{
 "artifacts": [
  {
   "name": "bench_graph_context.py",
   "url": "https://synthcore.org/code/1210/bench_graph_context.py"
  },
  {
   "name": "bench_report.json",
   "url": "https://synthcore.org/code/1210/bench_report.json"
  },
  {
   "name": "experiment.py",
   "url": "https://synthcore.org/code/1210/experiment.py"
  },
  {
   "name": "mini_experiment.py",
   "url": "https://synthcore.org/code/1210/mini_experiment.py"
  },
  {
   "name": "mini_results.json",
   "url": "https://synthcore.org/code/1210/mini_results.json"
  },
  {
   "name": "report.md",
   "url": "https://synthcore.org/code/1210/report.md"
  },
  {
   "name": "report_bench_2026-09-03T115239.md",
   "url": "https://synthcore.org/code/1210/report_bench_2026-09-03T115239.md"
  },
  {
   "name": "results.json",
   "url": "https://synthcore.org/code/1210/results.json"
  }
 ],
 "category": "architecture",
 "description": "Replace arbitrary graph serialization or global top-k retrieval with deterministic locality tiers centered on entities matched by the question. Render every candidate unit in the highest-priority seed-local tiers before admitting more distant or weakly connected material, and use stable identifiers to make ties reproducible. If the complete seed-local candidate region fits within the context budget, no relevant unit in that region is lost to truncation.",
 "download_zip": "https://synthcore.org/download/1210",
 "formulas_latex": [
  "$$U_k(S)=\\{\\mathrm{desc}(v):d(v,S)\\le k\\}\\cup\\{\\mathrm{rend}(e):e=(u,r,w),\\ d(u,S)\\le k,\\ d(w,S)\\le k\\},$$",
  "$$h(\\mathrm{desc}(v),S)=d(v,S),\\qquad h(\\mathrm{rend}(e),S)=\\max\\{d(u,S),d(w,S)\\},$$",
  "$$D_k(S)=\\sum_{x\\in U_k(S)}\\ell(x),\\qquad D_k(S)\\le B\\ \\Longrightarrow\\ \\mathrm{Render}(q)=U_k(S),\\quad \\mathrm{Recall}_{\\mathrm{candidate}}=1,$$",
  "$$\\mathrm{key}(x)=\\big(h(x,S),\\mathrm{id}(x)\\big),\\qquad \\mathrm{Render}_B(q)=\\operatorname{prefix}_{B}\\left(\\operatorname{sort}_{\\mathrm{key}}(U_k(S))\\right).$$"
 ],
 "id": 3032,
 "implementation": "Integrate this method as the retrieval and context-construction layer before a graph-RAG reader or graph transformer. Given a question, deterministically name-match entities to obtain $S$, perform a bounded breadth-first search to depth $k$ (start with $k=2$), create one render unit for every eligible node description and edge, and record each unit's exact serialized length including separators. Do not use an LLM or learned retriever initially. Pseudocode is: `S = name_match(question, graph); d = BFS_distances(graph, S, k); U = []; for v with d[v] \u003c= k: append(desc(v), h=d[v], id=node_id[v]); for edge (u,r,w) with d[u] \u003c= k and d[w] \u003c= k: append(render(edge), h=max(d[u],d[w]), id=edge_id[e]); sort U by (h,id); D=sum(length(x) for x in U); if D\u003c=B: context=concat(U); else: context=greedy_prefix(U,B)`; pass `context` to the same frozen reader used by the baseline. Compute graph distances, lengths, $D_k(S)$, and exact annotated evidence recall directly; estimate reader correctness empirically. The first cheap experiment should use a synthetic knowledge graph and a frozen 7B QA reader, comparing global serialization, random truncation, learned top-k retrieval, and seed-anchored rendering at budgets from 512 to 8,000 tokens. Annotate gold node and edge evidence. The quantitative prediction is a sharp coverage boundary: queries with $D_k(S)/B\\le1$ should have candidate recall approximately 1.0, while recall should decrease monotonically after the ratio exceeds one, with the largest loss at the first overflowing hop tier. Conditional reader accuracy given gold evidence should remain similar across methods; unconditional accuracy should differ mainly because naive methods truncate evidence. Verify that the measured full-coverage threshold agrees with $D_k(S)=B$ within 10% and that repeated runs produce identical contexts.",
 "math_summary": "Let $G=(V,E)$ be a graph, $S=S(q)\\subseteq V$ the deterministic seed set extracted from query $q$, $k$ the maximum hop radius, and $B$ the token or character budget. Define the candidate units $U_k(S)$ as node-description units $\\mathrm{desc}(v)$ for nodes with $d(v,S)\\le k$ and edge-render units $\\mathrm{rend}(e)$ for edges $e=(u,r,w)$ whose endpoints both satisfy $d(u,S),d(w,S)\\le k$. Assign each unit hop level $h(x,S)=d(v,S)$ for node units and $h(x,S)=\\max(d(u,S),d(w,S))$ for edge units. Let $\\ell(x)$ be the rendered length including separators, and let $D_k(S)=\\sum_{x\\in U_k(S)}\\ell(x)$. When $D_k(S)\\le B$, the renderer returns every unit in $U_k(S)$, giving candidate recall one. When $D_k(S)\u003eB$, it emits units in increasing hop level and resolves ties with an injective deterministic identifier. The predicted transition is at $D_k(S)=B$: full candidate coverage should hold below the boundary and begin failing above it.",
 "math_tags": [
  "graph-theory",
  "combinatorics",
  "information-theory"
 ],
 "ml_areas": [
  "retrieval",
  "graph-nn",
  "transformer",
  "attention"
 ],
 "paper": {
  "arxiv_id": "2609.02011",
  "arxiv_url": "https://arxiv.org/abs/2609.02011",
  "summary_what_math_gives_to_ml": "The paper provides a deterministic, seed-anchored graph-rendering mechanism for answering questions under a hard context budget. Its key transferable asset is a pre-render coverage guarantee: construct a bounded-hop candidate universe around query seeds, order render units by locality tiers with deterministic identifiers, and preserve all seed-local units whenever their aggregate render mass fits within the budget, independently of reader behavior. This can be transferred to graph-RAG, retrieval-augmented transformers, and topology-aware GNN preprocessing as a budgeted context selector with a falsifiable truncation boundary rather than as a generic prompt-formatting heuristic.",
  "title": "Seed-Anchored Budget-Bounded Graph Rendering for Question Answering on Industry-Standard Power-Grid Information and Exchange Models",
  "year": "2026"
 },
 "ratings": {
  "difficulty": 4,
  "novelty": 7,
  "usefulness": 8
 },
 "solves": [
  "accuracy",
  "scalability",
  "stability"
 ],
 "title": "Seed-Anchored Budgeted Graph Context",
 "url": "https://synthcore.org/idea/3032/seed-anchored-budgeted-graph-context",
 "verification": {
  "benchmark": {
   "track": "graph_context_budget",
   "model": "mlp_tiny",
   "n_seeds": 8,
   "metric_direction": "lower is better",
   "comparison": {
    "baseline_mean": 0.0418749984819442,
    "idea_mean": 0.0418749984819442,
    "delta_mean": 0,
    "per_seed_diffs": [
     0,
     0,
     0,
     0,
     0,
     0,
     0,
     0
    ],
    "idea_wins": 0,
    "n_pairs": 8,
    "p_value": 1,
    "mde": 0,
    "mde_rel_pct": 0,
    "verdict": "no measurable effect",
    "system_worked": false
   },
   "baseline": {
    "best_cfg": {
     "lr": 0.003
    },
    "sweep": [
     {
      "cfg": {
       "lr": 0.001
      },
      "mean": 0.09124999865889549
     },
     {
      "cfg": {
       "lr": 0.003
      },
      "mean": 0.03874999890103936
     },
     {
      "cfg": {
       "lr": 0.01
      },
      "mean": 0.04374999878928065
     }
    ],
    "full": {
     "mean": 0.0418749984819442,
     "std": 0.006091745648538752,
     "per_seed": [
      0.03500000014901161,
      0.044999998062849045,
      0.044999998062849045,
      0.029999999329447746,
      0.044999998062849045,
      0.03999999910593033,
      0.044999998062849045,
      0.04999999701976776
     ],
     "n": 8
    }
   },
   "idea": {
    "mean": 0.0418749984819442,
    "std": 0,
    "per_seed": [
     0.03500000014901161,
     0.044999998062849045,
     0.044999998062849045,
     0.029999999329447746,
     0.044999998062849045,
     0.03999999910593033,
     0.044999998062849045,
     0.04999999701976776
    ],
    "n": 0
   },
   "mechanism_signature": {
    "confirmed": true,
    "observed_anchored_gold_recall": 1,
    "observed_budget_units": 8,
    "observed_candidate_units": 24,
    "observed_global_gold_recall": 0.3333333333333333,
    "predicted_D_over_B": 3,
    "predicted_anchored_gold_recall": 1,
    "repeated_context_identical": true,
    "trained_anchored_accuracy": 0.9581250015180558,
    "trained_baseline_accuracy": 0.0418749984819442
   },
   "custom_track": {
    "domain": "retrieval",
    "file": "bench_graph_context.py",
    "name": "graph_context_budget"
   }
  },
  "mechanism_confirmed": true,
  "peer_reviewed": false,
  "practical_verdict": "no_effect",
  "stage1_mechanism_check": {
   "worked": true,
   "confidence": 9,
   "verdict": "Built a deterministic seed-matched BFS graph-context renderer with hop-tier ordering, stable identifiers, exact separator-inclusive lengths, and greedy budget truncation. The formal check showed an exact transition at D_k(S)=B=4119 characters: all tested budgets below D were incomplete, while B=D and larger budgets achieved candidate recall 1.0; repeated anchored renders were identical. Across 8 synthetic queries whose budgets fit all seed-local one-hop evidence, anchored rendering achieved 1.0 average relevant recall versus 0.273 for global ordering and 0.316 for random truncation.",
   "metrics": {
    "baseline": "Global ID ordering: average relevant recall 0.273 across 8 queries; random ordering: 0.316.",
    "idea": "Seed-anchored hop-tier ordering: average relevant recall 1.000, with full relevant recall on 8/8 queries; formal candidate recall transitioned exactly at D_k(S)=B=4119 characters."
   },
   "how_to_run": "python3 experiment.py \u0026\u0026 /home/maxwelhelp/main/bin/python3 mini_experiment.py",
   "files": [
    "experiment.py",
    "mini_experiment.py",
    "results.json",
    "mini_results.json"
   ],
   "limitations": "Only synthetic graphs and exact name matching were tested; no graph-RAG reader, QA accuracy, learned retriever, pretrained model, tokenization effects, latency, or real-world noisy queries were evaluated. The evidence-recall comparison used budgets deliberately sized to fit the one-hop seed-local region, so it verifies retrieval behavior rather than end-to-end reader gains."
  },
  "status": "mech_ok_no_baseline",
  "status_label": "Mechanism confirmed, baseline not beaten",
  "updated_at": "2026-09-03T11:52:39",
  "verdict_source": "deterministic test code (paired-seed permutation statistics)",
  "verification_axes": {
   "benchmark_mechanism": {
    "confirmed": true,
    "tested": true
   },
   "practical_benchmark": {
    "beats_baseline": false,
    "tested": true,
    "verdict": "no_effect"
   },
   "toy_mechanism_gate": {
    "confirmed": true,
    "tested": true
   }
  }
 }
}
