← Blog

Summarizing many documents with a model trained on one

Based on Zero-cost Transition to Multi-Document Processing in Summarization with Multi-Channel Attention (ECML PKDD 2024, undergraduate work at VNU Hanoi). Paper · Code

The problem

Good single-document summarizers are everywhere (BART fine-tuned on CNN/DailyMail, for example). Multi-document summarization, say a cluster of news articles on one event, is harder for three reasons:

  1. The usual fix is to concatenate all documents and use full attention, whose cost grows quadratically with total length.
  2. You need aligned multi-document training data, which is scarce.
  3. Concatenated inputs can exceed the encoder's position limit, requiring truncation, chunking, or a different long-context strategy.
Horizontal: concatenate, then full attention doc 1doc 2doc 3 one long sequence,full attention cost grows as n² Vertical (MCA): one channel per document doc 1doc 2doc 3 BART encoderBART encoderBART encoder MCA decoderattend per channel,then average cost grows as n same encoder weights, shared across channels
Documents are never concatenated into one sequence, so there is no quadratic growth in document count at fixed document length. Each document still has the encoder's position limit, and total input size is bounded by memory and compute.

The idea: treat each document as a channel

Instead of one long sequence, keep n separate documents, each its own channel. Scaling the number of documents then happens across channels (I call this vertical scaling) rather than along sequence length (horizontal scaling, e.g. Longformer or BigBird).

The paper motivates this with an approximate factorization: each document is treated as independently interpretable, and summary content is modeled through per-document contributions. Related news articles are not literally statistically independent, so this is a modeling assumption rather than an identity:

log P(Y | X)  ≈  sum over i of [log P(Y, X_i) - log P(X_i)]
                 = sum over i of log P(Y | X_i)  (approximate score)

Each term only needs one document, which is exactly what a single-document model already computes. Cost becomes linear in the number of documents.

The architecture: Multi-Channel Attention

I build this on BART with no new parameters.

mca = mean over channels i of  softmax(Q K_i^T / sqrt(d)) V_i

Same weights as BART's cross-attention, just applied per channel and averaged. That is why the transition is "zero-cost": no fine-tuning, no extra parameters.

Why average the attention outputs, not the final probabilities?

The factorization motivates combining per-document contributions. The paper illustrates the choice with a simplified decoder block containing a ReLU. If the summary draws only on document 1, document 2 should be ignored, yet its negative contribution would get added in and distort the result. By summing before the ReLU-containing block, the ReLU decides on the combined signal, so a channel's rejection depends on context instead of dragging down the sum. I normalize by n to keep scale stable as documents are added.

Results

number of documents time / memory BART, full attention BigBird MCA
Schematic of the trend only. The paper measures this with real timings: full attention is quadratic, MCA and BigBird are linear, and MCA is faster than BigBird.

Limits

Independent per-document encoding can miss relationships that require joint reasoning across documents. Averaging channel outputs is an architectural approximation, not an exact implementation of a normalized probabilistic factorization. Each document must still fit the encoder's length limit.