Degree-Corrected Hierarchical Router
Implementation & benchmark of arXiv:2607.03010 — Community structure of the pseudofractal web
Source paper: Community structure of the pseudofractal web arXiv:2607.03010 ⓘ · analyzed Aug 30, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Replace a flat MoE or graph-pooling assignment with recursive partitions selected by interaction evidence after removing each item’s expected degree effect. Tokens, nodes, or examples that are frequently active for purely popularity-related reasons should not automatically form an expert or cluster. Recursion stops when a candidate split has nonpositive degree-corrected evidence, producing an adaptive hierarchy rather than a fixed number of equally sized groups.
Formulas
Mathematical statement
The paper studies the pseudofractal web with n_t = (3/2)(3^t+1) vertices and E_t = 3^{t+1} edges, whose heavy-tailed degrees arise from deterministic growth. Its key comparison is between a plain Bernoulli block model and a degree-corrected model tested against a configuration-model null: the recursive partition has asymptotic log-evidence slope ln(3) - (2/3)ln(2) under the plain model, but 2ln(3) - (4/3)ln(2) under the degree-corrected model, with the latter surviving down to r_kappa = 42 nodes rather than 1095. For implementation, use a Poisson degree-corrected block likelihood. Let A_ij >= 0 be the symmetric interaction count between items i and j, d_i = sum_j A_ij be item degree, m = (1/2)sum_i d_i be total edge weight, g_i be the current cluster label, theta_i > 0 be a node propensity normalized by sum_{i:g_i=a} theta_i = 1 inside each cluster a, and omega_ab >= 0 be the interaction intensity between clusters a and b. The degree-corrected score is L_DCB = sum_{i<j}[A_ij log(theta_i theta_j omega_{g_i g_j}) - theta_i theta_j omega_{g_i g_j} - log(A_ij!)]. The degree-preserving configuration null uses q_ij = d_i d_j/(2m), with L_CM = sum_{i<j}[A_ij log q_ij - q_ij - log(A_ij!)]. Accept a proposed split only when Delta = L_DCB - L_CM - beta C is positive, where C is the number of free split parameters and beta is a validation-set-calibrated complexity penalty. The paper’s self-similar result motivates continuing refinement until roughly sqrt(n) groups of roughly sqrt(n) items when evidence keeps rising.
Implementation notes
Integrate this at the router or graph-pooling boundary, not inside the token MLP. For a graph model, let items be nodes and construct A from minibatch edge weights or exponentially averaged embedding similarities. For an MoE transformer, let items be token representatives, token clusters, or a bounded reservoir of vocabulary IDs; set A_ij to the exponentially averaged number of times i and j are sent to the same expert, co-occur in a local attention window, or have high cosine similarity. The router first computes ordinary logits z_i,e and soft assignments p_i,e = softmax(z_i,e). Build a sparse interaction graph from the top-k expert assignments, then recursively split each current group. Pseudocode: (1) initialize one group containing all items; (2) for every group, propose a binary split using the sign of the second eigenvector of the normalized interaction matrix or a two-means split of router embeddings; (3) estimate d_i = sum_j A_ij, m = (1/2)sum_i d_i, theta_i = d_i / sum_{j:g_j=g_i} d_j, and omega_ab = sum_{i in a,j in b} A_ij divided by the corresponding propensity normalization; (4) compute L_DCB, L_CM, and Delta; (5) commit the split only if Delta > 0 and both children exceed a minimum load; (6) repeat depth-first or breadth-first up to a fixed depth; (7) use the final groups as hierarchical routing masks or as initialization for learned expert logits. Estimate A, d_i, and m online with exponential moving averages, and compute the spectral split only every several hundred optimizer steps so routing overhead remains small. The paper supplies the degree-corrected-versus-configuration comparison and recursive refinement principle; the router-specific interaction graph and likelihood are the adaptation. Begin with a 4-layer, 8-expert Switch-style MoE on WikiText-103 or C4, preceded by a synthetic Zipf token-frequency benchmark. Compare ordinary load-balancing loss, flat frequency-normalized routing, and this method at equal FLOPs and capacity. Success means lower expert-load coefficient of variation, fewer collapsed experts, improved validation perplexity at the same active-parameter count, and partitions that remain stable across minibatches rather than tracking only high-frequency tokens.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Not tested
Stage 2 · Practical benchmark result: Not run
Methodology: Toy-system gate first; the benchmark stage runs only after a pass. How verification works
Stage 1 — Mechanism check agent confidence 7/10
Built a degree-corrected recursive spectral router with profiled Poisson DCB and configuration-model likelihoods, plus a synthetic Zipf-degree benchmark. The supplied asymptotic slopes were verified numerically: both are positive and the corrected slope is exactly 2x the plain slope. Across 20 trials, degree correction reduced expert/group-size CV from 0.723 to 0.554 on planted graphs and from 0.508 to 0.397 on popularity-only graphs, a promising load-balance signal; however, planted ARI did not improve (0.155 flat versus 0.152 DCB), so this is not an accuracy win.
- Agent confidence
- 7/10
- Baseline
- Raw adjacency spectral recursive split: planted load-CV 0.723 +/- 0.116, ARI 0.155 +/- 0.032; popularity-only load-CV 0.508 +/- 0.205.
- Idea
- Normalized/degree-corrected spectral recursive split: planted load-CV 0.554 +/- 0.252, ARI 0.152 +/- 0.068; popularity-only load-CV 0.397 +/- 0.211, ARI 0.090 +/- 0.062. Single-run DCB popularity-only split gain remained positive at 9.18 log units, indicating finite-sample false evidence can persist.
Limitations: Only small synthetic weighted graphs were tested; no MoE, transformer, graph-neural-network, validation-set penalty calibration, held-out likelihood, GPU execution, or equal-FLOP perplexity comparison was performed. The benchmark uses a simplified spectral splitter and the reported null ARI is not an accuracy metric because popularity-only graphs have no meaningful planted partition.
How to run: python3 experiment.py && /home/maxwelhelp/main/bin/python3 repeat.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.