So this has happened to me twice but both times, when returning to JFK from an international trip, there's a special line for US citizens only where they take your photo, and it will either say verified or not verified. If not verified you go for a passport check. If verified you proceed to baggage claim.
After it says verified, the officer says your name, so the photo matches to your name!
My question is: How do they know? During departure, they take your photo (which is optional and you can decline) and that photo is deleted 24 hours after departure. Or is it?