The Senate refused yesterday to break a filibuster against a Democratic bill to overhaul financing of congressional campaigns, but leaders of both parties expressed optimism that a compromise can be reached to curb interest-group influence in elections and to limit campaign spending.

Although the 52-to-47 vote in favor of curtailing the filibuster fell eight votes short of invoking cloture, Majority Leader Robert C. Byrd (D-W.Va.) and Minority Leader Robert J. Dole (R-Kan.) agreed that there is a "willingness to come together," as Dole put it.

"I have every confidence that we will find a way to create {the necessary majority} in due time," said Byrd, speaking of the Senate's curious kind of mating dance in which the two parties often prance around and posture at some length before getting down to the real business of legislative match-making.

Sen. David L. Boren (D-Okla.), who, with Byrd, is sponsoring the measure, said the vote signaled that a majority of the Senate wants to curb campaign spending excesses and will provide "bargaining leverage" for an eventual compromise.

The balloting, in which only two Republicans -- Sens. John H. Chafee (R.I.) and Robert T. Stafford (Vt.) -- joined most Democrats in voting to curtain a week-long GOP-led filibuster against the bill, also indicated that the final compromise will have to be bipartisan, Boren said. "It has to be bipartisan to get over the hump" of 60 votes necessary to shut off a filibuster, he said.

As introduced, the bill would provide public funds to finance Senate campaigns of candidates who agree to spending limits and impose restrictions on contributions that both Senate and House candidates may accept from political action committees (PACs).

Republicans object in particular to the spending limits and public financing for Senate campaigns. Democrats, insisting that some curbs are necessary on overall campaign spending, latched onto the inducement of public financing as a way of meeting the Supreme Court's insistence that any spending limits be voluntary.

As a possible area of compromise, Boren suggested a "bundle of carrots" that could include inducements other than public financing, such as advertising disclaimers for candidates who meet certain conditions for spending restraint. Republicans also indicated other possible areas of compromise, such as limits on PAC contributions to political parties, that they had originally excluded from their own campaign-financing proposals.

While Byrd vowed to push the bill until it passes, he and others indicated that behind-the-scenes efforts are under way to work out an accord. Dole said Republicans will caucus today to help the process along.