folklore GitHub
◆ Research · measured, not claimed

Seven questions, measured.

Folklore is a peer-to-peer layer where agents share prior, verified inference instead of re-deriving it. That makes two bets: it saves cost and compounds quality, and it stays reliable through signed provenance. We tried to falsify both. Here is every question, its measured answer, and the disciplined negatives we kept rather than buried. Three of the seven overturned our own first guess.

RQ1 · reuse → quality
Retrieval positive
Answer rerun
RQ2 · detect bad reuse
Cross-encoder .884
Split result
RQ3 · trust / poison
Labels invalid
Rerun
RQ4 · savings
Beats solo cache
Positive
RQ5 · compounding
Compounds, real
Pilot-pending
RQ6 · benchmarks
Suite shipped
Built
RQ7 · architecture
Hopfield link
Framed
RQ1Split result

When does reusing a prior answer improve quality?

Retrieval improves when the match is made on the question (query↔query): tree sharing raises recall@10 from 73.5% to 98.6% with 7/8,000 retrieval regressions. On the frozen SciFact fixture, different-need claims top out at cosine 0.544, below the 0.6 gate. The older answer-level "hurt 0/9" claim is withdrawn: its scorer treated all claims as SUPPORT, while the official labels are 39 SUPPORT / 21 CONTRADICT / 40 NOINFO.

ExampleTwo engineers ask paraphrases of "does X regulate Y?". The second inherits the first peer's already-verified source instead of paying for a fresh search: same need, near-identical embedding.

Bench: bench-inference-tree-sharing.mjs, run-e1-reuse.mjs, audit-scifact-labels.mjs

Retrieval recall@10 · NFCorpus
baseline tree-shared 73.5% 98.6% +34% relative · rescued 2015 · hurt 7 / 8000
Sharing the answered-question→verified-doc tree lifts recall with essentially zero regressions.
RQ3Labeled rerun required

Can cryptographic provenance defend reused context against poison?

Not proven yet. The ranker produced a large, poison-rate-invariant behavioral effect by dropping unsigned passages, but the harness scored every BEIR SciFact claim as SUPPORT. Official labels show that assumption is false. The old ~25× correctness headline is invalid; it is preserved as historical output, not safety evidence.

Required rerunScore official SUPPORT and CONTRADICT claims against their actual verdicts, handle NOINFO through an explicit abstention policy, and then compare identical poisoned contexts with and without trusted provenance.

Audit: audit-scifact-labels.mjs · 39 SUPPORT / 21 CONTRADICT / 40 NOINFO

Historical scorer output · invalid verdict reference
T0 baseline T1 ranker 0.59 0.024 Do not interpret as correctness · official-label rerun pending
The filtering behavior is real; its effect on truth is not established by this mislabeled run.
RQ4Positive

How much does sharing actually save, versus a good solo cache?

The existential test for being peer-to-peer: does federation beat a single node running a well-tuned semantic cache? At matched error (≤2% false-accept), federated reuse lands +22% recall@1 over the tuned single-node cache, and +55% over cold retrieval. Savings are real but bounded by retrieval precision × hit-rate × the cost of verifying a reused answer.

ExampleYou already run a vCache-style local cache. Adding peers still resolves +22% more queries from memory at the same error budget: the network knows things your single cache never saw.

Bench: bench-vcache-compare.mjs (SciFact, recall@1, matched ≤2% error)

Recall@1 · cold vs solo cache vs federated
cold solo cache federated 47.7% 60.7% 74.0% federated vs solo cache: +22% at matched ≤2% error
If a tuned local cache already captured the value, decentralization wouldn't be justified. It doesn't.
RQ5Positive · pilot-pending

Does shared inference compound across users, reliably?

It compounds. On real SciFact qrels, cooperative correct-resolve rises from 27.9% → 39.3% over isolated peers, at 1.8% false-admit, and real paraphrases separate from spurious matches at AUC 0.998, so peers can safely reuse each other's resolutions. Structurally it's monotone submodular coverage (diminishing returns, not runaway). The one piece still unmeasured is at-scale reliability: a 100-peer, 30-day live pilot.

ExampleOne peer pays to resolve a niche topic once; every other peer inherits it for a federation round-trip instead of a paid web call. The n-th query is increasingly likely to hit context already paid for.

Bench: bench-compounding-real.mjs, bench-paraphrase-sigma.mjs

