---
title: Curriculum Top-K Annealing in Sequence Prediction
url: https://www.emergentmind.com/topics/curriculum-top-k-annealing
type: topic
---

# Curriculum Top-K Annealing in Sequence Prediction

“Curriculum Top-K Annealing” is best understood as an *Editor’s term* for a family of curriculum mechanisms in which training is constrained by a truncated top-$k$ candidate set while some aspect of exposure to that set is annealed over training time. In the literature provided here, the clearest direct instantiation is the sequence-prediction method "Nearest-Neighbor Replacement Sampling" (NNRS) from "$k$-Neighbor Based Curriculum Sampling for Sequence Prediction," where previous gold tokens are replaced by sampled semantic neighbors drawn from a token’s top-$k$ embedding neighborhood under an epoch-level curriculum and a temperature-controlled similarity distribution [2101.09313]. The phrase itself is not used in that paper. This suggests that “Curriculum Top-K Annealing” is more accurately treated as a descriptive umbrella for related designs than as a standardized author-defined term.

## 1. Terminological scope and provenance

The most direct source for the concept is the NNRS mechanism in sequence prediction, but several adjacent papers instantiate only parts of the phrase “Curriculum Top-K Annealing.” Some are genuinely top-$k$-based without annealing, some are annealing-based without top-$k$, and some use curriculum staging over ranked bins rather than an explicit top-$k$ cutoff.

| Work | Relation to the term | Core mechanism |
|---|---|---|
| "$k$-Neighbor Based Curriculum Sampling for Sequence Prediction" [2101.09313] | Closest direct instantiation | Fixed top-$k$ neighbor truncation with annealed replacement rate and temperature |
| "PCC: Paraphrasing with Bottom-k Sampling and Cyclic Learning for Curriculum Data Augmentation" [2208.08110] | Adjacent, not identical | Bottom-$k$ decoding for hard paraphrases plus cyclic curriculum bins |
| "HuCurl: Human-induced Curriculum Discovery" [2307.07412] | Adjacent, not exact top-$k$ | Difficulty buckets with time-varying logistic weights and optional reassignment |
| "Differentiable Top-k Classification Learning" [2206.07290] | Top-$k$ without curriculum schedule | Fixed distribution over multiple $k$ values in a differentiable loss |
| "Thermodynamics of Reinforcement Learning Curricula" [2603.12324] | Annealing theory without top-$k$ | Geometric schedules minimizing excess thermodynamic work |
| "What Makes a Good Curriculum? Disentangling the Effects of Data Ordering on LLM Mathematical Reasoning" [2510.19099] | Ranking/tier analysis without explicit top-$K$ annealing | Offline ordering and tier-wise curricula under multiple difficulty metrics |
| "Feature-based tuning of simulated annealing applied to the curriculum-based course timetabling problem" [1409.7186] | Disambiguating usage of “curriculum” and “annealing” | Simulated annealing for CB-CTT, with no explicit top-$K$ move mechanism |

The principal ambiguity is therefore structural. In the direct sequence-modeling case, “top-$k$” refers to a truncated neighborhood of semantically similar tokens and “annealing” refers to the evolution of replacement frequency and sampling temperature [2101.09313]. In later adjacent work, “top-$k$” may instead refer to decoding support, rank-based classification objectives, or quantile buckets, while “annealing” may mean cyclic traversal, logistic reweighting, or thermodynamic schedule design [2208.08110][2206.07290][2307.07412][2603.12324].

## 2. Sequence prediction origin: exposure bias and curriculum replacement

The direct motivating problem is exposure bias in autoregressive sequence prediction. In the formulation used for NNRS, a generic sequence model is trained on paired sequences $(X,Y)$, with language modeling as the special case $X=x_{1:T-1}$ and $Y=x_{2:T}$. The training objective is standard maximum likelihood,
$$
\frac{1}{T}\sum_{t = 1}^{T} \log p(y_t|y_{1:t-1}, X; \vec{\theta}),
$$
which conditions on true past outputs during training. At inference, however, the model conditions on its own past predictions rather than teacher-forced histories. The paper identifies this mismatch as exposure bias and emphasizes that the resulting error can compound along the sequence, “in the worst case leading to errors quadratic in $T$” [2101.09313].

