The scientific community has lately been reminded that what it regards as freedom is actually a very long leash that's anchored back in Washington.

For example, the National Security Agency, the government's highly secret maker and breaker of codes, has elbowed the civilian National Science Foundation out of supporting a line of university-based computer research that may have revolutionary implications for cryptography. Some of the scientists performing this research have misgivings about their financial lifeline being taken over by a closed-door military agency. However, the science foundation, although big as a finacier of research, is a political pygmy on the Washington scene, and quietly got out of the way when the code agency expressed its interest.

Meanwhile, apart from that episode, the science foundation -- perhaps the most pristinely apolitical of all federal agencies -- has been enmeshed in an election-year tangle that combines politics, science and race.

When Director Richard C. Atkinson early this year told the president that he would resign July 1 for an academic post, the science-policy apparatus was instructed by the White House to replace him with a black -- which would be a first for the billion-dollar-a-year, 30-year-old agency. The post, with a statutory six-year appointment, was then offered to a highly qualified black, John B. Slaughter, an applied physicist who had served in the foundation as a high-leveled administrator before returning last year to Washington State University as a provost and academic vice president.

Slaughter initially declined the offer, but when the recruiters could come up with no other black they considered qualified for the job, Jimmy Carter telephoned the reluctant candidate and persuaded him to accept. The nomination was formally submitted July 3, and a confirmation hearing was held on Aug. 1. As of this writing, however, the appointment is in limbo, because Senate Republicans are balking at preelection confirmations for fixed-term presidential appointments.

The appointment became further entangled late in August when the Democratic majority on the Senate Labor and Human Resources Committee held a sneak meeting and voted to send the nomination to the floor, thus inflaming the Republican minority.

Slaughter, in the meantime, has prudently chosen to remain in Pullman, Wash., while this drama runs its course.

What should be noted is that the foundation is to the scientific community what the Fed is to the financial community -- a central institution of immense power and influence. Prior to the present impasse, the directorship was always considered to be apart from politics -- with one exception. That occured when President Richard Nixon exercised a last minute veto of his director-designate because the appointee was found to have opposed the anti-ballistic missile. When Nixon found that he had committed what scientists considered a sacrilege, he publicly apologized and withdrew his veto, although the candidate then chose to drop out.

Finally, despite shrill expressions of anger and despair from throughout the biomedical research community, the House has passed a bill that would require all 11 separate research components of the National Institutes of Health to undergo an annual legislative review, in addition to the usual budget examination. The measure is the handiwork of one of the House's fastest-rising young power-trippers, Rep. Henry Waxman (D-Calif.), who says that the annual view, which would be conducted by the subcommittee he chairs, is needed to ensure that NIH is doing its job properly. Waxman is actually a booster of NIH, and the screams from Grantland seem to have no basis beyond a preferance for retaining the comfy system of many years' standing. Despite intense lobbying by dozens of scientific and professional societies, Waxman's bill passed, 292 to 48.

These episodes invalidate the persistent myth that American scholarship has uniquely evaded the rule of he who plays the piper. Politics has, in fact, accorded a great deal of roaming room and money to academic inquiry. But the dual gift was inspired by the realization that the creature produces more that way, rather than by magnanimity or romantic affection for the value of learning. And, in instances where the managers of the political process have found it advantageous to violate the tacit concord with scholarship, there's simply no contest, as has been illustrated in recent weeks.

At the drop of an honorary degree, scientists and politicians alike will toast the independence of American science. What isn't talked about very much is that now and then, there's a hard yank on that long leash.