---
title: 'HAG-PS: Hierarchical Adaptive Parameter Sharing'
url: https://www.emergentmind.com/topics/hierarchical-adaptive-grouping-based-parameter-sharing-hag-ps
type: topic
---

# HAG-PS: Hierarchical Adaptive Parameter Sharing

Hierarchical Adaptive Grouping-based Parameter Sharing (HAG-PS) denotes a family of parameter-sharing designs in which agents are grouped at multiple levels, policies or modules are shared within those groups, and group structure is adjusted or selected in conjunction with control decisions. In its explicit multi-agent reinforcement learning formulation for urban mobility resource allocation, HAG-PS combines a shared global feature trunk, local actor–critic heads, adaptive split–merge grouping based on encoded trajectories, and learnable identity embeddings under centralized training with decentralized execution (CTDE) [2507.20377]. A related hierarchical reinforcement learning formulation treats grouping itself as a high-level decision and low-level actions as intra-group behavior, making HAG-PS a broader architectural pattern for coupling group formation and policy learning rather than a single immutable algorithm [2501.06554].

## 1. Conceptual definition and scope

HAG-PS is organized around three coupled ideas. First, grouping is explicit: each agent is assigned to a group, or a high-level controller selects a grouping structure. Second, parameter sharing is structured: some parameters are shared broadly, while others are shared only within subgroups. Third, grouping is adaptive or decision-dependent rather than purely fixed. In the hierarchical RL formulation, each agent \(i\) is assigned through a discrete variable \(z_i \in \{1,\dots,K\}\), the high-level policy is written as \(\pi_{\text{high}}(z \mid s)\), and low-level intra-group policies are written as \(\pi_k(a^i \mid o^i; \theta_k)\) for agents assigned to group \(k\) [2501.06554].

The mobility-resource-allocation instantiation makes the hierarchy concrete. Agents represent regional coordinators, the service area is discretized into rectangular regions, and HAG-PS uses global groups and local groups. A shared global trunk \(T_{\theta_c}\) transforms the global state into a context embedding, while compact local actor–critic heads specialize within local groups. Agent individuality is retained through trainable identity embeddings \(e_i\), so specialization is not reduced to literal parameter copying [2507.20377].

A central boundary condition is that not every grouping-based sharing method is HAG-PS in the strong sense. Flat selective sharing schemes such as Selective Parameter Sharing (SePS) cluster agents once before RL and then keep assignments fixed; they are important precursors, but they do not implement hierarchical adaptive grouping during training [2102.07475]. This distinction matters because the term “hierarchical” refers not merely to sharing different modules, but to a layered organization of grouping and control.

## 2. Antecedents in selective parameter sharing

The immediate methodological background is the literature on parameter sharing in multi-agent reinforcement learning. That literature established that sharing parameters reduces the number of trainable parameters, shortens training times, and can improve sample efficiency, but it also showed that indiscriminate sharing can be harmful when agents differ in reward functions, observation transitions, or action spaces. The reported failure modes include representation bottlenecks, interference between heterogeneous agents, and sharp environment dependence; in Blind-Particle Spread, full sharing can collapse to a local minimum, and even identity-conditioned full sharing can deteriorate as role diversity increases [2102.07475].

SePS was introduced precisely to avoid those pathologies. Its core idea is to learn an embedding for each agent that captures agent-centric observation transition and reward functions, then cluster agents in that embedding space and share parameters only within clusters. Formally, the method defines approximations \(\hat{P}^i: O^i \times A^i \to \Delta(O^i)\) and \(\hat{R}^i: O^i \times A^i \to \mathbb{R}\), learns a latent representation with an encoder–decoder objective, and then applies \(k\)-means to encoder means \(\mu_\theta(i)\) to obtain a deterministic mapping \(\mu: N \to \{1,\dots,K\}\) and group-shared policies \(\pi_k(a \mid o; \theta_k)\) and values \(V_k(o; \phi_k)\) [2102.07475].

For HAG-PS, SePS functions as a flat lower-level precursor rather than a direct implementation. The SePS paper explicitly states that grouping is learned prior to RL training and is static during policy learning, that the implemented structure is flat rather than hierarchical, and that dynamic re-partitioning is only suggested as future work. This makes SePS an important source of bottom-level grouping logic, but not a full HAG-PS system [2102.07475].

