DANIEL KLIEWERThe book

Validating at Scale: The Compiler Meets 6.3 Million RDF Triples

By
5 min read

The compiler was born on three hand-written documents. That was enough to prove the shape of the idea — Pass 2 maps what we don't know, Pass 4 versions what we do, and the loop closes them. But a tool that only works on toy input isn't a tool. It's a demo.

So we pointed it at real, large-scale data. Not a curated sample — the full ORKG (Open Research Knowledge Graph) RDF export: 6,344,307 triples, ~897 MB of N-Triples describing papers, contributions, problems, and the statements that connect them. The question we set out to answer: does the compiler generalize, or was the toy corpus hiding its assumptions?

From 6.3M triples to a corpus the compiler can read

ORKG doesn't hand you paragraphs. It hands you a knowledge graph where every claim is a (subject, predicate, object) triple and every predicate is a P-code. To turn that into a compiler-readable corpus we wrote two small, local-first tools:

  • orkg_ingest.py streams the entire 897 MB dump once, in bounded memory, and builds a queryable index: 14,128 predicates, 1.04M resources, 65,689 papers, 98,774 contributions, 8,420 research problems.
  • select_domain.py picks a research problem, walks its papers → contributions → statements, and renders each contribution as a markdown document with human-readable, label-resolved claims.

We chose the largest problem in the graph: "Empirical Research in Requirements Engineering" — 728 papers, 766 contributions. From that we extracted 300 documents, each a real, structured scientific claim-set drawn from ORKG's curated knowledge. That is a ~100× scale-up from the three-doc toy corpus, and every word came from a live scholarly knowledge graph rather than from us.

What broke at scale (and what we fixed)

A compiler that assumes small input silently fails on large input. Three things broke, and each fix is a legitimate scale adaptation of the existing tool — not a rewrite.

1. One model call per document = 300 sequential calls. At ~2–5 minutes per call on the 35B hardware, that's a 5-hour job that any single timeout would destroy. We added batched claims (KC_CLAIMS_BATCH): N documents per call instead of N calls, with each claim attributed back to its source document.

2. A long job with no checkpoint is a liability. A single timed-out batch was crashing the whole run and losing all progress. We added per-batch checkpointing, resume, and retry: the claims pass persists after every batch, skips completed documents on restart, and retries a failed batch at half size down to a single document. Kill it at batch 47; it resumes at 48.

3. The contradiction detector returned zero. On 881 claims in one shot, the model's chain-of-thought overflowed and the JSON failed to parse — so the pass reported 0 contradictions, which is almost never true of a real field. We added sharded contradiction detection (KC_CONTR_SHARD): scan windowed blocks of claims, re-base indices into the global list, and merge. After the fix, the detector found genuine disagreements — e.g. one contribution scopes Crowd-based RE to Elicitation/Analysis/Validation while another expands it to include Evolution and Prioritization.

None of these were "the idea didn't work." They were the difference between a tool and a demo.

What the compiler actually produced

Run end-to-end, locally, on the 35B model, against the 300-document ORKG corpus:

  • 881 claims extracted across 300 contributions
  • 2 contradictions detected (genuine scope disagreements)
  • 6 gaps and 7 silence topics — the things the corpus implies but does not state
  • 13 ranked questions, 4 flagged controversial
  • Pass 4 state: 7 accepted / 4 uncertain / 3 contested models, 3 logged conflicts, 12 open questions
  • The closing loop ran one iteration: it targeted the open question "What is the definitive operational scope of Crowd-based Requirements Engineering?", generated an evidence brief, added it as a new source, and Scientific Git committed version 2 with a real diff.

The output is not a summary someone wrote. It is a structured, diffable, revertible model of a research field — produced by compiling that field's own curated knowledge graph.

Two live artifacts, one tool

We deployed the validation run as a new, independent Vercel project so the original Question Compiler explorer stays live:

Both run the same compiler. The difference is the corpus — and that difference is the entire point. The tool behaves the same way on 300 documents drawn from a global knowledge graph as it did on three we wrote by hand. That is what "generalizes" means.

Why this matters

The thesis has been steady the whole way: if the loop is the product, observability becomes the operating system. A loop that only runs on toy input isn't an operating system — it's a screenshot. Pointing the compiler at 6.3 million real triples and watching it produce a coherent, versioned state of a 728-paper field is the first evidence that the loop can run on the world's actual scientific record, not just on our examples.

