Loadbear
6 ideasabout

Can the Answer Cross the Bridge First?

A tiny, falsifiable path-Laplacian retrieval lab: four planted answers, one tempting decoy cluster, and a fixed token budget.

created 2026-07-15·updated 2026-07-15·demo, writing

Part I was the operator. Part II was the recent paper and the warning label: faster mixing is not the same thing as better context.

This is the first test I would actually trust myself to run, precisely because it is small enough to fail in public.

The question is not “does path diffusion make a graph more connected?” The math already says it does. The question is:

Can a relevant answer a few hops away enter a fixed context packet before a nearby-but-wrong topic does?

That is a retrieval question. It needs labels, a budget, and a way to count embarrassing answers.

The fixture: an answer chain beside a plausible distraction

I planted a nine-node graph. The query anchor is customer request. The upper chain contains four pieces of an answer to an approval/follow-up question:

customer request → pricing owner → approval policy → follow-up task → contract exception

There is one bridge from approval policy into an unrelated support cluster:

approval policy → support bridge → renewal FAQ → incident timeline → on-call rota

renewal FAQ is deliberately unfair in the useful way: it has decent lexical query evidence, but it is not an answer. A real product has exactly this kind of material—locally plausible, semantically adjacent, and costly if it takes the place of an action or exception.

Before running anything, I mark the four upper-chain nodes as answer-bearing and the lower cluster as unrelated. That makes recall and leakage observable instead of vibes.

What the lab computes

The transport operator is the one from the 2025 paper:

L̂(α) = Σᵈ d⁻ᵅ L⁽ᵈ⁾
dx/dt = −L̂(α)x

Shortest-path distance defines the layers; the dashed, effective connections are not written back as facts in the graph. I approximate the heat equation with small explicit Euler steps for a fixed transport time of 0.90.

The experiment then combines that transport signal with a fixed query score:

retrieval score = 0.82 × normalized transport + 0.18 × fixed query prior

That second term is important. It is not in the paper. It stands in for an ordinary lexical or semantic retrieval signal that a context system already has. I want the lab to ask whether topology improves an existing retrieval policy, not quietly redefine “relevant” as “diffused quickly.”

Finally, the selector sorts candidates and greedily packs them into a 152-token packet. The four planted answer nodes use the entire budget exactly. The FAQ decoy costs 38 tokens—enough to crowd out contract exception if it ranks too high.

fixed transport time: 0.90fixed packet budget: 152 tokens
A relevant approval chain and a bridged support clusterThe upper chain contains four known answer-bearing nodes. The lower chain is unrelated support context. Green fill shows transport from the customer request; selected nodes receive a heavier outline.requestqueryowneranswerpolicyanswertaskanswerexceptionanswerbridgeotherFAQotherincidentotherrotaother

Upper chain = planted answer. Lower chain = plausible-looking, unrelated support context. The vertical edge is the only bridge.

answer recall
4 / 4
leakage
0
tokens
152 / 152
ranked candidatestransport 82% + fixed query prior 18%
pricing owner (answer)0.00held
approval policy (answer)0.00held
follow-up task (answer)0.00held
contract exception (answer)0.00held
support bridge (other)0.00held
renewal FAQ (other)0.00held
incident timeline (other)0.00held
on-call rota (other)0.00held
This is a synthetic retrieval fixture, not a result from the paper. The path Laplacian controls transport; the fixed query prior represents an existing lexical or semantic score. Change α and watch whether the 152-token packet gets all four planted answers before it admits the FAQ decoy.

At α = 0, every reachable pair has equal effective weight. The graph is complete for this operator, the transport signal is almost flat, and the FAQ’s lexical prior gets it into the packet. Result: 3 / 4 answer recall, one unrelated item, and 144 / 152 tokens spent.

Around α = 1 through 3 in this particular fixture, the packet reaches 4 / 4 answer recall with no unrelated nodes. At α = 8, which is close to direct-edge behavior here, transport is too local: the FAQ again outranks the distant contract exception and we fall back to 3 / 4 with one leakage item.

