The court just has to weigh all the evidence. A lot of people have heard top-10 songs, so it would be hard to prove true independence. At an extreme though, if you could prove that somebody was perfectly isolated (e.g., if they had video evidence of not being exposed since that top-10 song was produced), a clean-room implementation from that individual would satisfy copyright law (mostly, give or take the as-of-yet mostly legally untouched minefield of deep-fakes). The only real question is where courts would draw a line between that kind of conclusive evidence and some random Joe pinky-swearing they produced the latest Taylor Swift hit in their garage and that it's accidentally kind of similar.