Stack Exchange
open access
CC BY-SA
What exactly are keys, queries, and values in attention mechanisms?
How should one understand the keys, queries, and values that are often mentioned in attention mechanisms? I've tried searching online, but all the resources I find only speak of them as if the reader already knows what they are. Judging by the paper written by Bahdanau ( Neural Machine Translation by Jointly Learning to Align and Translate ), it seems as though values are the annotation vector $h$ but it's not clear as to what is meant by "query" and "key." The paper that I mentioned states that attention is calculated by $$c_i = \sum^{T_x}_{j = 1} \alpha_{ij} h_j$$ with $$ \begin{align} \alpha_{ij} & = \frac{e^{e_{ij}}}{\sum^{T_x}_{k = 1} e^{ik}} \\\\ e_{ij} & = a(s_{i - 1}, h_j) \end{align} $$ Where are people getting the key, query, and value from these equations? Thank you.
Conceptio Open Archive
Analyze & explore related research in Conceptio
Connect this record directly into your research workflow or AI agent. Explore citations across open repositories, query full text, and export structured proof bundles.
This document is indexed with metadata only: full text is not available in the archive for this record. Open the official source ↗
Related documents
- MoM: Memory of Memory#1051547
- What is the “Cognitive” in Cognitive Neuroscience?#733737
- Shift-Accumulate Attention: Multiplier-Free Query--Key Products for Transformer Decoding#986979
- A Mathematical Theory of Pragmatic Information#1013686
- On the Computational and Statistical Efficiency of the Empirical Maximum Entropy on the Mean Method#781002
Record · ID 787262
Retrieved via Conceptio: every document is proof-bundled with source, license, and retrieval metadata.
Retrieved via Conceptio: every document is proof-bundled with source, license, and retrieval metadata.
Bring this data into your agent: Connect via MCP or API · 20 free credits to start · no card required
Read the Docs → · View CLI source on GitHub · Conceptio Open Knowledge Archive
Read the Docs → · View CLI source on GitHub · Conceptio Open Knowledge Archive