The French government announced today that it had ordered the expulsion of four Soviet diplomats following judicial investigations that have resulted in the arrest of a retired French warrant officer.

Officials described the diplomats, who left Paris over the weekend, as members of the Soviet military intelligence organization known as GRU. Press reports here speculated that they were interested in gathering information about the French nuclear submarine base near the city of Brest in Brittany.

The Foreign Ministry said later that the Soviet Union had told four French diplomats to leave. "The French government deplores this measure, which is totally unjustified," it said.

These expulsions come at a time when relations between France and the Soviet Union have been improving after a visit here by Kremlin leader Mikhail Gorbachev last October. French President Francois Mitterrand has accepted an invitation to visit Moscow later this year.

The French government also announced that it was suspending a Franco-Soviet agreement on maritime cooperation which, it is believed here, had facilitated Soviet gathering of intelligence in French ports. French officials have complained about the suspiciously large numbers of Soviet ships in French waters.

French intelligence sources indicated that the latest expulsions were linked to the arrest of a retired Air Force warrant officer, Bernard Sourisseau, who was charged last month with spying for the Soviet Union. A former helicopter technician, Sourisseau is alleged to have made regular trips to French naval installations in Brittany as well as to have paid several visits to Libya, for reasons which have not yet been disclosed.

Denying the allegations of spying, a Soviet Embassy spokesman in Paris described the French government action as "unfriendly" and "provocative."

A total of 53 Soviet citizens have been expelled by France since April 1983, when the Socialist government ordered 47 Soviet diplomats and journalists to leave. According to a recent book on Soviet espionage activities here, "The KGB in France," those expelled in 1983 were identified as spies by a Soviet intelligence official who gave valuable information voluntarily to the French.

Author Thierry Wolton said the Soviet officer, who was code-named "Farewell," provided French intelligence with more than 4,000 documents on Soviet technological and scientific espionage over an 18-month period beginning in 1981. He ceased providing information at the end of 1982 and, according to Wolton, is now believed to be dead.

According to Wolton, whose research has been described as generally accurate by French officials, France passed on details provided by "Farewell" to the United States.