Mention the topic. "Hey, I'm interested in your experiences adjusting to this startup environment after being at Microsoft. Coffee?" "Hey, I noticed you worked a lot with the devops folks at (place) and I want to learn about that. Coffee?" "Hey, I saw this project you did up on github and I was wondering if you tried neural nets like you mentioned you would. Coffee?"
These signal that you know something about the person besides their gender, and indicate you might actually be interesting to talk to.
I have a feeling that would be ruined by a few men who who had more than professional intentions.
Besides, nearly this entire conversation is because of a few people. It only takes a single creepy guy in a group of 100 to ruin everybody's experience.
Yes, but this is the case in many spheres of life. For example, very few men attack women on the street. However, because I know that women are watching out for this, whenever I am going to be passing a woman on the street in an isolated neighborhood at night, I make sure to stay well away from her, don't look at her, and overall try to make sure that she doesn't think I'm one of those bad guys.
I would not use the phrase "go out." That sounds like a date. I would find some other means to signal that this is professional. As others are saying, inviting someone to grab a coffee in the break room is much less likely to sound like romantic interest than saying something like "go out for coffee."
"Hey would you like to go out for coffee professionally?"