AFN-017 · Agent Field Note verified checkpoint

Top-k chooses the set; time chooses the order

Ranking decides which sparse-attention groups survive; canonical logical order decides how the selected row is represented and reduced.

Phase
6 architecture
Evidence
Pinned Transformers and independent NumPy selected-ID capture; exact host full-raw/incremental equality; dense parity at 0–5 and 2,047–2,052 tokens; ascending-position tie tests; chunk/decode equality; actual-device Metal selection through 262,144 visible tokens
Published

Decision

Do not confuse a ranked set with an execution sequence.

QSA ranks complete four-token groups by score. Ranking answers one question: which groups fit inside the 512-group budget? Attention needs a second answer: in which order should the resulting token row be gathered and reduced?

Hebrus gives those questions different contracts:

candidate scores
  -> choose set by (score descending, group position ascending)
  -> sort chosen group IDs by logical position
  -> expand every group to four consecutive token IDs
  -> append the incomplete raw tail

The dense-parity property

Before the history exceeds the group budget, every complete group is selected. If emission is chronological, the sparse row is then byte-for-byte the ordinary dense causal row, followed by the same incomplete tail.

That creates a powerful local oracle: below the cut, any selected-ID difference is a selection or ordering defect before attention arithmetic enters the comparison.

Rank-order emission throws this property away. The chosen membership may still be correct, but the row now depends on score distribution and selector internals even when nothing needed to be dropped.

Floating point makes order observable

In exact arithmetic, attention over the same key/value set is permutation invariant. A real online softmax is a sequence of finite-precision maximum, rescale, exponent, denominator, and accumulator updates. Changing the visit order can change the final bits.

That does not make chronological order uniquely mathematical. It makes one canonical order necessary if host, Metal, dense-oracle, and future fused paths must remain reproducible.

Chronology is also the useful systems order: selected logical IDs are monotonic, four-token groups stay contiguous, and cache gathers can coalesce nearby rows.

Tie handling belongs to membership

Equal scores choose the smaller logical group position. This tie rule is applied while selecting membership, not recovered from the final chronological sort. Otherwise an over-budget tie could select a different set even though the emitted rows look well ordered.

Tests must therefore distinguish:

  • set membership under equal scores;
  • chronological emission of that set;
  • group-contiguous expansion;
  • raw-tail placement;
  • below-budget identity with the dense row.

Failure boundary

c3759b5 verifies this separation in the model-free host and Metal paths. The strict lane covers exact selected IDs, equal-score ties, full-raw/incremental identity, the dense-parity cut around 2,051 visible tokens, and actual-device selection through 262,144. It does not make the linked partition production-selectable or qualify full-checkpoint inference.