In identical language, the House and Senate bills explicitly prohibit the Trump administration from changing the formula used for decades to calculate and pay indirect costs.

“The administration’s proposal would radically change the nature of the federal government’s relationship with the research community, abandoning the government’s long-established responsibility for underwriting much of the nation’s research infrastructure, and jeopardizing biomedical research nationwide,” the Senate Appropriations Committee said in a report on its bill. The proposed cuts, it said, could not be made “without throwing research programs across the country into disarray.”

Just to make sure the message got through to the administration, Congress included the same prohibition in a stopgap spending bill that provides money to run the government through Dec. 8. President Trump on Friday signed the bill, which also suspends the debt limit and includes aid for victims of Hurricane Harvey and other disasters.

Tom Price, the secretary of health and human services, had argued for the proposed cuts, saying they would not harm research. “About 30 percent of the grant money that goes out is used for indirect expenses, which, as you know, means that that money goes for something other than the research that’s being done,” Mr. Price told the House Appropriations Committee in March.

But he won few converts.

“Indirect costs are very real costs,” said Dr. Landon S. King, the executive vice dean of the Johns Hopkins University School of Medicine, and “there is not another source to pay for them.”

The Senate bill provides a 29 percent increase in funds for research on Alzheimer’s disease, bringing the total to $1.8 billion for next year. The House bill provides a similar increase.

The Senate committee described Alzheimer’s as “the most expensive disease in America.’’ The nation spends nearly $260 billion a year caring for people with Alzheimer’s and other forms of dementia, with Medicare and Medicaid accounting for two-thirds of that amount, according to the Alzheimer’s Association.