Cook the spaghetti according to package instructions until al dente, then drain and set aside.
Peel and chop the onion and garlic finely.
Remove cauliflower leaves and separate into florets; discard tough core. Pulse the raw florets in a food processor until a minced, rice-like texture forms.
Pulse the walnuts in the food processor until coarsely minced; do not over-process into a paste.
Heat the olive oil in a non-stick frying pan over medium heat. Add the chopped onion and garlic and sauté 2–3 minutes until soft and translucent.
Add the minced cauliflower to the pan and cook 3–4 minutes, stirring occasionally.
Add the minced walnuts and cook another 3–4 minutes, stirring occasionally, until slightly toasted and combined.
Stir in the sieved tomato puree, sweet paprika, oregano, basil, and salt and black pepper to taste. Simmer the mixture 4–5 minutes until flavors meld.
Stir in the vegan alfredo sauce, if using, and cook briefly until heated through and creamy.
Toss the cooked spaghetti with the cauliflower–walnut sauce, serve, and sprinkle with vegan Parmesan if desired.