Skip to main content
Back

Northeastern Researchers Show Deleting 10% of Weights Beats Full Fine-Tuning

A new post fine-tuning method learns binary masks on frozen LLM weights, squeezing extra performance from already-tuned models without updating a single parameter.

Pro

Paper, Full Access
  • Mask Fine-Tuning freezes a fully fine-tuned LLM and learns a binary mask that zeroes ~10% of weights.
  • Improves IFEval by +2.70 on LLaMA2-7B and +4.15 on LLaMA3.1-8B on average.
  • Beats continued FFT, LoRA, random masking, and L1 masking across math, coding, and instruction domains.
  • Uses straight-through gradient estimator with per-weight learnable scores and top-K selection.
  • Loss landscape analysis shows MFT lands in flatter, better-generalizing minima than FFT.
  • Limitations: needs per-domain layer selection, only tested on SFT, no code release yet.

A common assumption in LLM training is that every parameter earned its place. You pre-train, you fine-tune, and the resulting weight matrix is treated as sacred. Continue training past the optimum and you overfit. Prune weights and you lose capability. A new paper from researchers at Northeastern University challenges that assumption by asking a strange question: what if some of the weights in your best fine-tuned model are actively hurting it?

Their answer is Mask Fine-Tuning (MFT), a technique that freezes a fully fine-tuned model and learns a binary mask that zeroes out roughly 10% of its weights. No weight is ever updated. Yet across math, coding, and instruction following benchmarks, the masked model consistently beats the fully fine-tuned checkpoint it started from.

When more training makes things worse

The setup is a familiar pain point. Full fine-tuning (FFT) optimizes all model parameters simultaneously and generally yields the most competitive performance, but push it too far and the model overfits. LoRA and other parameter-efficient methods reduce cost but usually cap out below FFT. Once you have your best FFT checkpoint, the conventional playbook says you are done.

The authors frame the question bluntly: is structural integrity indispensable for good model performance, or is there potential to further improve the model by removing certain components that break the structural integrity? Their empirical answer is that carefully chosen deletions help.

How the masking actually works

MFT starts from an already-fully-fine-tuned model with parameters frozen. It then attaches a learnable importance score to each weight in a selected group of transformer layers. During training, the top-K% highest-scoring weights are kept and the rest are masked to zero via an indicator function. Because that indicator is non-differentiable, gradients flow through it using the straight-through gradient estimator, where the indicator is regarded as an identity function during the gradient backwards step.

The training objective and dataset are identical to standard supervised fine-tuning. The only thing being learned is which weights to switch off. In pseudocode the core idea looks like:

frozen_W = fft_checkpoint.weights  # never updated
scores   = nn.Parameter(torch.randn_like(frozen_W))
def forward(x):
    mask = top_k_percent(scores, k=0.10)   # binary
    W_eff = frozen_W * mask                # element-wise
    return linear(x, W_eff)

A proof-of-concept sweep showed that masking is not equally useful everywhere. Grouping layers four at a time and sliding through the network revealed that shallow (0-7) and mid-to-rear (20-27) partitions often respond positively to MFT than other parts. Smaller groups worked better than larger ones. The final recipe uses a fixed 10% sparsity applied to a single four-layer block chosen per domain.

Line graphs comparing MFT, FFT, and best MFT performance across mask sparsity ratios

The numbers

Two backbones, LLaMA2-7B and LLaMA3.1-8B, were tested across GSM8K, MATH, HumanEval, HumanEval+, IF-Eval, and AlpacaEval 2.0. In every configuration MFT improved on the best FFT checkpoint, while continued FFT usually made things worse. On LLaMA3.1-8B under domain-specific fine-tuning:

  • IF-Eval: 59.6 to 65.6 (+6.0)
  • HumanEval: 51.0 to 53.5 (+2.5)
  • HumanEval+: 44.9 to 46.8 (+1.9)
  • AlpacaEval: 11.9 to 13.7 (+1.8)
  • MATH: 24.2 to 24.8 (+0.6)

Two vanilla baselines, random masking and L1-magnitude masking, mostly hurt performance, which rules out the trivial explanation that any sparsity would do. Continued FFT, run for the same additional epochs, consistently regressed. On LLaMA2-7B mixed-domain FFT for example, continued FFT dropped HumanEval by 8.6 points, while MFT gained 1.8 on the same setup.

Why the loss landscape gets flatter

The paper offers both an empirical and a theoretical account. Visualizing the loss surface around each checkpoint shows the MFT solution sitting in a flatter basin than the FFT starting point. The authors back this up with a projection argument: because the masked model is a coordinate projection of the FFT model, the maximum eigenvalue and trace of its Hessian can only decrease. Lower sharpness generally correlates with better generalization, which lines up with the benchmark gains.

Loss landscape contour plots comparing FFT and MFT trajectories

They also apply a PAC-Bayes style bound and show numerically that both the training loss term and the model complexity term move in the right direction for MFT relative to FFT.

Cost, caveats, and what it is not

MFT is cheap. Because weights are frozen and only a small mask is trained on a handful of layers, GPU memory usage is lower than continued FFT and only slightly higher than LoRA. Typical runs add around two extra epochs on top of the FFT checkpoint.

The limits are worth naming clearly:

  • The best mask sparsity is not universal. 10% works for coding but is suboptimal for instruction following, where smaller ratios do better.
  • Choosing which layers to mask still requires a per-domain sweep, though the sensitive bands are consistent within a backbone.
  • An initial global masking variant, which learns the sparsity ratio automatically, helped on LLaMA2 but hurt on LLaMA3.1.
  • Only supervised fine-tuning was studied. DPO and PPO style preference tuning are left for future work.
  • Cross-domain evaluations show that a math-tuned MFT model still degrades on coding and instruction, so this is not a free capability boost, it refines the domain the FFT was already targeting.

There is no public code release linked in the paper yet, but the recipe is straightforward to reproduce: take a fully fine-tuned checkpoint, attach learnable scores to a chosen block of linear layers, train with a top-K indicator and a straight-through estimator on the same SFT data.

The broader point about sparsity

Pruning literature has always framed masking as compression with an acceptable accuracy tax. This work reframes it as a capability tool. Pruning aims to remove a large portion of the model for efficiency, whereas this focuses on removing parameters that are irrelevant or even harmful to the model's capacity. Pruning methods inevitably entail a performance loss in the trained model, whereas this focuses on further enhancing it. If the finding generalizes, mask learning becomes a natural third stage after pre-training and fine-tuning, and the intuition that a denser model is a better model gets a useful counterexample.