That middle band is the only thing interesting about the result. It is not a universal “best α.” It is evidence that this fixture contains the tradeoff we meant to test.

The tiny implementation is the specification

The complete runnable version lives at scripts/path_laplacian_retrieval_lab.py in the repository. It uses only the Python standard library, so there is no numerical package doing hidden work:

python3 scripts/path_laplacian_retrieval_lab.py

It prints the selected packet, answer recall, leakage count, and tokens across α ∈ {0, 0.5, 1, 2, 3, 4, 8}. --json emits exactly the same results in a format a later Rust fixture runner can compare against.

I like this as a first implementation because its modeling choices are painfully visible:

Choice Here Later, with real context
Direction symmetrized, unweighted graph preserve source/target semantics or justify a directed operator
Time one fixed diffusion interval event-time decay and tier horizons
Query evidence hand-set prior lexical, semantic, metadata, and action signals
Ground truth four planted answer nodes frozen relevance labels from fixtures or human judgment
Selection greedy rank-then-pack the real context assembler and its token accounting

In other words: the Python is not a context_kernel feature. It is a reference model and a test oracle.

What this says about the current kernel

The current graph source is even more local than the toy operator. It looks at recent edge events, assigns asymmetric source/target boosts based on edge type, combines contributions with a saturating noisy-OR-style update, normalizes, and returns the highest-scoring nodes. It does not currently perform multi-hop diffusion.

That is good news, not a deficiency. We have a baseline with clear semantics. The wrong next step would be to replace it because a nine-node picture looked pretty.

The right next step is narrower:

  1. Freeze a handful of real or synthetic context_kernel fixtures with known answer-bearing nodes and known distractors.
  2. Build a read-only, optional path source beside graph; do not rewrite or “discover” edges.
  3. Decide explicitly how event direction, type, weight, and recency become an undirected distance or a directed alternative.
  4. Compare direct graph scoring against a sweep of α at the same token budget: recall, leakage, and latency.

If no α improves the direct baseline, we keep the direct baseline. That would be a successful experiment.

First Enron run: no path win yet

I pushed this lab into context_kernel as a read-only path-enron command, then ran it against an isolated slice of the real public Enron maildir: 120 messages from Skilling’s _sent_mail, bound against 18 curated Enron history/finance/baseline nodes.

The binding step wrote 98 email-to-context events. The resulting component had 104 nodes and 131 undirected edges. The existing direct kernel is already doing its job there: its historical validation passed 3 / 3; the finance validation passed 2 / 3 (the missing case was the SEC/related-party query).

The path sweep did not earn a promotion. At α ≤ 2, shared history/finance anchors turn the component into a fast-mixing hub: many unrelated two-hop emails tie at essentially the same score. At large α, the ranking becomes more local again, but the sweep did not reveal a stable middle band that improved the direct result.

That is the current result: the naïve, symmetrized path operator is too indiscriminate for this Enron slice. The evaluator remains useful because it makes the next questions concrete—typed edges, recency-weighted path cost, and relevance labels stronger than “an email plus a history node appeared.” None of those changes belong in the production kernel until they beat the direct baseline on frozen fixtures.

Two papers I am putting in the queue

The next theoretical fork is not more aggressive pairwise diffusion. It is whether some context should be represented as a group interaction in the first place. A meeting, a thread, or a document co-authored by several people is naturally a hyperedge, not a bag of pairwise links. “Higher-order Laplacian renormalization” in Nature Physics (2025) introduces cross-order Laplacians for diffusion across higher-order interactions and a way to coarse-grain them. It is not a retrieval paper, but it is a serious candidate for a later “threads are not just edges” exploration.

For scale, “Coarse-graining network flow through statistical physics and machine learning” in Nature Communications studies graph compression that preserves diffusion-oriented macroscopic quantities. The interesting future question is whether we could compress old, dense context regions while preserving the transport behavior that the selector actually uses—not merely preserve graph appearance.

Neither paper justifies a production feature. They do give us better questions once this first, deliberately boring lab is exhausted.