## 3. Architectural patterns and mathematical formulation

Two explicit instantiations define the core HAG-PS design space. In the mobility setting, the environment state aggregates temporal encodings, regional availability, demand statistics, and environmental features, while each agent takes a vector relocation action \(a_t^i \in \mathbb{R}^4\). The policy is hierarchical: for agent \(i\) in local group \((c,l)\),  
\[
\pi_i(a \mid s_t) = \pi(a \mid s_t, e_i; \theta_c, \phi_{c,l}), \qquad
V_i(s_t) = V(s_t, e_i; \theta_c, \phi_{c,l}),
\]
where \(\theta_c\) are global trunk parameters, \(\phi_{c,l}\) are local head parameters, and \(e_i \in \mathbb{R}^{d_e}\) is a low-dimensional trainable identity embedding. The MARL objective is
\[
J(\Pi) = \mathbb{E}_\pi \left[ \frac{1}{N} \sum_{i=1}^N \sum_{t=0}^{T-1} \gamma^t r_t^i \right].
\]
The per-agent reward combines service quality and relocation cost:
\[
r_t^i = \lambda \left(1 - \frac{U_t^i}{d_t^i+\epsilon}\right) - \alpha \frac{U_t^i}{d_t^i+\epsilon} - \beta \frac{\|a_t^i\|_1}{m}.
\]
This design yields hierarchical sharing because large trunk parameters are amortized across agents, while local heads remain compact and group-specific [2507.20377].

In the cooperative pairing formulation, HAG-PS appears as a two-level hierarchy with high-level grouping options and low-level actions. The grouping variable is an option \(\omega\) that specifies a partition of teams into disjoint pairs,
\[
S_\omega = \{(m_1(\omega)^1, m_1(\omega)^2), \dots, (m_{M/2}(\omega)^1, m_{M/2}(\omega)^2)\}.
\]
The high-level policy is \(\pi_\Omega(\omega \mid s)\), and the low-level intra-option policy is
\[
\pi_\omega(a_t \mid s_t; \theta) =
\prod_{k=1}^{M/2} \prod_{i \in m_k(\omega)} \prod_j
\pi(a_{i,j,t} \mid s_{m_k(\omega),t}; \theta).
\]
Here the paper uses complete sharing of \(\theta\) across all teams and options, which is a strong form of parameter sharing appropriate to the homogeneous-agent assumption adopted in that work [2501.06554].

These two formulations emphasize different aspects of HAG-PS. The mobility formulation prioritizes hierarchical trunk–head decomposition, adaptive local regrouping, and identity-based specialization in a heterogeneous urban system. The pairing formulation prioritizes timescale separation, option-critic structure, and permutation-invariant representations for homogeneous cooperative teams. A plausible implication is that HAG-PS is best understood as an architectural template whose concrete instantiation depends on whether heterogeneity, combinatorial grouping, or memory efficiency is the dominant systems concern.

## 4. Adaptive grouping mechanisms and optimization

The defining adaptive mechanism in the mobility formulation is split–merge regrouping based on recent trajectories. After each episode, agent \(i\) encodes its last \(H\)-step trajectory with a variational LSTM:
\[
z_t^i = f_{\text{enc}}(\tau_{t-H:t}^i) = \mathrm{VLSTM}(\tau_{t-H:t}^i).
\]
For each local group \(l\), the centroid embedding and within-group dispersion are
\[
\mu_t^{(l)} = \frac{1}{|\mathcal{G}_t^{(l)}|} \sum_{j \in \mathcal{G}_t^{(l)}} z_t^j,
\]
\[
D_t^{(l)} = \frac{1}{|\mathcal{G}_t^{(l)}|} \sum_{j \in \mathcal{G}_t^{(l)}} \frac{1}{2}
\left[
\mathrm{KL}(z_t^j \,\|\, \mu_t^{(l)}) + \mathrm{KL}(\mu_t^{(l)} \,\|\, z_t^j)
\right].
\]
If \(D_t^{(l)}\) exceeds a threshold \(D_{\text{split}}\) and the group is large enough, the group is bisected with \(k\)-means. If two groups are sufficiently close under symmetric KL divergence, they are merged. Regrouping frequency is itself adaptive through the exponentially smoothed average dispersion \(\bar D_t\) and the interval
\[
\Delta_{t+1} = \max\!\left(1, \left\lceil \Delta_0 e^{-\zeta(\bar D_t - \delta)} \right\rceil \right).
\]
This makes regrouping frequent when behaviors drift and infrequent when local groups stabilize [2507.20377].

