← All questions
RAGMedium· FiD· Context Window· Attention Mechanism

Why doesn’t Fusion-in-Decoder (FiD) just concatenate th...

A weak answer focuses only on context window limits. A strong answer addresses the cost structure: self-attention over concatenated passages is 4(kn)^2d per layer, compared to 4kn^2d for independent encoding, representing a ratio of k. Independent encoding does not remove cross-passage attention; it simply relocates it to the decoder, where the interaction costs O(kn) per decoded token.

Code playground (Python)