StateTrack README

项目的 README,来自 github.com/MUSE-AI-Lab/StateTrack。合并为一个 markdown 文件:README.md。

When LLMs Forget What They Believe: Characterizing State Integrity Collapse in Long-Horizon Dialogues

Yancheng Zhu · Yifan Yuan†

School of Artificial Intelligence, Shenzhen University
†Corresponding author

EMNLP 2026 (Main Conference)

arXiv Paper StateTrack-Bench Offline reproduction License

English · 简体中文


StateTrack-Bench evaluation protocol: a persistent constraint is planted in the dialogue, probed at increasing depths, and every failure is re-examined with a forked recall test.

TL;DR: An assistant can repeat a user's rule and still stop obeying it. We call this recall–compliance dissociation State Integrity Collapse (SIC): the model keeps the constraint in memory but no longer applies it to later turns — unlike ordinary forgetting, longer context or memory retrieval does not fix it. StateTrack-Bench plants one persistent constraint (numerical, format, role/persona, factual-memory or logical-rule) in a conversation, checks compliance at increasing dialogue depths, and uses a forked recall audit to separate forgetting from remembering-without-complying. Across seven provider-pinned models, 88.6% of failures are behavioral drift rather than forgetting, and Structured State Anchoring (SSA) recovers up to 24.4 points.

🔍 StateTrack-Bench

🚀 Reproduce the Paper Offline

All reported tables are reconstructed from the cached outputs with the Python standard library — no API key, no network:

git clone https://github.com/MUSE-AI-Lab/StateTrack.git
cd StateTrack
python tools/reproduce_reported_metrics.py      # retention table, dynamic-state, depth-50, two-constraint and checker audits
python scripts/sgd_ecological_pilot/reproduce_pilot_metrics.py   # SGD dialogue pilot
python -m unittest discover -s tests -v         # consistency checks over the stored results
python tools/verify_checksums.py                # integrity of every released file
python verify_package.py                        # exact package membership

The expected output of the first command is stored in reproduced_metrics.txt.

The primary retention curves are now recomputed from 175 scenario-level cached records in results/core/all_results.json, then checked against the published aggregate cache. The released core and augmented scenario banks, original runner sources, and full generation/replay instructions are documented in REPRODUCIBILITY.md.

Run the Core and Augmented Benchmarks

Both scenario banks are public: 25 core scenarios and 50 augmented scenarios, across five constraint categories. The runner retains the original 12-turn schedule, probe depths [3, 5, 7, 10, 12], filler messages, and regex checkers. These commands require only Python 3.10+:

# Inspect all scenarios and planned probe counts without credentials or API calls.
python scripts/run_benchmark.py --suite core --dry-run --output outputs/core-plan
python scripts/run_benchmark.py --suite augmented --dry-run --output outputs/augmented-plan

# Recompute metrics from scenario-level records, not aggregate tables.
python scripts/run_benchmark.py --suite core --replay results/core/all_results.json --output outputs/core-replay
python scripts/run_benchmark.py --suite augmented --replay results/augmented/all_results.json --output outputs/augmented-replay

# Generate fresh model outputs after configuring OPENAI_API_KEY.
python scripts/run_benchmark.py --suite core --model YOUR_MODEL_ID --output outputs/new-core
python scripts/run_benchmark.py --suite augmented --model YOUR_MODEL_ID --output outputs/new-augmented

Use --resume with the same arguments and output directory to skip completed dialogues. --state-type, --scenario-index, --limit, and --concurrency support smaller runs. OPENAI_BASE_URL or --base-url selects an explicitly configured compatible provider; the default is the official OpenAI API. Fresh runs save full dialogues, probe labels, a versioned scenario manifest, and reconstructed metrics under ignored outputs/ directories. Historical cached records contain probe previews and labels rather than complete dialogues; replay reproduces their original scoring, while fresh generation produces new evidence.

📊 Main Results

Strict joint retention (%) — mean over five constraint types and five depths (Table 3)

Model Overall Turn 3 Turn 12
DeepSeek-v4-Flash 100.0 100.0 100.0
GPT-5.4-mini 98.4 96.0 100.0
DeepSeek-v4-Pro 96.0 92.0 96.0
Qwen3.6-Plus 95.2 92.0 96.0
GPT-5.4 94.4 100.0 96.0
Claude-Sonnet-4-6 90.4 92.0 88.0
Gemini-3.1-Pro 62.4 64.0 54.0

Structured State Anchoring — retention (%) at depth 12 (Table 14)

Model Baseline + SSA Δ
GPT-5.4 96.0 99.2 +3.2
Claude-Sonnet-4-6 88.0 96.0 +8.0
Gemini-3.1-Pro 54.0 78.4 +24.4
Qwen3.6-Plus 96.0 98.4 +2.4

The forked recall audit attributes 88.6% of the observed failures to behavioral drift (84.4% when the most brittle model is excluded). Model snapshot identifiers are listed in metadata/snapshot_manifest.csv.

