•5 min read

Focus-Aware Hop Attenuation in Web Knowledge Graphs

Focus-aware hop attenuation is a degree-of-interest graph rendering heuristic that replaces integer breadth-first search steps with a continuous effective hop distance deff∈[0,4]d_{\text{eff}} \in [0, 4] [Fur86] [HMM00]. Implemented in graph-payload.ts, it bounds ego-network expansion via a 16-node focus budget, logarithmic hub penalties, and parametric power-decay curves.

Table
Highlighting StrategyDistance MetricScale-Free Hub BehaviorVisual Retention Profile
1-Hop Binary HighlightingDiscrete d∈{0,1,∞}d \in \{0, 1, \infty\}Collapses on popular tag hubs; hides indirect semantic bridgesBinary step function (full opacity vs. uniform dimming)
Unweighted kk-Hop BFSInteger shortest path d∈{0..4}d \in \{0..4\}Small-world explosion floods >80%>80\% of the graph at d=2d = 2 [BA99]Linear or uniform shell decay without density awareness
Focus-Aware Effective Distance (graph-payload.ts)Continuous deff∈[0,4]d_{\text{eff}} \in [0, 4] with focusBudgetNodes: 16Logarithmic hub penalty (log⁡2(deg/4)\log_2(\text{deg} / 4)) pushes hub children outwardCoupled power-decay curves f(deff)f(d_{\text{eff}}) across scale, color, and edges

The contrast across these three strategies illustrates why density-aware distance modulation is mandatory for interactive portfolio graphs.

Why Does Unweighted Breadth-First Search Fail in Hub-Heavy Knowledge Graphs?

Unweighted breadth-first search fails in bipartite content-tag knowledge graphs because scale-free tag hubs create a small-world fan-out explosion within two hops [BA99]. When an interactive viewer highlights all nodes at integer distance d≤2d \le 2 equally, a single high-degree hub illuminates almost the entire graph and destroys visual figure-ground separation [HMM00].

In our portfolio graph, articles, publications, and courses connect through shared taxonomic tags. While specific engineering tags connect 2–4 artifacts, foundational hubs like #Software-Architecture or #Artificial-Intelligence link dozens of nodes. Under naive kk-hop traversal, stepping from a post into a hub at d=1d=1 immediately pulls every sibling artifact into shell d=2d=2 at identical visual salience.

SVG
UNWEIGHTED BFS HUB EXPLOSION (d ≤ 2) Focus (d=0) 100% Salience Tag Hub (d=1) Degree = 42 >80% Graph Flooded (d=2) FOCUS-AWARE DOI ATTENUATION (d_eff ∈ [0, 4]) Focus (2.1x) d_eff = 0.0 d_eff = 1.0 Specific +Δd Hub Penalty d_eff = 3.4 Fisheye DOI Stretches Crowded Hubs Outward

To preserve cognitive ergonomics without severing multi-hop exploration, we adapt Furnas’s Generalized Fisheye Degree-of-Interest (DOIDOI) decomposition [Fur86]. Rather than treating topological distance as an unweighted integer, computeHopDistances stretches effective distance deffd_{\text{eff}} whenever a path traverses a crowded shell or high-degree hub.

How Do Focus Budgets and Hub Penalties Shape Effective Hop Distance?

In computeHopDistances, effective hop distance deffd_{\text{eff}} combines three deterministic regulators: a 16-node cumulative focus budget (focusBudgetNodes: 16), a logarithmic step penalty for parent hubs exceeding degree 4 (hubDegreeBaseline: 4), and a shared-parent multi-path discount (/ sharedParents) that preserves tightly coupled semantic clusters.

SVG
EFFECTIVE HOP REGULATORS (computeHopDistances) Balancing Ego Horizon, Scale-Free Hubs & Triangulation 1. Focus Budget budgetNodes: 16 Soft Cap: 8 Neighbors 2. Hub Penalty +w·log2(deg / 4) Dampens Scale-Free Hubs 3. Multi-Path Triangulation excessPenalty / sharedParents d_eff = max(hubAdjustedDist, budgetDist)

First, if direct 1-hop neighbors exceed directHubSoftThreshold: 8, shell 1 receives a crowding offset deff,1=1+0.60⋅clamp((∣S1∣−8)/16,0,1)d_{\text{eff}, 1} = 1 + 0.60 \cdot \text{clamp}((\lvert S_1 \rvert - 8) / 16, 0, 1). For outer shells d∈{2..4}d \in \{2..4\}, each candidate parent u∈Sd−1u \in S_{d-1} incurs a logarithmic degree penalty above baseline 4, while multiple shared parents divide the excess penalty and budgetDist enforces the 16-node focus horizon:

TypeScript
const stepCost =
  1 +
  HOP_ATTENUATION_CONFIG.hubPenaltyWeight *
    Math.log2(
      Math.max(HOP_ATTENUATION_CONFIG.hubDegreeBaseline, degU) /
        HOP_ATTENUATION_CONFIG.hubDegreeBaseline
    );
