For years, feminists have lamented the sorry state of girls in math and science, as they lag behind their male peers in test scores and shy away from careers in engineering and technology. Yet perhaps the most frustrating recent development on the topic is that some of the very programs designed to help girls get ahead may be holding them back—or are simply misguided.

Take single-sex math and science classes. While they seem like a logical way to give girls a jump-start in these subjects, new research suggests this initiative—championed over the past two decades as a possible solution—may backfire.

In a study published last year, psychologist Howard Glasser at Bryn Mawr College examined teacher-student interaction in sex-segregated science classes. As it turned out, teachers behaved differently toward boys and girls in a way that gave boys an advantage in scientific thinking. While boys were encouraged to engage in back-and-forth questioning with the teacher and fellow students, girls had many fewer such experiences. They didn’t learn to argue in the same way as boys, and argument is key to scientific thinking. Glasser suggests that sex-segregated classrooms can construct differences between the sexes by giving them unequal experiences. Ominously, such differences can impact kids’ choices about future courses and careers.

It’s worth noting that the girls and boys in these science classes had similar grades, which masked the uneven dynamic. It was only when researchers reviewed videotapes of the lessons that they got a deeper analysis of what was actually going on, and what the kids were really learning.

Glasser’s research got a boost last September when the journal Science published a scathing report on the larger issue of single-sex education, titled “The Pseudoscience of Single-Sex Schooling.” In the article, eight leading psychologists and neuroscientists debunked research supporting single-sex education, and argued that sex segregation “increases gender stereotyping and legitimizes institutional sexism.”

Another misguided—or, mistimed—effort to improve girls’ performance is the “you can do it” messaging directed toward girls in middle school, the period when their scores start lagging. New research shows that even when preteen girls say they believe this message, “stereotype threat”—when negative cultural stereotypes affect a group’s behavior—has a dampening effect on their actual performance.

In a 2009 study, psychologist Pascal Huguet of France’s Aix-Marseille University found that middle-school girls scored highest on tests measuring visual-spatial abilities—which are key to success in engineering, chemistry, medicine, and architecture, fields that promise high-paying, prestigious jobs down the road—when they were led to believe that there were no gender differences on the tasks. Not surprisingly, when they were told that boys do better on these tasks, they did poorly. But curiously, when they were given no information, allowing cultural stereotypes to operate, they also did poorly. The stereotypes were already ingrained.

The authors discovered: by middle school it’s too little, too late.

To disarm stereotypes, we must actively arm girls against them—starting at a very young age. By first or second grade, both girls and boys have the notion that math is a “boy thing.” But a 2011 study by psychologist Anthony Greenwald of the University of Washington found that there’s a window of opportunity during these early years in which, while girls do see math largely as a male preserve, they haven’t yet made the connection that “because I am a girl, math is not for me.” During this short period, girls are relatively open to the idea that they can enjoy and do well at math.

One strategy? Researchers suggest we take gender out of the equation in teaching about occupations. Rather than saying “girls can be scientists,” we should talk about what scientists do, and ask girls and boys if these are things they would be good at and interested in doing. For example, kids may be especially interested to know that scientists study how the world around them really works. Psychologists Rebecca Bigler of the University of Texas at Austin and Lynn Liben at Penn State say that when girls are encouraged to think this way, they’re much more likely to retain what they’re taught than they would be if they were just given the generic “girls can do science” message.

Finally, while women teachers can lead the way for girls in math and science, acting as role models, parents should be on the lookout for teachers’ math anxiety. A 2010 study of first- and second-graders led by psychologist Sian L. Beilock at the University of Chicago found that girls may learn to fear math from their earliest instructors—and that female elementary-school teachers who lack confidence in their own math skills could be passing their anxiety along to their students. The more anxious teachers were about their own skills, the more likely their female students were to agree that "boys are good at math and girls are good at reading."

And according to Beilock, elementary-education majors at the college level have the highest math anxiety level of any major, and may be unwittingly passing along a virus of underachievement to girls.

But there may be a silver lining to this story for parents. Even if your daughter has a teacher with high math anxiety, it’s not inevitable that she’s going to experience problems with math—it turns out that parents (or others) can “vaccinate” girls against their teachers’ qualms. Beilock found that teachers’ anxiety alone didn’t do the damage. If girls already had a belief that “girls aren’t good at math,” their achievement suffered. But the girls who didn’t buy into that stereotype, who thought, of course I can be good at math, didn’t tumble into an achievement gulf.

Now that we have reason to believe that gender stereotyping starts much earlier than previously thought, we also need to accept that countering it requires more sophisticated approaches than those we now use. If girls continue to lag behind in STEM areas, our future economy and competitiveness could suffer. It’s critical that we start our efforts in the primary grades and look beyond the obvious to succeed.

If we look “under the hood” at what’s really going on with girls, instead of just skimming the surface, we can provide more than mere cosmetic solutions.