BART issues a helpful poster explaining to women how to conduct themselves so they won't be harassed. Apart from the ubiquitous victim-blaming, note "Don't get distracted, phones, music, and sleeping can make you a target."
Many, many women use earbuds to deter creepers. It doesn't always work, but it cuts back on people assuming you're available for conversation.
I'd love to live in the universe where BART and others put up posters telling passengers how to defend other passengers against creepers.