---
title: 'HOP: Traversals, Retrieval & Learning'
url: https://www.emergentmind.com/topics/hop
type: topic
---

# HOP: Traversals, Retrieval & Learning

HOP denotes a family of notions organized around the graph-theoretic idea of traversing one or more edges, but the term is used in several technically distinct senses across recent literature. In combinatorial optimization, a hop is an exact-distance or bounded-length constraint on graph paths; in retrieval and graph learning, it indexes successive reasoning or propagation steps; in continual learning, it names specific architectures such as Hierarchical Orchestra of Policies and a high-order-pooling framework for NLP [2603.00692] [2011.06112] [2411.03008] [2402.18449]. The shared vocabulary therefore masks heterogeneous mathematical roles: hard feasibility constraints, retrieval units, receptive-field indices, and modular composition rules.

## 1. Terminological scope and formal notion of a hop

In its most literal graph-theoretic sense, a hop is one edge traversal. Recent work formalizes this either through shortest-path distance or through explicit hop bounds. For a graph \(G=(V,E)\), one recurring definition is
$$
d_G(u,v)=\text{length of a shortest path between }u,v\text{ in }G,
$$
with exact-distance neighborhoods
$$
N_r(x)=\{\,y\in V:d_G(x,y)=r\}.
$$
A second standard formulation uses edge lengths \(\ell_e\) and a global hop-limit \(H\), declaring a path \(P\) hop-constrained when \(\sum_{e\in P}\ell_e\le H\) [2603.00692] [2404.16725].

| Usage of HOP or hop | Technical role | Representative source |
|---|---|---|
| Exact-distance domination | Vertices must be dominated from distance exactly \(r\) | [2603.00692] |
| Hop-constrained network design | Paths must respect a hop-limit \(H\) | [2011.06112] |
| Multi-hop retrieval or relation extraction | Reasoning proceeds hop by hop | [2012.15534], [1904.01246] |
| Higher-order propagation in graphs | Neighborhood information is aggregated over multiple hops | [1805.12421], [2012.11147] |
| Modular continual learning | HOP names specific frameworks in RL and NLP | [2411.03008], [2402.18449] |

A plausible implication is that “hop” functions as a common abstraction of bounded-depth interaction. The cited papers, however, do not treat these as interchangeable notions: exact-distance domination requires equality \(d_G(u,v)=r\), hop-constrained design permits bounded length, and learning systems often interpret hops as iterative message-passing or policy-reuse steps rather than hard graph constraints.

## 2. Exact-distance domination and Roman variants

The most formalized use of HOP in recent graph theory appears in exact-distance domination. For \(r\ge 2\), a set \(S\subseteq V\) is an \(r\)-hop dominating set if every vertex in \(V\setminus S\) is exactly at distance \(r\) from some vertex of \(S\):
$$
\forall\,v\in V\setminus S\;\;\exists\,u\in S\quad d_G(u,v)=r.
$$
By contrast, an \(r\)-step dominating set requires every vertex of \(G\), including vertices in \(S\), to lie at distance exactly \(r\) from at least one vertex of \(S\). The Roman variant replaces sets by a function \(f:V\to\{0,1,2\}\), requiring that every vertex \(v\) with \(f(v)=0\) have a vertex \(u\) at distance exactly \(r\) with \(f(u)=2\), and measures solution size by the weight \(\mathrm{wt}(f)=\sum_{v\in V}f(v)\) [2603.00692].

