Manuscript Offprint
arXiv:2609.00387Hidden relationships in a document-derived property graph: top-k chunk embeddings and inverse-distance weighting over a dynamically evolving ontology
Abstract
A large language model asked to build a knowledge graph from text will assert only what a sentence states. Over a corpus, that faithfulness is also the method's ceiling: three paragraphs about one family can produce two disconnected components, because no single sentence ever names the tie between them. This article describes a purely additive second pass that recovers those ties without touching what the extractor found. Each document is split into paragraph chunks and embedded once. A top- nearest-neighbour query — originating only in the new document's chunks, but searching every chunk in the graph — yields chunk pairs, which expand through a chunk-to-entity membership map into candidate node pairs. Each pair is then scored by Shepard inverse-distance weighting over every chunk pair its endpoints co-occur in. Because the vectors are -normalised at write, , which makes the weight exactly Shepard's inverse-squared distance and the value term a rescaled chord distance, . We show that the affine alternative is unusable behind a -NN gate — the gate alone confines it to a band of width , silently disabling the write threshold — and we derive the resulting constraint . The per-pair accumulators (, support) form a commutative monoid and are persisted un-gated, so the pass is order-independent, needs no recomputation as the corpus grows, and lets a node pair that misses the threshold today cross it after the next document arrives. The implementation is engine-neutral: the same weighted EMBEDDED edges go into FalkorDB, Kinetica, ArangoDB or Neo4j through one adapter contract. We report the measurements that shaped the design — 768-dimensional embeddings agreeing with a 3072-dimensional reference on 92% of edges and 240-dimensional on 72% at under a thirteenth of the storage, and a top- formulation faster than the window-function form — and we are explicit about what is not measured: precision and recall against a labelled set of hidden relationships, for which no ground truth exists in this corpus.
Keywords: knowledge graph construction; property graph; link prediction; inverse distance weighting; text embeddings; -nearest neighbours; incremental ontology; large language models.
1 Introduction
Building a property graph from unstructured text is now a routine application of large language models: a document is split into passages, each passage is handed to a model under a constrained output schema, and the entities and relations it returns are folded into a canonical ontology and written into a graph engine. The method's great virtue is that it is faithful — every edge it
*Corresponding author: bkaramete@babelstreet.com

Figure 1: The running example. Three paragraphs, embedded at 240 dimensions and extracted independently, yield a correct but disconnected graph: four stated edges, two components. Nothing in the text ties Gulgun to Tan or FSI to BabelStreet. The colour strips below each paragraph are its embedding, mean-pooled to 64 buckets for display (Section 7).
produces corresponds to something a sentence actually said, and a well-prompted extractor will refuse to invent the rest.
That virtue is also its ceiling. Consider the three short paragraphs in Figure 1, drawn from the running example used throughout this article. They concern one family. A structural extractor reads them correctly and produces four edges — Gulgun → FSI, Kaan → BabelStreet, Tan → Bloomberg, Tan → Kaan — and every one of them is a sentence someone wrote. It nonetheless leaves two disconnected components, because no sentence in the corpus ever states the tie between Gulgun and Tan, or between FSI and BabelStreet. The information that these paragraphs belong together is present in the corpus; it is simply not present in any one sentence, and so it is invisible to a method that only transcribes sentences.
The obvious repair is to add edges the text did not state, and the obvious danger is that such edges are no longer facts. Our position is that the two can be reconciled by keeping the derived layer strictly separate and strictly additive: it writes exactly one new edge label, EMBEDDED, carrying a numeric weight and a support count; it can never modify or delete anything extraction produced; and it is hidden from the natural-language query path, so that a cosine artefact is never reported to a user as an extracted fact.

Figure 2: The same graph after the similarity pass. Four weighted EMBEDDED edges (dotted) join the two components; no new nodes are created. The top-k ring on the left is the reach of one document's chunk: neighbours outside it are never compared at all, which is what keeps the per-document cost sublinear in corpus size rather than quadratic.
edges (Figure 2). The seven stages — embed, persist, k-NN, expand, accumulate, select, link — are the organising structure of this article. That threshold is the layer's only admission rule, and it is a real one: Figure 7 draws these same three paragraphs at three settings of it, and at the third the two components are two again.
1.2 Why inverse-distance weighting
The scoring problem is an interpolation problem in disguise. A node pair is observed at several sites — the chunk pairs its endpoints co-occur in — each site carrying both a similarity value and a distance, and we want one number that respects the near observations more than the far ones. That is precisely the setting Shepard's method was written for, and it brings two properties that matter more here than accuracy does. First, it is a ratio of two sums, so the accumulators are additive and a new observation is folded in by addition alone. Second, it degrades gracefully with a single very close observation, which is what we want when two entities share a paragraph outright.
The arithmetic simplifies considerably because the vectors are -normalised at write time. On unit vectors , so the inverse-distance weight is exactly Shepard's inverse-squared-distance weight, with the factor of two cancelling in the ratio, and the value term admits a clean geometric reading as a rescaled chord distance. Section 5 develops this and shows why the obvious affine alternative, , cannot be used behind a k-NN gate.
1.3 Why the ontology is dynamic, and why that constrains the design
The ontology this pass writes into is not fixed in advance. Entity and relation type names proposed by the extractor are folded to canonical forms, aliases are learned as they are encountered, and facets — dimensions of a type, such as Engineer on a Person — accumulate separately from structural types. A corpus that grows therefore changes the ontology, not merely the instance data.
A derived layer over a moving target has to be built so that arrival order does not matter and so that nothing already computed has to be revisited. Both fall out of one decision: the accumulators are persisted un-gated. The write threshold is applied only to what is emitted as an edge, never to what is recorded, so a pair whose evidence is currently too thin keeps accumulating and crosses the threshold on some later document — with no recomputation, and with the same final weight regardless of the order the documents arrived in. Section 6 states this precisely: the accumulator triple is a commutative monoid under addition, and the pass is a monoid homomorphism from document batches into it.
1.4 Contributions
-
An additive similarity layer for LLM-constructed property graphs. It recovers relationships the text never states, as one new edge label carrying a weight and a support count, and it has no path by which it could alter what extraction found (Sections 3 and 7).
-
A corrected IDW formulation for cosine neighbourhoods. Behind a k-NN gate admitting , the affine value term is confined to a band of width and renders any write threshold inoperative. We replace it with the rescaled chord distance , derive the resulting constraint , and document the near-miss repair — Shepard , which flattens the neighbour spread from to (Section 5).
-
An order-independent incremental construction. The per-pair accumulators are persisted before thresholding, which makes arrival order irrelevant and removes recomputation entirely; the per-document cost is one top- query against the corpus, never an all-pairs pass (Section 6).
-
A dimension study with a storage argument. Because gemini-embedding-001 is a Matryoshka model [20], requesting dimensions is byte-identical to truncating the full vector, so width is a free choice at request time. Against a 3072-dimensional reference, 768 dimensions agree on 92% of emitted edges and 240 on 72%, at 960 bytes per chunk against 12,288 (Section 4).
-
An engine-neutral realisation. The same pass writes the same EMBEDDED edges into FalkorDB, Kinetica, ArangoDB and Neo4j through one adapter contract, and declines — by name, not by exception — on an engine whose label model admits no additive element write (Section 7), continuing the vendor-neutral line of Karamete et al. [18].
-
Two performance results that were design-determining rather than incidental: the top- self-join as a max_by aggregate rather than a window function is faster at 768 dimensions over 100k rows; and folding the accumulators in one multi-row VALUES upsert rather than per-row statements reduces a 19,900-pair merge from 82.3 s to a single statement (Section 8).
1.5 What this article does not claim
We do not report precision and recall for the recovered relationships. No labelled ground truth of hidden relationships exists for this corpus, and constructing one is a separate undertaking; the agreement figures in Section 4 compare one configuration against another, which is a statement about stability under dimensionality reduction and not about correctness. Section 10 sets out this and the other boundaries of the work explicitly, including the cases where the pass is deliberately inapplicable.
1.6 Organisation
Section 2 places the work among LLM-based graph construction, link prediction and spatial interpolation. Section 3 describes the document-to-graph pipeline the pass attaches to and the membership map it consumes. Section 4 covers the embedding model, the two supported widths and the per-graph pinning that width and model choice require. Section 5 is the core: the IDW formulation, its derivation on unit vectors, and the two traps. Section 6 treats the incremental and order-independence properties, and the sense in which the ontology evolves. Section 7 gives the implementation, including the query formulations that made it fast. Section 8 reports measurements, Section 10 the limitations, and Section 11 concludes.
2 Related work
The pass described here sits at the meeting point of four literatures that rarely cite one another: knowledge-graph construction from text, link prediction on graphs, spatial interpolation, and approximate nearest-neighbour search. We take each in turn, and in each case try to say precisely what is borrowed and what is different.
2.1 Knowledge graphs from text, and the RAG lineage
Knowledge-graph construction from unstructured text has a long history predating language models [12, 14], but the current practice — prompt a model per passage under a constrained output schema, then reconcile the results — is recent. Retrieval-augmented generation [22] established the chunk-and-embed substrate that this practice runs on, and GraphRAG [8] showed that imposing graph structure over those chunks improves query-focused summarisation, using community detection over an extraction-derived graph to build hierarchical summaries.
Our setting differs in what the derived structure is for. GraphRAG builds graph structure in service of generating better answers; the graph is intermediate. Here the property graph is the product — it is queried directly in Cypher or GQL, browsed, and joined against relational warehouse tables — so a derived edge must be first-class enough to traverse and honest enough to be distinguishable from an extracted one. That is why EMBEDDED is a distinct label with its own weight and support attributes rather than an unmarked edge, and why it is withheld from the schema shown to the natural-language query path (Section 7).
The reconciliation half — folding Employer, employer and works_for into one canonical relation type — is entity and predicate resolution under a different name. What is unusual in our setting is that canonicalisation is not a batch step over a closed corpus but an online one: the ontology is a live object that gains types, aliases and facets as documents arrive, which is the condition Section 6 is written against.
2.2 Link prediction
Predicting edges absent from an observed graph is a mature field [23, 24]. The dominant modern approaches are structural: they embed the graph itself and score pairs in that space. Knowledge-graph embedding methods such as TransE [3] and ComplEx [32] learn entity and relation vectors from the observed triples; random-walk methods such as node2vec [11] learn node representations from graph neighbourhoods; and graph neural network methods such as SEAL [34] learn from enclosing subgraphs. Closest to the present work, Karamete and Glaser [16] compute node vectors ad hoc inside the graph engine, without a training phase, and score candidate pairs by an inverse-distance weighting over the resulting neighbourhoods — the formulation this article adopts, and whose value term it revises in Section 5.
Our signal is not structural at all. It is the provenance signal — which paragraphs an entity was mentioned in — scored in the embedding space of the text, not of the graph. This has one clear disadvantage and two advantages. The disadvantage is that we cannot predict an edge between entities whose supporting text is dissimilar, however suggestive the graph topology may be; structural methods can, and the two signals are complementary rather than competing. The advantages are that no training is required, so the layer works on a graph one document old, and that the evidence for every derived edge is a concrete set of paragraph pairs, which makes the support count meaningful and the edge auditable. A structural embedding gives a score; a chunk pair gives a citation.
2.3 Inverse-distance weighting
Shepard's method [31] interpolates a value at an unsampled location as a weighted mean of observed values, weighting each observation by an inverse power of its distance. It is the standard workhorse of spatial interpolation and is normally discussed with in two or three geometric dimensions.
We use it in a high-dimensional cosine space, and the transplant is not cosmetic. Three points deserve emphasis. First, on -normalised vectors the relation makes the natural cosine-based weight coincide exactly with Shepard , so the choice of exponent is not a free parameter here but a consequence of normalisation (Section 5). Second, the classical method interpolates a value that is given independently of the distances, whereas our value term is a function of the same distance that produces the weight — which is why the choice of that function interacts with the neighbourhood gate in the way Section 5 analyses, an interaction with no counterpart in the spatial setting. Third, the singularity at zero distance, normally an annoyance handled by an or by returning the observed value exactly, is here a deliberate feature: two entities in the same paragraph enter at and dominate, because sharing a paragraph is much stronger evidence than being mentioned in similar paragraphs.
2.4 Text embeddings and nearest-neighbour search
Dense sentence and passage embeddings [29], benchmarked at scale by MTEB [27], are the input to the pass. We use gemini-embedding-001 [10, 21], whose relevant property for this work is that it is trained with Matryoshka representation learning [20]: prefixes of the full vector are themselves valid embeddings, so requesting dimensions is byte-identical to truncating to the first components. Width therefore becomes a storage decision made at request time rather than a modelling decision made at training time, which is what allows the two-width design of Section 4.
For neighbour search, HNSW [25] and the Faiss library [7, 15] are the standard tools at scale. We use neither as the default, and reach for the first only past a corpus-size threshold. The query is by default an exact top- self-join inside the analytical store [28] (Algorithm 1, step 8), which is affordable because only one arriving document's chunks are on the query side; past roughly stored vectors, where the scan stops being cheaper than the index, the store's own HNSW index supplies candidates and the exact metric still supplies the scores. That the approximation is confined to candidate selection is the whole of what makes it acceptable, and Section 6.3 measures the residual at the level that matters — the edges finally written, not the neighbours retrieved. Remark 1 draws the distinction that survives either route.
The other classical way to turn a vector set into candidate pairs is to partition it rather than to query it — -means and its spherical variant on unit vectors [6], the self-organising map [19], or any of the clustering family surveyed by Jain [13]. We measured that alternative rather than dismissing it, both as a scoring rule and as an index, and neither form is adopted. The negative result generalises further than we expected: partitioning fails here on the raw coordinates, on a wavelet basis, and on the centred and re-isotropised vectors alike, which is what eventually motivated a graph index rather than a better partition. Section 6.3 gives the measurements.
2.5 Property graphs and engine neutrality
The graph is expressed in the property-graph model and queried in Cypher [9], or in GQL and SQL/PGQ [5], whose foundations are surveyed by Angles et al. [1]; Robinson et al. [30] is the standard practical treatment. A recurring obstacle to writing a derived layer once and running it everywhere is that engines disagree on where a label lives: FalkorDB [4], Neo4j and ArangoDB treat a label as a value on the element, so a new edge label is an ordinary write, whereas warehouse-backed property graphs in the Dremel lineage [26] treat a label as part of the schema, so introducing one is a DDL change and there is no additive element write at all. Our adapter contract makes that difference explicit rather than papering over it: the pass names the engine and declines, instead of failing obscurely (Section 7).
Where a label is a value, what it costs to filter on one is a data structure question rather than a query-language one, and Karamete and Glaser [17] treat it as such at billion-edge scale. That cost is not incidental here. A pass that adds one dominant edge label makes label-scoped traversal the primary way to read the graph at all — separating the derived layer from the extracted one is a label predicate, and Section 9.6 shows it is the difference between a legible graph and an opaque one.
The vendor-neutral framing, and the concern with keeping graph traversal and relational analytics in one system rather than two, continues the line of Karamete et al. [18].
3 From documents to a property graph
This section describes the extraction pipeline the similarity pass attaches to. It is deliberately conventional; what matters for the rest of the article is the three artefacts it leaves behind — the chunk sequence, the canonical ontology, and the chunk-to-entity membership map — and the additive write seam through which anything downstream must go.
3.1 Chunking
A document is split on paragraph boundaries. Paragraphs, rather than a fixed token window, are used because they are the unit the extractor is prompted against and therefore the unit whose membership map is meaningful: an entity is recorded as a member of the paragraph the model saw when it named that entity.
Two details are load-bearing. The number of chunks per document is capped, and the cap is reported rather than applied silently — the pipeline returns a truncation flag alongside the chunk list, so a document that lost its tail is visible as such rather than appearing to have been processed in full. And chunk extraction calls are issued concurrently but their results are stored by index, so the downstream merge is order-deterministic even though completion order is not.
3.2 Extraction
Each chunk is sent to a language model under a constrained JSON output schema requesting a list of entities and a list of relations. The schema enforces one invariant that later stages depend on: a relation's source and target must each equal the name of an entity returned from that same chunk. This keeps every asserted edge local to a passage — an edge is a claim about one paragraph, and its provenance is unambiguous — and it is what makes the membership map of Section 3.4 well defined.
Extraction quality is treated as a build-time concern rather than a query-time one, so extraction and the folding step below run on a stronger model tier than the interactive question-answering path does.
3.3 Folding into a canonical ontology
A language model asked for an entity type will return Company on one paragraph and Organization on the next. The folding stage rewrites proposed type labels to canonical forms and learns aliases as it goes, along two axes — EntityType and RelationType — with the decision itself delegated to the model when a proposed name is not already a known alias.
The ontology that results is a live object, and it grows in three distinct ways as documents arrive: new canonical types appear, new aliases are attached to existing canonicals, and facets accumulate. A facet is a dimension of a type rather than a type in its own right — Engineer classifies a Person — and it is kept separate from the structural type on purpose. A node's label vector is [structural type, facets...], and folding a facet into the structural position would fan every relation edge out over the label combinations and push the per-type node shares past 100%. The distinction matters to the similarity pass only indirectly, but it matters to the claim that the ontology evolves: the schema a query sees after ten documents is not the schema it saw after one.
3.4 The membership map
The artefact the similarity pass actually consumes is the map
recording which entities were extracted from which chunk. It is written at extraction time, one row per (chunk, entity) pair, and it is the only bridge between the embedding space — which knows about paragraphs — and the graph, which knows about entities. Everything in Sections 5 and 6 is an operation on chunk pairs pushed through .
3.5 The additive seam
Extraction writes into the graph through an adapter method that ingests a list of nodes and a list of edges and merges them idempotently, keyed on a deterministic identifier. The similarity pass uses the same method, with an empty node list: every endpoint of an EMBEDDED edge is by construction a node the graph already has, ingested by this run's extraction or an earlier one.
This is the structural reason the derived layer cannot corrupt the extracted one. The pass has no delete path, no property-overwrite path and no node-creation path; the only mutation available to it is the addition of edges carrying a label that extraction never emits. A failure anywhere in the pass therefore leaves a graph that is smaller than intended but never wrong.
3.6 The seven stages
Figure 3 shows where the similarity pass sits and what it does. The remaining sections take the stages in order: embed and persist in Section 4; k-NN, expand and accumulate in Section 5; select and link in Sections 6 and 7.
Algorithm 1 is the same thing written out end to end, in words, for the arrival of one document. Every misreading of the method we have met comes either from the granularity — what is compared against what — or from stopping where candidate pairs exist, three stages before any edge is written.
Remark 1 (The neighbour step is a comparison, not a search). Readers arriving from the vector-database literature reliably import a mental model this pass does not use. The difference is worth stating plainly, because all three parts of it change what the method guarantees.
The unit is the paragraph, not the document. A document is never embedded, never has neighbours, and never appears in the membership map except as half of a key. Step 8 finds the twenty most similar paragraphs to each arriving paragraph, and those may come from twenty different documents or from one.
Algorithm 1 What happens when one document arrives. Steps 1–5 are extraction and are conventional; steps 6–14 are the similarity pass. Three lines carry most of the design. Step 8 is an exhaustive comparison against every stored paragraph, not a search through them. Step 11 is the inverse-distance weighted average — the scoring rule of Section 5 — and it is what turns a set of candidate pairs into a number. Step 12 saves that number un-gated, which is why step 13 can promote a pair that this document never mentions.
Input: one new document. Existing state: the graph, the canonical ontology, the table of paragraph vectors, and one running total per entity pair.
| Extraction | |
|---|---|
| 1 Split the document into paragraphs. | chunk |
| 2 Ask the language model, once per paragraph, which entities and which relations that paragraph states. | extract |
| 3 Fold the proposed type names into the canonical ontology, so that Company and Organization become one type (Section 3.3). | fold |
| 4 Record which entities were named in which paragraph. This map is the only bridge between the text and the graph (Section 3.4). | μ |
| 5 Write the entities and relations into the graph. Everything above has now landed; nothing below can alter it (Section 3). | ingest |
| Similarity pass | |
| 6 Turn each paragraph — not the document — into one vector of fixed width, 240 or 768 numbers, scaled to unit length (Section 4). | embed |
| 7 Store those vectors alongside every paragraph vector already kept for this graph. | persist |
| 8 For each new paragraph, measure its similarity to every paragraph vector in the store, and keep the 20 most similar that clear the gate cos ≥ 1 − β. This is an exhaustive comparison, not a search: there is no starting point and no walking from one neighbour to the next (Remark 1). | k-NN |
| 9 Also pair each new paragraph with itself, at perfect similarity. Two entities named in the same paragraph are the strongest evidence there is, and this is how that evidence enters (Section 5). | self-pair |
| 10 Turn every paragraph pair into entity pairs: one entity from each side, counted at most once per paragraph pair (Algorithm 2). | expand |
| 11 Score each entity pair by a weighted average, in inverse-distance weighting fashion. Each paragraph pair supporting it contributes a value that falls as the two paragraphs grow apart, and contributes it with a weight of one over that same distance — so near evidence dominates far evidence. The pair’s score is the weighted mean of those values, of (3). | IDW |
| 12 Add this document’s contribution into the running total held for each entity pair, and save the totals without filtering any of them (Section 6). | accumulate |
| 13 Re-read the totals of every pair touched — their whole history across the corpus, not just this document — and keep a pair if its weighted average is at least and it is in the top of either endpoint. | select |
| 14 Write the survivors as EMBEDDED edges carrying their weight and their support count, through the same additive seam extraction used. | link |

Figure 3: The similarity pass (blue) runs after extraction and writes back through the same additive seam. It consumes the chunk sequence and the membership map , and emits one edge label. It has no path by which it can alter an extracted node or edge.
The search is exhaustive by default. The tempting alternative — pick an entry point, move to whichever neighbour is closer to the query, repeat until no neighbour improves — is the greedy descent of the navigable-small-world family [25], and it is what an approximate index does. Below roughly stored vectors it is not what runs here, and it would not pay if it did. Step 8 is a single self-join over the whole vector table with a top- aggregate: every stored vector is scored, and the twenty returned are the true twenty. The reason this is affordable is asymmetry, not cleverness — only the arriving document's paragraphs are on the query side, typically tens of vectors, so the cost is linear in corpus size with a very small constant (Section 7.1).
Past that threshold an HNSW index takes over the candidate half of the step, and the guarantee weakens in exactly one place. The twenty returned may no longer be the true twenty; every pair that is returned is still scored by the same exact inner product, so no weight is ever an estimate. What that costs was measured on the written edges rather than on the retrieved neighbours, and the distinction is not cosmetic: the neighbours an approximate search drops sit in the far tail of the top-, which the threshold and the per-endpoint cap of step 12 discard in any case. Section 6.3 reports 99.6–100% agreement on the edge set where chunk-level recall reads 98.7–99.8%. Section 10 states what remains.
Candidate pairs are not edges. It is natural to read steps 8–10 as the method and to expect an edge for each entity pair spanning a neighbouring paragraph. Three stages separate the two. The pair must be scored by the weighted average of step 11; the score is accumulated into a total that spans every document ever ingested, not just this one; and only then is it selected against a threshold and a per-endpoint cap. A pair may therefore appear in many documents and never earn an edge, or earn one long after the document that first suggested it.
Remark 2 (A degenerate input, excluded upstream). The pipeline also supports a whole-document extraction mode in which the entire document is a single chunk. That mode is incompatible with the similarity pass in a specific and total way: with one chunk, every entity in the document co-occurs with every other at cos = 1, and the pass emits an all-pairs clique rather than a similarity signal. The system resolves this by forcing chunked extraction whenever the similarity pass is requested, and reporting that it did so, rather than by having the pass refuse to run. The reasoning is that the more specific instruction should win: a user who asks for similarity edges should receive them, not an explanation of why a setting on another panel prevented it.
4 Embedding: two widths, pinned per graph
4.1 Normalisation is a precondition, not a preference
Chunk vectors are -normalised at write time. This is not a stylistic choice about how to store floating-point data; two later results depend on it.
The first is computational. On unit vectors the inner product is the cosine, so the -NN self-join of Section 7 can use the store's raw array_inner_product primitive with no normalising divisions in the inner loop — and that inner loop runs over every chunk in the graph for every chunk of an arriving document.
Table 1: Agreement of the emitted EMBEDDED edge set with the full 3072-dimensional reference, and the storage each width implies per chunk at 4-byte floats. The two shipped widths are the ones that bracket the useful trade-off; nothing between them is offered because each width needs its own fixed-width physical table.
| Width | Edge agreement | Bytes/chunk | Relative storage | Status |
|---|---|---|---|---|
| 3072 | 100% (reference) | 12,288 | 1.00× | not offered |
| 768 | 92% | 3,072 | 0.250× | fidelity option |
| 240 | 72% | 960 | 0.078× | default |
The second is analytical. For unit vectors and ,
which is what turns the cosine-based weight of Section 5 into a recognisable Shepard weight and gives the value term a geometric reading. Without normalisation neither identity holds and the IDW formulation loses its justification.
4.2 Matryoshka widths, and why exactly two
The embedder is gemini-embedding-001 [21], a Matryoshka model [20]. The property that matters is that requesting an output of dimensions returns exactly the first components of the full vector: width is a request-time parameter, not a retraining decision, and a narrower vector is a prefix of a wider one rather than a different embedding.
The system exposes two widths, 240 and 768, and nothing between them. Two constraints produce that answer from opposite directions.
Storage forces discreteness. The analytical store types a vector column as a fixed-width array, so each supported width requires its own physical table (xgraph_chunk_vectors_240 and xgraph_chunk_vectors_768). Offering a continuous choice would mean a table per width in use. The set of widths is therefore small by construction, and the only question is which ones.
Measurement picks the members. Table 1 gives the agreement study: for each candidate width, the fraction of emitted EMBEDDED edges that match those produced by the full 3072-dimensional reference on the same corpus and the same parameters. At 768 the layer is substantially the same layer — 92% of edges agree — at a quarter of the storage. At 240 it is recognisably the same layer, 72% agreeing, at under a third of 768's storage and under a thirteenth of the reference's. 240 is the shipped default and 768 the fidelity option, because in the operational setting the pass is used in — a graph that keeps growing, where every chunk ever ingested stays resident and is scanned by every subsequent document — the vector table is the part that grows without bound, and a 28% disagreement on a layer that is explicitly advisory costs less than a store.
Remark 3. Table 1 measures agreement between configurations, not accuracy. A width that disagrees with the reference on 28% of edges is not thereby wrong on 28% of edges; it is differently right or differently wrong, and which of those it is cannot be determined without a labelled set that does not exist here. What the table does support is the operational claim it was taken for: at 768 the compression is nearly free, and at 240 it is a deliberate, quantified trade rather than a guess.
4.3 Pinning width and model per graph
Both the width and the embedder identity are recorded against the graph on first use, and a later request that conflicts with the recorded value is refused rather than silently coerced.
The reason is that a graph’s vectors share one table and one geometry. Mixing widths in a fixed-width table is impossible; mixing embedders in one table is worse, because it is possible. Two models’ vectors of the same length will happily produce an inner product, and that number is meaningless — there is no shared space in which the angle between them means anything. A cosine that is merely meaningless rather than erroneous is exactly the kind of defect that never announces itself, so the resolution functions for width and for model both raise on conflict.
The rest of the surface is forgiving by contrast. Every numeric option — , , the write threshold, the per-endpoint cap — is clamped to its valid range rather than rejected, on the principle that a malformed number in an options panel should not fail an extraction that otherwise succeeded. An unrecognised embedder identity likewise falls back to the graph’s pinned value, since an unknown identifier is usually a stale browser tab rather than a decision. Only a genuine conflict raises.
4.4 Persisting a vector, and what is kept beside it
Each chunk is stored as (graph, doc_uri, chunk_index, vec, char_len, preview), upserted so that re-processing a document is idempotent, together with the membership rows of Section 3.4.
The preview field — a whitespace-collapsed 240-character head of the paragraph — exists so that the stored layer can be inspected as paragraphs rather than as anonymous vectors, and its size is the whole point: long enough to recognise a paragraph, short enough that the store remains a vector store and does not become a second copy of the corpus. Vectors may also be discarded after the pass completes if the caller does not intend to extend the graph further; the accumulators of Section 6 survive independently, so discarding vectors costs the ability to add new documents cheaply, not the weights already derived.
5 Scoring: inverse-distance weighting over cosine neighbourhoods
This section is the core of the article. We set out the formulation, derive it on unit vectors, prove the constraint it places on the write threshold, and document two plausible variants that do not work — one of which shipped first and had to be replaced.
5.1 Definitions
Definition 1 (Chunk pair). A chunk pair is a triple where and are chunk keys and is the cosine of their embeddings. Two sources produce chunk pairs: the top- neighbour query, and same-chunk co-occurrence, which enters as the self-pair .
Definition 2 (Node pair evidence). Let be the membership map of Section 3.4. A chunk pair is evidence for the unordered node pair when and (or symmetrically), with . Node pairs are canonicalised by lexicographic order, so is stored once.
5.2 The formulation
For a chunk pair at cosine , write the distance, weight and value as
(2) with and clamped to . The weight of a node pair is the inverse-distance weighted mean of the value over all its evidence:
where is the multiset of chunk pairs that are evidence for . The implementation stores the triple per node pair, never the individual terms; Section 6 shows why that representation is the whole incremental story.
5.3 Why this is Shepard's method exactly
Proposition 1 (Shepard ). On -normalised vectors, the weight of (2) is Shepard inverse-squared-distance weighting, and the constant relating them cancels in (3).
Proof. By (1), , so and
which is Shepard's with , regularised at the origin, times the constant 2. Since (3) is a ratio in which every weight carries that same constant, it cancels.
The value term has an equally direct reading. Substituting into (2),
the chord distance rescaled to [0,1]: unit vectors are at most 2 apart, so v = 1 for identical direction, for orthogonal, v = 0 for opposed. Unlike the alternative considered next, this holds without reference to any gate.
5.4 Why the affine value term fails behind a gate
The neighbourhood is gated: the -NN query admits only neighbours with , with by default. The natural first choice for a value term — and the one this design inherited, from the ad-hoc node vector embedding of Karamete and Glaser [16] — is the affine rescaling . It maps to and is monotone, which appears sufficient.
It is not, and the gate is why.
Proposition 2 (The affine term collapses onto the gate). Under the gate , the affine value satisfies , an interval of width . At this is , of width 0.175.
Proof. Immediate from and .
Since (3) is a convex combination of the , every edge weight inherits that interval. The consequence is not a loss of precision but a loss of the threshold: a gate at makes every weight at least 0.825, so a write threshold set anywhere at or below 0.825 admits everything.
The rescaled chord distance (4) does not collapse, because is steep near zero exactly where the gate concentrates the mass. Table 2 shows the two forms on the two cases that motivated the change.
Table 2: The two value terms on the gated range. The affine form separates the strong and the marginal neighbourhood by 0.100; the chord form separates them by 0.163 and, more importantly, places both far above a threshold that can actually be set below them.
| Case | cos | d | ||
|---|---|---|---|---|
| same chunk | 1.00 | 0.00 | 1.000 | 1.000 |
| 50 neighbours, strong | 0.90 | 0.10 | 0.950 | 0.776 |
| 200 neighbours, marginal | 0.70 | 0.30 | 0.850 | 0.613 |
| gate boundary () | 0.65 | 0.35 | 0.825 | 0.582 |
5.5 The admissible threshold
Proposition 2 generalises into the constraint that governs how the write threshold may be configured.
Proposition 3 (Threshold floor). With the value term (2) and the gate , every node pair weight satisfies
Consequently a write threshold filters nothing.
Proof. Every term of (3) has , so the ratio is a convex combination of the and is bounded below by . Each is decreasing in , and the gate gives ; therefore for every , and so does the combination.
At the default the floor is . The default threshold is 0.7, chosen to sit above it. This is the practical content of Proposition 3: the threshold and the gate are not independent knobs, and a user interface that presents them as independent must at least display the floor that the current implies. The system does, and the floor it displays is ; an earlier version displayed , which is the floor for the value term that was replaced.
5.6 The near-miss: in the weight
There is a second, more tempting repair for the compression of Proposition 2: leave the value term affine and put the square root in the weight instead, . This is Shepard , and it is the wrong fix for two independent reasons.
It flattens the weighting it was meant to sharpen. Compare a very close neighbour at against one at the gate boundary . Under the ratio of their influence is , a spread of . Under it is , a spread of . Inverse-distance weighting exists to let near evidence dominate far evidence; reducing the dynamic range by more than an order of magnitude defeats the mechanism.
It does not address the same-chunk term either. The stated motivation for moving the term is usually the cos = 1 spike. But at cos = 1 we have as well as , so exactly as before. The spike is a property of , not of the exponent, and changing the exponent leaves it untouched.
5.7 The same-chunk spike is intentional
Two entities extracted from the same paragraph enter as a self-pair at cos = 1, giving and . Such a term dominates every near-neighbour term in (3) by three to six orders of magnitude, so a node pair with even one shared paragraph will score close to 1.
This is the intended behaviour, and it encodes the ordering we actually believe: sharing a paragraph is much stronger evidence of a relationship than being mentioned in two paragraphs that resemble each other. The mechanism is worth naming explicitly, because it means is not a numerical guard against division by zero — it is the parameter that sets how much a shared paragraph outweighs a similar one, and is a decision.
5.8 Expansion and accumulation
Algorithm 2 gives the expansion of chunk pairs into node-pair accumulators — steps 10 to 12 of Algorithm 1 at the level of the inner loop. Two guards in it are easy to omit and each produces a systematic overcount.
Algorithm 2 Accumulate — chunk pairs into node-pair IDW accumulators
input: chunk pairs , membership output: for do if or then continue seen // reset per chunk pair for , do if or then continue seen return
Guard 1: one contribution per chunk pair. The seen set is reset for each chunk pair and prevents a single chunk pair from contributing to the same node pair twice. It is required by the self-pair case: when , the double loop enumerates both and , which canonicalise to the same node pair, so every same-chunk co-occurrence would otherwise be counted twice — and since these are the dominant terms, the resulting weight would be wrong for exactly the pairs the layer cares most about. The same applies to a symmetric neighbour pair whose two chunks share entities.
Guard 2: mirrored chunk pairs from the query side. The -NN query restricts only its query side to the arriving document. Two chunks of that same document that are mutual nearest neighbours therefore return as both and . Because seen is per chunk pair, it does not deduplicate across them, and the node pair is counted twice. The fix is a deduplication of chunk pairs on the unordered key before accumulation. Note that this affects intra-document pairs only: a cross-document neighbour is queried from one side only and has no mirror. Cosine is symmetric, so discarding the duplicate loses nothing — both directions carry the same value.
5.9 Selection
Two gates are applied to what is written, and neither is applied to what is accumulated.
Threshold. A candidate survives if weight , with by default, admissible under Proposition 3.
Per-endpoint cap, with union semantics. A candidate survives if it is among the top by weight of either endpoint — a union, not an intersection. The asymmetry is deliberate: under intersection semantics, an entity whose only similarity edge happens to be some hub's fortieth-best would lose that edge and be orphaned, so the cap would systematically strip the periphery to tidy up the centre. Under union semantics a quiet node keeps its one edge while a popular node is still prevented from radiating unboundedly.
Finally, each surviving pair becomes an EMBEDDED edge carrying its weight, its support count and a kind marker, with a deterministic identifier derived from the endpoint pair and the label so that re-running the pass merges rather than duplicates.
6 A layer that evolves with the corpus
The pass is designed for a graph that is never finished. Documents arrive one at a time, in no particular order, and the ontology they fold into gains types, aliases and facets as they do. This section states the properties that make the similarity layer well behaved under those conditions, and it argues that they follow from a single representational choice rather than from any machinery.
6.1 The accumulator is a commutative monoid
Each node pair carries the triple
combined componentwise by addition, with identity . Componentwise addition on this set is associative and commutative; is therefore a commutative monoid.
The edge weight is not stored. It is the function applied at read time, with by convention. Keeping the accumulator rather than the weight is what makes the next two results available; storing a weight and trying to update it in place would require either the individual terms or a running count, and would make the merge dependent on how the batches were cut.
Proposition 4 (Order independence). Let be documents and let denote the accumulator map that Algorithm 2 produces for against a fixed corpus. Then the stored state after processing the documents in any permutation is the same, and equals pairwise. Consequently the weight of every node pair is independent of arrival order.
Proof. The stored state is the pairwise sum of the per-document accumulator maps in the monoid , and addition there is associative and commutative, so any permutation yields the same sum. is a function of that sum alone.
Proposition 4 holds only for the accumulator, not for the emitted edge set at intermediate times: which edges exist after the third of five documents does depend on order, because the threshold has been applied to a partial sum. That is a statement about a snapshot, not about the final state, and it is exactly the behaviour one wants — the layer reflects the evidence seen so far.
The phrase against a fixed corpus in Proposition 4 is load-bearing, and it is worth separating the two halves it distinguishes, because only one of them is order-free. The sum is: adding the same terms in a different order gives the same accumulator. Which terms get proposed is not, because a document's top- query runs against the vector table as it stands at that moment, and an early document sees a smaller table than a late one. We can measure the split. Recomputing the whole corpus in one shot yields 1,415,574 node pairs against the 1,517,795 the incremental run actually left behind. On the 1,051,617 pairs common to both, the weights agree to the last bit for 89.8%, with a mean absolute difference of ; mean support is 1.21 against 1.23. The residual is almost entirely candidate generation: 363,957 pairs exist only in the batch run and 466,178 only in the incremental one, because the neighbourhoods differed. So the arithmetic is order-independent as claimed, and the pass as a whole is order-sensitive in what it considers — which is the price of never recomputing, and is why the incremental run finds more than a single batch pass with the same parameters rather than less.
Remark 4 (The self-similarity term is excluded, not incorporated). The k-NN query excludes the trivial pair from its results, so the only terms in the sum are the same-chunk co-occurrence self-pairs deliberately injected in the expand stage. Without that exclusion every chunk would be its own nearest neighbour and the corresponding term would be injected twice.
6.2 Persist un-gated: the reason a pair can cross later
The threshold and the per-endpoint cap are applied to the candidate list at write time. They are not applied before persistence. The accumulators of every touched pair are stored regardless of how weak the pair currently looks.
This is the property the whole design is arranged around. A pair of entities mentioned in two mildly similar paragraphs accumulates a small and a weight that may sit below ; it produces no edge and is invisible in the graph. When a later document supplies a third paragraph that is strongly similar to both, that pair's accumulator gains a large w term and its weight moves — and the edge appears, with a support count that records how many pieces of evidence were involved. Nothing was recomputed, and no record of the earlier weak evidence had to be reconstructed, because it was never discarded.
The converse behaviour is worth being explicit about: because the accumulator is monotone in the additive sense, and because the pass has no delete path, the weight of a pair can move in either direction as evidence accrues — a burst of weak but very numerous evidence lowers a mean that was previously set by a single strong term — but the support count only rises, and no pair ever leaves the accumulator table. An edge already written whose weight later falls below is not retracted by this pass.
6.3 Cost per document
Let be the number of chunks in the graph and the number of chunks in the arriving document, with . The query side of the -NN is restricted to the arriving document while the search side is the whole corpus, so the pass performs similarity evaluations exactly — one pass over the corpus per new chunk — and not . Over a corpus ingested one document at a time the total is evaluations in the aggregate, but distributed as a constant amount of work per document rather than a rebuild.
The expansion stage is bounded by , which is small in practice because is the number of entities the extractor found in one paragraph. The accumulate stage is a merge into a keyed store and, measured on the running system, dominates the wall clock of the whole pass — which is why it is reported as its own progress phase rather than being folded into the similarity phase, and why the upsert formulation of Section 7 mattered enough to measure.
An approximate index on the search side brings the per-document cost to roughly at the usual recall trade-off. One is now built, but only past a threshold, and the reason for the threshold is that below it there is nothing to buy. Against a store of vectors the scan is bound by the dot products themselves rather than by memory bandwidth; measured per document at four chunks, it costs 6.5 ms at stored vectors, 46.3 ms at and 67.0 ms at . Extraction, meanwhile, runs at a median of 91.1 seconds per document. Even at a million chunks the scan is under a tenth of one percent of what the document already costs, and no index changes that ratio in a way anyone would notice — which is why the index is switched on by corpus size rather than used unconditionally.
What does eventually bind is the cumulative quadratic: ingesting a corpus one document at a time performs similarity evaluations in total, which measures at about four hours at a million chunks and seventeen days at ten million. That is the horizon Section 10 refers to, and it is a statement about an aggregate ingest rather than about any single insertion.
Alternatives considered. Several ways of avoiding or accelerating the scan were measured on this corpus. Every one that partitions the vectors failed; the one that does not — a navigable small-world graph — is what ended up adopted.
Clustering the vectors and scoring pairs by co-membership — -means and its spherical variant [6], in the self-organising tradition of Kohonen [19] and the family surveyed by Jain [13] — changes the written graph by about one percent. It is unusable without the weighting of Section 5, and it forfeits incrementality outright: a centroid is a function of the whole corpus, so refitting it retroactively invalidates work already done. Using that same clustering as an index rather than as a score does better than chance, but not by enough: an inverted-file partition at recovers 38% of the exact neighbours while scanning 4% of the corpus, and is still at 86% having scanned 32%. Space-partitioning trees fail outright, because distances here are too concentrated for a pruning bound to exclude anything [2, 33].
Changing the basis before partitioning does not rescue it. Clustering on wavelet coefficients or band energies is no better than clustering on the raw coordinates — and a control that randomly permutes the coordinates scores slightly higher, which means the transform basis carries no usable information about neighbourhood here. Nor does repairing the geometry. The embeddings are severely anisotropic: the mean of all 1,010 unit vectors has norm 0.897, and pairwise cosine has median +0.806, interquartile range 0.039, and a corpus-wide minimum of +0.630 — no two chunks are even mildly dissimilar. Centring and renormalising widens the angular spread by (median -0.009, IQR 0.137), exactly the isotropy the literature prescribes, and moves inverted-file recall by less than a percentage point at matched scan fraction; relative contrast [2] in fact falls, 0.643 to 0.488. Three partitions, three failures, and the common factor is that this corpus has no partition structure for a basis to expose.
Greedy descent over a navigable small-world graph [7, 25] does not partition, and it is the one approach that clears the bar. Judged where it matters — on the edge set the pass finally writes, after expansion, weighting, thresholding and the per-endpoint cap — an HNSW index reproduces 99.6% of the exact result at its cheapest search setting and 100% from ef = 80 upward, losing no edge at all; the residual disagreement is nine extra edges out of 57,475. Chunk-level recall understates this substantially (98.7% at the same setting), because the neighbours an approximate search misses are in the far tail of the top-, which the threshold and the cap discard anyway. Insertion into the index is incremental and lossless, so the accumulator property of Section 5 survives: adding one document costs 0.003s against 0.185s to rebuild.
What decides whether the index is worth using is not the search at all. Binding a 240-component query vector as a statement parameter costs 7.9 ms, against 0.06 ms for a trivial round trip, and the engine will not batch an index probe; inlining the vector as a literal instead takes a query from 11.9 to 5.3 ms and is what makes the indexed route win. Per document, the exact scan costs 3.2/30.4/42.2 ms at stored vectors against the index's 14.2/19.9/23.8: the crossover is near , and below it the exact scan is simply faster. Hence the threshold.
Two things that help less than expected are worth recording, since both are the obvious first guesses. Batching many documents into one query improves the constant by only . Expressing the same computation as a BLAS matrix multiply runs the arithmetic twenty times faster and gains only end to end, because the top- selection it uncovers is itself . Exact top- over all pairs is irreducibly linear in the corpus however it is expressed; only searching less changes that, which is what an index does. The supporting measurements are in the project's engineering notes rather than here, since none of them changed the design.
6.4 What “evolving ontology” means here, and what it costs
Three things change as the corpus grows: the instance graph gains nodes and edges; the ontology gains canonical types, aliases and facets (Section 3.3); and the similarity layer gains EMBEDDED edges — Figure 9 shows what the third of those does to the schema after five documents. The first two are extraction's business. The third is arranged so that it never has to be told about the first two: the pass reads the membership map and the vector table, and writes edges between node identifiers. It holds no schema, caches no type list, and is unaffected by a type being renamed to its canonical form, because the fold happens before the identifiers it works with are minted.
There is one cost, and it should be stated plainly. The accumulators encode the value term: is a sum of products computed under a specific . Changing — as happened when the affine form of Section 5 was replaced — invalidates every stored accumulator, because (3) recomputes from history and the history is now in mixed units. There is no migration for this; the correct response is to re-extract into a fresh graph, and mixing is not detectable after the fact. A version marker on the accumulator table would make it detectable, and is the obvious hardening.
6.5 A per-run bound, not a per-graph invariant
One honest caveat about the per-endpoint cap. It is applied over the candidates touched by this run — the node pairs this document's chunks reached — not over the graph's whole accumulator table. A node can therefore finish with more than EMBEDDED edges after many documents, even though no single run gave it more than .
This is deliberate. Enforcing a true per-graph invariant would mean ranking every node against the full accumulator table on every extraction, which is a real and growing cost for a property nothing downstream depends on. The cap exists to bound the fan-out any one pass can add, and it does that. Reporting it as a per-graph guarantee would be the error; widening the read to make it one would be the more expensive error.
Figure 4 shows the largest instance of this in the corpus run of Section 9, together with the reason a node can absorb that many derived edges without the graph carrying any more data about it.
7 Implementation
The pass is implemented in three modules with a strict separation that is worth describing, because it is what let every claim in Section 5 be pinned by a test that touches no engine, no database file and no network.
-
The arithmetic — (2), (3), canonicalisation, Algorithm 2, the two selection gates and the EMBEDDED edge shape — is a module of pure functions. It has no clock, no I/O and no configuration.
-
The embedder resolves the route to the embedding provider, pins width and model per graph, and refuses conflicts (Section 4). It also provides a deterministic offline embedder used only by tests: it has no semantics whatsoever, and exists so that the pass can be exercised end to end reproducibly.
-
The orchestration walks the seven stages. The store and the graph adapter are parameters rather than module-level lookups, so the whole pass runs against fakes.

Figure 4: The extreme case of the per-run cap, and what a node in one of these graphs actually holds. Attackers is the highest-degree node in threat_rss after 246 documents: 809 edges, of which 742 are EMBEDDED and 67 extracted (PERFORMED 28, GAINS_ACCESS_TO 10, USED_FOR 8, then a tail). It appears in 37 chunks across 28 documents, so a nominal per-run cap of produced an average of 26 derived edges per document that mentioned it. That is the union semantics of Section 5 compounding with the per-run scope: the cap keeps each endpoint's own top ten, and a frequently-mentioned node is additionally carried in on many other endpoints' lists. No single run violated the bound; the bound simply does not compose. The tooltip's "41 connections" is its degree within the three edge labels currently selected. The strip below the canvas is the whole node record, and it is the point of the skinny-graph design: NODE, LABEL, label_raw and two timestamps, with no domain attributes at all — the workbench says so in as many words, because for an extracted graph there is no wide relational source to join back onto. What the documents deposited on this node is not a row; it is a neighbourhood. The two timestamps are the incremental claim in its most direct form: Attackers was minted 44 seconds into the run and last written 7h 55m later, so almost every accumulator behind those 742 edges was updated by a document that arrived after the node already existed.
7.1 Top-: an aggregate, not a window function
The neighbour query is a self-join over the vector table, restricted on the query side to the arriving document and searching the whole graph. Listing 1 gives the generated form.
SELECT q.doc_uri AS q_doc, q.chunk_index AS q_idx,
max_by({'d': e.doc_uri, 'i': e.chunk_index,
's': array_inner_product(q.vec, e.vec)},
array_inner_product(q.vec, e.vec), 20) AS nbrs
FROM chunk_vectors_768 q, chunk_vectors_768 e
WHERE q.graph = ? AND q.doc_uri = ?
AND e.graph = q.graph
AND NOT (e.doc_uri = q.doc_uri AND e.chunk_index = q.chunk_index)
AND array_inner_product(q.vec, e.vec) >= 0.65
GROUP BY q.doc_uri, q.chunk_index
Listing 1: The top- neighbour self-join. The top- is an aggregate over the join, not a ranked window over it.
The natural way to write top--per-group in modern SQL is a window function: rank the join output by similarity within each query chunk and keep the first . Measured at 768 dimensions over 100k rows, that form took 35,819 ms against this form's 1,403 ms — a factor of 25 — and profiling attributed 96% of the difference to the window operator itself rather than to the dot products. The reason is structural: the window form must materialise and sort every candidate pair before discarding all but , whereas the aggregate maintains a bounded top- heap per group and never materialises the rest. At these dimensions the join output is the expensive object, so not building it is worth more than any improvement to the distance computation.
Two implementation notes. The count argument of the aggregate must be a constant, so and the similarity floor are interpolated into the statement text rather than bound as parameters; both are numerically coerced immediately before interpolation, so nothing unvetted reaches the SQL. And the exclusion of the trivial self-match is written as a predicate on the pair of keys rather than on similarity, since two distinct chunks with identical text would otherwise be excluded as well.
7.2 Folding the accumulators: one statement, not one per row
The accumulate stage merges the run's contributions into the stored table with running sums, and likewise for the other two components.
The first implementation issued this as a prepared statement executed once per row. That runs each row as its own statement and transaction, measured at 82.3s for a 19,900-pair merge — a few milliseconds per row, dominating the entire pass. Rewriting it as a single multi-row VALUES list makes the conflict resolution and the insert happen once for the whole batch. The per-pair arithmetic is unchanged; only the number of statements carrying it differs.
7.3 Engine neutrality, and declining by name
The link stage writes through the same adapter method extraction uses, with an empty node list. Four of the supported engines implement it directly: FalkorDB, Neo4j and ArangoDB treat a label as a value on the element, so introducing EMBEDDED is an ordinary write, and Kinetica's graph DDL accommodates it as well.
Warehouse-backed property graphs are the exception, and the reason is the model rather than the product: when a label is part of the schema, there is no additive element write — introducing an edge label is a DDL change. The pass detects this by comparing the adapter's bound method against the base class's, which is the only reliable test when the base declares the method and raises. It then returns a report naming the engine and the reason, rather than propagating an exception the caller would surface as an internal fault. The distinction matters operationally: "similarity edges are not supported on this engine" is actionable, and a stack trace is not.
The graph's declared direction is read from the store and passed through, rather than assumed. On engines whose DDL is genuinely directed or undirected, an EMBEDDED write must agree with what extraction already declared for that graph and must not silently redeclare it.
7.4 Keeping a cosine artefact out of the answer path
An EMBEDDED edge is a similarity artefact with a numeric weight. It is not a fact, and the natural-language question-answering path must not traverse it and then report the result as though it were one.
Suppressing it requires two changes, and the second is the one that is easy to miss. The obvious one is to drop EMBEDDED from the relation-type list handed to the model. The other is

