I guess I'm generally going off of an interviewee's body language, which isn't entirely fair since I'm not a mind reader. And I'm sure I'm missing some cases of stage fright, which is why again I mentioned all the techniques above that I try to mitigate this, but I agree is a really unfortunate side-effect of the interview process that I don't have a fool-proof solution for.
Still, I do have some EQ. A lot of candidates exhibit visible anxiety and then get into a rhythm and calm down when they start coding. Or they visibly calm down once I start asking them questions about how they're thinking and coax them towards viable implementation. On the flip side, a lot of candidates actually exhibit overconfidence running in the wrong direction, which I try to lightly mitigate but can't prevent in all cases without giving an unfair advantage.