const candidateCost = (minPathCost.get(u) ?? (d - 1)) + stepCost;
if (candidateCost < bestParentCost) {
  bestParentCost = candidateCost;
}
// After evaluating all parent neighbors u in shell d - 1:
const parentCount = Math.max(1, sharedParents);
const resolvedBestCost = Number.isFinite(bestParentCost) ? bestParentCost : d;
const hubAdjustedDist = d + Math.max(0, resolvedBestCost - d) / parentCount;
const dEff = Math.max(hubAdjustedDist, budgetDist);

Dividing the hub penalty excess max⁡(0,resolvedBestCost−d)\max(0, \text{resolvedBestCost} - d) by parentCount rewards triangulation: an artifact sharing three tags with the focused node remains visually close even if one of those tags is a broad hub.

Coupling Node Scale and Color Retention via Parametric Power Curves

Once computeHopDistances assigns an effective distance deffd_{\text{eff}} to every reachable node, computeHopCurve maps deff∈[0,Dmax⁡]d_{\text{eff}} \in [0, D_{\max}] onto continuous visual channels using a bounded power-decay law f(deff)=fmin⁡+(fmax⁡−fmin⁡)(1−(deff/Dmax⁡)γ)f(d_{\text{eff}}) = f_{\min} + (f_{\max} - f_{\min})(1 - (d_{\text{eff}} / D_{\max})^{\gamma}) that smoothly couples node scale, foreground color retention, and edge stroke width across both light and dark themes.

SVG
COUPLED POWER-DECAY CURVES f(d_eff) f(d) = f_min + (f_max - f_min)·(1 - (d / 4)^γ) f_max 0.50 f_min d=0 d=1 d=2 d=3 d=4 Color (γ=1.35) Scale 2.1x→0.4x (γ=1.25) Edge 3.0→0.8px DISCRETE HOP Z-ORDER & 750MS COSINE EASING z=40 z=30 z=20 z=10 z=1 Foreground Ego Rings Render Above Dimmed Background

In HOP_ATTENUATION_CONFIG, each visual channel is parameterized with a tailored range and concavity exponent γ>1\gamma > 1 over Dmax⁡=4D_{\max} = 4:

  • Node Scale (getAttenuatedNodeScale): Decays from fmax⁡=2.10×f_{\max} = 2.10\times at the focused node (deff=0d_{\text{eff}} = 0) down to fmin⁡=0.40×f_{\min} = 0.40\times at deff≥4d_{\text{eff}} \ge 4 with exponent γ=1.25\gamma = 1.25.
  • Node Color Retention (getAttenuatedNodeColor): Interpolates foreground hex color against the active light/dark canvas background via blendHexColor from 1.01.0 down to 0.200.20 (γ=1.35\gamma = 1.35).
  • Edge Width & Retention (getAttenuatedEdgeStyle): Scales stroke width from 3.0 px3.0\text{ px} to 0.80 px0.80\text{ px} (γ=1.10\gamma = 1.10) and color retention from 1.01.0 to 0.180.18 (γ=1.20\gamma = 1.20) using shifted hop distance max⁡(0,max⁡(dsrc,dtgt)−1)\max(0, \max(d_{\text{src}}, d_{\text{tgt}}) - 1).
  • Depth-Ordered Z-Indexing (getNodeHopZIndex): Assigns discrete layer priorities (40→30→20→10→140 \rightarrow 30 \rightarrow 20 \rightarrow 10 \rightarrow 1) so foreground ego-neighborhoods always render above attenuated background shells during 750 ms750\text{ ms} cosine-eased transitions.

Together, these coupled power curves and discrete z-index layers guarantee that hovering or dragging any node produces a clear, flicker-free ego-neighborhood spotlight across every visualization engine—building upon our May 2026 Interactive Graph Visualizations Update and 2D Elliptical Bin-Packing Tag Cloud Layout Engine, while laying the mathematical foundation for Five Graph Engines Under One Interaction Physics Contract, Voronoi Proximity Picking and 8-Way Tooltip Placement, and live exploration in our Cytoscape.js and Sigma.js WebGL sandboxes.

References

  • [Fur86]
    George W. Furnas (1986). Generalized Fisheye Views. In Proceedings of the SIGCHI Conference on Human Factors in Computing Systems (CHI '86), pp. 16--23. DOI: 10.1145/22627.22342.
  • [BA99]
    Albert-László Barabási and Réka Albert (1999). Emergence of Scaling in Random Networks. Science, 286(5439), pp. 509--512. DOI: 10.1126/science.286.5439.509.
  • [HMM00]
    Ivan Herman, Guy Melançon and M. Scott Marshall (2000). Graph Visualization and Navigation in Information Visualization: A Survey. IEEE Transactions on Visualization and Computer Graphics, 6(1), pp. 24--43. DOI: 10.1109/2945.841119.