- Rating
- 5
- Clarity
- 3
- Confidence
- 3
- Originality
- 3
- Quality
- 3
- Significance
- 2
Read review
Summary
The paper proposes a new method for efficient activation checkpointing named KEAP that uses sketching to selectively materialize only a portion of activations needed to compute gradients. The paper shows the estimated gradients are unbiased as the method uses input activations that is already available as a part of activation checkpointing. Also, the method to choose components for sketching are based on information available during the forward pass (confusingly referred to as the initial forward pass). The paper shows that proposed method saves 33% FLOPs via a simple "6ND"-type calculation. Empirically, the paper shows that training 134M/488M language models trained with KEAP results in a modest degradation in perplexity.
Strengths and weaknesses
Strengths
-
The core contribution of this paper is built on a neat observation that evaluating each block's Jacobian at the exact checkpointed input results in unbiased gradient estimates for stochastic selection methods (Proposition 1)
-
The proposed method chooses components by using information obtained from the initial forward pass. This is essentially free since a forward pass is necessary in activation checkpointing anyway.
-
The FLOPs savings are real due to the use of sketching to avoid rematerializing the full activations during checkpointing (prior to backpropagation). The method clearly shows that KEAP is better than selective activation checkpointing in theory
Weaknesses
-
Among the proposed strategies to choose k out of n components, empirically the top-k approach appears to work best in practice. This contradicts the claim that gradients are unbiased as that argument relies on using randomness.
-
The empirical evidence is weak. While the network size is a good start, it would be convincing if the paper showed that the method can work at a scale that's at least one order of magnitude larger than the models used in the paper. It would be interesting to study whether the choices that work at small scale continues to hold. I understand that the paper suggests scaling law study as future work but my observation here is to have a convincing example that shows that the method is useful in practice.
-
While FLOPs estimates are correct, the paper is missing wall-clock time or timing measurements that can give a sense for how well it works in practice
-
The method is clearly shown to work well on FFNs but appears to not work as well as the baseline on attention layers.
-
I found this paper very hard to read. The notation is dense and the core contribution that I enjoyed is buried in page 4. It would make for easier reading if the presentation could be reworked to emphasize the unbiased gradient estimates is due to using x^{AC} and not any sketched input
Questions
- why is a seemingly biased choice method working better than random? Could this affect model quality?
- Consider providing wall clock timings to complement the argument on FLOPs
- if the method works really well only on FFNs perhaps adjusting scope of the claims could make for a good paper. Would the authors consider this feedback?
- Finding a way to make the argument on composition of Jacobians more accessible to a general audience would be very welcome. But I understand this may not be possible.
Limitations
Yes
Paper formatting concerns
None
Final justification
After rebuttal, I now believe this is a good paper. While I am still on the fence I believe the Rating for this paper is closer to a 5 than a 4. Raising rating accordingly.
We are grateful for the reviewer's positive assessment of the observation and its theoretical benefit over regular AC.
1. Top-nk and Approximation Quality
We respectfully disagree that there is a contradiction between our use of a biased Top-nk approximation and the unbiased approximation analyzed elsewhere. We see the study of biased estimators as complimentary: the core idea remains in the use of xAC for the Jacobian, justified page 5.
Furthermore, biasedness does not imply a high quadratic error. For an unbiased estimator, this error is governed by its variance, whereas a deterministic approximation such as Top-nk introduces bias but can achieve a substantially smaller error. This phenomenon is common in the compression literature, where biased methods can outperform unbiased alternatives [4,5,6]. In fact, we thank the reviewer for their question, as it motivated us to derive a precise near-optimality guarantee for Top-nk in our setting: we prove in the Proposition below that a small approximation error for the optimal Bernoulli strategy implies a small error for Top-nk, up to a bounded multiplicative factor. The converse does not hold: Top-nk can have a very small or even zero error while the optimal unbiased Bernoulli strategy still has positive error. This asymmetry can help explain the strong empirical performance of Top-nk in our experiments. We will add it to the appendix, and we refer to the discussion with Reviewer A3hh for more details.
We also want to emphasize the empirical observation that a small number of selected features can reconstruct the relevant quantities almost completely; see Fig. 2,3. Consistently, the resulting gradients are nearly identical to the exact gradients, and we do not observe a meaningful degradation in model quality.
2. Scale and Generality
Our experimental scale is limited by our academic computing resources. Nevertheless, following the reviewer's suggestion, we conducted an additional experiment with a 1B-parameter model. We report the corresponding results in the answer to Reviewer knN2.
There is no fundamental reason preventing KEAP from scaling to larger models. Because the method is principled, its scalability can be characterized in terms of the approximation quality achieved by the chosen approximator. If the approximation remains accurate at a larger scale, KEAP should remain effective. If its quality deteriorates, a better approximation or a larger computational budget will be required.
Determining the optimal approximator remains an open problem. We do not claim that the sketching and selection strategies studied in this paper are optimal. Rather, our contribution is to introduce and formalize a new way of using approximate computation within automatic differentiation, thereby opening a new research direction.
3. Wall-Clock Performance, I/O, and Granularity
We thank the reviewer for highlighting the distinction between FLOP reductions and wall-clock speedups. We would like to be transparent that wall-clock performance depends on the arithmetic intensity of the hardware, memory and I/O costs, kernel efficiency, and implementation details. At submission, we used FLOP accounting as a hardware-independent measure of KEAP’s arithmetic savings, while the optimal hardware utilisation in particular for the more fine-grained selection remained open. We agree that explicitly analysing the resulting I/O and kernel-efficiency trade-offs will be valuable to readers, and we now provide this additional analysis that we will incorporate in the appendix.
In particular, approximation granularity affects both efficiency and accuracy:
Token-level granularity in Tab 1a provides the most accurate approximation but incurs the largest I/O and kernel-launch overhead.
Batch-level granularity, as studied in Tab 1b, produces wider and more structured computations that map better to efficient matrix-multiplication kernels. It is therefore faster, but yields a coarser approximation.
To explore the intermediate regimes, we ablate both token grouping and feature grouping and report the resulting perplexity, in the answer to Reviewer A3hh. These experiments characterize the accuracy cost of moving toward more structured, hardware-compatible computation. They also constitute a first step toward a more efficient implementation. Developing a fully hardware-optimized implementation is beyond the scope of the present paper, whose primary goal is to introduce and validate the underlying method.
4. FFN and Attention Layers
FFN layers account for a substantial fraction of the FLOPs in modern language models. We therefore consider KEAP's strong performance on FFN layers to be a practically important strength rather than a limitation. While we’re willing to incorporate the reviewer feedback, performance ultimately depends on the quality of the chosen approximator and on the approximation granularity. For example, at batch-level granularity, KEAP applied to attention performs better than KEAP applied to the FFN in our experiments. Intuitively, attention computations already aggregate information across tokens, so additional token grouping causes only a limited loss in approximation quality.
This suggests that better attention-specific approximators can be possible. For example, one could compute attention exactly during the first forward pass and use a more aggressive approximation during the recomputed forward pass. We will mention this possibility in the revised paper, while clarifying that identifying the best layer-specific approximators is an important direction for future work. We hope this solves your concern. Regardless, reporting a less favorable result is itself valuable, as it narrows the design space and saves future researchers from spending compute on an approach that we have already evaluated.
5. Presentation and the Role of Jacobians
We agree that the AC formulation makes the presentation more technical, and we will revise the exposition to separate the main idea more clearly from the automatic-differentiation details. However, some discussion of Jacobians is necessary because we need to specify when approximation and differentiation can be exchanged, through properties such as E[Jf(x)]=JE[f](x). This formulation also highlights the generality of KEAP: the method is not restricted to the particular approximation studied in our experiments, but can apply whenever a sufficiently accurate approximation f^≈f preserves the required gradient information. We will clarify this motivation and emphasize that the main contribution is the general principle introduced in Section 3.2, rather than the Jacobian notation itself.
We thank the reviewer again and hope that we have addressed their concerns. We believe that the main contribution of this paper is the introduction and formalization of a genuinely novel idea.
We believe that this response addresses Concerns 1 (75%), 2 (100%), 3 (100%), 4 (100%), and 5 (NA) raised by the Area Chair, and we hope to have clarified any remaining issues for the reviewer
Proposition: Top-k versus Unbiased Sampling
For a mask ω, define the approximation error
Q(\omega) \triangleq \mathbb{E}_{\omega}\left[\sum_m \left\\|\Phi(x^m)-\Phi^{\omega}(x^m)\right\\|^2\right].
Let the coherence among the components discarded by Top-k be
\left\\{ 0, \frac{\langle \varphi^i,\varphi^j\rangle} {\lVert\varphi^i\rVert_2\\,\lVert\varphi^j\rVert_2} \right\\},$$ Let $\omega^{\mathrm{Top}}$ denote the Top-$k$ mask and $\omega^{\mathrm{Opt}}$ the optimal Bernoulli mask with expected budget $k$. Then $$Q(\omega^{\mathrm{Top}}) \leq \bigl(1+(n-k-1)\mu\bigr)\\,Q(\omega^{\mathrm{Opt}}).$$ Conversely, when $n-k\geq 2$, there is no finite constant $C(n,k)$ such that $$Q(\omega^{\mathrm{Opt}}) \leq C(n,k)\\,Q(\omega^{\mathrm{Top}}).$$ **Proof.** Since Top-$k$ deterministically discards the components outside $\mathrm{Top}_k$, $$Q(\omega^{\mathrm{Top}})=\left\\|\sum_{i\notin\mathrm{Top}_k}\varphi^i\right\\|^2.$$ Expanding the squared norm and using the definition of $\mu$ gives $$Q(\omega^{\mathrm{Top}}) \leq \sum_{i\notin\mathrm{Top}_k}\||\varphi^i\||^2 + 2\mu\sum_{\substack{i<j, i,j \notin\mathrm{Top}_k}} \langle \varphi^i\,\varphi^j\rangle.$$ Using $2ab\leq a^2+b^2$, each squared norm appears in exactly $n-k-1$ pairs. Hence, $$Q(\omega^{\mathrm{Top}}) \leq \bigl(1+(n-k-1)\mu\bigr)\sum_{i\notin\mathrm{Top}_k}\\|\varphi^i\\|^2.$$ For the optimal Bernoulli mask, with probabilities $p_i$ satisfying $0<p_i\leq 1$ and $\sum_i p_i=k$, $$Q(\omega^{\mathrm{Opt}})=\sum_i\frac{1-p_i}{p_i}\\|\varphi^i\\|^2.$$ Since $(1-p_i)/p_i\geq 1-p_i$, $$Q(\omega^{\mathrm{Opt}}) \geq \sum_i\\|\varphi^i\\|^2-\sum_i p_i\\|\varphi^i\\|^2.$$ Under the constraint $\sum_i p_i=k$, the second term is at most the sum of the $k$ largest squared norms. Therefore, $$Q(\omega^{\mathrm{Opt}}) \geq \sum_{i\notin\mathrm{Top}_k}\\|\varphi^i\\|^2.$$ Combining the previous two inequalities proves $$Q(\omega^{\mathrm{Top}}) \leq \bigl(1+(n-k-1)\mu\bigr)Q(\omega^{\mathrm{Opt}}).$$ Finally, consider $n-k$ unit-norm discarded components whose sum is zero, while the retained $k$ components have norm $1+\epsilon$. Then Top-$k$ retains the latter and $$Q(\omega^{\mathrm{Top}})=0.$$ By contrast, because $\sum_i p_i=k<n$, the optimal Bernoulli mask must satisfy $p_i<1$ for at least one nonzero component, implying $$Q(\omega^{\mathrm{Opt}})>0.$$ Thus, no finite reverse constant $C(n,k)$ can exist. **References**: In reviewer KnN2’s response.