Last October news broke of allegations that University of California, Berkeley, astronomer Geoff Marcy had for years harassed female students. (Marcy, who denied some of the allegations, resigned.) The news reminded me of an experience I had in school. I admired an instructor and was honored when he took me out for a celebratory dinner near the end of the course. After walking me home, he put his arms around me, and alarm bells began to ring. When I rebuffed the advance, he complied, but later my grade changed from “outstanding” to “pass.” It was a painful lesson, and I never spoke about it to anyone.

I went on to complete my training in internal medicine and infectious diseases and embarked on a career as an HIV physician. I conducted research on virus-induced immunosuppression under the tutelage of two outstanding male professors. I felt supported by my mentors, usually men, who nurtured my clinical and research paths. But even as my career progressed, I observed that many of my female colleagues were disproportionately dropping out of academic medicine careers.

The statistics bore out my hunch. Although the percentage of doctorates awarded to women in life sciences increased from 15 to 52 percent between 1969 and 2009, only about a third of assistant professors and less than a fifth of full professors in biology-related fields in 2009 were female. Women make up only 15 percent of permanent department chairs in medical schools and barely 16 percent of medical school deans. The pipeline to leadership is leaking.

The problem is not only outright sexual harassment—it is a culture of exclusion and unconscious bias that leaves many women feeling demoralized, marginalized and unsure. In one study, science faculty were given identical résumés in which the names and genders of two applicants were swapped; both male and female faculty judged the male applicant to be more competent and offered him a higher salary.

Unconscious bias also appears in the form of “microassaults” that women scientists are forced to endure daily. This is the endless barrage of purportedly insignificant sexist jokes, insults and put-downs that accumulate over the years and undermine confidence and ambition. Each time it is assumed that the only woman in the lab group will play the role of recording secretary, each time a research plan becomes finalized in the men's lavatory between conference sessions, each time a woman is not invited to go out for a beer after the plenary lecture to talk shop, the damage is reinforced.

When I speak to groups of women scientists, I often ask them if they have ever been in a meeting where they made a recommendation, had it ignored, and then heard a man receive praise and support for making the same point a few minutes later. Each time the majority of women in the audience raise their hands. Microassaults are especially damaging when they come from a high school science teacher, college mentor, university dean or a member of the scientific elite who has been awarded a prestigious prize—the very people who should be inspiring and supporting the next generation of scientists.

If we are to achieve the full promise of science and medicine, we must use all the brainpower available to us by ensuring the full participation of women. We must reprimand blatant harassment, but we must do much more than that. We must change the culture of our organizations so that women feel the value they bring to science will be encouraged and celebrated.