Figure 5: The workbench on threat_rss, which is the instrument every measurement in Section 9 was read from. Top left, the ontology: the folded canonical types as a graph over the relation types that join them, each annotated with its share of traffic, so Activity at 13.6% is a type a seventh of the graph's nodes carry and the several EMBEDDED arcs are the derived layer entering the schema as an ordinary relation type. It is drawn at a legible zoom deliberately; at 246 documents the full folded ontology is too wide to render whole, which is itself the finding of Section 9.5. Right, the two label distributions. The lower one is the ratio this article keeps returning to, read directly off the graph: EMBEDDED 69,867 edges at 89.6%, against ASSOCIATED_WITH 1,653 (2.1%), AFFECTS 1,532 (2.0%) and USED_FOR 1,068 (1.4%). Bottom left, the canvas. The two SELECTED chips in the edge table are the mechanism behind Figure 11b: the derived layer is a layer one turns off, not a property of the graph one is stuck with.
that the schema summary also includes the ontology as subject-predicate-object triples, and EMBEDDED appears there too; dropping it from the type list alone leaves it fully visible in the triples, and a model shown a traversable triple will use it. Both are filtered.
This is a policy decision expressed in a prompt boundary rather than in the data, and it is reversible: the edges remain in the graph, fully visible to direct Cypher or GQL queries, to the visualiser, and to any consumer that has decided for itself what a weighted similarity edge means.
Figure 5 shows what that visibility amounts to in practice. The answer path cannot traverse EMBEDDED, but the inspection path is built to make it the first thing an operator sees, because the ratio between the derived and the extracted layer is the single number that determines whether a graph built this way is worth querying.
7.5 Reproducibility
Every arithmetic claim in Section 5 — the threshold floor of Proposition 3, the union semantics of the cap, the per-chunk-pair deduplication — is covered by tests over the pure module, with no services required. The end-to-end pass is exercised against a fake store and a fake adapter using the deterministic offline embedder, so the seven stages run identically on a machine with no credentials. Integration tests against live engines skip rather than fail when the engine is unreachable.
Table 3: The running example, before and after. The pass is additive in the strict sense: node count and stated-edge count are unchanged.
| After extraction | After similarity pass | |
|---|---|---|
| Documents | 3 | 3 |
| Chunks embedded | 3 | 3 |
| Entities (nodes) | 6 | 6 |
| Stated edges | 4 | 4 |
| EMBEDDED edges | 0 | 4 |
| Connected components | 2 | 1 |
8 Results
We report three kinds of result: what the pass does to the running example, how the design decisions of Sections 4–7 measure, and the default configuration that follows from them. Every number below was taken against the running system; none is estimated.
8.1 The running example
Figures 1 and 2 are the same three paragraphs — one document each, so three chunks — before and after the pass. Extraction produces six entities across two components and four stated edges, each corresponding to a sentence. The two components are {Gulgun, FSI} and {Kaan, Tan, BabelStreet, Bloomberg}: nothing any of the three paragraphs says connects them. The similarity pass adds four EMBEDDED edges and no nodes, joining the components into one graph.
The four derived edges carry weights in [0.72, 0.84], all above the default threshold of 0.7 and all well above the floor of 0.582 that Proposition 3 gives for . The strongest, Gulgun – Kaan at 0.84, is the tie the corpus most clearly implies and no sentence states.
Figures 1 and 2 are schematics: they show the tie the pass is for, reduced to the entities a reader can hold at once. Figure 6 is what the system actually returns when those same three paragraphs are fed to it. The extractor is considerably less parsimonious than the schematic — 23 entities and 24 stated relations across 13 node labels, not six entities and four edges — and the similarity pass adds 86 EMBEDDED edges, taking the graph to 110. The ratio is the point worth noting: nearly four in five edges are derived. Three paragraphs that are all about one family, with every chunk similar to every other, are close to a worst case for a chunk-similarity signal, and the figure should be read as showing the mechanism at its least selective rather than as a typical density.
What the threshold does to it
Section 9.7 sweeps over the full corpus, where the populations are large enough to be statistical and no individual edge can be followed. The same question put to these three paragraphs has an answer that can be checked by hand, and Figure 7 is it: one graph, drawn three times, at three thresholds.
The run behind that figure is a fresh one. The graph in Figure 6 was an ad-hoc session and no longer exists, and extraction is not deterministic, so re-running the same three paragraphs gives 19 entities and 17 stated relations rather than 23 and 24. Everything else is held at Figure 6's configuration, including and the per-endpoint cap of 6. The pass adds 124 EMBEDDED edges. Extraction alone leaves two connected components — the property Figures 1 and 2 are drawn to illustrate, here reproduced on a live run rather than asserted.
Table 4 is the whole derived layer, and it has only five values in it. That is not a simplification: with three chunks there are three cross-chunk pairs, so a node pair whose endpoints co-occur

