Papers › SAFE: Finding Sparse and Flat Minima to Improve Pruning

SAFE: Finding Sparse and Flat Minima to Improve Pruning

7 Jun 2025arXiv:2506.06866archive 2025-07-28

Dongyeop Lee, Kwanhee Lee, Jinseok Chung, Namhoon Lee

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.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2506.06866")

Code

Syntology Ran 10 of 18 code samples harvested from 2 repositories linked to this paper; 8 have no recorded run. Of those that ran: 5 ran · our draft was wrong; 5 ran with no contract checked.

By repository: official repository: 18 samples from 2 repositories, 10 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

LOG-postech/safe-torch officialmentioned on GitHubpytorch report
log-postech/safe-jax officialmentioned on GitHubjax report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

18 samples harvested; 10 ran; 0 honoured the contract we drafted; 8 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

5ran · our draft was wrong
5ran
8unverified

Licence: 0 of the 18 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

SAFEState log-postech/safe-jax/sparsify/safe.py official repository ran · metamorphic tier: deterministic Apache-2.0 (permissive) · 9e8f2bae04b225dd · report
TensorData LOG-postech/safe-torch/language/lib/prune.py official repository ran · metamorphic tier: deterministic fingerprinted MIT (permissive) · fd586c59f72d66ff · report
TensorDataLoader LOG-postech/safe-torch/language/lib/prune.py official repository ran MIT (permissive) · b399ee426cead852 · report
WrappedGPT LOG-postech/safe-torch/language/lib/prune.py official repository ran MIT (permissive) · c5a1e00bdf2e981f · report
compute_mask log-postech/safe-jax/sparsify/safe.py official repository ran · our draft was wrong Apache-2.0 (permissive) · 9c8aa55ec9a22c0c · report
find_layers LOG-postech/safe-torch/language/lib/prune.py official repository ran · our draft was wrong MIT (permissive) · 6644b68819429769 · report
only_weights log-postech/safe-jax/sparsify/safe.py official repository ran · our draft was wrong Apache-2.0 (permissive) · 17c71a4396facf51 · report
projection log-postech/safe-jax/sparsify/safe.py official repository ran · our draft was wrong Apache-2.0 (permissive) · 5ce6dac896cdfdbd · report
projection LOG-postech/safe-torch/language/lib/prune.py official repository ran MIT (permissive) · f2be2a9f4b2b8076 · report
safe log-postech/safe-jax/sparsify/safe.py official repository ran · our draft was wrong Apache-2.0 (permissive) · 5c2d5462f95decf7 · report
SAFE LOG-postech/safe-torch/language/lib/prune.py official repository unverified MIT (permissive) · b68d0d9cbeb82b3c · report
SAM LOG-postech/safe-torch/language/lib/prune.py official repository unverified MIT (permissive) · e75a622bc571e165 · report
TokenizerWrapper LOG-postech/safe-torch/language/lib/prune.py official repository unverified MIT (permissive) · dab11c061575d561 · report
get_c4 LOG-postech/safe-torch/language/lib/prune.py official repository unverified MIT (permissive) · d53a6dae4f8104ea · report
get_loaders LOG-postech/safe-torch/language/lib/prune.py official repository unverified MIT (permissive) · d6ccfa34fac6df39 · report
get_wikitext2 LOG-postech/safe-torch/language/lib/prune.py official repository unverified MIT (permissive) · 041beaad3085295f · report
prepare_calibration_input LOG-postech/safe-torch/language/lib/prune.py official repository unverified MIT (permissive) · c9b68ea3948eb9de · report
prune_safe LOG-postech/safe-torch/language/lib/prune.py official repository unverified MIT (permissive) · 5b1ee320f0a5541e · report

Tasks

Image ClassificationLanguage ModelingLanguage Modellingimage-classification

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Pruning

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections