The best way to beat a lie detector test is not to take even take it.... In the US you can not be forced to take a lie detector test under any circumstances... Lie detectors work by detecting changes...
It's nearly impossible nowadays unless you are a true Sociopath. In it's infancy, polygraph tests were able to be fooled by people with good control of their breathing , heart rate etc, like a master...