Research / Evaluation and verification

When Formatting Flips Answers: A Deterministic Atlas of Retokenization Sensitivity in LLM Evaluation

Presents RIA, a deterministic audit isolating retokenization sensitivity in multiple-choice QA, and finds that routine formatting edits reach a 9.18% maximum flip-rate across BoolQ, ARC-Challenge and an 8-subject MMLU subset.

Published
18 February 2026
Author
Ali Uyar
DOI
10.5281/zenodo.18682874
Code
github.com/aliuyar1234/retokenization-invariance-atlas

Abstract

Semantics-preserving formatting should not change model decisions, but in multiple-choice QA it often does. We present Retokenization Invariance Atlas (RIA), a deterministic audit that isolates this effect with paired no-truncation/semantics gates, scope-only token-divergence metrics, and mitigation checks with explicit no-harm criteria. Across BoolQ, ARC-Challenge, and an 8-subject MMLU subset (36,820 gated rows, two instruct models), routine formatting edits reach 9.18% maximum flip-rate (Llama3-8B, mmlu_subset, O4). TD is consistently positive but modest (ρ ∈ [0.072, 0.206], pass 1/6), while ablations expose strong template/placement sensitivity and non-universal canonicalization safety on MMLU. RIA turns retokenization sensitivity into a reproducible reliability axis with complete scripts, logs, figures, and gate evidence.

Why it matters

Formatting that preserves meaning should not change a model's decision. RIA isolates that effect with paired no-truncation and semantics gates and checks mitigations such as canonicalization against explicit no-harm criteria.

Cite

@misc{uyar2026ria,
  title     = {When Formatting Flips Answers: A Deterministic Atlas of Retokenization Sensitivity in LLM Evaluation},
  author    = {Uyar, Ali},
  year      = {2026},
  doi       = {10.5281/zenodo.18682874},
  publisher = {Zenodo},
  url       = {https://doi.org/10.5281/zenodo.18682874}
}
AU-21
Lit sorts: the characters the selected operator swaps, all inside the question; its words, the option lines and their labels stay as setSort tray: O1 curly apostrophe, O2 curly double quote, O3 in-word hyphen to en dash, O4 30% of eligible spaces to NBSP, O5 10% to tab, O6 soft wrap at 80 columnsProof: one mark per gated MMLU-8 question (n = 512) for Llama3-8B; the red marks, set in reading order, count the answers whose option letter changed against the clean formeLever: canon_full maps curly quotes, dashes, NBSP, tabs and newlines back, so every operator's forme returns to one canonical formeRIA is a deterministic audit of formatting edits that keep a prompt's words and can still change a model's multiple-choice answer. Six operators edit the item's own text (the question, plus the passage for BoolQ) and leave the options and the prompt scaffold unchanged. Every example must fit the context window and keep its meaning in all of its variants, and option letters are scored by log-probability, giving 36,820 gated rows over BoolQ, ARC-Challenge and an 8-subject MMLU slice for Gemma2-2B and Llama3-8B. In the top cell, NBSP injection (O4) changes Llama3-8B's letter on 47 of 512 MMLU questions (9.18%) while accuracy moves +0.98 pp, and token divergence is positively associated with flips in all six model and task settings (Spearman ρ 0.072 to 0.206).