HIPIF: Hierarchical Planning and Information Folding for Long-Horizon LLM Agent Learning

Juncheng Diao, Zhicong Lu, Peiguang Li, Yongwei Zhou, Changyuan Tian, Qingbin Li, Rongxiang Weng, Jingang Wang, Xunliang CaiarXiv 2026

TL;DR

The paper introduces HIPIF (Hierarchical Planning and Information Folding), a framework that trains LLM agents end-to-end to tackle complex, long-horizon tasks. By dynamically decomposing goals into subgoals and "folding" (compressing) completed histories, HIPIF mitigates long-context interference and drastically reduces token usage. Optimized via reinforcement learning (GRPO) with rule-based process rewards, it achieves state-of-the-art performance on agentic benchmarks without relying on expensive expert trajectories or auxiliary models.

What Problem Does This Paper Address?

When Large Language Models (LLMs) act as autonomous agents in multi-turn, long-horizon environments, their performance typically degrades as the interaction history grows. This phenomenon is known as long-context interference. As the agent accumulates a massive trail of observations and actions, redundant information floods the context window, causing the model to lose track of the global task state and suffer from reasoning degradation or "goal forgetting."

While existing hierarchical reinforcement learning (HRL) methods attempt to solve this by decomposing tasks, they often rely on separate auxiliary models for task decomposition or require costly, task-specific expert trajectories for behavior cloning. Furthermore, they rarely train the agent to actively manage and compress its own history, leaving the root cause of long-context interference unaddressed.

Methods

HIPIF addresses these challenges through an end-to-end trainable framework consisting of three core components:

  1. Hierarchical Planning and Information Folding: Instead of conditioning decisions on the entire raw history, HIPIF organizes execution around explicit subgoals. Once the agent determines a subgoal is complete, its detailed action-observation history is "folded" into a compact summary record [subgoal, final_observation], maintaining a clean and concise working context.
  2. Hierarchical Reflection: To stabilize planning, the agent performs a two-part reflection at each step. It first generates a binary completion judgment along with a chain-of-thought rationale. Based on this judgment, the generation branches: if completed, it reflects on historical subgoals to propose the next one; if uncompleted, it reflects on the current subgoal's local history to output the next atomic action.
  3. Subgoal-Oriented Process Rewards: To alleviate the sparse reward problem inherent in long tasks, the authors introduce rule-based process penalties optimized via Group Relative Policy Optimization (GRPO). These include Subgoal Content Rewards (penalizing ungrounded or failed subgoals) and Subgoal Execution Rewards (penalizing repetitive action-observation loops).
Figure 1: Overview of the design of HIPIF. (a): End-to-End Training for Hierarchical Planning and Information Folding. (b): Hierarchical reflection. (c): Subgoal-oriented process rewards.

Datasets

The authors evaluated HIPIF on three widely used, publicly available interactive agent benchmarks:

  • ALFWorld: A text-based environment aligned with ALFRED, featuring household tasks like picking, cleaning, and heating objects across 6 categories.
  • VirtualHome: A simulated indoor environment requiring agents to execute sequences of household activities based on high-level descriptions.
  • ScienceWorld: A complex text-based environment testing scientific reasoning and multi-step experimental procedures (e.g., measuring temperatures, finding objects).

Key Insights and Ideas

  • Structure Trumps Scale: One of the most striking findings is that a smaller base model (Qwen2.5-3B) equipped with HIPIF's hierarchical structure can outperform a larger model (Qwen2.5-7B) running a standard flat architecture. Explicit context organization is more critical than raw parameter count for long-horizon tasks.
  • Context Management as a Learnable Policy: Rather than relying on static, hand-crafted prompt engineering to summarize history (which often fails in complex environments), HIPIF treats context folding as a policy behavior optimized directly through environmental feedback.
  • Orthogonality to Credit Assignment: HIPIF fundamentally restructures the decision-making process rather than just tweaking reward signals. As a result, it is highly complementary to advanced credit-assignment methods like GiGPO; combining the two yields the highest overall performance.

Key Results

HIPIF consistently outperformed advanced closed-source models, prompting baselines, and state-of-the-art RL methods across all benchmarks:

  • Task Success Rates: Using a 3B base model, HIPIF achieved an average success rate of 96.1% on ALFWorld, 63.3% on VirtualHome, and 64.8% on ScienceWorld. This significantly beats powerful closed-source models like GPT-4o (which scored 48.0%, 20.8%, and 47.1% respectively under standard prompting).
  • Token Efficiency: HIPIF dramatically reduced both the number of interaction steps and the total accumulated input tokens per trajectory. For instance, on ALFWorld, HIPIF averaged 16.6k tokens per trajectory compared to 37.8k tokens for standard GRPO without subgoal structures.

Limitations and Future Work

Despite its strong performance, the authors note several limitations:

  • Environment Constraints: HIPIF was primarily validated in simulated environments with structured observation and action spaces. Transitioning to open-ended, real-world settings will require integrating robust perception and open-vocabulary action grounding.
  • Instruction-Following Dependency: The framework relies heavily on structured XML-style tags (<reflection>, <subgoal>, etc.) to control the branching logic. This necessitates a base model with reasonably strong instruction-following capabilities to avoid formatting errors.
  • Evaluation Scope: The experiments did not exhaustively cover all model families or massive parameter scales (e.g., 70B+ models), leaving its extreme scaling behavior an open question for future research.

Summary updated

BibTeX
@misc{diao2026hipif,
  author = {Juncheng Diao and Zhicong Lu and Peiguang Li and Yongwei Zhou and Changyuan Tian and Qingbin Li and Rongxiang Weng and Jingang Wang and Xunliang Cai},
  title = {{HIPIF: Hierarchical Planning and Information Folding for Long-Horizon LLM Agent Learning}},
  year = {2026},
  eprint = {2606.10507},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.10507},
}
Figure