End-to-End Long Document Summarization using Gradient Caching

Rohit Saxena, Hao Tang, Frank Keller
1/3/2025
cs.CLcs.AI

No confident code implementation found for this paper.

Abstract

Training transformer-based encoder-decoder models for long document summarization poses a significant challenge due to the quadratic memory consumption during training. Several approaches have been proposed to extend the input length at test time, but training with these approaches is still difficult, requiring truncation of input documents and causing a mismatch between training and test conditions. In this work, we propose CachED (Gradient $\textbf{Cach}$ing for $\textbf{E}$ncoder-$\textbf{D}$ecoder models), an approach that enables end-to-end training of existing transformer-based encoder-decoder models, using the entire document without truncation. Specifically, we apply non-overlapping sliding windows to input documents, followed by fusion in decoder. During backpropagation, the gradients are cached at the decoder and are passed through the encoder in chunks by re-computing the hidden vectors, similar to gradient checkpointing. In the experiments on long document summarization, we extend BART to CachED BART, processing more than 500K tokens during training and achieving superior performance without using any additional parameters.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{saxena2025endtoend,
  title  = {End-to-End Long Document Summarization using Gradient Caching},
  author = {Rohit Saxena and Hao Tang and Frank Keller},
  year   = {2025},
  eprint = {2501.01805},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2501.01805v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2501.01805.svg)](https://codeofpaper.com/paper/2501.01805)

Discussion