cs.CLOct 15, 2026

EMO: A Closed-Loop Test-Time Computation Framework via Alternating Context Optimization and Logits Steering

Authors: Wei Xia, Yehui Tang, Zhi-Hong Deng

Organizations: State Key Laboratory of General Artificial Intelligence, School of Intelligence Science and Technology, Peking University · Samsung Research, Beijing, China

Abstract

Test-time context optimization adapts frozen language models through textual feedback, but ordinary conditional generation provides no separate control over how strongly to reinforce the distributional changes induced by a context update. We introduce EMO, a training-free framework inspired by expectation--maximization that alternates question-specific context estimation (E-step) and distribution refinement (M-step). The E-step revises a system context using textual gradients from an external judge without access to gold answers. The M-step contrasts next-token distributions under the revised and preceding contexts at a shared prefix to construct a confidence-constrained logit correction. Feedback on the steered response drives the next context update, coupling adaptation across rounds with intervention within each generation. Theoretically, we connect parameter and context optimization through a shared target-KL objective and additive logit representations, and derive the steering vector from context-induced logit displacements. Under context-improvement and faithful-steering assumptions, we prove a one-round decrease in target KL divergence for sufficiently small steering strength. Under greedy decoding across eight models and six benchmarks, EMO improves the zero-shot baseline in 39 of 40 aggregated settings, averaging +9.10+9.10 percentage points. With the same judge, it adds +1.53+1.53 points on average over context-only optimization (TextGrad), with consistent MMLU-Pro gains across models. At matched target-model generation budgets, accuracy advantages over best-of-NN are strongest on Llama, while oracle coverage is higher in most comparisons despite fewer candidates. The coverage--selection gap motivates allocating test-time computation jointly to candidate generation and verification.

Figures & tables

Appendix figures & tables17 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Cautious Context Steering for Language Model Personalization

    Aug 6, 2026Gihoon Kim, Jeyoung Lee, Suhan Woo +4Language Model SteeringLLM Personalization

  2. Evaluation-Conditioned Training: Teaching Models to Generalize to Stronger Oversight Regimes

    Aug 10, 2026Alec Harris, Kasey Corra, Archie Chaudhury +1RL for Language ModelsLLM Alignment

  3. Self-Generated Feedback Destabilizes Test-Time Training: A Causal Decomposition of Long-Horizon Adaptation

    Oct 4, 2026Cheng Luo, Bing Li, Bernard GhanemTest-Time AdaptationContinual Test-Time Adaptation