Correct-resolve · isolated vs cooperative
isolated cooperative 27.9% 39.3% +11.4 pts · false-admit 1.8% · paraphrase sep. AUC 0.998
Knowledge and inference both compound on a real corpus; the pilot is what turns the thesis from likely to proven.
RQ2Split result

Can the system tell a reused answer is stale or off-topic?

The bi-encoder layer fails, but the final untried lever worked. MiniLM, bge, coverage, margin, entropy, and retrieval depth stay near chance (AUC 0.41–0.55). A cached ms-marco cross-encoder rescoring the live MiniLM candidates reaches AUC 0.884. That separates OOD relevance; it does not yet prove whole-answer replayability or detect on-distribution stale traces.

ExampleAsk a software-research graph "how do I bake sourdough?" It still returns its five nearest nodes at respectable cosine. The gate can't separate "I can answer this" from "I'm reaching."

Bench: bench-energy-crossencoder.mjs · leave-one-out TPR 86.1%, FPR 9.1%

OOD separation · live retrieval candidates
bi-encoder cross-encoder 0.552 0.884 relevance fixed · replayability and stale-axis still open
Joint query-document scoring finds the signal that every embedding-only lever missed.
RQ6Built

What benchmarks make these answers rigorous?

The harness is the suite. Retrieval quality on BEIR (SciFact / NFCorpus / FiQA), long-horizon memory on LongMemEval and LoCoMo, a templated poison eval (3 attacks × 3 rates × 3 treatments), a recall_any@k metric, and a vCache A/B for the savings question, plus the new ones built for this program: answer-quality-under-reuse, energy-coverage, energy-bge, and the OOD-signal sweep. Discipline throughout: matched comparisons, answers scored against gold qrels (never the gate), and every number labelled simulator vs measured. The open gap: no public benchmark scores cross-peer reuse quality + savings + trust jointly, which is the harness this program starts.

RQ7Framed

What architecture fits shared, provenance-tagged inference?

The longer-term frontier, framed not yet benched. The reranker is already one modern-Hopfield update step, which is softmax attention; personalized-PageRank, EigenTrust, and cache eviction all read as energy-descent fixed points. The hypothesis that ties it to RQ3: long-context models that ingest provenance-tagged retrieved context as first-class evidence should out-calibrate models that see anonymous tokens. The open theory problem is a distributed Hopfield capacity theorem: how much shared memory the network holds before retrieval degrades.

OPENWhat's next

Open questions: where the research goes next

The current ledger separates valid results from required reruns. These are the next falsifiable steps, each a concrete experiment, not a wish.

extends RQ2 · after the .884 resultDoes the cross-encoder generalize to held-out data, and can it reject non-replayable answers?

Calibrate on fresh fixtures, reject tool output and query echoes, then test on-distribution stale or wrong traces rather than only OOD relevance.

extends RQ5 · the only calendar-bound pieceDoes compounding stay reliable across a real, churning 100-peer population over 30 days?

The live web-fallback curve and false-admit tail the simulator can't produce. This is where the thesis stops being a thesis.

extends RQ3 · repair the fixtureDoes provenance improve correctness under official claim labels?

Rerun the poison matrix on actual SUPPORT/CONTRADICT verdicts, define NOINFO abstention, then add an adaptive adversary and true 7B consumer.

extends RQ1 · RQ4Does reuse preserve answer quality while saving measured compute?

Rerun answer grading with correct labels and extend the 3-topic model-trace result to mixed verdicts, net tokens, latency, and provider billing.

extends RQ6 · the missing harnessBuild the benchmark that scores cross-peer reuse (quality, savings, and trust) jointly.

No public benchmark measures all three at once. That gap is the harness this program starts.

extends RQ7 · the theory frontierA distributed Hopfield capacity theorem, and does provenance-tagged context out-calibrate anonymous tokens?

How much shared memory the network holds before retrieval degrades, and whether long-context models that read provenance as first-class evidence calibrate better than those that see anonymous tokens.

The ledger changes when the evidence changes.

The cross-encoder rescued OOD relevance after every bi-encoder lever failed. The SciFact audit revoked the answer-safety and ~25× provenance headlines after finding invalid verdict labels. The 0.6 gate still sits above the measured different-need ceiling on the frozen fixture. Engineering a benchmark that can kill your own claim, then updating the record, is the whole posture.

Every figure here is a real bench run on real corpora or the live graph: wins, negatives, and revoked interpretations alike. BEIR qrels are treated as relevance labels, never claim verdicts. Methods, per-question notes, and raw captures live in /research.

Folklore · MIT-licensed · home · white paper · github