The next horizon is unattended iteration: letting the loop run on a schedule, reading its own open questions, pulling more of the graph, re-compiling the field one verified step further each pass — every advance diffable and revertible. That is observability as the OS, applied to science itself.

The code, the ingestion pipeline, and the scale-hardening fixes are all pushed to the repository. The validation run is live. The compiler is no longer a demo.

Related research

Jul 23, 2026

The Next Experiment: From 'Survives Scale' to 'Correct' — Grounding, Negative Controls, and Quantitative Domains

Today we proved the Scientific Question & State Compiler survives scale — 6.3M ORKG RDF triples distilled into a 300-document corpus, 881 claims, 13 ranked questions, a versioned state of the field, all compiled locally on a 35B model. But surviving scale is not the same as being correct. This post records what we built, what we learned, the four bugs that only appeared at scale (including one that shipped Alzheimer's data into the live ORKG demo), and a fully-specified next experiment: source-level traceability, a grounding audit with a groundedness rate, a negative control, a fixed versioning layer, an explicit distillation method, an external-validity check against survey papers, and a move to quantitative domains (COVID-19 observatory or materials science) where contradictions are measured, not just defined.

Jul 26, 2026

Does the Compiler Know When It's Wrong? Semantic Rediscovery and the Limits of Falsification-Awareness

Popper-ORKG ended with two honest failures: temporal rediscovery was near-zero, and the compiler confidently rebuilt Lamarckian inheritance. v4 exists to ask whether those are fixable weaknesses or fundamental limits — by adding measurement, not by tuning the scorer. The answer turned out to be one of each. Mechanism-level semantic matching shows rediscovery was a measurement artifact all along (0.63 vs 0.005 exact-match, flat across temporal gaps). But a falsification-awareness consensus check could not downgrade Lamarckism or caloric: the ORKG index contains no detectable refutation edges, so the near-miss is a genuine limit of the knowledge substrate. Everything in popper/ and orkg/ stayed byte-for-byte frozen, md5-verified. Run locally on a 35B model.

Jul 25, 2026

Does the Hypothesis Compiler Generalize? Running Popper on a Corpus I Did Not Build

Popper beat its controls on five hand-curated benchmark literatures — but I built those corpora, so the result could be an artifact of clean data. This experiment removes that objection: the identical pipeline, byte-for-byte, run on a corpus I did not build — the Open Research Knowledge Graph, 6.3 million triples across 65,689 papers and seven scientific disciplines. Same schema, same rubric, same four-way controls; the only independent variable is the corpus. The compiler still wins (0.85 composite vs 0.56 keyword vs 0.00 ungrounded), an ablation proves the architecture is load-bearing (remove graph reasoning and it collapses to zero), and the grounding audit finds zero hallucinated citations across 265 evidence items. It also fails honestly: exact temporal rediscovery is near-zero, and it confidently rebuilds Lamarckian inheritance. Run locally on a 35B model.

Jul 24, 2026

Popper: Making the Hypothesis Compiler Falsifiable — Rediscovery Benchmarks, Negative Controls, and the Move From Plausible to Provable

The last experiment proved a knowledge-graph compiler survives scale. This one asks a harder question: are its hypotheses scientifically meaningful, or only linguistically convincing? Popper stops trying to make the compiler smarter and starts making it falsifiable — a strict hypothesis schema, source-level provenance, three negative controls, and a historical rediscovery benchmark where the discovery paper is removed and the system must reconstruct the leap from prior literature alone. Run locally on a 35B model: the compiler scored 0.89–0.97 composite against 0.00 for ungrounded generation, and reconstructed the CTLA-4 checkpoint-blockade and nucleoside-modified-mRNA discoveries from their prior literature — while honestly failing on CRISPR and refusing to confidently rebuild phlogiston.

Jul 23, 2026

Building the Scientific Question Compiler: A Map of What We Do Not Know

We built the second compiler in the Scientific State program: the Scientific Question Compiler, which turns a corpus into a map of what humanity does not yet know. Local-first, running on a 35B model on our own hardware. Here is what we built, what broke, and what it means.

Jul 23, 2026

The Loop Closes Itself: A Compiler That Directs Its Own Next Compile

We closed the loop on the Scientific State Compiler: the open questions from the compiled state are turned into new evidence sources, the field is re-compiled, and Scientific Git records a real version diff. The compiler begins to direct its own next compile — the loop, not the model, becomes the product.

More from the archive