Papers › M-FAC: Efficient Matrix-Free Approximations of Second-Order Information

M-FAC: Efficient Matrix-Free Approximations of Second-Order Information

7 Jul 2021NeurIPS 2021 12arXiv:2107.03356archive 2025-07-28

Elias Frantar, Eldar Kurtic, Dan Alistarh

Efficiently approximating local curvature information of the loss function is a key tool for optimization and compression of deep neural networks. Yet, most existing methods to approximate second-order information have high computational or storage costs, which can limit their practicality. In this work, we investigate matrix-free, linear-time approaches for estimating Inverse-Hessian Vector Products (IHVPs) for the case when the Hessian can be approximated as a sum of rank-one matrices, as in the classic approximation of the Hessian by the empirical Fisher matrix. We propose two new algorithms as part of a framework called M-FAC: the first algorithm is tailored towards network compression and can compute the IHVP for dimension d, if the Hessian is given as a sum of m rank-one matrices, using O(dm²) precomputation, O(dm) cost for computing the IHVP, and query cost O(m) for any single element of the inverse Hessian. The second algorithm targets an optimization setting, where we wish to compute the product between the inverse Hessian, estimated over a sliding window of optimization steps, and a given gradient direction, as required for preconditioned SGD. We give an algorithm with cost O(dm + m²) for computing the IHVP and O(dm + m³) for adding or removing any gradient from the sliding window. These two algorithms yield state-of-the-art results for network pruning and optimization with lower computational overhead relative to existing second-order methods. Implementations are available at [9] and [17].

PaperPDFConference PDFCodeCode 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="2107.03356")

Code

Syntology Ran 7 of 14 code samples harvested from 2 repositories linked to this paper; 7 have no recorded run. Of those that ran: 4 ran · honoured contract; 3 ran · our draft was wrong.

By repository: official repository: 6 samples from 1 repository, 4 ran; community (archive-listed): 8 samples from 1 repository, 3 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

IST-DASLab/M-FAC officialmentioned in papermentioned on GitHubpytorch report
ist-daslab/efcp mentioned 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

14 samples harvested; 7 ran; 4 honoured the contract we drafted; 7 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.

4ran · honoured contract
3ran · our draft was wrong
7unverified

Licence: 0 of the 14 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.

batch_mvp IST-DASLab/M-FAC/prun.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · 8050b1947cc48db8 · report
batch_vmp IST-DASLab/M-FAC/prun.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · 19650f5d1f338d8a · report
batch_dot IST-DASLab/M-FAC/prun.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · 87ccd31d3ec472fd · report
test IST-DASLab/M-FAC/main_optim.py official repository ran · honoured contract MIT (permissive) · c1bbbadad5c3cdcf · report
HInvFastUpMulti IST-DASLab/M-FAC/optim.py official repository unverified MIT (permissive) · 289ba747a6543b4b · report
MFAC IST-DASLab/M-FAC/optim.py official repository unverified MIT (permissive) · dadfb3e97237d010 · report
get_gradients ist-daslab/efcp/optimizers/dense/MFAC.py community (archive-listed) ran · honoured contract Apache-2.0 (permissive) · 3cb7ad181b8a381b · report
get_weights ist-daslab/efcp/optimizers/dense/MFAC.py community (archive-listed) ran · honoured contract Apache-2.0 (permissive) · d0a95782e972077b · report
norm ist-daslab/efcp/optimizers/dense/MFAC.py community (archive-listed) ran · honoured contract fingerprinted Apache-2.0 (permissive) · 79cfb98e536acac6 · report
DenseMFAC ist-daslab/efcp/optimizers/dense/MFAC.py community (archive-listed) unverified Apache-2.0 (permissive) · 7290388bb1e94558 · report
HInvFastUpMulti ist-daslab/efcp/optimizers/dense/MFAC.py community (archive-listed) unverified Apache-2.0 (permissive) · 80db31a3a92821b5 · report
get_first_device ist-daslab/efcp/optimizers/dense/MFAC.py community (archive-listed) unverified Apache-2.0 (permissive) · 1f9104c9660aeb24 · report
get_gpus ist-daslab/efcp/optimizers/dense/MFAC.py community (archive-listed) unverified Apache-2.0 (permissive) · 08f4dde70db58de8 · report
update_model ist-daslab/efcp/optimizers/dense/MFAC.py community (archive-listed) unverified Apache-2.0 (permissive) · c2dc9537f5e560fa · report

Tasks

Network PruningSecond-order methods

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

PruningSGD

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