Forward Knows Efficient Backward Path: Saliency-Guided Memory-Efficient Fine-tuning of Large Language Models

Yeachan Kim, SangKeun LeeACL 2025

Introduction

Fine-tuning is essential for aligning Large Language Models (LLMs) with specific tasks and human intentions. However, the memory requirements for training remain a significant barrier. While Parameter-Efficient Fine-Tuning (PEFT) techniques like LoRA successfully reduce the memory footprint of weights and optimizer states, they do not address the activation caching problem. To compute gradients during the backward pass, standard training requires storing intermediate activations for every token across all layers. As sequence lengths and model depths increase, these activations often exceed the capacity of consumer-grade hardware, leading to Out-of-Memory (OOM) errors.

Saliency-Guided Gradient Flow (SAGE)

To overcome this bottleneck, we introduce Saliency-Guided Gradient Flow (SAGE). SAGE is based on the observation that the "intelligence" gathered during the forward pass can guide an efficient backward pass. Instead of caching all activations, SAGE selectively stores only the most "salient" tokens—those that the model's attention mechanism identifies as crucial for the current output.

The SAGE framework: Saliency scores derived from attention guide the selective caching of activations across Transformer blocks.

The SAGE method consists of several key components:

  1. Saliency Identification: During the forward pass, SAGE calculates saliency scores using the attention weights between output tokens and input tokens.
  2. Information Density Selection: A dynamic threshold ($\tau$) is used to retain the minimum set of tokens that preserve the majority of cumulative attention weight, allowing memory usage to adapt to task complexity.
  3. Sparsified Backward Path: Only salient activations are cached. Gradients flow through these sparse paths during backpropagation, drastically reducing memory consumption.
  4. Forward-Backward Alignment: Alignment phases in deeper layers ensure that the model converges effectively despite the sparse information in the backward pass.

Experimental Results

We evaluated SAGE across diverse benchmarks, including reasoning tasks (RTE, PIQA, ARC), instruction fine-tuning (Alpaca GPT-4), and image classification.

Comparison of Test Accuracy vs. Memory Cost. SAGE achieves superior accuracy while remaining within the 24 GB memory limit of consumer GPUs.

As shown in the figure above, SAGE significantly outperforms existing memory-efficient methods like LST, TokenTune, and VeLoRA. On a LLaMA-3 (8B) model, SAGE-LoRA reduced memory usage from 47.4 GB to 26.8 GB—a 44% reduction—while maintaining an average accuracy of 88.2% (compared to 88.8% for vanilla LoRA). This efficiency allows for fine-tuning 13B+ parameter models on consumer-grade GPUs when combined with quantization techniques like QLoRA.

Key Insights

  • The "Forward Knows" Philosophy: The model's internal attention mechanism is an effective built-in heuristic for identifying information importance.
  • Activation Redundancy: LLM activations are highly redundant; a small fraction of salient tokens carries the vast majority of necessary information for learning.
  • Attention Sinks: The method naturally preserves "attention sinks"—initial tokens and tokens near the output—which act as anchors for information processing.

Conclusion and Future Work

SAGE provides a "plug-and-play" solution for memory-efficient fine-tuning that maintains high performance. While currently dependent on explicit attention scores, future work will explore alternative saliency metrics (e.g., activation norms) to extend SAGE to attention-free architectures and further automate token selection.

Summary updated

BibTeX
@inproceedings{kim2025forward,
  author = {Yeachan Kim and SangKeun Lee},
  title = {{Forward Knows Efficient Backward Path: Saliency-Guided Memory-Efficient Fine-tuning of Large Language Models}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
}
Figure