Figure 6: The pass run on the three paragraphs of Figures 1–2. The header records the outcome: 23 entities, 24 relationships, 86 EMBEDDED edges, 110 edges in total, at 240 dimensions. The hint under the threshold field — ≥ 0.582 (set by Beta) — is Proposition 3 evaluated live for the configured , so an operator cannot set a threshold the gate has already made inert. Two settings here are below their defaults: rather than 20, and a per-endpoint cap of 6 rather than 10, which is why the derived layer is as dense as it is on so few nodes. The coloured strips are the three chunk vectors, mean-pooled to 64 buckets for display.
in one of them can carry only that pair's value term. The table also shows both gates working separately. Twenty-four pairs sit at 0.6958, below , and are held in the accumulator rather than written — the latent layer of Section 6, at a size one can count. Of the 147 rows that clear , only 124 became edges; the per-endpoint cap of 6 removed the other 23.
The sweep follows directly. At all 124 edges stand and the graph is connected. At 0.72 the 0.7009 group is excluded and 94 remain, still connected, because the strongest cross-paragraph evidence is untouched. At 0.74 the last cross-paragraph group goes and the count falls to 58 — all of it same-paragraph co-mention, which by construction cannot connect anything two paragraphs did not already share — so the graph separates into the two components it started with. Between 0.74 and 1 nothing further happens. This is the corpus-scale shape of Section 9.7 in miniature: a short band where decides everything, and a long flat stretch above it where there is simply no population left for a threshold to act on.
The practical reading is that is not a dial for adjusting how busy a picture looks. On this corpus every value that matters lies between 0.69 and 0.74, and moving through that band is the
Table 4: Every accumulator in the running example, grouped by weight. Three chunks admit exactly three cross-chunk pairs, so a node pair supported by one of them can take only one of three values; the fourth group is the two-term combination for an entity named in two paragraphs, and the fifth is same-chunk co-mention. “Implied cos” inverts the value term, , which is exact for a single-term pair because its weight is its value term. The first group never becomes an edge: it is below , and is kept un-gated against a document that has not arrived.
| Weight | Support | Pairs | Implied cos | Evidence |
|---|---|---|---|---|
| 0.6958 | 1 | 24 | 0.8149 | paragraphs — below |
| 0.7009 | 1 | 32 | 0.8211 | paragraphs |
| 0.7171 | 2 | 8 | — | both of the above |
| 0.7304 | 1 | 48 | 0.8546 | paragraphs |
| 1.0000 | 1, 2 | 59 | 1.0000 | same paragraph (co-mention) |

