SAFE: Finding Sparse and Flat Minima to Improve Pruning

Dongyeop Lee, Kwanhee Lee, Jinseok Chung, Namhoon Lee
6/7/2025
cs.LGcs.AI

No official code found. Best implementation: LOG-postech/safe-jax (13 stars, Apache-2.0, last commit 2026-04-03). 1 more below.

Abstract

Sparsifying neural networks often suffers from seemingly inevitable performance degradation, and it remains challenging to restore the original performance despite much recent progress. Motivated by recent studies in robust optimization, we aim to tackle this problem by finding subnetworks that are both sparse and flat at the same time. Specifically, we formulate pruning as a sparsity-constrained optimization problem where flatness is encouraged as an objective. We solve it explicitly via an augmented Lagrange dual approach and extend it further by proposing a generalized projection operation, resulting in novel pruning methods called SAFE and its extension, SAFE$^+$. Extensive evaluations on standard image classification and language modeling tasks reveal that SAFE consistently yields sparse networks with improved generalization performance, which compares competitively to well-established baselines. In addition, SAFE demonstrates resilience to noisy data, making it well-suited for real-world conditions.

View on arXivView PDF

Code Implementations(2)

Apache-2.0

[ICML 2025 Spotlight] Official JAX implementation of SAFE: Finding Sparse and Flat Minima to Improve Pruning

131Shell, PythonJul 16, 20256 months agoApache-2.0
MIT

[ICML 2025 Spotlight] Official PyTorch implementation of SAFE: Finding Sparse and Flat Minima to Improve Pruning

123Shell, PythonJul 15, 20251 years agoMIT

Similar Papers

Cite this paper

@article{lee2025safe,
  title  = {SAFE: Finding Sparse and Flat Minima to Improve Pruning},
  author = {Dongyeop Lee and Kwanhee Lee and Jinseok Chung and Namhoon Lee},
  year   = {2025},
  eprint = {2506.06866},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2506.06866v2},
  journal = {ICML 2025 2025}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2506.06866.svg)](https://codeofpaper.com/paper/2506.06866)

Discussion