The House of Representatives overwhelmingly passed a measure last night that would give the Pentagon broad power to subject to lie detector tests more than 4 million military and civilian employes with access to classified information and would require polygraphs before granting the highest level clearances.

The measure, approved 333 to 71 as an amendment to the Defense Department authorization bill, would grant the Pentagon more authority to use the controversial device than officials there had sought.

Its passage reflects mounting congressional concern over the alleged Walker spy ring and follows calls from top Pentagon officials and others for increased use of lie detectors to uncover espionage.

The Senate has already passed a defense authorization bill that provides for a much more limited polygraph program. The two bills will have to be reconciled in a conference committee.

"Give our country some tools to battle the spies and the potential spies, the traitors and the potential traitors," the author of the amendment, Rep. C.W. Bill Young (R-Fla.) urged his colleagues.

Among those voting in favor of the amendment was Rep. Les Aspin (D-Wis.), chairman of the House Armed Services Committee, who earlier this month termed lie detector tests "basically not that reliable."

According to a recently declassified Defense Department report obtained yesterday by The Washington Post, polygraph tests have prompted at least nine persons holding or applying for sensitive government jobs in the last several years to admit that they had been recruited or agreed to spy for hostile foreign powers.

Three other applicants for highly sensitive intelligence jobs said that their girlfriends or members of their families were spies, according to the report.

Most of the individuals, some of whom had received the highest-level security clearances, were either job applicants or employes of the National Security Agency or the Central Intelligence Agency, Defense Department officials said.

In an interview last night after the vote on the amendment, Young attributed its wide margin of success to the mood of the Congress in the wake of the arrests of former Navy communications specialist John Anthony Walker Jr. and three other Navy men.

"There's no question the mood in Congress tonight was, 'Let's do something . . . to stop spying,' " Young said.

The amendment would permit the Pentagon to require those applying for or holding clearances to see classified information to submit to polygraphs. It would require lie detector tests before new clearances are issued to those with access to "special access information" and would allow random imposition of polygraphs on the roughly 140,000 persons already holding such clearances.

A similar measure backed by Senate Majority leader Robert J. Dole (R-Kan.) is pending in a Senate Armed Services subcommittee.

The House yesterday passed by voice vote an amendment calling on Defense Secretary Caspar W. Weinberger to study the desirability of reimposing the death penalty for espionage. An amendment permitting capital punishment for military personnel charged with espionage in peacetime is expected to come before the House today.

Currently, the Pentagon is conducting a test program in which it has congressional approval to administer 3,500 lie detector tests annually. About 300 of the tests, limited to those in the "special access" category, have been conducted under the program so far, defense officials said.

The CIA and the National Security Agency already have authority to require polygraph tests for job applicants and employes, Defense officials said.

Under a policy adopted this year, the Pentagon allows officials, for the first time, to deny certain positions to employes solely on the basis of their failure to pass a lie detector test.

The passage of the Young amendment came after the House beat back, by a vote of 281 to 121, a much weaker measure offered by Rep. Jack Brooks (D-Tex.). All but two Republicans voted against the Brooks measure, while Democrats divided evenly.

Like the Senate version of the authorization bill, his proposal would have continued the Defense Department's year-old pilot program for an additional year.

"There is no scientific basis for relying on the polygraph as a valid indicator of veracity," said Brooks, warning that innocent persons would be denied jobs while spies would remain undetected.

Congressional "hysteria to do something should not overwhelm our sound judgment," he said.

In Senate testimony yesterday, L. Britt Snider, director of counterintelligence and security policy for the Defense Department, said that regardless of what action Congress takes, the department cannot conduct more than 3,500 polygraph tests before Oct. 1, 1986. He said the department does not have nearly enough examiners and can't train new ones fast enough.

The validity and proper use of lie detector tests have been the subject of continuing controversy in the Reagan administration. The Pentagon has stepped up use of polygraphs for purposes such as uncovering sources of news leaks and conducting criminal investigations, and it has been pushing hard for several years to use lie detector tests for screening those seeking or holding security clearances.

The Defense Department report, prepared by a polygraph expert for the National Security Agency, describes a number of cases in which members of the U.S. military, applicants for sensitive intelligence jobs, or employes of U.S. intelligence agencies revealed espionage attempts after undergoing polygraph tests.

Two members of the U.S. military, one of whom was approved to see "sensitive compartmented information" -- the highest basic category of classified material -- admitted under questioning that they had turned over substantial numbers of secret documents to hostile foreign intelligence services, the report says.

Another individual, employed by a U.S. defense contractor, admitted that her former husband "was engaged in espionage against the United States" while holding "various positions with the U.S. government and with defense contractors," the report says.

Another person, a former member of the U.S. military applying for an intelligence job, "admitted he would sell classified information to a foreign power if it would guarantee him a comfortable living," according to the report.

Testifying in favor of polygraph tests as a screening device, the Pentagon's Snider told senators yesterday that "we have heard from several defectors" that the Soviet government warns its intelligence agents not to get in a position where they must take a polygraph test.

Convicted spy Christopher John Boyce has testified that Soviets told him they can teach agents how to beat lie detector tests. But John F. Donnelly, director of counterintelligence and investigative programs, testified yesterday that he does not believe that the Soviets "have given anyone that training."

The Defense Department's methods for detecting potential spies have come under strong criticism in recent weeks following the arrests of four accused Navy spies.

The Defense Department relies almost entirely on background checks and routine record checks to ensure the loyalty of employes and is far behind in its investigations.