Papers
Topics
Authors
Recent
Search
2000 character limit reached

StarPO: State-Thinking-Actions-Reward Policy Optimization

Updated 9 November 2025
  • The paper introduces a framework that integrates explicit thought actions with environment actions, leading to enhanced sample efficiency and improved performance in multi-turn scenarios.
  • It defines a thought-MDP that extends classical MDPs by incorporating deterministic, zero-reward thought actions to enable local policy refinements through internal reasoning.
  • It presents StarPO-S, a stabilized variant using uncertainty-based trajectory filtering, asymmetric clipping, and removal of KL penalties to mitigate training instabilities.

State-Thinking-Actions-Reward Policy Optimization (StarPO) is a trajectory-level reinforcement learning (RL) framework for agents—particularly LLMs—that decomposes decision processes into explicit state, thinking (reasoning), action, and reward components. Unlike standard RL, which typically maximizes return over actions alone, StarPO jointly models and optimizes both the reasoning trace (i.e., internal deliberation or "thinking") and external actions, integrating these into a single end-to-end policy that seeks to maximize cumulative trajectory reward. StarPO and its stabilized variant StarPO-S emerged as practical solutions to the unique challenges in training multi-turn, autoregressive RL agents and have provided crucial insight into the emergence and stability of reasoning behaviors in LLMs and other embodied agents (Hanna et al., 20 Jun 2025, Wang et al., 24 Apr 2025).

1. Conceptual Foundations and Formalism

StarPO builds from the "thought Markov decision process" (thought-MDP) framework, which minimally extends the classical MDP by augmenting the state-action space to explicitly include a set of thought states and thought actions. Formally, in a thought-MDP, an agent interacts with an environment according to the tuple:

  • $𝓜_{thought} = \langle S, T, A, C, p, p_T, r, γ \rangle$
    • SS: environment-state space
    • AA: environment action set (executable actions)
    • TT: finite set of thought-states (τT\tau \in T)
    • CC: finite set of thought-actions (cCc \in C)
    • pp: standard transition kernel p:S×AΔ(S)p: S\times A \to \Delta(S)
    • pTp_T: thought-state transition function SS0 (typically deterministic)
    • SS1: nonnegative reward SS2 (no direct reward for thinking)
    • SS3: discount factor

At each timestep, the agent observes SS4 and selects either an environment action SS5 or a thought action SS6. If SS7, standard environment dynamics and reward obtain; if SS8, only the thought-state transitions—no environment change and SS9. The value function is AA0.

This structure enables the explicit modeling and optimization of periods of "thinking" or internal reasoning, treated formally as (zero-reward) actions that update an internal latent state (the thought state) but incur a temporal (discounting) cost.

2. Theoretical Results on Thinking and Policy Improvement

A key theoretical result is that, in thought-MDPs, optimal policies never execute thought actions: any such step only delays reward collection without increasing the agent's expected return (Proposition 1). However, during learning, thinking action may emerge as policy improvement steps in sub-optimal or pre-trained policies.

Theorem 1 establishes that a policy improvement step will set AA1 (invoke thinking) only if, upon transitioning the thought-state to AA2, the return AA3. Thus, "thinking" corresponds exactly to a local policy refinement: the agent selects a (temporarily) sub-optimal sub-policy and executes one or more thought actions to switch into a higher-value local strategy before acting in the environment.

A corollary is that chaining multiple thought-actions for further refinement is justified only if each further thought-state properly increases the associated value.

Additional analysis (Proposition 2) shows that, in goal-oriented tasks, access to reward-improving thought transitions strictly reduces the effective planning horizon—accelerating goal arrival when thinking allows access to better strategies not immediately available from the current policy.

3. Emergence Conditions for Thinking Through RL

The emergence of thinking actions in model-free RL depends on three central conditions:

  • Policy Initialization: The initial policy AA4 must embed sub-policies AA5 with non-identical returns for some AA6, so that switching via thought actions can expose higher-value subpolicies.
  • Deterministic, No-Cost Thought Dynamics: Thought actions induce deterministic transitions AA7 and have no intrinsic cost beyond time-discounting.
  • Nonnegative Reward Structure: The environment should offer nonnegative rewards with reachable positive reward from any state, ensuring agents are motivated to improve.

This set of requirements explains why pre-training or behavior cloning to initialize policies with "sub-skills" (i.e., high-value subpolicies in certain thought-states) can enable RL to exploit thinking: RL can then learn to invoke thought actions in order to trigger subpolicies that solve new or composite tasks more effectively.

Empirical evidence (LLM arithmetic tasks and the tailored Gridworld domain) demonstrates that agents initialized with such subpolicy structures plus thought actions achieve significant sample efficiency compared to agents lacking these properties.

