AI
Researchers benchmark hierarchical AI agents for e-commerce using memory-efficient context management
A new benchmark and training method help multi-agent systems handle long-horizon tasks by controlling context accumulation without sacrificing performance.
Researchers have introduced HiMA-Ecom, a comprehensive benchmark designed to test how hierarchical multi-agent AI systems manage memory and context over extended task sequences, particularly in e-commerce environments. The work addresses a fundamental challenge: as agentic systems tackle longer tasks, the accumulated context—instructions, tool descriptions, memory, dialogue history, and previous outputs—grows rapidly across multiple agents.
The Context Accumulation Problem#
Unlike traditional long-context approaches that process a single lengthy document, hierarchical multi-agent systems must reassemble prompts dynamically at each step, with each agent drawing from separate role instructions, tool descriptions, recalled memories, and prior outputs. This can quickly exhaust computational budgets and model capacity without careful management.
The benchmark comprises 22.8K instances, with 17.7K including memory entries in context. It pairs agent-specific supervised fine-tuning data with system-level supervision for end-to-end multi-agent reinforcement learning.
Training With Controlled Costs#
To tackle context management, the researchers developed HiMA-R1, which employs Variance-Reduction Group Relative Policy Optimization (VR-GRPO). This approach:
- Samples along initial trajectories so computational cost grows linearly rather than exponentially with task length
- Prioritizes updating agents with the highest reward variance
- Incorporates an efficiency reward that penalizes longer trajectories
- Repurposes GRPO reward signals as cost-free guidance for memory evolution—determining what stays in context
Performance and Efficiency Gains#
Models based on 3B and 7B open-source language models matched DeepSeek-R1's performance and exceeded DeepSeek-V3 by an average of 6.0 points on the benchmark. Additionally, the reward-driven memory mechanism reduced the update steps required for convergence by roughly 55%, demonstrating significant training efficiency improvements.
The work suggests that smaller, efficiently-trained models can compete with or exceed larger proprietary systems when equipped with better memory and context management strategies.

