Reliance on lie detectors to stop leaks would play into the hands of Soviet "moles" trying to work their way into the Pentagon, the Defense Department's health director said in his sharpest attack on the Reagan administration's proposal to widen use of polygraphs among government employes.

"The polygraph endangers national security" rather than protects it because Soviet spies know how to beat the tests designed to determine whether a person is lying, wrote Dr. John F. Beary III, acting assistant secretary of defense for health affairs, in an internal memorandum obtained by The Washington Post yesterday.

"I am told the Soviets have a training school in an eastern bloc country where they teach their agents how to beat the polygraph," said Beary in his memo, the authenticity of which the Pentagon confirmed.

"Because many of our Department of Defense managers think it works," said Beary of the polygraph, "they get a false sense of security, thus making it easier for a Soviet mole who passes the polygraph to penetrate the Pentagon."

Beary's latest polygraph memo--he has written several others, some of which also have become public--is expected to raise new questions in the CIA, Defense Intelligence Agency, National Security Agency and other government offices where workers are required to take lie detector tests to obtain access to highly sensitive information.

Beary, a medical doctor in the Pentagon's top health administration post, said he had reviewed the NSA study saying that lie detector tests are 97.7 percent accurate and found it inaccurate.

"In all candor," he said of the author, "he does not seem to be very well trained in science."

In other parts of his memo, dated Aug. 10, Beary said:

* The polygraph "does not work. The hypothesis of the polygraph/lie detector is scientifically unsound. There is no physiologic response unique to the cognitive state of lying. No psychophysiologist has been able to identify such a unique response to us despite an additional nine-month search" into the reliability of polygraphs.

* Soviet agents are trained "how to beat the polygraph . . . . One could reasonably ask at this juncture, why has Washington been bamboozled by the polygraph community for over 20 years? I can only speculate that it may have something to do with the poor state of science education in the United States as mentioned in the National Report on on released in April."

* Using the polygraph endangers department morale because it gives so many inaccuratph misclassifies 30 percent to 50 percent of innocent people as liars in field tests. This is bound to cause s's careers are affected by this device. I suspect the proposed policy will stimulate a flurry of lawsuits, mos Defense will lose because of the unsound science underlying the policy."

"It is important to realize tha excitement detector, not a lie detector . . . . The only application for the polygraph which may have some meedge test,' " which would show knowledge of an event, but not necessarily involvement in it.

Retired Army Gputy undersecretary of defense for policy, said in defending a draft Pentagon directive to widen use of lie dective was to provide "greater assurance" that defense employes in sensitive positions "are not spying for a hoDefense Secretary Caspar W. Weinberger at his news conference on Thursday sidestepped a question as to what faith, as a lawyer, he had in the polygraph. Weinberger said "to the best of my knowledge no one has ever taken a lie detector test unless they agreed to take one" at the Pentagon, adding that "there's no suggestion" that the test will be forced on anyone in the future.

The pending fiscal 1984 defense authorization bill would forbid the Pentagon from widening lie detector tests as envisoned in the draft directive. President Reagan issued a directive March 11 making lie detector tests a condition for federal employes to hold certain sensitive positions.