Silicon Valley is a male-dominated industry, and big tech companies have spent lots of money trying to make it a more equitable place.

New research published this week by the National Bureau of Economic Research finds that the unconscious biases of teachers can cut off talented women in grade school, even before they have an opportunity to join the tech industry.

Israeli sixth-grade students were divided into groups where teachers knew the names and genders of some students and not others. Girls tended to outscore the boys when graded anonymously, which benefited their academic performance all the way through high school.

“It isn’t an issue of discrimination but of unconscious discouragement,” explained researcher Edith Sand, an economist at the Bank of Israel. “This discouragement, however, has implications. The track to computer science and engineering fields, which report some of the highest salaries, tapers off in elementary school.”

The research dovetails with the attempts by Google to combat gender discrimination through training in unconscious bias. Helping their employees become more conscious of these prejudices could make the search giant a more equal place for men and women.