Cosine similarity is unable to differentiate between these two cases, assigning a high score to both these pairs, causing both of them to be labeled positive.
balAPinc with sparse representations teases them apart by giving a high score to the first pair and a low score to the second.