(a) (the run's own setting): 124 derived edges, one component.
(b) : 94 edges. Thinner, but still one component.
(c) : 58 edges, and two components again.
Figure 7: The running example at three thresholds. Black arrows are the 17 relations extraction stated and are the same in all three panels; blue arcs are the derived layer. Sub-threshold edges are drawn invisibly rather than removed, so the layout is identical in every panel and the reader is comparing thresholds rather than drawings — the three images have the same dimensions to the pixel. The panels are vector art; node names are legible on zoom. The interesting transition is the third: at every cross-paragraph weight of Table 4 has been excluded, the 58 survivors are all same-paragraph co-mention, and the graph is back to the two components extraction produced. Tightening the threshold does not merely thin the derived layer here; past 0.7304 it switches the pass off.
difference between the pass making its claim and not making it at all.
We present all of this as an illustration of the mechanism, not as evidence of accuracy. Three paragraphs cannot support a claim about precision, and Section 10 says what would.
8.2 Embedding width
Table 1 in Section 4 gives the agreement study: 92% of emitted edges agree with the 3072-dimensional reference at 768 dimensions, and 72% at 240 dimensions, at 960 bytes per chunk against 3,072 and 12,288. Because the model is Matryoshka, the narrower vector is a prefix of the wider one, so this is a pure storage-versus-stability trade with no retraining and no second embedding pass. The shipped default is 240; the vector table is the only structure in the pass that grows without bound with the corpus, and the layer it feeds is advisory.
Table 5: Two formulation results. The top- measurement is at 768 dimensions over 100k rows; the upsert measurement is a 19,900-pair merge. In both cases the arithmetic performed is identical between the two rows and only its expression differs.
| Stage | Formulation | Time | Ratio |
|---|---|---|---|
| -NN top- | QUALIFY row_number() OVER (...)max_by(struct, similarity, k) | 35,819 ms1,403 ms | 25.5×1× |
| accumulate upsert | per-row prepared statement (≈4 ms/row)one multi-row VALUES upsert | 82,300 msone statement | —— |
Table 6: Influence ratio between a very close neighbour () and one at the gate boundary (), under the shipped weight and under the Shepard alternative. Inverse-distance weighting exists to make near evidence dominate; the form gives away more than an order of magnitude of that dynamic range, and leaves the cos = 1 spike untouched because that spike is set by .
| Weight | at | at | Spread |
|---|---|---|---|
| (Shepard , shipped) | 999.0 | 2.86 | 350× |
| (Shepard ) | 22.4 | 1.20 | 19× |
8.3 Query formulation
Table 5 collects the two measurements that changed the implementation. Both are formulation effects rather than tuning effects: the same logical operation, expressed differently, at the same scale, and explained in Section 7.1.
8.4 The value term, quantified
Table 2 in Section 5 gives the two value terms across the gated range; here is what the change bought in operation. Under the affine term the gate confined every weight to [0.825, 1], and the threshold shipped at 0.5 — so no setting below 0.825 would have filtered anything. Under the chord term the same gate gives a floor of 0.582, the threshold was moved to 0.7, and it now sits above the floor and below the values the strong cases produce.
Table 6 quantifies the rejected alternative: moving the term into the weight reduces the influence ratio between the closest admissible neighbour and one at the gate boundary from to .
8.5 Resulting defaults
Table 7 is the configuration these measurements produce. Every numeric field is clamped to its stated range rather than rejected; only a width-or-model conflict against a graph’s pinned value raises.
9 A corpus-scale test on public threat intelligence
Three paragraphs show what the pass does; they show nothing about how it behaves as a corpus grows. Three claims need scale: that the derived layer finds ties across documents rather than restating co-mentions within one, that the un-gated accumulators leave a latent layer a later document can promote, and that the ontology stabilises rather than inflating without bound. This section reports a run over public cyber-threat-intelligence feeds — 856 documents from 43
Table 7: Default configuration and the reason for each value.
| Parameter | Default | Range | Rationale |
|---|---|---|---|
| width | 240 | {240, 768} | 72% agreement at 0.078× storage |
| 20 | [1, 200] | neighbours per chunk | |
| 0.35 | [0, 2] | max cosine distance admitted | |
| 0.70 | [0, 1] | above the 0.582 floor (Prop. 3) | |
| (cap) | 10 | [1, 1000] | per endpoint, union semantics |
| fixed | sets same-chunk dominance | ||
| keep vectors | yes | — | required to extend the graph cheaply |
live sources, of which 246 were ingested in an eight-hour run. Every number below is computed from the run's own per-document log by one script, tools/tabulate_run.py; none is transcribed by hand.
The domain was not chosen for convenience. Threat reporting is written by many independent publishers about a shared, fast-moving set of actors, malware families, vulnerabilities and victims: a national CERT, a vendor research team and a news outlet describe the same campaign within days, in different words, none citing the others. That is exactly the situation the pass is for — the tie between two documents is real, no single document states it, and it becomes assertable only once both have arrived.
9.1 Corpus construction
Documents were built from public RSS and Atom feeds by tools/fetch_threat_feeds.py. The fetch policy is part of the method, not an implementation detail. The tool reads only the feed documents and never follows an article link, so the whole corpus costs about fifty HTTP requests and no question arises about whether retrieving an article body is within a site's terms. It does not disable TLS verification and does not retry a 403 behind a different User-Agent; a feed that declines is dropped and named in the output, so a corpus is never quietly smaller than it claims. Four feeds were dropped this way (an expired certificate, two 403s and one malformed XML document), leaving 43 live sources.
The consequence for the experiment is that a document is a feed summary, not an article. Summaries are short — a median of 395 characters — so the paragraph count per document is bimodal: 403 documents are a single paragraph and hence a single chunk, while 318 hit the six-paragraph cap the fetcher applies. A single-chunk document contributes no same-chunk pairs beyond its own entities' co-mention and must find its neighbours elsewhere in the graph, which if anything makes the cross-document tier harder to reach, not easier.
The 246 documents actually ingested are a prefix of the corpus in feed order, not a sample drawn from it, and they are not representative of it: their median length is 693 characters against the corpus median of 395, and 133 of them sit at the paragraph cap against 65 at a single paragraph — the reverse of the corpus-wide ratio. The direction of that skew matters for how the results should be read. Longer documents produce more chunks, more chunks produce more same-chunk pairs, and same-chunk pairs are the easy tier. A prefix skewed long therefore biases the tier split toward the within-document tier and against the cross-document one, so the cross-document share reported in Table 11 is if anything an underestimate of what the same pipeline would produce on the whole corpus.
Each document is a JSON record carrying its text, source, category, URL and paragraph count, and the gateway derives a stable identifier from the text itself — doc_uri = "text:" followed by the first twelve hex digits of its SHA-256 — so the vector store joins back to the corpus offline, without re-fetching anything and without a side table that can drift.
Table 8: The corpus. Feeds were selected across three categories before the run and the selection was balanced round-robin so that no single high-volume publisher dominates; the residual imbalance toward vendor blogs reflects how many of them publish feeds, not a sampling choice made after seeing results. The last column is how many of each category the run reached; the shortfall is budget, not failure, and the seven documents that did fail are accounted for in Section 9.2.
| Category | Sources | Documents | Paragraphs | Median chars | Ingested |
|---|---|---|---|---|---|
| Government / CERT | 3 | 88 | 489 | 316 | 21 |
| Vendor research | 26 | 573 | 1,636 | 348 | 154 |
| News / aggregators | 14 | 195 | 509 | 612 | 71 |
| All | 43 | 856 | 2,634 | 395 | 246 |
9.2 Ingestion, and the stage that actually costs
Each document is one /extract call with the similarity options attached: 240 dimensions, , , , cap 10 — the shipped defaults of Table 7. Extraction and folding ran on Gemini 2.5 Flash. Documents were driven concurrently, which the accumulator algebra makes safe rather than merely convenient. Within one document the pass persists its chunks before it queries for neighbours. So for two documents and to miss each other, would have to query before persisted and before persisted, which is a cycle; whichever queries second sees the other. Concurrency changes wall-clock time and not the result.
Six documents were in flight at a time. The run reached 246 documents — 974 paragraphs, 7,672 entities, 7,787 relations — in 8.0 hours of wall clock, and 7 documents failed. Per-document cost is quoted as a median, 91.1s, because the mean is not a useful summary here: it is 584.6s, six times the median, against a ninetieth percentile of 182s and one stalled provider request that ran for 6.7 hours. Summed request time is 46.9 hours, so six-way concurrency returned an effective factor of 5.9. The failures are worth itemising, because none is a failure of the pass and two are a lesson. Four were a DuckDB lock conflict: the metadata store is a single file, a test run happened to open it, and the colliding documents were lost. One was a read timeout. The last two were a payload shape — the extractor is asked for facets as {name, axis} objects and roughly one document in forty returns a bare list of strings, which every downstream reader then indexed as a dictionary. A failed document writes no ledger row and no vectors, so the graph stays consistent and the document can be re-driven; but with a generative extractor the schema is a request, not a guarantee, and consumers have to coerce rather than assume.
Running the corpus surfaced a scaling property of the surrounding pipeline that is worth reporting because it is counter-intuitive and because it is not in the similarity pass at all. Per-document time climbed from 11.9s on the first document to 80.4s by the twelfth, on documents of the same size. What grows with the corpus is the ontology, and the only stage that reads the whole ontology is label folding: each previously-unseen label costs one LLM round-trip that asks whether it is a synonym of an existing canonical, and those round-trips were issued one at a time. Profiling a six-paragraph document against an established ontology gave extraction 72s, folding 387s, and the entire similarity pass — embed, k-NN, expand, accumulate, select, link — 3s. Folding was 84% of the wall clock. The control that attributes it is the same document ingested into an empty graph, where folding takes 2.0s because with no canonicals to fold into every check short-circuits before it reaches the model.
The fix is fan-out, not caching: the fold-checks for distinct labels are independent — each reads a snapshot of the canonical set taken before the walk and writes nothing — so they are issued concurrently, while every write back to the metadata store stays on the calling thread in the original walk order, so the store sees exactly the sequence it saw before. That is a
Table 9: Where an extraction's time goes, on one six-paragraph document at 240 dimensions. The middle column is the same document into an empty graph, which is what identifies the cost: nothing about the document changed, only the size of the ontology it is folded against. The right column is after fanning the independent fold-checks out across eight workers and sending the document's paragraphs to the extractor in parallel.
| Stage | Established ontology | Empty graph | After fan-out |
|---|---|---|---|
| Extraction | 72.0 s | 112.5 s† | 21 s |
| Label folding | 387.0 s | 2.0 s | 49 s |
| Similarity pass | 3.2 s | 3.0 s | 3 s |
| Total | 463.2 s | 117.5 s | 73.3 s |
† by difference; only the folding stage and the total were instrumented in the empty-graph control.
improvement end to end, and it is reported here for two reasons. First, it is the honest accounting of what a document costs in this pipeline: the pass this article is about is 3 s of a 73 s document, and a reader deciding whether to adopt it should know that it is not the expensive part. Second, it is a property of ontology folding specifically — the cost grows with what has already been learned — and any system that maintains a canonical vocabulary across a corpus will meet it.
9.3 The ontology as it is learned
Nothing in the pipeline is given a schema. The first document arrives against an empty graph, the extractor proposes whatever types its text seems to need, and every document after that is folded against what the previous ones left behind. The ontology in Figure 8 is therefore not a design; it is a residue.
Two things in the five-document panel are worth naming, because they are the mechanism the rest of this section measures at scale. The first is that Organization is already a hub at 27.8% of nodes while Campaign and Activity, at 1.4% each, are still one-node types waiting to see whether anything else in the corpus needs them. A type's share is not a property of the type; it is a property of what has arrived so far, and the long tail here is a queue, not a residue.
The second is what is not in the panel. There is one Product and one Technology, not the pairs Product/Software Product and Technology/TechnologyConcept an earlier run of this same corpus produced at the same point. Those near-synonyms were not a delay that more documents would have resolved. We ran that corpus far enough to establish they were permanent: it ended at 903 node and 1,315 edge labels, too large for the workbench's own Graphviz build to lay out. Four causes were at work, and the decisive one was the cheapest to fix. The fold was being asked to merge names after the fact, when the extractor could have been told the existing vocabulary and asked to reuse it in the first place. Reuse decided in the extraction prompt is free; the same decision made afterwards costs one model round-trip per label and landed less than half the time. The vocabulary is passed as a strong preference rather than a closed enum, because document 1 has no vocabulary and document 500 must still be able to name a genuinely new kind. We record the earlier failure rather than quietly re-running, because "the ontology converges" is only worth anything alongside the configuration under which it did not.
9.4 The same ontology with the derived layer put back
Both panels of Figure 8 are the extracted ontology: every arrow in them is a relation some document states, and EMBEDDED is filtered out. That is the right default for a figure about what extraction produces — drawing the derived layer into it would credit the extractor with something it never found — but it means the layer this article is about does not appear in either

(a) After one document: 5 types, 5 relation types, 5 arrows over 7 edges.

(b) After five: 13 types, 12 relation types, 40 arrows over 55 edges. Nothing from (a) was discarded.
Figure 8: The extracted ontology after one and after five documents, rendered by the workbench itself — the gateway's own schema-DOT builder laid out by the same @pcc-js/wasm Graphviz build the browser loads. Solid ellipses are structural types and carry their share of all nodes; solid arrows are relation types and carry that arrow's share of all edges. Dashed boxes are facets — a dimension of a type rather than a relationship between two, so Social Media hangs off Organization instead of being a second organization-like thing next to it. Both panels are reconstructed after the fact from the first_seen_ts every node and edge carries; the run itself was not instrumented.

Figure 9: The five-document ontology of Figure 8b with the derived layer put back, at the same cutoff and from the same builder. Blue arrows are EMBEDDED; black arrows and ellipses are exactly the extracted ontology of the earlier panel. The structural vocabulary does not move — the pass mints no types — but the schema does: 12 relation types over 40 arrows and 55 edges become 13 over 107 and 262, so the similarity layer contributes 67 arrows and 207 edges against extraction's 55. Nearly four derived edges for every stated one, after five documents. The derived arrows are drawn off Graphviz's constraint graph, so the black skeleton keeps the layout it has in Figure 8b and the two can be read against each other; letting 67 arrows participate in rank assignment buries the skeleton the reader came for. Parameters are the run's throughout: dimensions. Two cautions come with the density. At type level the layer approaches saturation, so what makes it useful is not which type pairs it touches but how strongly — and a schema view deliberately discards exactly that. And at this cutoff the blue arrows are not graded at all: every one of the 207 edges has weight , because five documents have produced no cross-document evidence yet to dilute a co-mention. No threshold below 1 removes any of them. Section 9.7 sweeps over the full corpus, where the two levels do come apart.
picture. Figure 9 is the five-document panel with the filter removed.
9.5 What the vocabulary did over 246 documents
Table 10 is the cumulative count of distinct canonical types as documents arrive. The structural vocabulary saturates: the twenty-fourth entity type is reached at document 246 and the rate over the last 46 documents is 0.04 new types per document, against 1.33 over the first ten. No fold in the run was forced — the hard cap of 100 canonicals per kind, at which the fold-check is re-asked as a choice with no null option, was never approached.
That is the claim the section set out to test, and Figure 10(a) and (b) support it — for structural types. Panel (c) is the mechanism behind the flat line: nearly nine names in ten that the extractor proposes are absorbed rather than minted, and 145 canonicals survive out of 1,119 proposals. Table 10 counts a type from the moment a document is labelled with it and so reaches 24, four more than the ledger's 19; the difference is names first minted on a facet axis and later used structurally, and the two counts bracket the same flat curve.
The claim does not hold for the graph's node labels, and the difference is worth being precise about, because the honest number is the larger one. A node carries a structural type and its facets as labels, so the graph at the end of the run has 101 distinct node labels, not 19. Facets fold onto an axis, but their names are not capped the way a type's are: the ledger holds 104 canonical entity names in all, of which 85 were minted on a facet axis. Some are real — Agentic, Ephemeral, Cloud-Hosted, Export-Controlled. Others are adjectives lifted out of prose and are facets of nothing: Correct, Different, Final, Frustrating.
Table 10: Cumulative distinct canonical types against documents ingested, counted from the driver's per-document log — a type enters at the first document labelled with it. The right-hand column is the marginal rate over the interval ending at that row, which is the quantity that decides whether an ontology converges; a count that merely grows more slowly than the corpus still grows without bound. Figure 10 counts the same vocabulary from the ledger instead, at the moment a canonical is minted, and ends four lower.
| Documents | Entity types | Relation types | New entity types / doc |
|---|---|---|---|
| 1 | 3 | 3 | 3.00 |
| 10 | 15 | 16 | 1.33 |
| 25 | 17 | 17 | 0.13 |
| 50 | 17 | 19 | 0.00 |
| 100 | 19 | 24 | 0.04 |
| 200 | 22 | 39 | 0.03 |
| 246 | 24 | 43 | 0.04 |

Figure 10: The ontology over the run, reconstructed from the first_seen_ts each canonical carries; the run itself was not instrumented. (a) Entity types flatten at 19 from about document 80 and do not move again, relation types climb more slowly to 41, and facet names — a dimension of a type rather than a type — rise to 85 and are still rising at the end of the run. That divergence is the section's main negative result. (b) The same total against a Heaps' law fit; vocabulary growth in natural language is sublinear, and an exponent of 0.55 says an extracted ontology behaves the same way. (c) What the fold is doing: the extractor proposed 1,119 names of which 974 (87.0%) were absorbed into an existing canonical, and the rolling fold rate stays between 80% and 95% rather than declining — an ontology that is saturating, since an increasing share of what the extractor invents is something it already has a word for.
Measuring this turned up one thing that was a defect, and it is worth separating from the rest because the two look alike and only one is fixable. A facet folds onto an axis — the dimension it measures — and the two placeholders企业类型 and RelationType mean no axis given, which is to say the structural axis itself. They were deliberately never folded, so that a label arriving without an axis could not be filed under whichever real axis happened to rank closest. What that missed is that the extractor proposes an axis literally named Type, and TYPE for relations, and those are the same axis under another spelling. Unfolded, they minted a facet axis duplicating the structural role: 271 of the ledger's 1,119 type rows, 24%, carried a structural axis under a facet name, and each name on it was then counted as a facet of nothing. The fold now recognises them — an axis is the structural one when all of its word stems come from {entity, relation, node, edge, type} and one of them is type, so Type and企业类型 resolve while Technology Type stays a facet dimension — and the decision replays over an existing ledger by string matching alone, with no re-extraction. Because an axis is a grouping and not a label, no node label moves,
Table 11: The derived layer by provenance tier. “Written” is edges above ; the two right-hand columns are the accumulator rows behind them, which are persisted un-gated. The bottom-right cell is the latent layer this article argues for: 92,464 cross-document pairs that a later document can promote by raising their accumulated weight, with no recomputation of anything already stored.
| Tier | Written | Share | Median w | Accum. | Accum. |
|---|---|---|---|---|---|
| Same chunk | 46,215 | 66.1% | 1.000 | 154,022 | 0 |
| Same document | 252 | 0.4% | 0.761 | 65,010 | 858 |
| Cross document | 23,400 | 33.5% | 0.749 | 1,205,441 | 92,464 |
| All | 69,867 | 1.000 | 1,424,473 | 93,322 |
and every count in this section is unchanged by the repair.
Two things that look like the same defect are not, and are left alone. Impact and IMPACT do coexist, but in two separate registries following the graph’s two naming conventions — Title Case for entity labels, UPPER_SNAKE for relation types — and within either registry no two canonicals differ only by case. And 18 canonicals sit on both the structural and a facet axis, which is the domain rather than an error: Retail genuinely is both a kind of thing and a dimension of one.
The uncapped facet vocabulary we report rather than fix, because the fix is an ontology-design decision. The cap that disciplines types counts canonicals per kind, and a facet is a different kind — a dimension of a type, of which a domain may legitimately have many. Capping facet names would work and would change what the ontology means. What the measurement establishes is narrower and still useful: the mechanism that stabilises a vocabulary works where it is applied, and where it is not — the dashed curve in Figure 10(a) — the vocabulary does not stabilise on its own.
9.6 The derived layer at corpus scale
The run wrote 635,562 EMBEDDED emissions, which resolve to 69,867 distinct derived edges in a graph of 6,706 nodes and 77,999 edges. The derived layer is thus 89.6% of all edges — the extracted graph is the small part, which is what one should expect from a pass that considers every pair of entities that share a neighbourhood rather than only pairs a sentence relates.
Three readings of Table 11 matter. First, the same-chunk tier dominates the written edges at 66.1% and sits at a median weight of exactly 1.000, which is by construction: two entities in one chunk enter as a self-pair at and no amount of corpus can outweigh that. Anyone reading a derived edge’s weight should know that a weight of 1 means co-mention and nothing more. Second, and against that, a third of the written layer — 23,400 edges — is cross-document, at a median weight of 0.749. Those are the ties no single document states, and they exist in this quantity only because the corpus is many publishers writing about a shared subject. Third, the un-gated accumulator table is 1,517,795 rows, or 6.8% of all node pairs, of which 93,322 sit below the gate. That is the evolving part: it is not a cache and not a to-do list, it is a set of assertions the corpus currently does not support strongly enough to write down, held in a form where the next document can change that verdict arithmetically.
One property does not survive contact with a corpus, and it is the per-endpoint cap. top_n = 10 bounds how many neighbours an endpoint keeps per run, not per graph, so a hub accumulates a fresh top ten on every document that mentions it. Over 246 documents the median derived degree is 11, the ninetieth percentile is 36, and the maximum is 742; 3,689 of 6,668 endpoints (55.3%) exceed the nominal cap. This is a real design consequence rather than a bug — a per-graph cap would require reconsidering an endpoint’s whole neighbourhood on every write, which is exactly the recomputation the incremental design exists to avoid — but a reader should not take top_n as a degree bound. The weight distribution is otherwise as the arithmetic requires: minimum 0.707, tenth percentile 0.741, median 1.000, and zero edges below the floor of established in Section 5. Support — the number of chunk pairs behind an edge — has median 1, ninetieth percentile 3 and maximum 119.
9.7 Tightening thins the instances, not the ontology
Figure 9 raises an obvious question: the derived layer looks saturated at type level, so would a stricter threshold thin it back to something legible? Table 12 answers it, and the answer is no — for a reason worth stating, because it bounds what is good for.
The sweep costs nothing to run, which is itself a consequence of the design. The accumulators are persisted un-gated (Section 6) and a written edge carries its weight as a property, so re-applying at read time needs neither the corpus nor the embedder. Two populations are swept: the 69,867 written edges, which can only be tightened because they were already gated at ; and the 1,517,795 accumulator rows, which are every pair the pass has ever had evidence for and so sweep from the floor up. Each is counted at both levels — instance edges, and the directed structural-label arrows an ontology diagram draws.
Table 12: The derived layer against the weight threshold, re-applied at read time. “Arrows” is distinct structural-type pairs — an edge of Figure 9, drawn at corpus scale. Both populations lose instances fast and arrows slowly. Below the written column cannot move, since that is the gate the run applied; the accumulator column can, and shows the latent layer underneath it.
| Written edges | Un-gated accumulators | |||
|---|---|---|---|---|
| Instances | Arrows | Pairs | Arrows | |
| 0.582 | 69,867 | 347 | 1,517,795 | 464 |
| 0.70 | 69,867 | 347 | 1,424,473 | 464 |
| 0.75 | 57,540 | 341 | 394,668 | 415 |
| 0.80 | 46,928 | 319 | 159,969 | 336 |
| 0.90 | 46,687 | 317 | 154,505 | 323 |
| 1.00 | 32,817 | 285 | 130,942 | 294 |
Moving from 0.70 to 0.80 discards 88.8% of the candidate pairs and 27.6% of the schema arrows. The gap is structural rather than a property of this corpus: an arrow exists if any instance under it survives, so the type level is a disjunction over thousands of instances, and a disjunction is very hard to switch off — each arrow only ever needed one. is therefore a strong instance-level control and a weak ontology-level one. Anyone hoping to declutter a schema diagram by raising it will find they have deleted most of the graph and almost none of the picture; the lever that works on the picture is drawing arrows by strength, which is what Figure 9 gives up by being a schema view.
The flat stretch from 0.80 to 0.95 is not a coarse grid. The weight distribution is bimodal, and sharply so: of 1.5 million pairs, only 5,513 — 0.36% — have a weight anywhere in [0.80, 0.999). The 23,514 more between 0.999 and 1 are co-mention carrying a floating-point residue rather than a third mode. Evidence is either same-chunk co-mention pinned at 1.0 or cross-document material in a band just above the 0.582 floor of Section 5, with next to nothing in between, so there is no population for a threshold in that range to act on. This is the corpus-scale form of what Figure 9 shows at five documents, where the second mode does not exist yet and the sweep is flat all the way to 1.
Figure 11 draws the same layer rather than tabulating it, and it makes visible one thing a table cannot: the derived edges are what connect the graph, and they connect it too well.

(a) Everything: 77,999 edges over the 6,686 nodes that carry one.

(b) EMBEDDED deselected: the three largest extracted relation types — ASSOCIATED_WITH (1,653), USED_FOR (1,068) and PERFORMED (974) — 3,695 edges over 4,012 nodes.
Figure 11: The same graph with and without its derived layer, drawn by a force simulation in the browser. a is what 89.6% derived looks like: an undifferentiated disc in which the layout has nothing left to separate, because almost every pair of entities sharing a neighbourhood now shares an edge. It is not a pretty picture of a graph, and that is the finding. b is the extracted graph underneath, reached by deselecting one edge label in the workbench's Edges-by-Label panel: hub-and-spoke stars around frequently-named actors and technologies, joined by long ASSOCIATED_WITH spans, with a fringe of small components that are individual documents the corpus has not yet tied to anything. The hovered node is Vulnerabilities, and it gives this subsection's argument at the scale of one node — the tooltip's "17 connections" is its degree within the current selection, its full extracted degree is 47, and it carries 302 EMBEDDED edges, 86.5% derived.
(a) 998 chunk vectors on , 3-NN arcs retention@20 = 0.14


(c) a 240-D neighbour projects closer than a random pair 86% of the time

Figure 12: The corpus embedded on : 998 chunk vectors from 246 documents. (a) chunk vectors projected onto the three leading principal components, coloured by a spherical k-means computed in the full 240 dimensions — so the colours are a fact about the embedding, and the picture either shows them holding together or it does not. Each grey arc joins a chunk to one of its three nearest neighbours in 240 dimensions; short arcs are neighbourhoods the projection kept, arcs across the sphere are neighbourhoods it lost. Point opacity is , the fraction of that point's own deviation from the corpus mean that survived the projection, so a washed-out point is one the figure is least entitled to make a claim about. (b) projected cosine against true 240-dimensional cosine. (c) the claim as a distribution rather than a shape: where 240-dimensional nearest-neighbour pairs land after projection, against random pairs.
Extraction produces a document-shaped scatter, because nothing in a single feed summary relates its entities to any other document's — panel b is that scatter, still legible, with per-document components one can count by eye. Adding the derived layer pulls all of it into the single body of panel a. That is the result the pass was built to produce and simultaneously the reason it needs a gate. Whether the object is useful at this density is a separate question, and Section 10 takes it up. The immediate practical point is smaller: the derived layer must be a toggleable layer in whatever tool inspects the graph, because a single view of both is a view of neither.
9.8 Seeing the neighbourhood structure: the corpus on
Everything in Section 5 is arithmetic on cosines, which is hard to disbelieve and equally hard to believe. This subsection turns it into a picture — and, because a picture of clustering proves nothing on its own, into the two numbers that say whether the picture is entitled to its shape.
The vectors are -normalised at write time, so they already lie on . Flattening them is not a change of geometry but a choice of how many coordinates of an orthonormal frame to keep: two give a circle, three give a sphere. The frame that preserves the most squared distance is PCA, and for unit vectors that is not one option among several. The matrix of pairwise cosines is the Gram matrix, and classical multidimensional scaling on a Gram matrix is algebraically identical to PCA on the vectors. The vectors are centred first: sentence embeddings are anisotropic and every one carries a large shared component, so the uncentred first component is “is this text at all” — true of every point and separating none.
Two coordinates fall out of the projection for free and both are reported rather than hidden. The first is , how much of point 's deviation survived; it is drawn as opacity. The second is the only thing a k-NN figure can honestly claim,
the share of each point's true k nearest neighbours that are still among its k nearest after projection. It belongs in the caption of any such figure, and its absence elsewhere is usually the tell.
Those numbers also settle the choice of a sphere over the circle the idea naturally suggests. has one degree of freedom: n points on it are n angles on a line that wraps, so once n reaches the thousands, neighbouring points sit a fraction of a degree apart and everything looks clustered because there is nowhere else to be. A picture that cannot fail is not evidence. On the 998 chunks of this run the third coordinate is worth retention@20 of 0.142 against 0.080 for the circle, and retention@50 of 0.223 against 0.145 — and for one extra number per point.
Panel (c) is the result, and it is worth stating in the order that makes it falsifiable. The projection is bad at what a projection is usually asked to do: three axes keep 11.0% of the variance, the median point retains 0.304 of its own deviation from the corpus mean, only 14.2% of a point's true 20 nearest neighbours are still among its nearest 20 afterwards, and the rank correlation with the true cosine is a weak . Every one of those numbers got worse as the corpus grew — at 56 chunks the same projection kept 21.5% of the variance at — which is what crowding 240 dimensions into three must do and is exactly why the figure reports them.
And yet the separation survives all of it. A pair that are nearest neighbours in 240 dimensions project to a median cosine of +0.865, against -0.007 for a random pair, and a neighbour lands closer than a random pair 85.6% of the time — at 998 chunks, essentially unchanged from 85.3% at 56. That gap, not the shape of panel (a), is what “similar documents cluster spatially” means operationally: the projection has lost which neighbour is which while keeping that neighbours are near. It is also the cleanest argument for why the pass queries the full 240 dimensions and never a projection — 11% of the variance is enough to see the neighbourhood structure and nowhere near enough to compute on it.
Two things are deliberately not drawn. The admission gate is an angle of in 240 dimensions; drawing it as a cap on the projected sphere would assert that the projection preserves angles, which it does not. Nor are the gate-admitted pairs drawn, which was the first attempt: on this corpus the gate admits 497,499 of 497,503 chunk pairs — all but four — because every document is about the same subject, so “admitted” is very nearly the complete graph and an arc for each says nothing. That is itself a result — the gate is a cheap pre-filter against unrelated text, not a discriminator within a topical corpus, and the discrimination is done downstream by min_weight.
10 Limitations
Several of these are the direct cost of a decision defended earlier, and a reader deciding whether to adopt the method needs both halves.
No precision or recall. The central omission. We do not know what fraction of the EMBEDDED edges a human annotator would endorse, nor what fraction of the endorsable relationships the pass recovers. Both need a corpus with hidden relationships labelled by someone who read it, and no such corpus exists here. The agreement figures of Table 1 compare two configurations of one method; reading them as accuracy would be a misuse. The obvious study — annotate a few hundred candidate pairs, blind, and report precision at several thresholds — is the natural next step and is not attempted here.
The value term is analysed, not validated. Section 5 shows that the affine term is unusable behind a gate and that the weight flattens the dynamic range. Both are arguments from the shape of the formulas, supported by Table 6. Neither shows that the chord term produces better edges than some third alternative; that comparison needs the ground truth of the previous paragraph.
On this corpus the gate and the threshold barely bind. Over all 509,545 chunk pairs the cosine runs from 0.630 to 1.000, with a median of 0.805 and an interquartile range only 0.038 wide. The gate therefore admits 100.00% of them, and downstream passes 1,390,600 of 1,415,574 node pairs, or 98.2%. The per-endpoint cap does essentially all of the selecting. The analysis is not invalidated — an embedder that concentrates distances more tightly than the gate makes the collapse of Proposition 2 worse, not better — but on a single-domain corpus at 240 dimensions the two parameters a user is offered are not the ones controlling the result. Whether that is a property of the domain, the embedder, or truncation to 240 dimensions we have not separated; the corpus has no 768-dimensional counterpart to compare against.
is a decision, not a guard, and it is untuned. At a same-chunk co-occurrence outweighs a neighbour at by about . Section 5 argues that same-chunk evidence should dominate, and the ordering is surely right, but the magnitude was inherited from a numerical-guard idiom rather than chosen. A corpus of long paragraphs, where sharing one is weak evidence, would want a much larger , and we have not characterised where that crossover lies.
Changing the value term invalidates stored accumulators, silently. Accumulators written under one cannot be mixed with those written under another, and nothing detects the mixture (Section 6). The remedy in use is procedural — re-extract into a fresh graph — which is not a remedy.
The per-endpoint cap does not bind at corpus scale. It is a per-run bound, so a node accumulates a fresh top from every document that mentions it. Section 9.6 quantifies the result: with over 246 documents, 55.3% of endpoints finish above the nominal cap and the largest derived degree is 742. The trade is deliberate, but cannot be read as a degree bound in any useful sense.
The derived layer dominates the graph, and the query side is not yet adapted to that. At the end of the corpus run 89.6% of all edges are EMBEDDED. That the ratio is expected does not dispose of it: a traversal that ignores weights will find a derived path between almost any two nodes, and will find it more easily than the extracted path that actually states something. Keeping EMBEDDED out of the natural-language answer path (Section 7) protects that one consumer and leaves every other to discover the problem for itself. A weight-aware traversal primitive, or a materialised view at a higher threshold, is the missing piece.
Facet names are not capped, so the node-label count does not converge. Canonical types saturate at 24 over 246 documents, but the graph ends with 101 distinct node labels, because a node carries its facets as labels too and the cap counts canonicals per kind rather than labels per node (Section 9.5). Some of the excess are not facets of anything — Correct, Different, Frustrating — but adjectives lifted out of prose. This is upstream of the similarity pass. It matters here because “the ontology converges” has been shown of the structural vocabulary only.
Exact k-NN is linear in corpus size per document. The search side of the join is the whole vector table (Algorithm 1, step 8). At today's scale the constant is small and exactness is worth more than the saving, but the reasoning has a horizon, and Section 6.3 measures where it falls: not per document, where the scan stays negligible against extraction, but in the cumulative ingest, around ten million chunks. An HNSW index [7, 25] is built past a corpus-size threshold and takes over there, with candidates rescored on the exact metric so the written weights are never approximate. The residual limitation is narrower than it was: what remains approximate is only which pairs are offered for scoring, and that was measured at 99.6–100% edge-level agreement rather than assumed. The trade-off has not been eliminated, only bounded on one corpus.
Warehouse-backed graphs are excluded. Where a label is part of the schema, there is no additive element write and the link stage cannot run (Section 7). The pass declines by name rather than failing, but the exclusion is real: there the layer would have to be materialised as its own relation behind a view cascade, which is a different design.
Whole-document extraction is incompatible. With one chunk per document every entity co-occurs with every other at cos = 1 and the pass emits a clique. Forcing chunked extraction resolves the failure and also means the two modes cannot be combined.
Edges are never retracted. The pass has no delete path, so an EMBEDDED edge whose weight later falls below — possible, since the weight is a mean — stays in the graph. Raising after the fact is a different operation and is available: every written edge carries its weight, so tightening the threshold on an existing graph is one DELETE predicated on r.weight rather than a re-run. On the corpus graph that is worth doing, but it is an operator action outside the pass.
Chunking is paragraph-based and capped. A document with more paragraphs than the cap is truncated. The truncation is reported rather than silent, but the tail is not embedded and its entities acquire no similarity evidence.
One embedding provider. The pass supports a single embedder family and refuses to run when the configured chat provider is not the matching one, rather than handing another provider's credentials to the embedding client. That is the right failure, but it ties the layer's availability to a provider choice made elsewhere.
Single-language and single-modality. Everything here assumes text paragraphs in a language the embedder handles well. Cross-lingual behaviour is untested, and non-text content contributes nothing.
11 Conclusion
An extractor that only asserts what a sentence says will build a graph that is correct and disconnected. The pass described here recovers the ties the corpus implies without weakening that guarantee. It keeps the derived layer strictly separate: one edge label carrying a weight and a support count, written through the seam extraction already uses, with no path by which it can alter or remove anything extraction found.
Two things in the design turned out to matter more than expected.
The first is that transplanting inverse-distance weighting into a cosine space is not merely a change of metric. On -normalised vectors the weight is exactly Shepard , so the exponent is fixed rather than free. But the value term is a function of the same distance that produces the weight, which has no counterpart in the spatial setting, and that is where the design goes wrong if it is going to. Behind a gate admitting , the natural affine value term is confined to a band of width and renders any write threshold inoperative. The rescaled chord distance does not collapse, and it comes with an explicit constraint, , tying the threshold to the gate. Neither the failure nor the constraint is visible from the formulas until the gate is taken into account, and the failure is silent: a threshold that filters nothing looks exactly like one set generously.
The second is that persisting the accumulators before thresholding buys almost everything one wants from an incremental system, and costs one representational decision rather than any machinery. The accumulator triple is a commutative monoid, so arrival order cannot affect the final weights, nothing has to be recomputed as the corpus grows, and a pair whose evidence is currently too thin keeps accumulating until a later document tips it over the threshold. The layer evolves with the corpus because addition is associative — not because anything watches for changes.
What is missing is the evaluation. We can say what the method computes, why the formulation is the one it is, and what it costs; we cannot yet say how often the edges it produces are ones a reader would endorse. Building a labelled set of hidden relationships and reporting precision across thresholds is the necessary next work, and it would also make the open parameters — above all, which sets how much a shared paragraph outweighs a similar one and is currently inherited rather than chosen — tunable against something other than judgement. Beyond that, the two clear extensions are an approximate neighbour index, which the exact self-join will require once the corpus reaches the order of millions of chunks, and the combination of this text-provenance signal with a structural link-prediction signal, which draws on entirely different evidence and should be complementary rather than redundant.
Acknowledgements
The engineering record this article draws on — every measurement quoted here was taken against the running system — was kept as part of the xgraph workbench at Babel Street.
References
[1] Renzo Angles, Marcelo Arenas, Pablo Barceló, Aidan Hogan, Juan Reutter, and Domagoj Vrgoč. Foundations of modern query languages for graph databases. ACM Computing Surveys, 50(5):1–40, 2017. doi: 10.1145/3104031.
[2] Kevin Beyer, Jonathan Goldstein, Raghu Ramakrishnan, and Uri Shaft. When is “nearest neighbor” meaningful? In Proceedings of the 7th International Conference on Database Theory (ICDT), volume 1540 of Lecture Notes in Computer Science, pages 217–235, 1999. doi: 10.1007/3-540-49257-7_15.
[3] Antoine Bordes, Nicolas Usunier, Alberto Garcia-Durán, Jason Weston, and Oksana Yakhnenko. Translating embeddings for modeling multi-relational data. In Advances in Neural Information Processing Systems (NIPS), 2013.
[4] Pieter Cailliau, Tim Davis, Vijay Gadepally, Jeremy Kepner, Roi Lipman, Jeffrey Lovitz, and Keren Ouaknine. RedisGraph GraphBLAS enabled graph database. In IEEE International Parallel and Distributed Processing Symposium Workshops (IPDPSW), pages 285–286, 2019. doi: 10.1109/IPDPSW.2019.00054.
[5] Alin Deutsch, Nadime Francis, Alastair Green, Keith Hare, Bei Li, Leonid Libkin, Tobias Lindaaker, Victor Marsault, Wim Martens, Jan Michels, Filip Murlak, Stefan Plantikow,
Petra Selmer, Oskar van Rest, Hannes Voigt, Domagoj Vrgoč, Mingxi Wu, and Fred Zemke. Graph pattern matching in GQL and SQL/PGQ. In Proceedings of the 2022 International Conference on Management of Data (SIGMOD), pages 2246–2258, 2022. doi: 10.1145/3514221.3526057.
[6] Inderjit S. Dhillon and Dharmendra S. Modha. Concept decompositions for large sparse text data using clustering. Machine Learning, 42(1-2):143–175, 2001. doi: 10.1023/A:1007612920971.
[7] Matthijs Douze, Alexandr Guzhva, Chengqi Deng, Jeff Johnson, Gergely Szilvasy, Pierre-Emmanuel Mazaré, Maria Lomeli, Lucas Hosseini, and Hervé Jégou. The Faiss library, 2024.
[8] Darren Edge, Ha Trinh, Newman Cheng, Joshua Bradley, Alex Chao, Apurva Mody, Steven Truitt, and Jonathan Larson. From local to global: A graph RAG approach to query-focused summarization, 2024.
[9] Nadime Francis, Alastair Green, Paolo Guagliardo, Leonid Libkin, Tobias Lindaaker, Victor Marsault, Stefan Plantikow, Mats Rydberg, Petra Selmer, and Andrés Taylor. Cypher: An evolving query language for property graphs. In Proceedings of the 2018 International Conference on Management of Data (SIGMOD), pages 1433–1445, 2018. doi: 10.1145/3183713.3190657.
[10] Gemini Team, Google. Gemini: A family of highly capable multimodal models, 2023.
[11] Aditya Grover and Jure Leskovec. node2vec: Scalable feature learning for networks. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD), pages 855–864, 2016. doi: 10.1145/2939672.2939754.
[12] Aidan Hogan, Eva Blomqvist, Michael Cochez, Claudia d'Amato, Gerard de Melo, Claudio Gutierrez, Sabrina Kirrane, José Emilio Labra Gayo, Roberto Navigli, Sebastian Neu-maier, Axel-Cyrille Ngonga Ngomo, Axel Polleres, Sabbir M. Rashid, Anisa Rula, Lukas Schmelzeisen, Juan Sequeda, Steffen Staab, and Antoine Zimmermann. Knowledge graphs. ACM Computing Surveys, 54(4):1–37, 2021. doi: 10.1145/3447772.
[13] Anil K. Jain. Data clustering: 50 years beyond K-means. Pattern Recognition Letters, 31(8):651–666, 2010. doi: 10.1016/j.patrec.2009.09.011.
[14] Shaoxiong Ji, Shirui Pan, Erik Cambria, Pekka Marttinen, and Philip S. Yu. A survey on knowledge graphs: Representation, acquisition, and applications. IEEE Transactions on Neural Networks and Learning Systems, 33(2):494–514, 2022. doi: 10.1109/TNNLS.2021.3070843.
[15] Jeff Johnson, Matthijs Douze, and Hervé Jégou. Billion-scale similarity search with GPUs. IEEE Transactions on Big Data, 7(3):535–547, 2021. doi: 10.1109/TBDATA.2019.2921572.
[16] B. Kaan Karamete and Eli Glaser. An ad-hoc graph node vector embedding algorithm for general knowledge graphs using Kinetica-Graph, 2025. URL https://arxiv.org/abs/2407.15906.
[17] Bilge Kaan Karamete and Eli Glaser. Novel data structures for label based queries specifically efficient for billion+ property graph networks using Kinetica-Graph, 2023. URL https://arxiv.org/abs/2311.03631.
[18] Bilge Kaan Karamete, Louaï Adhami, and Eli Glaser. A fixed storage distributed graph database hybrid with at-scale OLAP expression and I/O support of a relational DB: Kinetica-Graph, 2022. URL https://arxiv.org/abs/2201.02136.
[19] Teuvo Kohonen. The self-organizing map. Proceedings of the IEEE, 78(9):1464–1480, 1990. doi: 10.1109/5.58325.
[20] Aditya Kusupati, Gantavya Bhatt, Aniket Rege, Matthew Wallingford, Aditya Sinha, Vivek Ramanujan, William Howard-Snyder, Kaifeng Chen, Sham Kakade, Prateek Jain, and Ali Farhadi. Matryoshka representation learning. In Advances in Neural Information Processing Systems (NeurIPS), 2022.
[21] Jinhyuk Lee, Feiyang Chen, Sahil Dua, et al. Gemini embedding: Generalizable embeddings from Gemini, 2025.
[22] Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Küttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel, Sebastian Riedel, and Douwe Kiela. Retrieval-augmented generation for knowledge-intensive NLP tasks. In Advances in Neural Information Processing Systems (NeurIPS), 2020.
[23] David Liben-Nowell and Jon Kleinberg. The link-prediction problem for social networks. Journal of the American Society for Information Science and Technology, 58(7):1019–1031, 2007. doi: 10.1002/asi.20591.
[24] Linyuan Lü and Tao Zhou. Link prediction in complex networks: A survey. Physica A: Statistical Mechanics and its Applications, 390(6):1150–1170, 2011. doi: 10.1016/j.physa.2010.11.027.
[25] Yu A. Malkov and D. A. Yashunin. Efficient and robust approximate nearest neighbor search using hierarchical navigable small world graphs. IEEE Transactions on Pattern Analysis and Machine Intelligence, 42(4):824–836, 2020. doi: 10.1109/TPAMI.2018.2889473.
[26] Sergey Melnik, Andrey Gubarev, Jing Jing Long, Geoffrey Romer, Shiva Shivakumar, Matt Tolton, and Theo Vassilakis. Dremel: Interactive analysis of web-scale datasets. Proceedings of the VLDB Endowment, 3(1-2):330–339, 2010. doi: 10.14778/1920841.1920886.
[27] Niklas Muennighoff, Nouamane Tazi, Loïc Magne, and Nils Reimers. MTEB: Massive text embedding benchmark. In Proceedings of the 17th Conference of the European Chapter of the Association for Computational Linguistics (EACL), pages 2014–2037, 2023.
[28] Mark Raasveldt and Hannes Mühleisen. DuckDB: An embeddable analytical database. In Proceedings of the 2019 International Conference on Management of Data (SIGMOD), pages 1981–1984, 2019. doi: 10.1145/3299869.3320212.
[29] Nils Reimers and Iryna Gurevych. Sentence-BERT: Sentence embeddings using Siamese BERT-networks. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 3982–3992, 2019. doi: 10.18653/v1/D19-1410.
[30] Ian Robinson, Jim Webber, and Emil Eifrem. Graph Databases: New Opportunities for Connected Data. O'Reilly Media, 2nd edition, 2015.
[31] Donald Shepard. A two-dimensional interpolation function for irregularly-spaced data. In Proceedings of the 1968 23rd ACM National Conference (ACM '68), pages 517–524. ACM, 1968. doi: 10.1145/800186.810616.
[32] Théo Trouillon, Johannes Welbl, Sebastian Riedel, Éric Gaussier, and Guillaume Bouchard. Complex embeddings for simple link prediction. In Proceedings of the 33rd International Conference on Machine Learning (ICML), pages 2071–2080, 2016.
[33] Roger Weber, Hans-Jörg Schek, and Stephen Blott. A quantitative analysis and performance study for similarity-search methods in high-dimensional spaces. In Proceedings of the 24th International Conference on Very Large Data Bases (VLDB), pages 194–205, 1998.
[34] Muhan Zhang and Yixin Chen. Link prediction based on graph neural networks. In Advances in Neural Information Processing Systems (NeurIPS), 2018.