---
title: Hierarchical Variable Agent (HiVA)
url: https://www.emergentmind.com/topics/hierarchical-variable-agent-hiva
type: topic
---

# Hierarchical Variable Agent (HiVA)

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 [2509.00189].

## 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” [2509.00189].

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 [2509.00189].

The paper formalizes this as optimization over a hybrid search space,
\[
\mathcal{S} = \mathcal{G} \times \mathcal{P}_\Theta
\]
where \(\mathcal{G}\) is the space of graph topologies and \(\mathcal{P}_\Theta\) is the space of semantic parameters such as prompts and tool configurations. The global target is
\[
s^* = \arg\min_{s \in \mathcal{S}} \mathcal{L}(s).
\]
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 [2509.00189].

## 2. System architecture and hierarchical memory

HiVA models the agent system as a **dynamic computational graph** whose nodes are agents \(v_i\), with one special **source** node \(v_s\) and one special **aggregator/sink** node \(v_a\). Edges encode information flow between agents. Each agent has a prompt \(p_i\), a tool set \(\tau_i\), and an instruction-to-output mapping \(x_i \mapsto y_i\). 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 [2509.00189].

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 [2509.00189].

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,
\[
s_{t+1} \leftarrow s_t \oplus \Delta s_t,
\]
where \(\Delta s_t\) contains update instructions for both topology and semantics [2509.00189].

The textual gradient is decomposed into topology updates \(\Delta \mathcal{G}_t\) and semantic updates \(\Delta \mathcal{P}_{\Theta,t}\). 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:
\[
\frac{\partial\mathcal{L}_t}{\partial v_i} \approx \text{LLM}\left(\left\{\frac{\partial\mathcal{L}_t}{\partial v_j} \mid v_j \in \text{successors}(v_i)\right\}, y_i\right).
\]
In effect, downstream critiques and a node’s own output are combined into an instruction about how that node should improve [2509.00189].

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 [2509.00189].

## 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 [2509.00189].

The routing policy incorporates a **knowledge-based distance**,
\[
\text{Dist}(A_i, I_{\text{task}}) = \log(1 + d_I) \cdot \sum_{k=1}^4 \omega_k \Psi_k,
\]
where the mismatch indicators \(\Psi_k\) 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 [2509.00189].

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 [2509.00189].

The third phase is **coordinated update**. HiVA updates semantic parameters, topology, and routing beliefs together. The Bayesian routing beliefs are revised using
\[
\alpha_i^{(t+1)} = \gamma^{\Delta t} \alpha_i^{(t)} + \left[ r_i^{(t)} + \delta \cdot \text{KM}(A_i, I_{\text{task}}) \right] \cdot \mathbb{I}_{\{A_i \in \mathcal{S}_t\}},
\]
\[
\beta_i^{(t+1)} = \gamma^{\Delta t} \beta_i^{(t)} + \left[ 1 - r_i^{(t)} + \delta \cdot \text{KD}(A_i, I_{\text{task}}) \right] \cdot \mathbb{I}_{\{A_i \in \mathcal{S}_t\}}.
\]
Here reward, task alignment, and recency jointly determine future selection probability [2509.00189].

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 \(O(|\mathcal{V}|^2)\), and the average GAIA optimization cost is reported as around **\$0.1 per sample** under default settings [2509.00189].

## 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 [2509.00189].

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 [2509.00189]. 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 [2509.00189].

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 [2509.00189].

## 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 [2602.14425]. Another paper proposes **HierVA**, a **Hierarchical Visual Agent** for chart reasoning, organized as a manager-worker framework with scoped visual and textual contexts [2605.04304]. 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 [2606.10267]. In domain-specific multi-agent design, **HTAM** structures agents around a task dependency graph, with top-down planning and bottom-up execution [2511.17198]. In machine-learning infrastructure, **HAMLET** is a dynamically constructed holarchy of heterogeneous agents organized from a hypergraph representation of algorithms, datasets, and models [2010.04894]. In self-organizing populations, **Agentic Hives** formalize variable numbers of micro-agents, family specialization, and runtime birth, duplication, specialization, and death under an orchestrator [2603.00130]. In theory-of-mind modeling, **HiVAE** uses hierarchical latent variables—belief, desire, and intention—to represent structured internal state rather than agent collaboration topology [2602.16826].

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 [2509.00189].

Source: https://www.emergentmind.com/topics/hierarchical-variable-agent-hiva