Skip to content

Research

Method

Adapting CSLS for retrieval seeding: a 100k-label cutoff regression and raw-cosine floor

Dense-seeding recall@10 rose from 77.5 to 97.0 across six fixtures and three runs. At up to 100k labels and 350 balanced queries, plain CSLS improved @10 while regressing @40. A raw-top1 floor narrowed the loss, but a significant −4.9pp residual remained at 30k and 60k.

dense-seeding recall@10, six fixtures × three runs
77.5 → 97.0
100k floor @10 / @40; raw 40.3 / 81.4; n=350
46.9 / 78.9

Question: When embedding candidates that are broadly similar to many queries occupy the semantic seeds, can local-density correction recover the target without creating a deeper-cutoff regression?

Observation: Across six fixtures and three runs, adapted CSLS raised dense-seeding recall@10 from 77.5 to 97.0. At 5k–100k labels, however, it improved @10 while reducing @40; a raw-cosine top-one floor still left a significant −4.9pp @40 residual at 30k and 60k.

Decision: Treat CSLS as a cutoff-dependent policy, not an unconditional replacement. Retain the raw floor, sampling cap, and scale guard, withdraw the “lossless at every scale” claim, and re-evaluate under a natural query distribution.

In dense tables and catalogues, semantic seeds were filling with mutually similar items while the correct entity fell below the cutoff. The failure occurred before final reranking, at candidate generation for graph diffusion. Once the target is absent from the seeds, neither a downstream ranker nor a stronger reader can recover it.

This study ports CSLS from cross-lingual embeddings into GraphRAG seeding, then stress-tests the small-fixture success until it breaks at 100,000 labels.

Recall at 10 and 40 for raw cosine, plain CSLS, and a raw-top1 floor from 5k to 100k labels

1. Diagnosis: close to this query versus close to everything

When the row labels of a 50-item table embedded into a tight cluster, arbitrary lookalikes occupied semantic top-k. The correct triple existed in the graph, but its entity missed the seeds and remained outside the PPR top ten. The pattern is consistent with hubness, where some high-dimensional vectors become nearest neighbours to many queries.

This study did not directly measure k-occurrence skew or another hubness statistic. The precise claim is that a local-density failure consistent with hubness was observed, and a density-penalty intervention reduced it.

Two intuitive interventions were quantitatively tested first.

Intervention Result Rejection reason
Disable semantic search when top-1/top-k margin is small No effect The failing table’s margin was not smaller than prose, so the gate never fired
Disable it when candidate-to-candidate similarity is high One table 17→83; another 50→50 A real table at 0.61 overlapped semantic-dependent prose at 0.57

Only these two alternatives have retained quantitative evidence. I do not expand that record into “three alternatives rejected” by adding unmeasured ideas such as MMR.

2. Adapting a correction from another field

CSLS was introduced to suppress hubs in cross-lingual word-embedding alignment. It estimates how close candidate e is to its own neighbours, r_k(e), then subtracts that local popularity from query similarity.

Consilience uses this rank-equivalent adapted score:

score(q,e) = 2 · cosine(q,e) − r_k(e)

The original symmetric term r_k(q) is constant across candidates for one query and therefore cannot change their order, so it is omitted. The arithmetic reuses stored embeddings and adds no API call per query. It does add generation-level CPU and memory for density estimation.

3. Small fixtures: a large gain with an early warning

Six single-document cases were re-extracted and averaged over three runs. This initial A/B reconstructed the seeding logic in the eval harness rather than directly invoking the full production function.

Arm recall@10
Lexical only 85.2
Raw dense seeding 77.5
Dense + adapted CSLS 97.0

The gains concentrated in dense tables: a uniform 50-row table moved from raw 22 to CSLS 100, and a real-name 32-row table from 50 to 100. Not every case was lossless. English aerospace prose moved from raw 100 to CSLS 89, while a small table tied at 93. “No prose regression” is therefore too broad.

With all six documents merged into a 263-entity workspace, mean recall@10 moved from 75.8 to 96.0. A separate 31-question context-only QA check moved three-run macro answer accuracy from 89 to 97. Both are bounded internal fixtures, not external QA benchmarks.

The small study justified a larger falsification attempt; it did not settle deployment safety.

4. 5k–100k labels: the winner changes with cutoff