These problems are all NP-complete for every fixed \(r\ge 2\). The parameterized picture is sharper. For each \(r\ge 2\), \(\textsc{\(r\)-Hop Roman Domination}\) parameterized by the weight bound \(k\) is W[2]-complete. Membership is proved by an FPT-reduction to classical Roman Domination using a distance-encoder graph \(G'\) whose vertices correspond one-to-one with those of \(G\), and where \((u_j,u_k)\) is an edge iff \(d_G(v_j,v_k)=r\). Hardness comes from Dominating Set via even-\(r\) and odd-\(r\) gadget constructions based on subdivision and added branching paths [2603.00692].

For each \(r\ge 2\), \(\textsc{\(r\)-Step Domination}\) and \(\textsc{\(r\)-Hop Domination}\) parameterized by \(k\) are W[2]-complete, even when restricted to bipartite or chordal graphs. The membership arguments again use distance-encoder graphs, now reducing to Total Dominating Set and Dominating Set, respectively. The hardness proofs add \(2r\) forcing vertices together with branching paths so that any small solution must contain those forcing vertices plus a subset corresponding to a dominating set in the original graph [2603.00692].

The lower-bound landscape is correspondingly strong. Because the reductions from Dominating Set are linear in \(n+m\), Cygan et al.’s ETH-based lower bound transfers: unless ETH fails, none of \(\textsc{\(r\)-Hop Domination}\), \(\textsc{\(r\)-Step Domination}\), or \(\textsc{\(r\)-Hop Roman Domination}\) admits a \(2^{o(n+m)}\)-time algorithm on graphs with \(n\) vertices and \(m\) edges. The same reductions imply that for any \(\varepsilon>0\), no polynomial-time algorithm can achieve a \((1-\varepsilon)\ln n\)-approximation for these problems, even on bipartite or chordal graphs. On the positive side, the reduction to Roman Domination means that any exact \(O(\alpha^n)\)-time algorithm for Domination yields an \(O(\alpha^n)\)-time algorithm for minimum \(r\)-Hop Roman dominating set; the summary explicitly notes that Iwata’s polynomial-space \(O(1.4864^n)\) algorithm transfers in this way [2603.00692].

## 3. Hop-constrained network design and tree embeddings

Hop constraints also define a major line of work in network design. In the Hop-Constrained Steiner-Tree Problem, one is given an undirected graph \(G=(V,E)\) with positive edge costs, a root \(r\), a set of terminals \(T\subseteq V\), and a hop-limit \(H\). The objective is a minimum-cost subtree spanning \(r\) and all terminals such that the number of edges on the unique \(r\)-to-\(v\) path is at most \(H\) for every included vertex \(v\). When \(T=V\), this becomes the Hop-Constrained Minimum Spanning-Tree Problem [2007.07405].

A central structural obstacle is that hop-constrained distances are far from being a metric. For a complete weighted graph \(G=(V,E,w)\) and hop bound \(h\), the \(h\)-hop-constrained distance is
$$
d_G^{(h)}(u,v)=\min\{\,w(P)\mid P\text{ is a path from }u\to v\text{ in }G\text{ with }hop(P)\le h\}.
$$
This quantity is symmetric and nonnegative, but may violate the triangle inequality. The key advance of the tree-embedding line is that \(d_G^{(h)}\) can nevertheless be approximated by distributions over partial tree metrics with bounded exclusion probability, bounded hop-stretch, and polylogarithmic expected stretch. The embedding theorem in “Tree Embeddings for Hop-Constrained Network Design” yields a randomized polynomial-time algorithm producing well-separated partial tree metrics with exclusion-probability at most \(\varepsilon\), worst-case approximation \((O(\log^2 n/\varepsilon),O(\log^2 n/\varepsilon))\), and induced expected stretch \(O(\log n\log \frac{\log n}{\varepsilon})\) [2011.06112].

This embedding perspective supports bicriteria approximations. Chekuri–Jain formulate a path-based LP with edge variables \(x_e\) and path variables \(f_p\) over all simple \(s_i\)-\(t_i\) paths of length at most \(H\). From this LP they obtain, for hop-constrained Steiner forest, a randomized \(\bigl(O(\log^2 n\log r),O(\log^3 n)\bigr)\)-approximation, and for hop-constrained set connectivity, a \(\bigl(O(\log^5 n\log r),O(\log^3 n)\bigr)\)-approximation. Their buy-at-bulk reduction yields an \(O(\log D\log^3 n\log r)\) approximation with respect to the natural LP, and they also obtain polylogarithmic bicriteria approximations for fault-tolerant variants, including a randomized \(\bigl(O(k^3\log^6 n),O(k^k\log^3 n)\bigr)\) bicriteria guarantee in the single-source setting for fixed \(k\) [2404.16725].

At the modeling level, Jabrayilov’s comparison between assignment-based and partial-ordering-based ILPs for HSTP isolates a polyhedral difference. If \(\mathcal A_X\) and \(\mathcal P_X\) denote the projections of the two LP relaxations onto the arc variables, then
$$
\mathcal P_X\subseteq \mathcal A_X,
$$
and the inclusion is strict for some instances. On 216 standard HMSTP/HSTP benchmark instances, the partial-ordering model solved approximately \(140+\) instances to optimality within a 10 h limit, whereas the assignment model solved only approximately \(100\) [2007.07405]. This supports the more general conclusion that hop constraints are not merely added side conditions; they often determine the geometry of the relaxation itself.

## 4. Multi-hop retrieval, relation extraction, and graph representation learning

In open-domain QA, HopRetriever defines a hop as a pair
$$
hop_{i,j}=(m_{i,j},d_j),
$$
where \(m_{i,j}\) is a hyperlink mention in document \(d_i\) pointing from entity \(e_i\) to entity \(e_j\), and \(d_j\) is the outbound document for \(e_j\). The system encodes the mention embedding and document embedding separately with BERT, fuses them with attention weights \([w_m,w_u]\), retrieves iteratively from top-500 TF–IDF candidates with beam search size 8, and updates an RNN state across hops. On HotpotQA full-wiki dev, HopRetriever improves over PathRetriever from \(80.96/89.09/89.98\) to \(86.89/91.11/91.80\) on top-\(1/5/8\) “Ans exists,” from \(82.05/88.69/89.48\) to \(88.41/92.78/93.20\) on “Sent exists,” and from \(73.91/86.12/87.39\) to \(82.54/88.60/89.09\) on “All docs exist.” Its interpretability is quantified through the structured-vs-unstructured fusion weights: on bridging questions the average weights are \(w_m=89.53\%\), \(w_u=10.47\%\), while on comparison questions they are \(w_m=4.61\%\), \(w_u=95.39\%\) [2012.15534].

For knowledge-based question answering, UHop uses “one hop” to mean a single KG relation traversal. Instead of exhaustive search over all one-hop, two-hop, and up-to-\(L\)-hop chains, it adopts a transition-based search in which the model selects one relation at a time and halts when the score of the last chosen relation exceeds the score of any continuation. The resulting complexity is \(O(n(H+1))\), compared with \(O(n(n-1)^{L-1})\) for exhaustive chain-based search. On WebQSP, where the average out-degree is approximately \(98\), the paper notes that exhaustive 2-hop search examines approximately \(98\times 97\approx 9506\) chains, whereas UHop inspects on average approximately \(98\times 3=294\) candidates, a reduction of more than \(30\times\) [1904.01246].

Graph representation learning uses hops as layers of neighborhood aggregation. HHR-GNN computes hop-specific embeddings \(h_i^{(k)_r}\) and learns node-specific relation scores between the central node’s 0-hop embedding and its \(r\)-hop embeddings through a Neural Tensor Network, thereby producing a personalized receptive field. The model reports competitive performance on five benchmarks and is described as “up to 13K faster in terms of time cost per training epoch on large heterogeneous graphs” than Graph Transformer Networks [2012.11147]. HOPF, by contrast, studies deep collective classification and diagnoses “Node Information Morphing,” the exponential dilution of the original node features across many propagation layers. Its Node Information Preserving formulation injects \(h_0\) into every layer, and its iterative inference mechanism uses only \(C\ll K\) differentiable layers per iteration while reaching an effective \(K=T\cdot C\) hops with memory \(O(C)\) rather than \(O(K)\). On 11 datasets, NIP-MEAN outperforms its WL counterparts on 9/11 datasets with Wilcoxon \(p<0.01\); I-NIP-MEAN has average shortfall approximately \(0.9\%\), and on inductive PPI it achieves \(92.48\%\) micro-F1 versus \(86.05\%\) for GCN-MEAN and \(83.89\%\) for the neighbor-only baseline [1805.12421].

## 5. HOP as a continual reinforcement learning architecture

In continual reinforcement learning, HOP stands for Hierarchical Orchestra of Policies. The method targets catastrophic forgetting by maintaining a modular set of policy checkpoints and dynamically combining them on the basis of observation similarity, without requiring explicit task labels. Each frozen checkpoint \(\pi_m\) stores a set \(S_m\) of trusted states collected from trajectories whose return exceeds a reward threshold \(R_{\text{threshold}}\). Given the current state \(s_t\), HOP finds the most similar stored state by cosine similarity, activates checkpoint \(m\) if the similarity exceeds a threshold \(\omega\), and combines the current policy with all activated frozen policies through hierarchical weights
$$
W_m=\frac{I_m}{1+\sum_{k=m}^{M}I_k},
$$
so that more recent policies receive greater influence when they activate [2411.03008].

The hierarchy grows by freezing the current policy at fixed intervals of training steps \(C\). During training, the agent samples actions from the joint policy \(\pi_{n_a}(s_t)=\pi_n(s_t)+\sum_{m=1}^{n-1}W_m\pi_{m_a}(s_m^\*)\), stores \((s_t,a_t,r_t,\mathrm{done},\{I_m\})\) in a replay buffer, and updates the current policy and value function via PPO using the stored activations. The summary states that gradients back-propagate through \(\pi_n\) always, and through each frozen \(\pi_m\) only for states where \(I_m=1\), so module refinement is selective rather than global [2411.03008].

The empirical evaluation uses Procgen benchmarks—Ninja, StarPilot, Climber, and CoinRun—with 30 sequential levels, \(84\times 84\) RGB frames, and 15 discrete actions. Training proceeds in three 3 M-step phases over a 9 M-step total schedule: Env\(_1\), then Env\(_2\), then back to Env\(_1\). Relative to PPO, HOP shortens recovery on StarPilot\(\to\)Climber\(\to\)StarPilot from \(2.68\) M to \(1.04\) M steps, a \(61.2\%\) reduction; on Ninja\(\to\)CoinRun\(\to\)Ninja it reduces steps-to-return from \(1.37\) M to \(0.72\) M, a \(47.7\%\) drop. Final returns also improve: for StarPilot–Climber, PPO reaches \(12.14\), HOP \(18.15\), and PNN \(15.98\); for Ninja–StarPilot, PPO reaches \(6.79\), HOP \(8.73\), and PNN \(7.97\) [2411.03008].

The paper emphasizes that HOP matches or outperforms Progressive Neural Networks in most settings despite not using task labels. It also identifies limitations: the similarity threshold \(\omega\) and reward threshold \(R_{\text{threshold}}\) require tuning, and immediate performance drops after environment switches indicate remaining adaptation latency [2411.03008].

## 6. HOP in continual learning for NLP

A second framework named HOP appears in continual NLP, where it denotes a method that “permits to hop across tasks and domains” through three components: adapters inserted into a frozen BERT encoder, high-order moments over token embeddings, and auxiliary heads specialized for each end problem. At each incremental step, a new set of bottleneck adapters is allocated and previous adapters remain frozen; the BERT backbone is frozen throughout. This isolates new parameters in \(O(d\cdot r)\) space per problem while allowing forward transfer by initialization from the previous adapters [2402.18449].

The distinctive pooling mechanism computes central moments over the distribution of token embeddings. If \(h_1,\dots,h_Q\in\mathbb R^d\) are the token vectors and
$$
\mu=m_1=\frac{1}{Q}\sum_{q=1}^Q h_q,
$$
then the \(k\)-th central moment vector is
$$
m_k=\frac{1}{Q}\sum_{q=1}^Q (h_q-\mu)^k,\qquad k=1,\dots,p,
$$
with the power taken element-wise. The pooled representation is the concatenation \(R(x)=[m_1;\dots;m_p]\in\mathbb R^{p\cdot d}\). This is then processed by a two-layer MLP head; in Task-IL there is one head per task, whereas in Domain-IL a single head is updated across domains [2402.18449].

The training objective is standard cross-entropy on the current dataset \(S_t\), with only the current adapters and corresponding head trainable:
$$
L_t(\theta_t)=\frac{1}{N_t}\sum_{k=1}^{N_t}-\log \hat y_t^k[y_t^k].
$$
The paper explicitly states that no extra regularizer is needed, because freezing prior parameters and isolating new adapters already acts as a stability constraint [2402.18449].

The evaluation spans four NLP applications, five benchmarks, and both Task-IL and Domain-IL setups: aspect-level sentiment classification, document-level sentiment classification, topic classification on 20News, and natural language inference on MultiNLI. On DSC-small, HOP reaches \(85.6\%\) mean accuracy in TIL versus \(83.9\%\) for CTR, and \(87.8\%\) in DIL versus \(86.0\%\) for CTR. Across the five benchmarks and two setups, the summary reports that HOP yields the highest average mean accuracy and Macro-F1, with forgetting near \(0\%\). The parameter overhead is described as only approximately \(3\%\) more total parameters and approximately \(8\%\) more per-task training time than plain Adapter-BERT fine-tuning [2402.18449].

The ablations attribute much of the gain to moment order. On DSC-small, [CLS] pooling performs worst at about \(55\%\) TIL mean accuracy; AVG pooling rises to about \(81\%\); HOP with \(p=2\) already beats AVG+MAX; and \(p=3\) is optimal, while \(p=4\) degrades slightly. Measured by Wasserstein distance between task feature distributions, the first moment has average distance about \(0.15\), the second about \(0.36\), the third about \(0.26\), and the fourth about \(0.04\), which motivates the use of moments up to order three [2402.18449].

## 7. Hop-by-hop systems in routing, localization, and quantum communication

In communication systems, hop-by-hop design often replaces global shortest-path logic by local decisions informed by congestion or physical constraints. CARP, a hop-by-hop congestion-aware routing protocol for heterogeneous MANETs, assigns each one-hop link from node \(i\) to node \(j\) a weight
$$
w_{ij}=(L_q\times D_{\rm rate})/(OH_{\rm MAC}\times D_{\rm avg}),
$$
where link quality \(L_q\) is derived from received RTS signal strength, \(OH_{\rm MAC}=C_{\rm occ}+t_{\rm acc}\) under IEEE 802.11 DCF, \(D_{\rm rate}=D_{\rm Size}/C_{\rm delay}\), and \(D_{\rm avg}\) is estimated by sending \(2H\) dummy packets along an \(H\)-hop path. End-to-end route cost is the sum of these weights, and the source selects the route of minimum total cost. In NS-2 simulations against AOMDV, CARP yields a 10–20% throughput improvement, roughly 15–25% fewer packet drops, packet-delivery ratio around \(0.9\) or above versus approximately \(0.8\)–\(0.85\), and end-to-end delay reductions of up to \(30\%\) [0907.5441].

In IoT localization, Shen and Wang propose Distance-Based Connectivity Consistency as a hop-loss model for DV-Hop. The activation condition checks only first-order connectivity consistency,
$$
AC^{CC}_{i,j}=1
$$
exactly when \((Hop^{pred}_{i,j}=1)\neq(Hop^{real}_{i,j}=1)\), and the individual loss is the continuous penalty \(|Dist^{pred}_{i,j}-R|\). The resulting DCC loss eliminates repeated predicted hop-count recomputation, has per-candidate complexity \(O(N^2)\) instead of \(O(N(N+E))\), and is proved to have full coverage of hop errors: if \(Hop^{real}_{i,j}\neq Hop^{pred}_{i,j}\), then some node pair on a shortest path must activate the loss. Across 96 scenario combinations, DCC is on average 10–20% more accurate than DEMN-DV-Hop and reduces total computation time by 30–40%; for random topology with \(N_a=10\) anchors and \(R=35\) m, mean localization error drops from \(14.53\) to \(11.92\) [2412.19827].

In quantum networking, HOPPER extends the hop-by-hop idea to entanglement distribution in asynchronous repeater chains. The protocol removes global slots, lets links generate EPRs and repeaters swap immediately upon availability, and makes autonomous hop-by-hop decisions over local memory resources. In a homogeneous chain with memory size \(m\), entanglement-generation rate \(\lambda\), and link success probability \(p\), the summary gives an approximate steady-state throughput
$$
R_{e2e}^{\rm HOP}\approx m\lambda p,
$$
with startup delay approximately \(\sum_i \tau_i\), whereas a synchronous alternative is upper-bounded by \(1/T\) and its slot length grows with path length. Numerical simulations show that in a long-distance regime with \(5000\) km per link, \(\Gamma=1\) Hz decoherence, and \(\lambda=100\) Hz, synchronous performance tops out at about \(20\) ebits/s for any memory \(m\), while HOPPER saturates at about \(84\) ebits/s once \(m\gtrsim 50\) and 30 concurrent application requests are present; fidelity remains higher by \(20\%\)–\(30\%\) [2605.15869].

Taken together, these systems show that hop-by-hop design is not limited to abstract graph problems. It also governs local control in classical routing, continuous surrogates for discrete hop inconsistencies in localization, and asynchronous resource arbitration in quantum repeater networks. This suggests a recurring engineering pattern: replacing globally synchronized or exhaustive computations by local hop-level decisions can improve scalability, but the form of the gain depends on the domain-specific objective—throughput and delay in MANETs, localization error and runtime in IoT, or end-to-end ebit rate and fidelity in quantum networks.

Source: https://www.emergentmind.com/topics/hop