Optimization in that setting uses Proximal Policy Optimization. The combined objective is
\[
L_{\text{PPO}}(\theta_c, \phi_{c,l}, \{e_i\}) =
\mathbb{E}_t \left[
\min\!\big(r_t(\theta_c,\phi_{c,l}) \hat A_t,\,
\mathrm{clip}(r_t(\theta_c,\phi_{c,l}), 1-\epsilon, 1+\epsilon)\hat A_t\big)
- c_v (V_t - R_t)^2 + c_{\text{ent}} H(\pi_t)
\right].
\]
Gradients are propagated through the global trunk, local heads, and identity embeddings, with reported hyperparameters \(\gamma = 0.995\), GAE \(\lambda = 0.95\), policy learning rate \(3\mathrm{e}{-4}\), value learning rate \(1\mathrm{e}{-3}\), and local heads implemented as MLPs with 128 hidden units [2507.20377].

The hierarchical RL pairing formulation uses CTDE with an option-critic-style centralized value structure:
\[
Q_{\Omega,\psi}(s,\omega) = \sum_a \pi_{\omega,\theta}(a \mid s)\, Q_{U,\psi}(s,\omega,a),
\]
\[
Q_{U,\psi}(s,\omega,a) = \sum_i r(s_i,a_i) + \gamma \sum_{s'} P(s' \mid s,a,\omega)\, U(\omega,s'),
\]
\[
U(\omega,s') = (1-\beta(s'))Q_{\Omega,\psi}(s',\omega) + \beta(s')V_{\Omega,\psi}(s').
\]
To avoid enumerating the full option space, the method uses a permutation-invariant critic and a greedy maximum-weight perfect matching solver over pair scores \(\psi_4(t_1,t_2)\). Termination is fixed to weekly intervals rather than learned:
\[
\beta(S_{i,j,t}) = 0 \text{ if } wH \le t < (w+1)H, \quad
\beta(S_{i,j,t}) = 1 \text{ otherwise}.
\]
This illustrates a second route to HAG-PS: adaptive grouping can be expressed either as explicit regrouping of parameter-sharing units or as high-level option selection over group structures [2501.06554].

## 5. Empirical evidence, scalability, and domain-specific behavior

The most explicit empirical evidence for HAG-PS comes from the mobility study on 1,232,838 Citi Bike trips from January 2024, aggregated into \(K=106\) regions covering Manhattan. In that setting, HAG-PS achieved a fulfilled service ratio of \(77.21\%\) and rebalanced 472,212 bikes. The reported baselines were No-Share \(51.18\%\), Share-All \(43.84\%\), CDS \(58.40\%\), SePS \(64.77\%\), and DyPS \(69.09\%\). Ablation results further attribute the gain to specific components: removing identity embeddings reduces availability by approximately \(0.3\) percentage points, disabling split–merge or hierarchical grouping yields drops of approximately \(2.1\) and \(4.0\) points, and fixing the regrouping period reduces approximately \(1.1\) points [2507.20377].

The same study also provides an explicit memory-efficiency analysis. A naive per-agent parameterization has memory \(O(NP)\), while HAG-PS reduces this to
\[
O(CP_g + LP_{\text{grp}} + NP_{\text{id}}),
\]
where \(C\) is the number of global groups, \(P_g\) the trunk parameter count, \(L\) the number of local groups, \(P_{\text{grp}}\) the head parameter count, and \(P_{\text{id}}\) the identity embedding size. Because the trunk is large and shared while local heads are small, the design is intended for urban-scale MARL under realistic memory budgets [2507.20377].

The hierarchical RL grouping paper provides evidence in a different domain: weekly pairing of cooperative teams. Its evaluation uses 10 teams, each with 10 subjects, a binary action space, reward defined as the square root of the next day’s step count, \(\gamma = 0.9\), training for 10,000 iterations, evaluation for 1,000 steps, and averaging over 20 repetitions. The reported values for the proposed method are \(-143.04\) average reward and \(-1436.97\) \(0.9\)-discounted cumulative reward, alongside fixed-action and random baselines. The significance of this result is less in the absolute metric than in the demonstration that grouping and policy can be learned simultaneously through a hierarchical controller with CTDE and option-critic structure [2501.06554].

The precursor SePS results clarify when hierarchical or selective sharing is needed. In heterogeneous settings, selective sharing strongly outperformed naive full sharing: for example, in BPS-h(3) with 200 agents, NoPS was infeasible, while SePS achieved \(-2522.61 \pm 276.29\) against SAP \(-6825.47 \pm 115.74\) and SAP+id \(-4085.51 \pm 3.71\). In C-RWARE(3) with 16 agents, SePS achieved \(32.27 \pm 3.16\), versus NoPS \(0.33 \pm 0.15\), SAP \(1.03 \pm 0.64\), and SAP+id \(21.30 \pm 15.13\). These results do not constitute HAG-PS directly, but they provide the empirical rationale for moving from indiscriminate sharing toward group-aware and eventually hierarchical sharing [2102.07475].

## 6. Variants, misconceptions, and open problems

A recurrent misconception is that any adaptive sharing scheme is already hierarchical. The supplied literature consistently distinguishes flat methods from true HAG-PS. AdaPS, for example, is described as adaptive, grouping-based parameter sharing in which agents are clustered by learned identity features and then routed to distinct subnetworks carved from a single shared backbone via fixed binary masks. However, it is explicitly characterized as a flat, one-shot grouping method rather than a hierarchical, coarse-to-fine grouping scheme, with fixed hard masks and no online reassignment during RL [2312.09009].

A second misconception is that hierarchy always implies the same kind of adaptation. In the pairing formulation, adaptation is at the level of selecting weekly pairings through options and maximum-weight matching, while termination is fixed rather than learned [2501.06554]. In the mobility formulation, adaptation is continuous through VLSTM trajectory encoding, split–merge logic, and a regrouping interval controlled by dispersion [2507.20377]. These are not interchangeable mechanisms; they address different sources of non-stationarity.

The broader literature in the supplied corpus also uses HAG-PS as an organizing template outside its original MARL mobility setting. Hierarchical Adapters Merging (HAM) is presented as a continual learning instantiation in which tasks are dynamically grouped by adapter similarity, consolidated within groups through pruning and concatenation, and then globally merged into a single inference-time adapter [2509.13211]. The Hierarchical Recurrent Adapter (HRA) is described as a parameter-sharing hierarchy with a shared recurrent controller and task-level adapter heads reused across layers of a speech backbone [2403.19709]. HAPS, a hierarchical LLM routing framework, maps HAG-PS to a high-level architecture router, a low-level parameter generator, and a shared backbone that is used by both routers [2601.05903]. These mappings suggest that HAG-PS has become a general design vocabulary for hierarchical grouping plus structured sharing, even when the domain is not cooperative MARL.

The open problems are consistent across instantiations. The mobility paper notes that split–merge decisions depend on variational encodings and KL thresholds, that station capacities and travel-time constraints are not explicitly modeled, and that formal convergence guarantees are not provided [2507.20377]. The pairing paper highlights the combinatorial growth of grouping options, reliance on homogeneity assumptions, and potential instability if termination were to be learned rather than fixed [2501.06554]. The SePS precursor already identified a core unresolved issue: static partitions learned from early trajectories may fail when agents later diverge in roles, which directly motivates the adaptive regrouping agenda that HAG-PS seeks to address [2102.07475].

Taken together, the literature portrays HAG-PS not as a single canonical algorithm, but as a principled response to the central tension in large-scale cooperative learning: full sharing is memory-efficient but vulnerable to interference, while fully independent policies are expressive but computationally expensive. HAG-PS addresses that tension by layering sharing, specialization, and regrouping within one system.

Source: https://www.emergentmind.com/topics/hierarchical-adaptive-grouping-based-parameter-sharing-hag-ps