I do maths at Oxford (with both pure and Quantum modules). I'm pretty atypical as regards gender (I'm also a Navy cadet), but have never really noticed the imbalance on my course as an issue to be honest. There's a slightly odd statistic at Oxford in that girls tend to go there over Cambridge, so perhaps that's led to the skewed figures.
I agree change has to happen early on. I was lucky in that my Mum taught me, but most mathematicians I know have been heading that way from a young age. I'm not closed-minded to the possibility that there are genetic gender factors, but I do think there's a lot of social factors too.
You'll be pleased to hear I'm totally opposed to female only scholarships and other forms of higher level social engineering.
There is an element of girls choosing Oxford over Cambridge, usually to avoid the risk of STEP. And yes, the Cambridge course is harder (as much as I hate to admit it
). I may also have estimated wrongly. To be honest, I never really take note of gender.
I went on the UKMT summer school and there were 5 girls to 30 boys, so I'm not denying there's a massive imbalance at the top end.
There are a lot of possibilities. As above, I'm not closed-minded to the possibility that there are genetic gender factors. Certainly as regards the very top I can imagine boys are far more ambitious and competitive, and perhaps they're more mathematically 'genius' capable. However, I do think there are a lot of social factors too, even now - give it a hundred years and we'll find out for sure.
There are enough women near the top (many of my lecturers, plus historic figures such as Emmy Noether and Sophie Germaine) for me not to be too worried. If the very elite are male, I have no problem with that, so long as any individual is allowed to contribute what they can.
I haven't really answered your question, but the truth is I have no idea. Just thought I'd contribute random personal experience.