← Back to article

Equation 5 · From n-Grams to Reasoning Models: A Technical History of the Language Model

What does this equation mean?

ci=∑j=1Txαijhj,αij=exp⁡(eij)∑k=1Txexp⁡(eik).c_i = \sum_{j=1}^{T_x} \alpha_{ij} h_j, \qquad \alpha_{ij} = \frac{\exp(e_{ij})}{\sum_{k=1}^{T_x} \exp(e_{ik})}.

Read the formula alongside the article passage below. Each part has a deeper page with its role in the equation, the supporting passage and nearby citations.

Start withexp(e_ij)
Divide bysum_k=1^T_x exp(e_ik)
This relates toc_i
How to read the two sides of this formula. Follow the article passage for the meaning of each quantity.

This equation states an equality: the expressions on both sides have the same value under the article’s assumptions. Read the equation part by part below; each part has a contextual explanation and a link to its mathematical background.

Read it piece by piece

cic_i

Symbol c_i

cic_i is part of the quantity the equation computes from the expression on the right.

Understand this part →

jj

Symbol j

j occurs above the fraction bar. The numerator is divided by the entire denominator below it.

Understand this part →

TxT_x

Symbol T_x

TxT_x occurs below the fraction bar. The quantity above the bar is divided by this expression; zero is excluded as a denominator.

Understand this part →

αij\alpha_{ij}

Symbol alpha_ij

alphaia_ij is an input to the expression that computes the quantity on the left.

Understand this part →

hjh_j

Symbol h_j

hjh_j is an input to the expression that computes the quantity on the left.

Understand this part →

eije_{ij}

Symbol e_ij

eie_ij occurs above the fraction bar. The numerator is divided by the entire denominator below it.

Understand this part →

kk

Symbol k

k occurs below the fraction bar. The quantity above the bar is divided by this expression; zero is excluded as a denominator.

Understand this part →

eike_{ik}

Symbol e_ik

eie_ik occurs below the fraction bar. The quantity above the bar is divided by this expression; zero is excluded as a denominator.

Understand this part →

=

=

The expressions on both sides represent the same quantity under the stated assumptions.

Understand this part →

See an illustrated explanation →
fraction

fraction

Divide the expression above the line by the one below it.

Understand this part →

See an illustrated explanation →
subscript

subscript

The lower label selects a particular version, component, or indexed member of the quantity. For example, x₀ and xₜ can be values at different positions.

Understand this part →

superscript

superscript

A raised number can be a power. When it is a label or bound, it selects a case or the upper limit of a sum; the formula’s structure distinguishes these uses.

Understand this part →

See an illustrated explanation →
j=1j=1

Starting index or lower bound: j=1

This label says where the repeated addition, multiplication, or accumulation starts. Read its value or condition together with the article’s description of the index.

Understand this part →

TxT_x

Ending index or upper bound: T_x

This label says where the repeated addition, multiplication, or accumulation stops. It sets the last term or end of the range.

Understand this part →

exp⁡(eij)\exp(e_{ij})

Numerator: exp(e_ij)

The complete quantity above the fraction bar.

Understand this part →

See an illustrated explanation →
∑k=1Txexp⁡(eik)\sum_{k=1}^{T_x} \exp(e_{ik})

Denominator: sum_k=1^T_x exp(e_ik)

The complete quantity below the fraction bar; it must be nonzero for this division.

Understand this part →

See an illustrated explanation →
k=1k=1

Starting index or lower bound: k=1

This label says where the repeated addition, multiplication, or accumulation starts. Read its value or condition together with the article’s description of the index.

Understand this part →

TxT_x

Ending index or upper bound: T_x

This label says where the repeated addition, multiplication, or accumulation stops. It sets the last term or end of the range.

Understand this part →

How to interpret it

With a fixed numerator, increasing a nonzero denominator reduces the fraction. Read it with the definitions, units, and assumptions supplied by the article.

What the article says around this equation

Bahdanau, Cho and Bengio proposed letting the decoder search the source for the parts relevant to each output word, rather than reading from a single compressed vector [ 9 ] . The decoder computes, at each output step i , a context vector as a weighted sum of all encoder states: ci=∑j=1Txαijhj,αij=exp⁡(eij)∑k=1Txexp⁡(eik)c_i = \sum_{j=1}^{T_x} \alpha_{ij} h_j, \qquad \alpha_{ij} = \frac{\exp(e_{ij})}{\sum_{k=1}^{T_x} \exp(e_{ik})}. The capacity of the intermediate representation now grows with the input rather than being fixed in advance. They further reported that the learned alignments corresponded well with human linguistic intuition — an interpretability result that arrived free with a performance fix, which is rare.

Read the equation in its article →

Sources cited in the surrounding passage

These citations give research context. Read each source to check which claims it supports.

Return to From n-Grams to Reasoning Models: A Technical History of the Language Model

See this formula across 1 published context →

Browse the mathematical compendium →