I was under the impression that the polygraph didn't detect "lies" but, specifically, body functions. If someone's very nervous or very calm, doesn't that kinda defeat the whole thing ?
No. It doesn't respond directly to body functions, but to changes in body functions. So if you're very nervous at the start, but you get even more nervous when asked a question related to the incident in question, you will be flagged. If you're very nervous at the start, but are uniformly nervous throughout the interview, you will probably pass.
Now, you're right that someone with superhuman "nerves of steel" could almost certainly pass a polygraph by simply willing his body to display no signs of stress whatsoever. Such people appear to be relatively rare in the general population, as do the "nervous Nellies." As to whether or not you can be trained to become such a superman --- that was one of the issues that the NAS was concerned about.