4. StarPO Algorithm: Design and Implementation

StarPO operationalizes these theoretical principles as a practical RL algorithm. The objective is the maximization of the usual discounted return in the thought-MDP:

AA8

StarPO uses a single (typically neural) policy network, parameterized by AA9, which receives state embeddings for both TT0 and TT1 and outputs logits over the joint action space TT2:

  • TT3
  • TT4

The environment and thought transition functions TT5 are assumed known or fixed (e.g., small deterministic tables).

StarPO learning loop (policy gradient style):

CC2 Variance reduction can be incorporated with learned value functions or alternative baselines. Off-policy variants may learn a Q-function TT6 and use e.g. TT7-greedy or softmax action selection. Practical design allows a variety of embeddings for TT8 (from simple one-hots to recurrent/attention encodings depending on the size of TT9).

5. Advanced Stabilization: The StarPO-S Variant

Multi-turn RL with LLMs presents unique instability modes, notably the “Echo Trap” pattern where reward variance dramatically drops and gradients spike. StarPO-S introduces three empirical stabilization techniques (Wang et al., 24 Apr 2025):

  1. Uncertainty-Based Trajectory Filtering: For each batch, prompts with the lowest in-group reward variance (i.e., "solved" or "unsolvable" instances) are filtered out. This focuses updates on informative, learnable samples, improving both learning signal and stability.
  2. KL-Term Removal: The Kullback-Leibler divergence penalty term in PPO is omitted (i.e., τT\tau \in T0), decoupling learning dynamics from the initialization distribution and enhancing exploration.
  3. Asymmetric ("Clip-Higher") Clipping: Token-level policy ratio clipping is set asymmetrically (τT\tau \in T1, τT\tau \in T2), permitting larger positive updates while preserving protection against excessive divergence.

These modifications delay or eliminate collapse phenomena across diverse environments, and augment peak performance and robustness.

6. Implementation in LLM Agent Contexts

In the LLM domain, StarPO decomposes each interaction turn as follows:

  • State (τT\tau \in T3): full transformer input prefix, including all previous “> …</think>” and “<answer>…</answer>” segments.

    • Thinking (τT\tau \in T4): a token sequence with both explicit reasoning (“<think>…”) and output action (“<answer> a_t </answer>”).
  • Action (τT\tau \in T5): environment-executable output extracted from <answer> tags.

  • Reward (τT\tau \in T6): externally supplied environment feedback, possibly with additional shaping or format consistency penalties.

Policy optimization proceeds at the token level, with both actor-only (GRPO-style) and actor-critic (PPO-style) updates. The key equations include:

  • StarPO (trajectory-level) objective:

τT\tau \in T7

  • PPO token-level clipped loss:

τT\tau \in T8

where τT\tau \in T9

  • GRPO normalized advantage:

CC0

  • Uncertainty filtering metric (StarPO-S):

CC1

The structure allows credit assignment not just to final decisions but to the entirety of the "reasoning" trace. Reward signals can be shaped to penalize missing or malformed <think> structure, further encouraging explicit, trackable deliberation.

7. Contrasts with Prior LLM-RL and Broader Significance

Previously, RL for LLM agents typically applied PPO or GRPO at the prompt–response level, treating each generation in isolation. Such approaches struggle to handle multi-turn, long-horizon tasks and cannot assign reward to intermediate reasoning. StarPO's trajectory-centric, reasoning-aware approach enables unified optimization over both actions and reasoning sequences, bridging the gap between token-level policy training and end-to-end agent performance.

Empirical results indicate that integrating reasoning structures and thought actions—when appropriately initialized—not only improves performance in compositional or multi-step tasks but also yields dramatic sample efficiency gains unattainable with naïve, purely reactive RL. The introduction of StarPO-S also demonstrates that trajectory-level stabilization is crucial to prevent collapse in high-variance, multi-turn RL settings (Wang et al., 24 Apr 2025).

A plausible implication is that broad, multi-task pre-training followed by StarPO fine-tuning could be a paradigm for scalable, self-improving reasoning agents, especially as environment and reasoning complexity increase.


In summary, State-Thinking-Actions-Reward Policy Optimization (StarPO) defines a principled and practical framework for end-to-end RL in environments requiring both external action and explicit, creditable reasoning. By extending the policy domain to include internal thought processes and stabilizing training with targeted sampling and gradient control (StarPO-S), this approach provides a viable path toward general, multi-turn, reasoning-capable agents in both language and non-language domains (Hanna et al., 20 Jun 2025, Wang et al., 24 Apr 2025).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (2)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to State-Thinking-Actions-Reward Policy Optimization (StarPO).