Came across an article by Jean Yang that talks about the collaboration problem that crops up when female comsci students collaborate with men in psets. Related: Her subsequent post about how professors can address the problem.
I think the effect is lessened if the group is larger and gender-balanced, and if the women are viewed as competent individuals rather than potential mates. The latter has some awkward implications: should you, as a woman, signal that you’re ‘one of the guys’, in order to be accepted into the tribe? Related: this post