# First Passage Attention

DevFeed: [First Passage Attention](<https://devfeed.tech/articles/first-passage-attention-94780.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2610.22714>)

Author: Yuxuan Liu

Published: 2026-10-22T04:00:00Z

Content type: article

Language: en

Sources: [arXiv: Machine Learning](<https://devfeed.tech/sources/arxiv-machine-learning.md>)

Topics: [Transformer](<https://devfeed.tech/topics/transformer.md>)

Tags: [attention](<https://devfeed.tech/tags/attention.md>), [context](<https://devfeed.tech/tags/context.md>), [cs-ai](<https://devfeed.tech/tags/cs-ai.md>), [cs-cl](<https://devfeed.tech/tags/cs-cl.md>), [cs-lg](<https://devfeed.tech/tags/cs-lg.md>), [experiments](<https://devfeed.tech/tags/experiments.md>), [field](<https://devfeed.tech/tags/field.md>), [key-value-cache](<https://devfeed.tech/tags/key-value-cache.md>), [keys](<https://devfeed.tech/tags/keys.md>), [language-model](<https://devfeed.tech/tags/language-model.md>), [parameter](<https://devfeed.tech/tags/parameter.md>), [retrieval](<https://devfeed.tech/tags/retrieval.md>)

## AI overview

First Passage Attention (FPA) uses the deepest dip of a learned scalar field below a key's level along the key-query span to penalize its logit. This lets later dips selectively remove intermediate keys while preserving older relevant ones; with a shared learned walk, unpenalized keys form a stack. The paper reports that a constant-dimension FPA head can realize any subset of keys left alive by subsequent dips, while comparable softmax heads with positional biases or token-level forget gates need dimension linear in the number of keys. In synthetic experiments, one-layer FPA heads converged to target sets across seeds, unlike the tested softmax and FoX baselines. In a 110M-parameter language model, FPA matched FoX in perplexity and achieved perfect passkey retrieval at eight times training length, including with the key-value cache compressed to about 25%.

## Source excerpt

arXiv:2610.22714v1 Announce Type: cross Abstract: Augmenting softmax attention with forget gates typically relies on summing decay contributions along the key--query path. Because such accumulation is monotonic, these mechanisms cannot selectively erase intermediate context while preserving older, structurally relevant tokens. We propose First Passage Attention (FPA), which shifts from path summation to path extrema by lowering a key's logit proportionally to the deepest dip of a learned scalar field below that key's level over the intervening span. FPA encompasses the Forgetting Transformer (FoX) as a special case, and when the field and levels follow a shared learned walk, the alive keys with unpenalised logits naturally form a stack. We show that a constant-dimension FPA head realises any subset of keys left alive by subsequent dips, whereas softmax heads with positional biases or token-level forget gates require a head dimension linear in the number of keys. In synthetic experiments, one-layer FPA heads converge to these target sets while comparable softmax and FoX baselines fail on every seed. Scaling to a 110M-parameter language model, FPA matches FoX in perplexity and uniquely achieves perfect passkey retrieval at $8\times$ the training length, even with its key--value cache compressed to about $25\%$.