cs.LGMar 2, 2026

Provable and Practical In-Context Policy Optimization for Self-Improvement

Authors: Tianrun Yu, Yuxiao Yang, Zhaoyang Wang, Kaixiang Zhao, Porter Jenkins, Xuchao Zhang, Chetan Bansal, Huaxiu Yao, +1 more

Organizations: Brigham Young University · University of North Carolina at Chapel Hill · Microsoft

Abstract

We study test-time scaling, where a model improves its answer through multi-round self-reflection at inference. We introduce In-Context Policy Optimization (ICPO), in which an agent optimizes its response in context using self-assessed or externally observed rewards without modifying its parameters. To explain this ICPO process, we theoretically show that with sufficient pretraining under a novel Fisher-weighted logit-matching objective, a single-layer linear self-attention model can provably imitate policy-optimization algorithm for linear bandits. Building on this theory, we propose Minimum-Entropy ICPO (ME-ICPO), a practical algorithm that iteratively uses its response and self-assessed reward to refine its response in-context at inference time. By selecting the responses and their rewards with minimum entropy, ME-ICPO ensures the robustness of the self-assessed rewards via majority voting. Across standard mathematical reasoning tasks, ME-ICPO attains competitive, top-tier performance while keeping inference costs affordable compared with other inference-time algorithms. Overall, ICPO provides a principled understanding of self-reflection in LLMs and yields practical benefits for test-time scaling for mathematical reasoning.

Figures & tables

Appendix figures & tables7 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. SRPO: Self-Reflective Policy Optimization for Long-Horizon Reasoning

    Aug 24, 2026Jialong Liu, Yuling Shi, Ning Yang +2RL for Language Model ReasoningPolicy Optimization

  2. ∇\nabla-Reasoner: LLM Reasoning via Test-Time Gradient Descent in Latent Space

    Mar 5, 2026Peihao Wang, Ruisi Cai, Zhen Wang +4LLM ReasoningTest-Time Optimization

  3. ThinkTwice: Jointly Optimizing Large Language Models for Reasoning and Self-Refinement

    Apr 2, 2026Difan Jiao, Qianfeng Wen, Blair Yang +2RL for Language Model ReasoningLLM Reasoning