You didn’t plan to have Katy Perry stuck in your head all day. It just happened, and now you’re a prisoner in your own treacherous, pop music–blasting mind. Never fear: We have answers. A study published today in the journal Psychology of Aesthetics, Creativity and the Arts [PDF] identifies the features that transform certain songs into earworms—and even offers tips for their extraction.

Scientists call this experience involuntary musical imagery, or INMI. Previous studies have suggested certain traits [PDF] that make a song ideal INMI fodder. First, it’s familiar; songs we’ve heard many times before are the ones most likely to jam in our brains. Second, it’s sing-able. So far, that’s really all we know. But researchers remain on the case.

In 2012, researchers in Finland and the UK conducted simultaneous surveys inviting their compatriots to complain about the songs that haunted them the most. The latter survey, called The Earwormery, amassed responses from 5989 disgruntled Brits. It was conducted by researchers from Goldsmiths, University of London, four of whom are co-authors on the current study.

For the current study, they pulled the responses of 3000 of those respondents and analyzed them for trends. They then identified 100 of the worst offenders and sorted them based on 83 different musical parameters, including length, melody, pitch range, and commercial success.

The songs most commonly found wiggling around in British brains had quite a few things in common. They were typically pretty fast pop songs, and their melodies were fairly generic, yet each one had a little something, like an unusual tonal interval or a repetition, that set it apart from others on the charts and made it stickier.

The top 9 list of wormiest tracks revealed a couple of other trends. See if you can spot them here:

1. “Bad Romance,” Lady Gaga

2. “Can’t Get You Out of My Head,” Kylie Minogue

3. “Don’t Stop Believing,” Journey

4. “Somebody That I Used to Know,” Gotye

5. “Moves Like Jagger,” Maroon 5

6. “California Gurls,” Katy Perry

7. “Bohemian Rhapsody,” Queen

8. “Alejandro,” Lady Gaga

9. “Poker Face,” Lady Gaga

Only one of those artists is even British—and three of them are Lady Gaga.

These results are specific to UK survey respondents, as are the musical qualities that inspired them. It's probable that stickiness is cultural; what's sticky in Mozambique may glide in one Japanese person's ear and out the other, and vice versa.

The researchers say their research could be beneficial for those in music-related industries. "You can, to some extent, predict which songs are going to get stuck in people's heads based on the song's melodic content,” lead author Kelly Jakubowski, a music psychologist at Goldsmiths, University of London, said in a statement. “This could help aspiring songwriters or advertisers write a jingle everyone will remember for days or months afterwards.”

Still, we’re not completely helpless. The researchers offer three tips for extracting an earworm. First, just give in. Listening to the song the entire way through can help get it out of your head. Second, find a musical antidote. The British survey respondents listed “God Save the Queen” as the best way to shake an earworm, but we’d like to recommend James Brown’s "Get Up (I Feel Like Being a) Sex Machine.” (Trust us. It works.)

Finally, stop worrying about it. Like a little splinter or an errant eyelash, that Lady Gaga will likely work its way out all on its own.