Congress is expected to vote soon on legislation that would make major changes in the Veterans Administration's home loan guaranty program, which has helped more than 12 million military veterans buy houses since its inception 40 years ago.

A bill passed by the House, and similar legislation approved by the Senate Veterans Affairs Committee, would increase the size of loans the VA could guarantee and would establish ways to reduce the high rate of foreclosures on veterans' homes. Both measures would reduce the cost of veterans' liability and the VA's losses when foreclosures take place.

The Senate bill will be composed of housing provisions that now are in the larger veterans' benefits measure. The committee expects to move the housing provisions into a separate measure and send it to the Senate floor within a couple weeks, according to a committee staff member.

The VA could guarantee loans up to $40,000 or 40 percent of the loan amount, whichever is less, under the House bill. The law now sets these figures at $27,500 and 60 percent.

The Senate measure would increase the guaranty amount to the lesser of $36,000 or 60 percent of the loan. The guaranty was last increased in 1980, when the maximum was set at $27,500. Since then, the median price of an existing home has gone up by more than 30 percent, according to the National Association of Home Builders.

Chances for Senate passage of the legislation are considered good.

The fee of 1 percent of the mortgage that veterans must pay to obtain a loan would be frozen for two years by both the Senate and House measures, a move to thwart Reagan administration attempts to increase it. The administration several times has proposed increases in this fee and others in the Federal Housing Administration's mortgage insurance program.

The Senate and House bills extend for two years the formula used to decide whether the VA will buy property at foreclosure and resell it later to recoup its loss, or pay the mortgage lender the guaranty amount and leave the house with the bank or savings and loan.

Regulations on how loans can be assumed by buyers when veterans sell their homes would be tightened to prevent abuse and fraud that has taken place in the past, and protect veterans from liability in such cases. Another measure proposed in the Senate and House bills would eliminate restrictions that prevent veterans from reducing their monthly payments by refinancing mortgages when interest rates go down.

The Senate bill would require the VA to counsel veterans who are three months behind in their mortgage payments on ways to avoid foreclosure, and the House measure provides more tangible help when a veteran is about to default through no fault of his or her own. The VA would be authorized to lend the veteran up to $8,400 to help stave off foreclosure.

Loan defaults and foreclosures on GI homes have shot up during this decade. Many of the defaults and foreclosures have been on loans made from 1982 to 1984, when interest rates were high, according to a General Accounting Office report delivered to Congress in June. The VA can offer vets three types of financial assistance but routinely tells them about only one, in which the agency tries to persuade the lender to reduce the loan's interest rate, the GAO said.

None of seven VA offices GAO surveyed "voluntarily notified veterans" about the other kinds of help available. Under one method, the VA can take over the mortgage from the lender and have the veteran make payments to the agency. This saves the agency $14,400 per property in foreclosure costs, but the VA employed the tactic in only one of every 129 mortgage foreclosures during fiscal year 1986, the GAO said.

Another option is to provide financial help so that a defaulting veteran can sell his property, thus saving the VA foreclosure costs. The report said GAO investigators were told by the VA's assistant director for loan management that veterans are not informed of these options because they might not try to solve their difficulties by reaching repayment agreements with mortgage lenders.

The Senate bill would override state laws that prohibit a veteran and the VA from avoiding foreclosure costs by permitting the veteran to voluntarily deed his property to the government.

Under this provision, the veteran would still be liable for the balance of the loan after the value of the house is deducted. If the VA refuses to accept the voluntary deed in lieu of foreclosure, the agency would not be allowed to add the foreclosure cost to the veteran's liability to the government.

Under another provision in the Senate bill, veterans who buy mobile homes would have to make down payments of 5 percent of the loan amount starting Jan. 1, 1988. This measure is designed to reduce the high default rate -- 16 percent -- on VA-guaranteed mobile home loans in recent years.