lietzsche;perron

updated 2026-11-26·7 min read

Baseline Audit & Diagnostic Ledger

Canonical 8-node toy graph verification across all 14 retrieval baselines, dev_val post-audit results, and evaluation bugs caught along the way.

When a full benchmark run prints 0.0% or 1.0%, you cannot tell from the summary number alone whether the math is broken or the repository parser silently dropped half your edges. That is why every baseline in RepositoryRetrievalEngine runs through an 8-node toy graph first before touching dev_val (seed = 20261003).

Those sanity checks also caught several real bugs that forced retractions mid-project:

  • The retrieve_bm25 List[int] bug: On the namespace-obfuscation test (SchrödingerRepo), retrieve_bm25() returned integer node IDs (List[int]) and the evaluation runner multiplied them as float scores, briefly faking a 0.29% BM25 score and a +34.59 pp graph advantage. Fixing the return path wiped out the illusion (34.59% BM25 vs 34.88% PPR, p=1.0000p = 1.0000).
  • Uncalibrated dev_val PPR collapse: In the dev_val matrix below, Standard PPR collapses to 1.0% (and Aider/Query-Reweighted PPR follow it down) because that baseline pass used uncalibrated dense priors and let test files act as walk sinks. Turning on sharp top-25 softmax priors and test-node filtering in later sweeps lifted Standard PPR to 48.5%.
  • Cancelled 12B (gemma-4-12b-it) run: I cancelled the 12B scaling run on N = 58 tasks unconditionally. E4B pointwise scoring already hit 49/58 (84.48% Acc@5), leaving at most 9 misses against McNemar’s 14.25 to 16.45 pp 80%-power minimum detectable effect. Worse, inspecting perron/reranker/scaling_worker.py turned up an accidentally de-indented def get_input_target_device that had made 26 lines of GPU eval dead code, alongside a "26b" in model_id check pinning 12B onto a single 14.56 GiB T4.
  • LoRA prompt leak: An early LoRA dataset generator (prepare_lora_dataset.py) leaked # Gold target symbol comments into training prompts, splitting performance into 58.33% Acc@5 on seen repos vs 15.38% (0.4846 ROC-AUC) on unseen repos.

Canonical 8-Node Toy Graph Specification

The diagnostic toy graph checks one minimal question: can a retriever step across a 1-hop structural call edge to an unmentioned target without getting swallowed by a global hub?

  1. Seed Node S

    High lexical overlap with the query text ("process_order").

  2. Target Node T

    Located 1 call-hop from S ("calculate_tax") with low in-degree = 1 and zero lexical overlap with the query.

  3. Hub Node H and Fillers F1..F5

    Hub H has high in-degree = 6 from S and filler nodes F1..F5; passing requires T in R[:3].

Toy Graph Evaluation Matrix (All 14 Baselines)
#Baseline NameToy ResultCategoryDiagnosis
1Okapi BM25FAIL (Rank 7)Intrinsic limitLexical token match only; unmentioned target TT has zero token overlap.
2BM25 + 1-Hop ExpansionPASS (Rank 3)PassPropagates 50% BM25 score from SS across 1-hop edge to TT.
3Dense Semantic RetrievalFAIL (Rank 7)Intrinsic limitIdentifier similarity without graph edge traversal scores 0.0 for TT.
4Prior-Only Control (p0p_0)FAIL (Rank 7)Intrinsic limitTeleport prior without random-walk diffusion leaves zero mass on TT.
5Standard PPRPASS (Rank 3)PassPower-iteration walk flows probability mass from SS to 1-hop neighbor TT.
6Authentic Aider Repo MapPASS (Rank 3)PassPageRank seeded on prompt identifier tags reaches TT.
7Hub Blocklist + Lexical OverridePASS (Rank 2)PassMasks top in-degree hub HH, elevating TT to rank 2.
8Static Degree-Discounted MatrixPASS (Rank 3)PassPenalizes incoming transition weights to HH, preserving flow to TT.
9Degree-Normalized PPRPASS (Rank 2)PassPost-walk division by (din+1)γ(d_{\text{in}} + 1)^\gamma attenuates HH.
10HippoRAG Pre-Walk Prior ScalingPASS (Rank 3)PassPre-walk prior modulation by 1/πgγ1/\pi_g^\gamma directs flow to TT.
11Query-Reweighted PPRPASS (Rank 3)PassDynamic edge scaling prioritizes active query symbols.
12Perron Static (γ=0.70\gamma = 0.70)PASS (Rank 2)PassDecoupled ratio πq/πg0.70\pi_q / \pi_g^{0.70} suppresses HH and places TT at rank 2.
13Perron Adaptive (γq\gamma_q)PASS (Rank 2)PassQuery prominence ηq\eta_q modulates suppression, placing TT at rank 2.
14Oracle Upper BoundPASS (Rank 1)PassPlaces ground-truth target TT at rank 1 unconditionally.

Stratum C Factorial Localization and Pool Truncation

Forest plot comparing Stratum C factorial localization conditions and relative lift against A4 across N=131 tasks
stratum c factorial localization (n = 131) forest plot showing pointwise e4b and candidate-pruned reasoning gains.
Pointwise candidate pool-size truncation curves comparing A4 graph expansion against A2 depth BM25 across N=344 tasks
pointwise candidate pool-size truncation curves across n = 344 verified tasks comparing a4 and a2.

Dev-Set Post-Audit Rerun (dev_val, N = 100)

Executed via python scripts/run_suite.py --suite table2 --split dev_val --seed 20261003 and recorded in results/dev_val_table2_postaudit.json:

Full Dev-Val Post-Audit Results Table (14 Baselines)
BaselineFn Acc@5Fn Acc@10File Acc@5Cov@4kHSI@10McNemar pp
Okapi BM2511.0%20.0%57.0%26.3%99.7%0.0923
BM25 + 1-Hop Expansion11.0%20.0%57.0%26.3%99.5%0.0923
Dense Semantic8.0%15.0%42.0%17.3%99.2%0.7905
Prior-Only Control (p0p_0)11.0%20.0%57.0%26.3%99.7%0.0923
Standard PPR (Shared p0p_0)1.0%2.0%10.0%0.5%60.0%0.0034
Authentic Aider Repo Map1.0%1.0%6.0%0.5%55.2%0.0018
Hub Blocklist + Lexical Override2.0%2.0%16.0%1.5%90.2%0.0034
Static Deg-Discount Matrix1.0%2.0%16.0%0.5%69.2%0.0034
Degree-Normalized PPR2.0%3.0%22.0%5.5%97.1%0.0020
HippoRAG Prior Scaling1.0%2.0%10.0%0.5%58.5%0.0034
Query-Reweighted PPR1.0%1.0%14.0%0.5%60.8%0.0018
Perron Static (γ=0.70\gamma = 0.70)8.0%13.0%50.0%10.5%92.3%baseline
Perron Adaptive Specificity6.0%8.0%44.0%7.0%82.4%0.1250
Oracle Upper Bound83.0%83.0%83.0%82.0%99.8%0.0000

Next: Dataset Datasheet or Confirmatory Preregistration v2.

Search wiki and portfolio

type to search across all entries.