The US banking sector is "stabilizing" after the recent failures of Silicon Valley Bank (SVB) and Signature Bank rattled the industry, Treasury Secretary Janet Yellen will tell a summit Tuesday, according to prepared remarks.

The collapses caused a crisis of confidence, with many customers of similarly sized banks withdrawing their money and depositing it into bigger institutions -- considered too big for the government not to bail them out if they faced failure.

But "aggregate deposit outflows from regional banks have stabilized" following authorities' moves to shore up confidence and stem contagion, according to Yellen's remarks.

"Our intervention was necessary to protect the broader US banking system," she will say in a speech to the American Bankers Association's Washington DC summit.

"And similar actions could be warranted if smaller institutions suffer deposit runs that pose the risk of contagion," she added.

After SVB's collapse, the Treasury, Federal Reserve and Federal Deposit Insurance Corporation set out plans to ensure its customers would be able to access their deposits. A similar exception was announced for Signature Bank.

The Fed also introduced a new lending tool for banks in an effort to prevent a repeat of SVB's quick demise.

"I believe that our actions reduced the risk of further bank failures," according to Yellen's remarks.