SparseLoRA: Accelerating LLM Fine-Tuning with Contextual Sparsity
ELVIA analysis
Independent review pending
The supplied paper gives substantial accuracy and efficiency comparisons and explicitly describes token, layer, and step sensitivity controls. The pinned implementation contains a core gradient-path defect: selected base-projection activations are gathered or scattered under `no_grad`, eliminating their backward contribution to upstream trainable adapters. The defect is demonstrated for the release, while its presence in the historical experiments remains unverified. A separate Minor issue concerns a table caption contradicted by its own category scores. Arithmetic checks support the headline ratios. Scientific adjudication is pending.
Problem 1. Selected base projections lose their backward Jacobian
MajorEvidence and reasoning
Problem statement
Location: Section3/Figure3 p.3; modules/linear.py19-22,30-40; registry.py33-47; api.py101-123.
Paraphrase: Sparse selected-weight loss and gradient computation with dense adapters.
Pinned release a2fd69de93b1168080346ec113c99501f0bb58b1. Enabled sparse PEFT base projection; proper channel subset. Frozen base weight; input depends on upstream trainable parameter. Indices fixed locally; no derivative through top- required.
Proof
Assessment: Major for the core released implementation; historical experimental attribution Needs Evidence. Section 3 and Figure 3, p. 3, motivate sparse loss and gradient computation through selected base-model weights while retaining dense LoRA branches. The pinned `sparselora/modules/linear.py`, lines – and – instead performs activation gather and output scatter inside `torch.no_grad()` blocks. This removes the selected base path from reverse-mode differentiation.
The source path is not an unreachable utility. In `registry.py`, lines – a PEFT base projection is assigned `out_scatter` or `in_gather`. The API replaces eligible linear modules at `api.py`, lines – The attention module passes selected indices to those projections at `llama.py`, lines – and – In `linear.py`, lines – the patched adapter forward adds the base result to the dense LoRA result.
The finding assumes an enabled sparse layer with a nonempty proper subset of channels, a frozen base weight, and an input that depends on an upstream trainable adapter. These are ordinary fine-tuning circumstances. The selected index set can be held fixed locally; no derivative of a top- decision is required.
For `out_scatter`, the selected matrix multiplication is initially differentiable with respect to its input. The subsequent `scatter_add` is evaluated under `no_grad`, so the assembled output loses that graph. For `in_gather`, the input gather itself is detached. Multiplication by a frozen base weight cannot restore the missing dependency. PyTorch’s primary documentation confirms that computations inside this context are excluded from the reverse-mode graph even when inputs require gradients. Neither gather nor scatter-add is a factory-function exception.
Let an upstream scalar adapter parameter produce Take frozen and retain channel The intended selected base computation produces with A fixed-index scatter or gather must preserve this derivative. Treating the selected result as detached gives contribution zero instead. An independent rational-arithmetic central difference at with step is exactly No author function was imported or executed, and this is not represented as a PyTorch runtime test.
The same reasoning applies if residual or LoRA branches are present: those branches can still carry gradients, but the selected frozen-base contribution is missing. Freezing a weight eliminates its own parameter update; it does not eliminate the Jacobian needed to train parameters preceding that weight.
Possible revision
Keep activation gather/scatter differentiable while masks/indices may be predicted without gradients. Re-measure accuracy and speed before claiming repaired equivalence.
Problem 2. All-category MT-Bench caption is inconsistent with displayed scores
MinorEvidence and reasoning
Problem statement
Location: Table4 caption p.8.
Paraphrase: Matches or exceeds LoRA in all categories.
Compare displayed point estimates without assuming statistical significance.
Proof
Assessment: Minor. Table 4, p. 8, claims matching or exceeding LoRA across all categories. Its own entries instead decrease from to for Extraction, from to for Math, and from to for STEM.
The decisive check is subtraction of the reported entries, yielding The averages are consistent: the eight-category means are for LoRA and for SparseLoRA. Thus the caption should say comparable aggregate performance, with mixed category changes. The decreases are small and no paired uncertainty information establishes statistical deterioration. This is a bounded reporting correction, not evidence against the core acceleration result.
Possible revision
Correct caption; no score change needed.
Supporting record & provenance
Work status
Current version
Version 1
Minhao Liu · Initial report · Version 1
Independent review pending
Original claim and review scope
SparseLoRA shows for the first time that it can also play a role in LLM fine-tuning, where () only a sparse subset of weights is required for loss and gradient computation, and () this sparse subset needs to be determined based on the input sequence or tokens.
Published ICML 2025 proceedings (PMLR 267); PDF p. 1
Actual review scope
The recorded inspection concerns these source locations: Retained report, Problem 1: Problem 1 (Selected base-projection gradients are detached in the pinned implementation).; Retained report, Problem 2: Problem 2 (The MT-Bench all-category caption exceeds the displayed evidence).