ALIAS: Evaluating Performance and Memorization in LLM-Written TLA+ Specifications
Organizations: Loyola University Chicago
Abstract
Memorization inflates the benchmark scores of large language models (LLMs), since a model can reproduce answers it saw in training. Researchers test for it with consistent identifier renaming (CIR), which gives every identifier in a task a new name, and treat a lower score on the renamed task as evidence of recall. We test this method on the Temporal Logic of Actions Plus (TLA+) language, whose model checker acts as an oracle by confirming whether a renamed task preserves the exact behaviors of the original. Across 111 TLA+-Bench tasks, renaming lowers the correctness of Claude Opus 4.8 from 28% to 18% and of GPT-5 from 9% to 7%. Most of this decrease comes from how the test grades, which requires exact names that most descriptions never state. Grading by behavior shrinks the decrease to about 3 percentage points for Opus 4.8 and to 0 for GPT-5. In two model families fine-tuned on disjoint halves of the tasks, renaming removes about half of the training gain in likelihood and costs 4.9 percentage points (Qwen) and 1.3 percentage points (Gemma) on unseen tasks. A lower score after renaming therefore mixes memorization, name-based grading, and the cost of new names.
Figures & tables
| Measure | Original | Random | Meaningful |
|---|---|---|---|
| Claude Opus 4.8 | |||
| Parse (SANY) | 80.4 | 81.6 | 81.0 |
| Correct, name | 28.3 | 18.2 | 20.0 |
| Correct, behavior | 38.4 | 35.3 | 37.7 |
| GPT-5 | |||
| Parse (SANY) | 66.1 | 70.5 | 69.1 |
| Measure | Exposure | DiD | Unseen cost |
|---|---|---|---|
| Qwen2.5-Coder-14B | |||
| Correct, behavior | 7.6 [3.8, 12.0] | 3.3 [ 0.2, 7.3] | 4.9 [2.0, 8.4] |
| Correct, name | 5.6 [2.2, 9.6] | 3.5 [0.4, 6.9] | 4.4 [1.5, 7.6] |
| Likelihood | 0.34 [0.30, 0.39] | 0.16 [0.13, 0.19] | – |
| Likelihood, other | 0.31 [0.27, 0.35] | 0.07 [0.06, 0.09] | – |
| Gemma 4 31B | |||
Appendix figures & tables11 assets
Supplementary material from the paper’s appendix.
Appendix
| Kind | Example | Renamed | Hidden |
|---|---|---|---|
| Domain words | BarrierProperty | 599 (34%) | 148 (44%) |
| Conventions | TypeOK | 415 (23%) | 77 (23%) |
| Abbreviations | hr | 774 (43%) | 108 (32%) |
| Total | 1,788 | 333 |
| Measure | Behavior grade | Name grade |
|---|---|---|
| Tasks | 90 | 110 |
| Original, seen / unseen | 22.0 / 14.0 | 19.5 / 11.6 |
| Renamed, seen / unseen | 17.1 / 12.7 | 9.5 / 7.5 |
| Exposure effect | 8.0 [3.6, 12.9] | 7.8 [3.6, 12.4] |
| DiD | 3.6 [ 0.9, 8.2] | 5.8 [1.5, 10.5] |
| Unseen cost | 1.3 [ 2.0, 4.9] | 4.2 [0.4, 8.5] |
| Control | Passed | |
|---|---|---|
| Reference against itself | 102 | 90 |
| Operator-renamed reference | 56 | 56 |
| Renamed reference and modules | 90 | 90 |
| Mutant with other reachable states | 105 | 0 |
| Set | Used for | |
| TLA + -Bench system specifications | 146 | starting pool |
| Pass SANY and TLC after CIR (test set) | 111 | Experiment 1 |
| With a TLC configuration | 110 | Experiment 2, name-based grading |
| No test fixtures or random values | 102 | grader validation |
| Reference passes behavior-based grading | 90 | Experiments 2 and 3, behavior-based grading |
| With a valid meaningful renaming | 77 | meaningful-name control |
| Measure | Task-pair exposure | Specification-only exposure |
|---|---|---|
| Exposure effect, original descriptions | 7.6 [3.8, 12.0] | 2.7 [ 0.2, 5.8] |
| Exposure effect, renamed descriptions | 4.2 [1.1, 7.8] | 0.0 [ 3.1, 3.3] |
| Difference in differences | 3.3 [ 0.2, 7.3] | 2.7 [ 1.8, 7.3] |
| Renaming cost, unseen tasks | 4.9 [2.0, 8.4] | 0.4 [ 3.6, 4.4] |
| Log-likelihood, difference in differences | 0.16 [0.13, 0.19] | 0.08 [0.07, 0.10] |
| Log-likelihood, tokens outside renamed identifiers | 0.07 [0.06, 0.09] | 0.04 [0.03, 0.05] |
| Benchmark and task | Check | Hidden name |
|---|---|---|
| TLA + -Bench Bisharat et al. (2026b) , description to specification | SANY and TLC with the reference configuration | 78/111 |
| SysMoBench Cheng et al. (2026) , code to system model | SANY, TLC, trace validation and invariant templates, with names mapped by an LLM | no |
| TLAPS-Bench The tlaps-bench Authors (2026) , theorem to proof | TLAPS on the stated theorem | no |
| TLAi+Bench Kuppe (2025) , puzzle to specification | TLC counterexample and a refinement mapping to the gold specification | no |
| Measure | Original | Random | Meaningful |
|---|---|---|---|
| Claude Opus 4.8 | |||
| BLEU-4 | 47.3 | 41.9 | 44.3 |
| ROUGE-L | 60.0 | 56.9 | 58.6 |
| GPT-5 | |||
| BLEU-4 | 36.1 | 32.1 | 33.9 |
| ROUGE-L | 51.0 | 48.4 | 49.9 |
Memorization in Language Models
Memorization in language models studies how training examples and facts are stored, recalled, generalized, and exposed by model parameters.
See all 114 papers