Hierarchical Variable Agent (HiVA)
- The paper introduces HiVA, a framework that jointly optimizes agent semantics and inter-agent topology using textual gradients, enabling efficient, autonomous task execution.
- HiVA is a self-organizing DAG that evolves hierarchically across macro, meso, and micro memory levels to support adaptive agent collaboration and routing.
- Empirical evaluations show HiVA enhances task accuracy and resource efficiency across diverse benchmarks compared to static workflows and reactive loops.
Hierarchical Variable Agent (HiVA) is a multi-agent framework introduced as a self-organized graph for autonomous task execution, in which both agent semantics and inter-agent topology are optimized jointly rather than treated as separate design problems. In the formulation of “HiVA: Self-organized Hierarchical Variable Agent via Goal-driven Semantic-Topological Evolution,” the system begins from a minimal directed acyclic graph (DAG), routes tasks through a sparse execution subgraph, converts environmental feedback into textual gradients, and then updates prompts, tools, routing beliefs, and graph structure in a coordinated loop. The stated objective is to overcome the trade-off between reusable but static workflows and flexible but non-transferable reactive loops, while improving both task accuracy and resource efficiency across dialogue, coding, long-context question answering, mathematical reasoning, and agentic benchmarks (Tang et al., 29 Aug 2025).
1. Conceptual origin and problem formulation
HiVA is motivated by a diagnosis of two dominant agent-design patterns. The first consists of manual fixed workflows: modular and reusable multi-agent pipelines with predefined roles and edges. Their weakness, as stated in the paper, is that they are static and usually require manual redesign when the environment or task format changes. The second consists of reactive loops, including ReAct- and AutoGPT-style systems, which can adapt online but “do not distill reasoning progress into transferable structures” (Tang et al., 29 Aug 2025).
The framework therefore targets a specific gap: existing systems often optimize either agent behavior or routing/topology, but not both together. HiVA treats the entire agent system as the object of optimization. Its core claim is that an autonomous agent should learn not only what each agent does—its prompts, tools, and roles—but also how agents are connected and how information flows. In this view, specialization, collaboration, and workflow structure are emergent properties induced by feedback rather than fixed design-time commitments (Tang et al., 29 Aug 2025).
The paper formalizes this as optimization over a hybrid search space,
where is the space of graph topologies and is the space of semantic parameters such as prompts and tool configurations. The global target is
A common misconception is that HiVA is merely a prompt-tuning method wrapped in a graph abstraction. The paper’s formalism explicitly rejects that reading: topology and semantics are updated together, and the graph is itself a learned memory of useful collaboration patterns (Tang et al., 29 Aug 2025).
2. System architecture and hierarchical memory
HiVA models the agent system as a dynamic computational graph whose nodes are agents , with one special source node and one special aggregator/sink node . Edges encode information flow between agents. Each agent has a prompt , a tool set , and an instruction-to-output mapping . The graph is not fixed; it is a DAG that evolves over time and can grow from a minimal singleton-style setup into a structured multi-agent graph (Tang et al., 29 Aug 2025).
The framework describes this organization as hierarchical because memory is distributed across three levels. At the macro level, graph topology stores long-term collaboration patterns. At the meso level, edge weights store the effectiveness of particular collaboration paths. At the micro level, each agent’s semantic parameters preserve specialized knowledge. This makes “hierarchical” and “variable” precise: the hierarchy spans multiple memory scales, and both structure and semantics can change during learning (Tang et al., 29 Aug 2025).
This architecture differs from a fixed role hierarchy. In HiVA, hierarchy is not simply an ordering of manager and worker nodes; it is a persistent but revisable organization of specialization, routing, and collaboration. A plausible implication is that the graph itself functions as an executable policy prior: successful paths are preserved in topology and edge memory, while unsuccessful collaborations are pruned or bypassed.
3. Semantic-Topological Evolution and textual gradients
The optimization mechanism of HiVA is Semantic-Topological Evolution (STEV). Because the search space is discrete, non-Euclidean, and non-differentiable, the paper replaces ordinary numeric gradients with textual gradients and defines a symbolic update rule,
0
where 1 contains update instructions for both topology and semantics (Tang et al., 29 Aug 2025).
The textual gradient is decomposed into topology updates 2 and semantic updates 3. Instead of backpropagating through the graph numerically, HiVA uses an LLM to convert environmental feedback into structured critiques. The paper gives a chain-rule-like approximation for localized feedback: 4 In effect, downstream critiques and a node’s own output are combined into an instruction about how that node should improve (Tang et al., 29 Aug 2025).
The content of a textual gradient can include instructions to improve a prompt, add or remove a tool, specialize an agent role, add or delete a successor, connect directly to the aggregator, or do nothing. This makes textual gradients a discrete-domain surrogate for backpropagation. The paper’s claim is not that the system becomes differentiable, but that language is used as a structured update medium in a non-differentiable agent-graph space (Tang et al., 29 Aug 2025).
4. Iterative control loop: routing, feedback, and coordinated updates
HiVA operates in repeated iterations with three main phases. The first is Multi-Armed Bandit-infused forward routing. Rather than activating the full graph, the system uses Knowledge-Aware Bayesian-Bandit (KABB) routing to choose a sparse, task-specific execution subgraph. The routing score balances three considerations: historical success, semantic relevance to the current task, and synergy with the currently selected subset (Tang et al., 29 Aug 2025).
The routing policy incorporates a knowledge-based distance,
5
where the mismatch indicators 6 correspond to semantic mismatch, dependency complexity, historical performance mismatch, and tool incompatibility. This means routing is not purely reward-driven; it is explicitly modulated by task-agent compatibility (Tang et al., 29 Aug 2025).
The second phase is diagnostic gradient generation from environmental feedback. After the forward pass produces an output, the environment evaluates it. The environment may be programmatic, data-driven QA, interactive agentic, or mathematical/verifiable. Its feedback is converted into a textual loss and then into a textual gradient by the LLM (Tang et al., 29 Aug 2025).
The third phase is coordinated update. HiVA updates semantic parameters, topology, and routing beliefs together. The Bayesian routing beliefs are revised using
7
8
Here reward, task alignment, and recency jointly determine future selection probability (Tang et al., 29 Aug 2025).
Edge synergy memory is also updated so that historically useful collaborations are reinforced. The paper further states that RepairTopology keeps the graph a valid, efficient DAG. On efficiency, HiVA does not activate the whole graph for every task; KABB creates a sparse execution subgraph, weak or redundant links are pruned, worst-case iteration complexity is reported as 9, and the average GAIA optimization cost is reported as around $0.1 per sample under default settings (Tang et al., 29 Aug 2025).
5. Empirical evaluation and quantitative profile
HiVA is evaluated on MATH, GSM-8K, HotpotQA, 2WikiHopQA, HumanEval, MBPP, MMLU, BBH, and GAIA, using Qwen-2.5-72B-Instruct-Turbo as the main LLM and GPT-4o-mini for some agentic settings. Baselines include Vanilla, CoT, Self-Consistency, Self-Refine, Multi-Agent Debate, DyLAN, AgentVerse, ADAS, MaAS, AutoGPT on GAIA, and TextGrad in scalability comparisons (Tang et al., 29 Aug 2025).
The main benchmark table reports average accuracy 89.2%, an improvement over Vanilla of +8.0%. Reported task scores include 81.2% on MATH, 94.5% on GSM-8K, 79.7% on HotpotQA, 86.5% on 2WikiHopQA, 94.2% on HumanEval, 92.1% on MBPP, 91.7% on MMLU, and 93.4% on BBH (Tang et al., 29 Aug 2025). The MATH result is notable because it is slightly below Vanilla, which was 82.7%. This matters for interpretation: the paper does not claim uniform superiority on every benchmark, but rather stronger average performance across diverse task types.
On GAIA, HiVA outperforms MaAS and AutoGPT in accuracy across all levels, with reported scores of 26.2% on Level 1, 24.3% on Level 2, and 11.1% on Level 3. The reported cost-efficiency score is 5.5 for HiVA, compared with 5.2 for MaAS and 1.3 for AutoGPT (Tang et al., 29 Aug 2025).
The scalability experiment on MBPP over 10 iterations reports improvement from 86.3% to 91.7% for HiVA, compared with 86.3% to 90.6% for MaAS and 86.3% to 87.4% for TextGrad. The ablation study reports degraded averages when removing key components: Without TEV: avg 83.7, Without SEV: avg 82.2, Without KABB: avg 85.0, Without Env: avg 84.7, and Without Tool: avg 84.3. The paper’s stated interpretation is that SEV and TEV are the most important components, KABB matters consistently, environmental feedback improves learning, and tool integration helps broadly, though removing tools on MBPP slightly increased performance (Tang et al., 29 Aug 2025).
6. Scope, distinctions, and relation to adjacent hierarchical-agent research
The term HiVA is not unique across recent arXiv literature. A different paper uses HiVA to denote “Hierarchical Vision-language Interaction for AU Understanding” in facial Action Unit detection, where the hierarchy is cross-modal attention rather than self-organizing agent graphs (Li et al., 16 Feb 2026). Another paper proposes HierVA, a Hierarchical Visual Agent for chart reasoning, organized as a manager-worker framework with scoped visual and textual contexts (Dong et al., 5 May 2026). These are terminological collisions rather than extensions of the same formalism.
Conceptually related work spans several neighboring design patterns. In robotics, hierarchical vision-language-action systems are formalized as planner-controller architectures under an options-style framework, where high-level VLM planners generate language subgoals and low-level VLA controllers execute them (Hu et al., 9 Jun 2026). In domain-specific multi-agent design, HTAM structures agents around a task dependency graph, with top-down planning and bottom-up execution (Li et al., 21 Nov 2025). In machine-learning infrastructure, HAMLET is a dynamically constructed holarchy of heterogeneous agents organized from a hypergraph representation of algorithms, datasets, and models (Esmaeili et al., 2020). In self-organizing populations, Agentic Hives formalize variable numbers of micro-agents, family specialization, and runtime birth, duplication, specialization, and death under an orchestrator (Garnier, 23 Feb 2026). In theory-of-mind modeling, HiVAE uses hierarchical latent variables—belief, desire, and intention—to represent structured internal state rather than agent collaboration topology (Doering et al., 18 Feb 2026).
This broader landscape suggests that HiVA belongs to a larger family of hierarchical and variable agent paradigms, but its distinctive contribution is specific: joint optimization of semantics, topology, routing, and memory through textual gradients in a self-organizing DAG. It is therefore inaccurate to equate HiVA with any hierarchical architecture whatsoever. Its defining claim is stronger and narrower: learning should rewrite the agent system itself, not only the outputs of the agents within it (Tang et al., 29 Aug 2025).