NL · EN
  documentation / the Maze Transformer

the Maze Transformer

open the Transformer → maze.swarp.nl/transformer

Reads power laws (y ∝ xᵉ) from the LaTeX of arXiv papers, puts them on one map and chains them into paths: relations that follow from two or three papers together. Look at the map, follow the paths, or have your own paper examined.

documentation in four layers · maze.swarp.nl/transformer · Leiden, 26 Oct 2026 · test version

This is not a flat manual but documentation in four layers, for four readers: who uses it, who wants to understand the idea, who builds it, and who wants to go further. Each layer carries a label saying how long it keeps.

lastingSurvives a rebuild — the idea, the model, the choices.
moves with the codeDescribes how it is built now — routes, sources, thresholds. This can go stale.

Layer 1 — for the user1What you do with it moves with the code

/transformerThe maptab "Kaart en paden" · panel kaart

  • Each dot is a quantity (stellar mass, gas density, frequency …) from one of 150 arXiv papers on galaxies (astro-ph.GA, February 2025). Each arrow is a law from the formulas of such a paper: y ∝ xᵉ, its thickness following the size of the exponent. Gold dots occur in two or more papers: that is where papers touch.
  • Search a name in the search field, or click a dot. "Alles" resets the map. Dots can be dragged.
  • At the top, three blocks say what is tested and what is not: the names (45 of 50 correct for a blind judge), the reading (fixed test fragments green) and the paths (not tested: no paper on the map measures two connected quantities directly).

/transformerA quantitypanel grootheid

  • After a click: the name, in how many papers it occurs, each law with its exponent (± uncertainty when the paper gives one), the LaTeX itself and the link to the paper on arXiv. Below that, the pairs from the gap list that run through this quantity. Every name is clickable again: that is how you follow a path from dot to dot.
  • In the MAZE (28 Oct): at the bottom you see where the quantity lives in the MAZE. In the old MAZE that is the Wikipedia article with the same name (or where Wikipedia redirects, as long as every word of the name is kept); a click opens that resident at its address. In the new MAZE it is the node with that same title. Without a link, the reason is shown (ambiguous, other concept, not in the net). Every law hangs under lus_helling in the new MAZE, every path under lus_overal. Behind every paper is ⌂: the paper itself as a resident of the old MAZE. Tested blind: 36 of 40 links right, 4 too broad, 0 wrong (plan koppeling-maze-2).

/transformerThe gap listpanel gatenlijst

  • Pairs of quantities that are tied together through two or three papers but are nowhere measured together directly. Per pair: the number of routes, the predicted exponent of the shortest route, the intermediate steps and the papers that route runs through. Each pair is a prediction someone could measure.
  • Read it critically: generic quantities such as "radius" or "density" connect topics that have nothing to do with each other. Many routes does not mean: a strong relation.

/transformer/levenswetenschappenMap of the life sciencessame page, second map

  • The same kind of map as the galaxy map, built from 495 arXiv papers in biology, biophysics and biochemistry (q-bio and physics.bio-ph, March–November 2025). Switch maps at the top.
  • There is no "Have it examined" tab here: a submitted paper is compared with the galaxy map.
  • Tested: names 42 of 50 correct (blind); laws 52 of 60 correct on a fresh blind sample (87%), after an AI filter that kept 202 of the 924 laws read; without the filter it was 25 of 60. The paths are untested: at first 172 paths seemed directly measured, but a blind check found 0 of 60 real (parameter values with units, figure labels, definitions). After the reading was repaired, no paper measures two connected quantities directly.

/transformer/geneeskundeMap of medicineown page · panel geneeskunde

  • A second map, from layer B: effect sizes (odds ratio, hazard ratio, relative risk) from 1,303 PubMed abstracts on Parkinson's disease. Each dot is a factor or outcome (smoking, constipation, dementia, mortality); a line is a measured effect, red = raises, green = lowers, grey = no difference.
  • Click a dot: every effect with the pooled estimate and 95% interval, the number of papers, the direction per measurement and links to PubMed. On the right, the tested paths A → M → B with their status and whether the direct measurement comes from a different paper ("independent").
  • Tested: the binding (which factor and outcome belong to a number) 54 of 60 correct according to a blind reviewer; the paths 36 of 41 confirmed (p = 0.0015), strict — independent measurements only, computed afterwards — 24 of 26 (p = 0.002). An arrow is association, not cause; not medical advice.