NNRS modifies the distribution of conditioning histories rather than the likelihood itself. At time step $t$, the previous gold token $y_{t-1}$ need not be fed unchanged as the next input. Instead, training may substitute either the model prediction $\hat y_{t-1}$, as in scheduled sampling, or a sampled nearest neighbor $\tilde y_{t-1}$ of the gold token in a pretrained embedding space. The important conceptual interpolation is
$$
y \rightarrow \tilde y \rightarrow \hat y,
$$
rather than the direct scheduled-sampling transition
$$
y \rightarrow \hat y.
$$
This supplies a semantically local perturbation regime between pure teacher forcing and full self-conditioning [2101.09313].

Under this interpretation, Curriculum Top-K Annealing denotes a controlled broadening of the training history distribution. The perturbation space is not the full vocabulary and not initially the model’s own predictive distribution. It is a truncated semantic neighborhood, which makes the induced corruption bounded and embedding-structured. A plausible implication is that the method is best viewed as a curriculum over *history corruption severity*: initially almost deterministic, then increasingly stochastic, but within a top-$k$ neighborhood whose internal entropy is itself controlled.

## 3. Mechanism: top-$k$ neighborhoods, replacement schedules, and temperature control

In NNRS, each vocabulary item $w$ is associated with its top $k$ nearest neighbors in a pretrained embedding space. Cosine similarity is the neighborhood criterion,
$$
\cos(w, w') = \frac{\vec{w}^\top\vec{w}'}{\norm{\vec{w}}\norm{\vec{w}'}}.
$$
Only the top-$k$ most similar words are retained, stored in a matrix $\mathbf N \in \mathbb R^{|V| \times k}$ whose row $\mathbf N_w$ defines the truncated neighborhood for $w$. Sampling therefore occurs from a fixed support of size $k$, not from the full vocabulary [2101.09313].

The probability of selecting neighbor $w'$ given source word $w$ is a softmax over cosine similarities with temperature $\tau$:
$$
p(w'| w; k, \tau) = \frac{\exp(\cos(\vec{w},\vec{w}') / \tau)}{\sum_{\vec{u} \in \mathbf{N}_{w}} \exp(\cos(\vec{u}, \vec{w}) / \tau)}.
$$
Small $\tau$ makes the distribution more peaked and approaches nearest-neighbor determinism; large $\tau$ flattens the distribution and explores more of the top-$k$ list. The paper also mentions an alternative weighted-mean neighbor representation,
$$
\tilde{\vec{w}} = \frac{1}{k}\sum_{i=1}^{k} p(w'_i|w, k) \vec{w}'_i,
$$
but the reported experiments focus on discrete neighbor sampling [2101.09313].

A crucial terminological point is that, in this paper, $k$ itself is fixed. The annealed variables are the probability of performing NNRS replacement, denoted $\gamma$, and the temperature $\tau$ governing how probability mass is distributed *within* the top-$k$ set. The paper states that in its experiments $k \approx \log_2(|V|)$, and that pretrained GoogleNews skip-gram embeddings are used to construct the neighbor graph [2101.09313].

The curriculum is epoch-indexed. Scheduled sampling uses rate $\epsilon$, NNRS uses rate $\gamma$, and both are monotonically increased using linear, exponential, inverse-sigmoid or S-shaped, and static schedules. Token selection during training is stochastic per sample and per time step: random variables are drawn, compared against $\epsilon$ and $\gamma$, and the input is chosen as the model prediction, a sampled neighbor, or the gold token. If both scheduled sampling and NNRS fire on the same step, the paper’s prose specifies random tie-breaking with equal probability. If neither fires, teacher forcing is retained [2101.09313].

A second annealing process adapts $\tau$ using validation perplexity. The rule is described more clearly in prose than in the printed equation: if validation loss worsens or fails to improve, $\tau$ is increased to encourage broader exploration among top-$k$ neighbors; if validation loss improves, $\tau$ is decreased so the model focuses more on the closest neighbors. The text states $\tau \in [0.5,10]$ to avoid making the distribution too degenerate or too uniform [2101.09313].

This gives the most faithful technical interpretation of Curriculum Top-K Annealing in the sequence-modeling literature: fixed top-$k$ support, curriculum over replacement rate, and annealing of effective support within that fixed set through temperature.

## 4. Relation to scheduled sampling, implementation profile, and empirical behavior

NNRS is explicitly positioned relative to scheduled sampling. Both perturb previous-token inputs during training to address exposure bias, and both use curricula that change over training. The difference is that scheduled sampling replaces a gold token with the model’s own prediction, whereas NNRS replaces it with a semantically similar token chosen externally from a pretrained embedding space. The paper argues that this creates a smoother path from teacher forcing to self-conditioning and also claims that, because the replacement policy is not generated by the model itself, NNRS more easily preserves a “proper” scoring-rule interpretation than scheduled sampling as criticized by Huszár [2101.09313].

Operationally, the method is designed to be straightforward, online, and memory-efficient. The nearest-neighbor table is precomputed from pretrained embeddings; training-time overhead is then largely limited to indexed categorical sampling from stored top-$k$ lists. The paper contrasts storing embeddings of size $|V| \times d$ with storing a transition matrix of size $|V| \times |V|$, emphasizing that $d \ll |V|$ is the practically relevant regime. For larger vocabularies, the discussion notes that exact or approximate $k$-NN search could use KD-trees, metric trees, or cover trees, although this was unnecessary in the reported experiments [2101.09313].

The reported benchmarks are Penn Treebank and WikiText-2, with perplexity as the main language-modeling metric and self-BLEU and WMD or self-WMD as additional generation analyses. Main perplexity results are reported for a 2-hidden-layer LSTM, with additional quality and diversity tables including LSTM, GRU, and Highway networks. Baselines include no sampling or standard MLE teacher forcing, TPRS, scheduled sampling, NNRS alone, and the combined SS-NNRS system [2101.09313].

The main empirical findings are consistent across the summary provided. NNRS alone can improve over teacher forcing, but SS-NNRS usually performs best. Successful settings generally use $\epsilon: 0 \to 0.5$ and $\gamma: 0 \to 0.2$. Exponential schedules, and sometimes static low replacement rates, outperform linear or sigmoid schedules; sampling too aggressively too early hurts. The gains are larger on WikiText-2 than on PTB, which the authors attribute to the larger vocabulary, more rare words, and greater usefulness of semantically local replacements. The paper reports about 8 perplexity points improvement on WikiText-2 over no sampling and about 2.75 perplexity points improvement on PTB with the best approach, with best test perplexities around 120.76 on WikiText-2 and 69.06 on PTB for SS+NNRS configurations [2101.09313].

These results give the phrase “Curriculum Top-K Annealing” its strongest concrete meaning: a semantically local curriculum over top-$k$ perturbations whose stochasticity is introduced gradually and works especially well in conjunction with scheduled sampling.

## 5. Adjacent formulations in curriculum, top-$k$, and annealing research

Outside sequence prediction, related papers realize analogous components without reproducing the same mechanism. In curriculum data augmentation, PCC uses top-$k$ and bottom-$k$ decoding regimes to generate paraphrases, ranks them by textual similarity, partitions them into six curricula, and traverses them cyclically. Its bottom-$k$ procedure does **not** sample from the least probable $k$ words; instead, it excludes the top-$k$ most probable words and samples from the remainder for the first $\mathcal N$ decoding steps, then falls back to top-$k$ and top-$p$. Difficulty is defined by paraphrase similarity rather than perturbation ratio, and the system passes through the curricula twice. This is strongly suggestive for curriculum-controlled truncation policies, but the paper does **not** define an explicit annealing schedule over the value of $k$ itself [2208.08110].

In sample-ranking curricula, HuCurl partitions examples into $k$ ordered difficulty groups using annotation entropy or average baseline loss, then applies group-specific logistic weights
$$
w(t; r, s) = \frac{1}{1+\exp(-r(t-s))}
$$
over normalized training time. Its non-monotonic extension arises not from a non-monotone pacing function but from dynamic reassignment of examples across bins according to current loss relative to group mean. This is a bucket-wise annealing framework rather than a hard top-$k$ selector, but it provides a soft approximation to changing ranked prefixes and explicitly shows that top-performing curricula are often non-monotonic [2307.07412].

Objective-side top-$k$ appears in differentiable classification learning, where a random variable $K \sim P_K$ defines a fixed distribution over top-$k$ targets and the model is optimized with
$$
\mathcal{L}(X, y) = - \log\!\left( \sum_{k=1}^n P_K(k) \left( \sum_{m=1}^k \mathbf{P}_{m, y}(f_\Theta(X)) \right) \right).
$$
This supplies a principled multi-$k$ loss and shows that mixing multiple $k$ values can outperform optimizing a single $k$, but the paper does **not** propose a time-varying curriculum $P_K^{(t)}$ [2206.07290].

Annealing without top-$k$ is formalized in reinforcement learning by the thermodynamic curriculum framework, where task parameters or entropy temperature define a path $\lambda(t)$ on a task manifold and optimal curricula minimize excess thermodynamic work. The leading-order objective
$$
\mathcal{W}_{\mathrm{ex}} \approx \int_0^{\mathcal T}\dot{\lambda}(t)^\top \zeta(\lambda(t)) \dot{\lambda}(t)\,dt
$$
induces a friction metric and geodesic schedules. This directly motivates geometry-aware annealing, but the paper does **not** treat explicit top-$K$ selection [2603.12324].

Offline ranking analyses for LLM reasoning provide further evidence that curriculum behavior is metric-dependent. The 2025 mathematical-reasoning study compares forward and reverse curricula, Single Group Curriculum, and grouped forward and reverse curricula over difficulty metrics such as ACC, SLP, LG, SLE, TLE, and VACC. It reports that no curriculum strategy dominates universally and that, for several metrics, the medium tier rather than the extreme easy or hard tier can be most useful. This does not define top-$K$ annealing, but it materially weakens the assumption that a monotone expansion from the easiest prefix is universally optimal [2510.19099].

Finally, the simulated-annealing paper on curriculum-based course timetabling is a terminological counterexample. Its “curriculum-based” refers to the CB-CTT problem formulation, and its annealing is classical simulated annealing over timetabling moves; the paper explicitly does **not** contain an explicit top-$K$ move-selection mechanism [1409.7186].

## 6. Limitations, misconceptions, and conceptual implications

Several misconceptions are directly corrected by the source material. The first is that NNRS anneals $k$. It does not. In the direct sequence-prediction formulation, top-$k$ candidate truncation is fixed; annealing happens over replacement probability and over the temperature $\tau$ of the top-$k$ sampling distribution [2101.09313]. The label “Curriculum Top-K Annealing” is therefore faithful only if “annealing” is understood to mean annealing *within* a top-$k$ support or annealing the probability of invoking that support.

The second misconception is that stronger perturbation is always beneficial. The NNRS analysis states that too much replacement too early hurts, that larger $k$ increases diversity at the expense of generation quality, and that $k=0$ corresponds to ML training. Exponential schedules help because they defer most stochasticity until later in training [2101.09313]. PCC reaches a closely related conclusion from a different direction: harder examples generated by bottom-$k$ decoding are useful, but they are embedded in a cyclic curriculum rather than introduced once in a purely monotone schedule [2208.08110].

A third misconception is that semantic locality guarantees contextual validity. NNRS depends on pretrained embedding quality, and a near neighbor in embedding space may still be syntactically or contextually inappropriate for the current history. The method assumes that semantic neighborhoods provide useful smoothing, which helps more on WikiText-2 than PTB but remains task- and data-dependent [2101.09313].

The broader curriculum literature in the provided sources also argues against a universal one-way annealing doctrine. HuCurl reports that top-performing discovered curricula are often non-monotonic, while the 2025 LLM reasoning study finds that the relative effectiveness of forward versus reverse ordering depends jointly on model capability and task complexity and that different difficulty tiers produce distinct gains depending on task demands [2307.07412][2510.19099]. A plausible implication is that hard top-$K$ expansion schedules should often be replaced by bucketed, cyclic, or non-monotonic exposure rules when difficulty estimates are noisy or when the most useful training signal lies in a medium-difficulty band rather than at the extremes.

Taken together, the literature supports a precise but limited meaning of Curriculum Top-K Annealing. In its most concrete form, it refers to fixed top-$k$ truncation combined with an annealed policy over when and how to sample from that truncated set, as in NNRS for sequence prediction [2101.09313]. In a broader, inferred sense, it denotes curriculum systems in which ranked or truncated candidate sets are exposed under time-varying control, possibly through bottom-$k$ decoding, bucket-wise logistic weights, multi-$k$ objectives, or thermodynamically informed schedules [2208.08110][2307.07412][2206.07290][2603.12324]. The provided papers collectively support the design pattern; they do not support a single canonical definition.

Source: https://www.emergentmind.com/topics/curriculum-top-k-annealing