How do some institutions attract so many female computer scientists?
Carnegie Mellon gives an answer on their website:


  The steady climb of women enrolling in these fields at Carnegie Mellon highlights a combination of factors: a strong commitment by leaders at the university, college and department levels; influential pipeline programs for middle- and high-school students; targeted recruitment; closer scrutiny of applications; support and mentorship programs; and attention to diversifying the faculty.


A second, speculative answer:  Carnegie Mellon is wealthy.  Computer science is where they invest the most.  If they want to attract more women to their computer science department, they can use their money to do it.  Many of the factors they list cost money. They may be decreasing the diversity of other universities.