Preheat oven to 180C. Line a 20cm-square brownie tin or cake tin with baking paper. Roast walnuts on an oven tray until golden brown and fragrant (8-12 minutes), cool briefly, then discard loose skin and finely chop half the walnuts (not too fine) and coarsely chop remaining.
Beat sugar and oil in an electric mixer until combined well (4-5 minutes). Meanwhile, sift flour and spice into a bowl with a pinch of salt, stir in walnuts and set aside. Add banana and yolks to sugar mixture, beat to combine, then stir in dry ingredients. Pour mixture into prepared tin, spread evenly to the edges, smooth top and bake in centre of oven until golden brown and cake springs back when gently pressed (30-35 minutes). Cool briefly in tin, then turn out to cool completely (1-1½ hours).
For mascarpone frosting, whisk ingredients in an electric mixer until soft peaks form (1-2 minutes). Just before serving spread frosting over the cake with a small spatula or palette knife, slice and serve. Slice will keep unfrosted and sealed in an airtight container for 1-2 days.