/transformer#onderzoekHave it examinedtab "Laat onderzoeken" · panel onderzoek

  • Type an arXiv ID (for instance 2502.01024, or paste the link) and press "Onderzoek". The server fetches the LaTeX from arXiv, reads the laws with the same rules as the map, lets a language model name symbols that have no name, and recomputes the paths with this paper added. That usually takes 5 to 60 seconds.
  • You get: the laws found (with their LaTeX), which quantities the paper shares with the map (click to see them on the map), "same relation elsewhere" when the map already connects the same two quantities, and the paths the paper touches. When a path says bevestigd (confirmed), onbeslist (undecided) or tegengesproken (contradicted), a paper measures that relation directly: that is a real test. "Gat" (gap) means: predicted only.
  • Limits: only papers with a LaTeX source (not pdf-only); at most 5 new papers per visitor per day; the language model gets at most 40 questions per paper and 300 per day for everyone together — above that the Transformer keeps reading without the model and unnamed symbols stay out of the paths. A paper examined before comes from the stored result and costs nothing.
  • A paper outside astronomy is allowed, but will then nearly always touch the map through generic words; the page says so.

Layer 2 — for the thinker2The idea & the rules lasting

A power law y ∝ xᵉ is a small, hard claim: double x and y changes by a factor 2ᵉ. Papers write them down in their formulas, each about its own subject. When two papers share a quantity, their laws can be chained: if one says b ∝ aᵉ¹ and the other c ∝ bᵉ², then c ∝ aᵉ¹ᵉ² follows — a relation neither paper states. That is a path. When a third paper measures c against a directly, the path can be tested: confirmed, undecided or contradicted.

The rule that keeps it honest: reading and chaining follow fixed rules, not a language model (L1–L12 for reading, K1–K8 for the paths). The language model does one thing: give a symbol the text itself does not name its common name (L10). That part was tested blind (45 of 50 correct). What cannot be tested is called untested: the paths of this map are predictions, and among the 150 papers there is not yet a single direct measurement to test one against.

"Have it examined" is therefore mainly a way to find that test: a paper that measures two quantities from the gap list directly turns a prediction into a result.

Layer 3 — for the builder3How it works — code, limits & API moves with the code

A context under the-maze like the generator: maze/transformer/route.mjs (page, API, limits), pagina.html, and the Transformer itself in Python: v1.1/lees.py (L1–L12), kern.py (K1–K8), net.py (haal_tex, bouw), namen.py (L10, gpt-4o, temperature 0, cache).

Python from Node. Per examination the server starts a child process: python3 -I transformer/openbaar/onderzoek.py <id> --cache <dir> --max-vragen <n>, which returns one JSON object. At most one runs at a time (queue of 3), with a hard limit of 150 seconds and 25 MB of source. Chosen over a separate Python service: no second Render service (≥ $7/month), no internal URL, and the Transformer stays one implementation. Render's Node runtime has python3; the only non-standard module, snowballstemmer, ships as a small copy in openbaar/_vendor (BSD-3).

The map as data. openbaar/export_net.py builds the February net once, locally, from the 150 LaTeX sources (10 GB cache, not on Render) and writes openbaar/kaart-net.json: the passages, the readable names, the gap list. The export tests itself: kern.paden on the export gives exactly the same paths as the net. It reads with L1–L12 (v1.2c) and gives 3,006 paths; the older map v1.1/kaart-data.json (L1–L11, 2,877 paths) stays unchanged. So the map and a submitted paper sit on one rule set.

Rules of the examination (top of onderzoek.py): O1 fetch with a ceiling; O2 the name budget, new names go to namen-bezoek.json in the cache (not to namen-cache.json, which belongs to the measurements); O3 a paper already on the map does not count its own map laws; O4 "same relation elsewhere" with the K4 rule.

GET /transformerthe page (map and paths; #onderzoek opens the second tab)
GET /api/transformerthe limits, today's use, the counts of the map and what is tested
GET /api/transformer/kaart[?veld=leven]the map (with ?veld=leven the life-sciences map): quantities, laws (with arXiv ID and LaTeX), gap list (top 60 with exponent and route), counts, test status
GET /api/transformer/koppeling?kaart=per quantity its resident in the old MAZE (title, address, via) and its nodes in the new MAZE, or the reason why not; per paper its resident (kaart = sterrenstelsels | levenswetenschappen | geneeskunde)
GET /api/transformer/geneeskundethe map of medicine: places, edges (pooled estimate, interval, PMIDs, direction per measurement, curve), tested paths with independence, test status
POST /api/transformer/onderzoek{ arxiv } — read one paper and lay it against the map; stored per ID. GET with ?arxiv= returns a stored result (404 if there is none)

Costs. The language model is the only thing that costs money per visitor: one name question is about 650 tokens, around $0.002; a paper asks 5 to 6 on average (≈ 1 cent). The daily limit of 300 questions keeps the worst case below ~$0.60 per day (~$18 per month); in normal use it is cents. arXiv is free; the computing fits in the existing starter instance.

Known limits. The daily counter and the stored results live in the temporary folder: after a restart or deploy they start again. arXiv throttles under many requests; the service asks once per paper and reports when arXiv refuses. The L10 question calls the paper an "astrophysics paper"; for other fields the names are less reliable.

Layer 4 — for the connector4Links, sources & further moves with the code