Preheat the oven to 350°F (175°C).
Grease a 9-inch square baking pan and set aside.
In a medium bowl, whisk together flour, baking powder, and baking soda.
In a large bowl, use an electric mixer to cream together butter and granulated sugar until light and fluffy.
Beat in eggs one at a time, followed by vanilla bean paste.
Gradually mix in the flour mixture, then sour cream, until just combined.
In a separate bowl, mix together brown sugar, cinnamon, and chopped walnuts (if using).
Add the softened butter to the brown sugar mixture and mix until crumbly.
Pour half of the batter into the prepared pan, followed by half of the crumble mixture.
Repeat the layers, starting with the remaining batter and topping with the remaining crumble mixture.
Bake for 40-45 minutes, or until a toothpick inserted into the center comes out clean.
Remove from the oven and let cool in the pan for 10 minutes before transferring to a wire rack to cool completely.