ELVIA analysis of: SparseLoRA: Accelerating LLM Fine-Tuning with Contextual Sparsity — Problem 1: Selected base projections lose their backward Jacobian
Original paper: Samir Khaki; Xiuyu Li; Junxian Guo; Ligeng Zhu; Konstantinos N (Kostas) Plataniotis; Amir Yazdanbakhsh; Kurt Keutzer; Song Han; Zhijian Liu. SparseLoRA: Accelerating LLM Fine-Tuning with Contextual Sparsity. Proceedings of the 42nd International Conference on Machine Learning, vol. 267, 2025. https://proceedings.mlr.press/v267/khaki25a.html
Source version: Published ICML 2025 proceedings (PMLR 267)
Source location: Retained report, Problem 1: Problem 1 (Selected base-projection gradients are detached in the pinned implementation).
Question: What does the recorded analysis establish about “Selected base projections lose their backward Jacobian”?
Bounded finding:
Keeping LoRA dense does permit learning, and dense tokens and other paths remain active. Thus this finding does not show that training completely stops, that all gradients vanish, or that any printed benchmark number is false. Deliberately using a stop-gradient approximation is another possible algorithm, but it is not the selected-weight backpropagation described in the paper and requires explicit characterization.
The acquired release is pinned, but no historical training commit or raw run log ties these exact lines to the reported experiments. That part of the conclusion is Needs Evidence. The release-level defect is nevertheless material: it changes the optimization mechanism and may reduce backward work beyond channel sparsification. It therefore affects both algorithmic fidelity and the interpretation of a speed measurement made with this implementation. Major is supported for the core implementation without requiring an observed accuracy loss.
The scoped correction is to leave mask prediction or index selection outside autograd if desired while retaining differentiable activation gather/scatter operations. This restores the selected base Jacobian. No source was modified, no repaired training run was performed, and neither corrected accuracy nor corrected speed is claimed.
Release omits selected frozen-base contributions to upstream gradients. Major released implementation defect; historical accuracy and speed effects remain Needs Evidence, not demonstrated benchmark damage.
Recorded check:
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 19–22 and 30–40, 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 33–47, a PEFT base projection is assigned `out_scatter` or `in_gather`. The API replaces eligible linear modules at `api.py`, lines 101–123. The attention module passes selected indices to those projections at `llama.py`, lines 71–88 and 104–108. In `linear.py`, lines 51–71, 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-\(k\) 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 \(x(\theta)=(\theta,0)^\top\). Take frozen \(W=\operatorname{diag}(2,3)\) and retain channel 0. The intended selected base computation produces \(y=(2\theta,0)^\top\), with \[L(\theta)=\tfrac12\|y\|^{2}=2\theta^{2},\qquad
\left.\frac{dL}{d\theta}\right|_{\theta=1}=4.\] 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 \(\theta=1\), with step \(10^{-6}\), is exactly \(4\). 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.
Case-wide limitations:
- Limitations: No author code executed; no PyTorch runtime test (not installed in active Python).
- Limitations: Historical correspondence and actual repaired performance unknown.
- Limitations: Raw timing and run-level uncertainty unverified.
- Limitations: Table3 average appears to omit WNLI; convention unclear.
- Limitations: No comprehensive errata/novelty search.
- P1 — Selected base projections lose their backward Jacobian — Counterevidence: Dense LoRA, dense tokens and residual paths still learn.
- P1 — Selected base projections lose their backward Jacobian — Counterevidence: No historical commit/run log links these exact lines to printed results.
- P1 — Selected base projections lose their backward Jacobian — Counterevidence: Deliberate stop-gradient would be a distinct approximation needing disclosure.
- P2 — All-category MT-Bench caption is inconsistent with displayed scores — Counterevidence: Aggregate score slightly improves; small differences may be noise.
- The original report's complete scope, counterevidence and unresolved questions are retained below.
- This import checks publication format and identity; it does not repeat scientific review.
- Independent human scientific review is pending; author adoption has not been requested.
Source problem ID: p1
Source report index: 1
Original source excerpts (verbatim):
SparseLoRA shows for the first time that it can also play a role in LLM fine-tuning, where (1) only a sparse subset of weights is required for loss and gradient computation, and (2) this sparse subset needs to be determined based on the input sequence or tokens.
Source: Published ICML 2025 proceedings (PMLR 267)
Locator: PDF p. 1
Source PDF SHA-256: 252c06e2c789f3a4b8ee04edc7ba740e9366ab9822385e62f379808ce73e5cd5
Review status: Independent review pending
Case: icml2025-0124-sparselora-accelerating-llm-fine-tuning-with-contextual-sparsity
Revision: 1
Record created: 2026-10-26T04:21:21.357774+00:00
Permalink: https://elvia-atlas.org/atlas/cases/icml2025-0124-sparselora-accelerating-llm-fine-tuning-with-contextual-sparsity.html#problem-1
Versioned public record: https://elvia-atlas.org/atlas/evidence/icml2025-0124-sparselora-accelerating-llm-fine-tuning-with-contextual-sparsity/records/icml2025-0124-sparselora-accelerating-llm-fine-tuning-with-contextual-sparsity.r1.json
Canonical record SHA-256: b775a13e085939bb07ae77a0d71f79cb7f9b03b5e9eb172aade51923b7848fdb
The page follows the latest revision; the versioned record identifies this snapshot.