The scale corpus started with 23,859 real graph labels and added Wikipedia titles, EDGAR company names, and controlled clusters to create 5k, 30k, 60k, and 100k points. Each scale used the same 350 queries: 100 isolated, 100 organic-dense, 100 injected-cluster, and 50 cross-language. This balanced design is not a natural traffic distribution.

Labels @10 raw / CSLS / floor @40 raw / CSLS / floor
5k 45.7 / 52.0 / 56.3 89.7 / 73.7 / 90.0
30k 40.9 / 46.6 / 47.1 82.3 / 70.0 / 77.4
60k 40.9 / 46.9 / 47.4 82.0 / 71.1 / 77.1
100k 40.3 / 46.9 / 46.9 81.4 / 75.4 / 78.9

Plain CSLS beat raw at @10 across all measured scales and lost at @40 across all of them. The loss came from the organic-dense stratum. When the target was itself a member of a dense product family or table series, the correction demoted the entire cluster and moved the target’s median rank from 21 to 854. Top ten hides that cost; the product consumes roughly forty candidates, so it is operationally real.

The correct scale conclusion is not “the small result reproduced.” Its direction depended on cutoff, and one headline metric concealed the opposite loss.

5. The raw-top1 floor reduced the regression; it did not remove it

The repair guarantees the raw-cosine top candidate one seed slot with its original weight, regardless of CSLS demotion. It preserved or improved @10 and recovered much of the @40 loss.

It was not Pareto-dominant:

  • 30k @40: 77.4 versus raw 82.3, −4.9pp, significant.
  • 60k @40: 77.1 versus raw 82.0, −4.9pp, significant.
  • 100k @40: 78.9 versus raw 81.4, −2.6pp in the underlying aggregate, not significant.

Dense targets ranked second through eighth by raw cosine are not rescued by a one-slot floor. Widening it re-admits the lookalike clusters it was meant to suppress. The current implementation retains the floor, but the decision is now classified as a conditional policy that preserves top-ten benefit while limiting deeper loss, not a lossless deployment.

6. A more accurate density estimate performed worse

At 100k labels, a 1,024-item stride sample reached @10 46.9, a 4,096-item sample 44.9, and exact all-pairs neighbours 38.9. Exact density is an estimation oracle, not a relevance oracle.

Sampling misses some true neighbours, underestimates (r_k), and softens the penalty, effectively acting like a temperature. The implementation therefore pins SAMPLE_CAP to 1,024 and guards against “improving accuracy” through exact or ANN density without re-running the eval.

On the measured machine, 100k-label local density took 6.9 seconds serially and 647 ms with Rayon. Resident embeddings were roughly 300 MB. The method adds zero query-time API calls, but constructing the scale study cost about $2.60 plus CPU and memory. Quality was measured to 100k; the 200k implementation cap is a performance extrapolation, not a validated quality range.

7. Limits and current judgement

  • The 350 queries deliberately balance four strata; the aggregate is not an expected user-traffic value.
  • Added-label topology is synthetic, while real topology exists only in the 41 core graphs.
  • The six-fixture and scale harnesses have different fidelity, and not every arm directly invoked the same production function.
  • The retained analyser supports a 10,000-resample paired bootstrap; a McNemar implementation was not found and is not claimed.
  • @10, @40, and QA accuracy are distinct outcomes. Improvement in one cannot substitute for the others.
  • The current judgement is to retain the floor and sampling/scale guards, but make no general superiority claim before an independent run under natural query prevalence and deeper cutoffs.

Reproducibility and evidence boundary

Item Retained evidence
First measured 28 June 2026; six fixtures × three runs, roughly 300 entities
Scale validation 16 July 2026; 5k/30k/60k/100k labels, the same 350 balanced queries at each scale
Primary records docs/details/graphrag-seeding-csls.md, csls-scale-eval-2026-07.md
Implementation src-tauri/src/rdf/ppr.rs; adapted CSLS, raw-top1 floor, sampling cap
Retained artifacts Aggregate tables and regeneration scripts. The 1.4 GB corpus, graph snapshots, and JSONL outputs were deleted on 16 July 2026
Bitwise reproduction Not possible: it depends on the historical app DB, Wikipedia latest, non-deterministic query generation, and hash-map iteration
Claim status Fixture @10 gain and scale cutoff trade-off retained; “lossless at every scale” and complete floor parity withdrawn

What this measures

  • Consilience

    A general-purpose AI agent that uses a knowledge graph for coding, design and answering questions. It builds and maintains ontologies from documents without a resident engineer.

Send message