NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

StateTree: Enhancing Long-term Dialogue Reasoning via Reinforcement Learning

Naen Xu, Wanqing Cui, Yibo Hu, Shixin Hong, Hengyu An, Meiguang Jin, Junfeng Ma, Tianyu DuNeurIPS 2026

TL;DR

Large Language Models tend to lose the plot during months-long, multi-session chats—forgetting scattered details or failing to notice when you change your mind. StateTree solves this by reframing long-term dialogue reasoning as a literal treasure hunt: it embeds synthetic, timestamped binary trees into authentic conversations and trains models via Reinforcement Learning (RL) to follow the freshest clues. Remarkably, training on just 616 short (10K-token) examples unlocks massive gains on 128K-token benchmarks, allowing a 14B model to outperform much larger 32B baselines without the crushing compute cost of full-length training.

What Problem Does This Paper Address?

If you want an AI assistant that genuinely knows you over months of chatting, feeding it a massive context window isn't enough. Unlike static documents (like a textbook), human conversations are non-stationary and messy. Crucial facts are scattered across weeks (cross-session retrieval), chronological order matters (temporal reasoning), you might move from Hawaii to Paris (knowledge updates), and answering a single question often requires stitching together scattered hints (multi-hop reasoning).

Figure 2: Examples of the challenges in multi-turn dialogue. For each example, we show the associated evidence statements on the left and the question with the answer on the right.

Teaching LLMs these skills hits a triple wall:

  1. Data Scarcity: Authentic, multi-session dialogue datasets with verified ground-truth answers are tiny (e.g., LoCoMo has only 10 dialogues).
  2. Complex Reasoning: Standard supervised fine-tuning (SFT) on synthetic reasoning traces tends to memorize surface patterns rather than generalize.
  3. Prohibitive Compute: Running Reinforcement Learning (RL) across 128K-token contexts requires astronomical GPU memory and time, and often degrades the model's everyday short-context skills.

Methods

The authors' core insight is that reasoning over evolving chat histories is structurally identical to searching a path through a temporally constrained tree. To teach this without new data, they introduce StateTree, an RL pseudo-task embedded directly inside existing dialogues.

Here is how the novel data pipeline works:

  • Basic StateTree: Starting with a real QA pair from a multi-session chat, the target question is hidden in one leaf of a binary tree (other leaves get plausible distractor questions). Tree edges are converted into JSON key-value pointers using meaningless random UUIDs (e.g., {"113464e2": "5ab90ad1"}) and scattered across chat sessions. At every branch, the correct pointer is placed in a more recent session than the distractor. Given a root key, the model must scan sessions, compare timestamps to pick the newest branch, uncover the hidden question, and answer it.
  • Compositional StateTree: Instead of bare pointers, edges carry semantic fragments—like [A] Melanie at Level 1, [B] paint a sunrise at Level 2, and When did [A] [B]? at Level 3. Now the model must also aggregate clues along its path just to figure out what is being asked.
Figure 3: The StateTree data construction pipeline. Left: Basic StateTree embeds key-value records across sessions into a tree; the model traverses root-to-leaf to recover the target question. Right: Compositional StateTree augments edges with step-level fragments aggregates into the final question.

For optimization, the authors use a standard RL algorithm (GRPO—Group Relative Policy Optimization) paired with two critical design choices:

  • Four-Stage Curriculum: Models start with standard QA warm-up, graduate to depth-2 Basic trees, then depth-3 Basic trees, and finally depth-3 Compositional trees.
  • Combined Reward: Models get a reward of 1 if their boxed answer passes either an exact string match or a deterministic 1.5B LLM-as-a-Judge check, balancing strict accuracy with phrasing flexibility.

Datasets

No new evaluation benchmarks were introduced; instead, StateTree turns tiny existing datasets into rich RL gyms:

  • Training & In-Domain Eval: LoCoMo (only 616 QA pairs at ~10K tokens used for training; 770 for testing), plus 2,500 DAPO-Math samples mixed into Stage 3 to prevent forgetting general reasoning.
  • Out-of-Distribution (OOD) Long-Context Eval (up to 128K tokens): LongMemEval and PersonaMem.
  • Short-Context General Eval: MMLU, MATH-500, and IFEval.

Key Insights and Ideas

  • 10K Training Generalizes to 128K: Because StateTree teaches structural habits—scanning exhaustively, checking dates, and chaining hops—rather than context-length-specific tricks, models trained strictly on 10K-token chats extrapolate seamlessly to 128K-token histories.
  • Opaque Keys Prevent Lazy Shortcuts: When the authors replaced random UUID keys with normal English words (like "apple") in ablations, performance dropped. Semantic keys let the model take lexical shortcuts; meaningless UUIDs force genuine timestamp comparison.
  • Prompting Isn't Enough: Simply asking the base model to "think step by step" yielded less than a 1% gain. Meanwhile, during StateTree curriculum RL, the models naturally grew their reasoning traces as tree depth increased, developing emergent verification habits.
Figure 4: Reasoning F1 score and response lengths throughout RL training on the validation set.

Key Results

Applied to Qwen2.5 (7B, 14B) and Qwen3 (8B), StateTree outperforms SFT (SEALONG) and RL memory baselines (LoongRL, RL-MemAgent):

  • Punching Above Its Weight: Trained on just 616 examples, StateTree-14B hits 60.91% accuracy on LoCoMo (+11.82% over base), beating GPT-4o (52.73%) and QwenLong-L1-32B (46.36%). Temporal reasoning sees a massive +26.19 F1 jump.
  • Massive 128K OOD Gains: On LongMemEval (128K), StateTree-7B surges by +23.60% (from 23.80% to 47.40%), while StateTree-14B reaches 59.00%, comfortably beating QwenLong-L1-32B (51.00%).
  • Zero Capability Tax: On MMLU, MATH, and IFEval, short-context performance stays rock solid (+0.1% average change on 8B; minimal -0.2% and -0.6% shifts on 7B and 14B).
  • Qualitative Leap: Where larger models stop at the first matching session or miss items, StateTree systematically sweeps timestamps across the entire history before doing the math.
Figure 1: Model trajectories in multi-session dialogue reasoning. (i) QwenLong-L1-32B gets lost across sessions and misses information. (ii) The StateTree-trained model shows cross-session retrieval, temporal reasoning, knowledge update, and multi-hop reasoning, improving reasoning reliability.

Limitations and Future Work

Not discussed in the paper. (Note: The provided manuscript ends right after the conclusion on page 10, omitting any appendix or dedicated limitations section.)

Summary updated

BibTeX
@inproceedings{xu2026statetree,
  author = {Naen Xu and Wanqing Cui and Yibo Hu and Shixin Hong and Hengyu An and Meiguang Jin and Junfeng Ma and Tianyu Du},
  title = {{StateTree: Enhancing Long-term Dialogue Reasoning via Reinforcement Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=Wtmbj6bI9C},
}
Figure