📦 Released Artifacts

Folder Content
results/core/ aggregate retention cache behind Tables 2 and 3 (7 models × 5 depths)
results/rebuttal/ 70-output audit (task success, constraint compliance, recall, SIC+ / SIC−), 105-output update / revocation experiment, 216-probe symbolic-depth analysis, 34-output two-constraint analysis, execution audit for the depth-50 results
results/checker_calibration/ two independently worded temperature-0 model-assisted checker passes over the 70 audit rows, disagreement adjudication and agreement report
results/ecological_pilot/ pilot on human-authored Schema-Guided Dialogue conversations: 30 cases × 7 models with behavior and recall responses (details)

🧪 Re-running the Experiments

Re-running model generation needs your own provider credentials. Copy the template and fill in OpenAI-compatible endpoints and keys (never commit this file):

cp experiment_config.example.json experiment_config.json
python scripts/paper1_state_collapse/run_rebuttal_experiments.py
python scripts/paper1_state_collapse/run_symbolic_depth_audit.py
python scripts/paper1_state_collapse/run_multiconstraint_audit.py
python scripts/paper1_state_collapse/run_model_assisted_checker_audit.py --max-workers 16

Hosted model endpoints change over time, so fresh runs can differ from the cached outputs.

📁 Repository Structure

results/                     # cached outputs and summaries (see above)
scripts/
├── common/                  # OpenAI-compatible LLM caller and JSON judge
├── paper1_state_collapse/   # runners of the follow-up audits and checker calibration
└── sgd_ecological_pilot/    # SGD pilot prompts, summary and reproduction
tools/                       # offline metric reproduction and checksum verification
tests/                       # consistency tests over the stored results
metadata/                    # model snapshot identifiers
assets/                      # figures

📝 Citation

@inproceedings{zhu2026statetrack,
  title     = {When {LLMs} Forget What They Believe: Characterizing State Integrity Collapse in Long-Horizon Dialogues},
  author    = {Zhu, Yancheng and Yuan, Yifan},
  booktitle = {Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing (EMNLP)},
  year      = {2026},
  eprint    = {2610.31314},
  archivePrefix = {arXiv}
}

📄 License

Code is released under the MIT License; the authored benchmark scenarios and derived metadata under CC BY 4.0. Cached model outputs remain subject to the respective providers' terms, and the Schema-Guided Dialogue source data is not redistributed.

StateTrack (MUSE-AI-Lab/StateTrack)

正在搜索数据库…

这是什么?StateTrack 是一篇 EMNLP 2026 论文的可复现代码库。该论文研究的问题是:大语言模型为什么还能复述用户在对话前面给出的规则,却不再遵守它。代码库包含 StateTrack-Bench 评测协议、缓存的实验结果,以及一种名为结构化状态锚定(SSA)的缓解方法。
这是聊天机器人,还是基准测试或评测框架?它是一个基准测试和评测工具包,本身不是聊天机器人。Python 脚本会在多轮对话中植入一条持续有效的约束,在不同对话深度检测模型是否遵守,并对任何兼容 OpenAI 接口的模型 API 运行分叉式回忆审计。
我该怎么复现论文的结果?所有报告中的表格都可以离线重建,只需使用缓存输出、Python 标准库和 Python 3.10+。完整的生成和回放命令都在 REPRODUCIBILITY.md 中。
使用它需要 API 密钥吗?复现缓存表格不需要,这一步完全离线运行。如果要重新生成新的模型输出,则需要你自己的兼容 OpenAI 接口的服务商凭证,可通过 OPENAIBASEURL 或 --base-url 进行设置。
我重新跑出来的结果会和论文一致吗?不一定。托管的模型接口会随时间变化,因此针对实时服务商 API 的新生成结果,可能与已发表表格背后的缓存输出不同。
什么是状态完整性崩溃(SIC)?SIC 指模型在记忆中仍然保留着已声明的约束,但在后续轮次中不再应用它。这是一种回忆与遵守相脱节的现象。它与普通的遗忘不同,不会因为上下文变长或记忆检索而得到修复。
什么是结构化状态锚定(SSA)?SSA 是一种无需训练的缓解方法。它在每一轮都加上一个 [ACTIVESTATE] 块,将约束改写为可检验的谓词,并对失败的输出最多重试两次。在测试的最弱模型上,它最多挽回了 24.4 个百分点的保持率。
测试了哪些模型?共测试了七个固定服务商版本的模型,包括 DeepSeek-v4-Flash、DeepSeek-v4-Pro、GPT-5.4 和 GPT-5.4-mini、Qwen3.6-Plus、Claude-Sonnet-4-6 以及 Gemini-3.1-Pro。
失败案例中,真正的遗忘和行为漂移各占多少?分叉式回忆审计将 88.6% 的已观察到的失败归因于行为漂移,即模型仍然记得规则,但忽略了它;而不是真正的遗忘。
大小
0.6 MB
星标
239
更新
提交Nov 11
时长
22天
提交 · 90 天