MPI-IS Tübingen · AI Center · October 2026

Rationalizing a Society of Learners

Toward a Calculus of Grounded Computational Organisation

Christian Weilbach

Section 0 · Motivation (5 min)

A bet from autumn 2025

0 · Motivation

  • Coding agents would soon build what a small team could not: simulators, compilers, provers.
  • Then the scarce part is no longer writing the code. It is deciding what to build, checking it, and changing it while it runs.
  • So I worked on a programming model for people and agents together, not on one application.
  • Language models write a small experiment in seconds, so the pace is set by the round trip: write, run, look. Time is the scarce resource.

Fourteen months later: about ten open-source libraries, from a forkable runtime to a proof checker, and a simulated Stuttgart of 936,597 people.

Time per tested hypothesis

\(\displaystyle \text{progress per hour} \;\approx\; \frac{\mathbb{E}[\,\text{value of the experiment}\,]}{t_{\text{write}} + t_{\text{build}} + t_{\text{setup}} + t_{\text{run}} + t_{\text{check}}}\)

term usually costs time because… here
write programs are long small programs as data; agents write Lisp well
build compile, link, restart the running REPL; Raster and Ansatz work inside it
setup the state an experiment needs is rebuilt fork a running world
run each device has its own toolchain Raster lowers one algebra to each device
check review and tests sit outside the system tests in forks, a proof kernel in the process, receipts
value experiments are chosen by hand inference chooses what to compute or measure next

A city that can be forked

The Stuttgart explorer with the Milaneo's floor space moved to Zuffenhausen

  • 936,597 simulated people, nine parameters inferred from the city's published retail turnover
  • closing a shopping centre, or moving it, is a fork of the city
  • the two worlds share almost all of their state and computation

If the Milaneo closed, about half of the 93 M€ a year that residents spend there would move to other shops in Mitte.

Inspired by Axtell's agent-based models of firms (Science 2001; AAMAS 2016), which we reimplemented in Raster.

Three questions

  1. Which programming model lets people and agents build, run and change large systems together?
  2. How does simulation become part of that model, so that a question is inference over forkable worlds?
  3. If such a system improves itself, what grounds it?

Background · learners at every scale · a persistent memory model · layered compilation as learning · building simulations with agents · where it leads

What we built, at a glance

organisationSimmis · Kontorworkspace, branches, review; double-entry accounts agentsDvergrrooms, attempts in forks, receipts, review models, inferenceFoerster · Stuttgart simulatorinference and steering over forkable worlds compilers, proofsRaster · Wandler · Ansatznumerics to devices; checked rewrites; Lean 4 kernel executionSpindel · partial-cps · forkable SCIreactive execution; continuations as values memoryDatahike · Konserve · Yggdrasil · Geschichtepersistent values, history, branches across stores

About ten open-source libraries in fourteen months, most of it written with coding agents at a REPL against the running system (timeline in the backup).

Section 1 · Background (4 min)

Where I come from: a program's structure shapes its inference

1 · Background

Program, graphical model, faithful inverse, structured continuous normalizing flow

Weilbach, Beronov, Harvey & Wood, AISTATS 2020. With the faithfully inverted structure the flow needs 7,725 weights instead of 18,679, and learns faster than the dense flow.

Graphically structured diffusion models

Graphical model, attention mask, diffusion process (GSDM, ICML 2023)

Weilbach, Harvey & Wood, ICML 2023. Valid Sudokus 98 % of the time unconditionally and 96 % with 16 of 81 cells given; matrix factorisation trained up to size 10 generalises to size 200; attention costs O(nm) instead of O(n²).

Programs that write programs

Lisp: code is data, and the evaluator is a short program in the language itself (McCarthy 1960; Abelson & Sussman 1985). Three lines of work built on that:

miniKanren synthesises append from four examples by running a relational interpreter backwards

Run an interpreter backwards: Byrd, Ballantyne, Rosenblatt & Might, ICFP 2017 (CC BY 4.0).

Grow a library of abstractions: Ellis et al., DreamCoder, PLDI 2021 (figure in the talk: Fig. 2 of arXiv:2006.08381).

A language model inside a probabilistic program, conditioned on a constraint

A language model as the proposal in a probabilistic program: Lew et al. 2023 (CC BY 4.0); Loula et al., ICLR 2025.

What we take: programs are values that a running system proposes, tests and keeps; the proposer can be a person, a search, or a language model.

Section 2 · Learners at every scale (6 min)

Learners at every scale pool their resources and form levels

2 · Learners at every scale

Levin's cognitive light cones: tick, dog, human, possible AI; cells nested in an organism nested in a colony

Levin, Front. Psychol. 2019, Fig. 2 (art: Jeremy Guay), CC BY 4.0.

  • cells, organisms, firms and societies pool budgets and share evidence at a boundary
  • forking and spending need the group's admission
  • what crosses the boundary is a summary
  • leaving has a cost

Maynard Smith & Szathmáry 1995; Buss 1987; West, Fisher, Gardner & Kiers 2015; Agüera y Arcas, What Is Intelligence?, 2025.

Learners are physical processes that pay to predict

  • a process on an energy gradient persists by keeping information that predicts its world
  • computing those predictions costs energy, time or money
  • it cannot model its own physics in full, but it can measure and predict what its computation costs, and plan its own approximations
  • and it keeps accounts, as any organisation does

Gershman, Horvitz & Tenenbaum, Computational rationality, Science 2015 (figure in the talk: Fig. 2).

Still, Sivak, Bell & Crooks 2012; Kolchinsky & Wolpert 2018; von Neumann 1966; Russell & Wefald 1991; Lieder & Griffiths 2020.

Computation is inference, too

Bayesian quadrature: posterior over the integrand and the solver's own error estimate as evaluations grow

A pipeline of numerical steps from data to action, along which computational error should be propagated

Carry each step's error along the pipeline, and spend computation where it matters.

Data never exist on their own: a record means something relative to a context and the process that acquired it. Probabilistic numerics models that process; our stack records it.

Hennig, Osborne & Girolami, Proc. R. Soc. A 2015, Figs. 1 and 4 (CC BY 4.0); Hennig, Osborne & Kersting 2022.

To predict affordably, a learner builds levels

implements, predicts ↓ organisation · institutions agents models compiler · kernels device worldphysics,people,a city ε ε ε ε groundmeasure evidence, credit ↑ moves, on every level forktry an alternative evidence groundread or measure the world joinmerge, count evidence once translatechange level, record ε description rewritechange a rule after a check rules one persistent memory under every level: each move is a new root, every read is recorded

Horsman, Stepney, Wagner & Kendon 2014: a physical system computes when its evolution and an abstract one agree through a representation.

To improve, it has to change its levels while it runs

implements, predicts ↓ organisation · institutions agents models compiler · kernels device worldphysics,people,a city ε ε ε ε groundmeasure evidence, credit ↑ moves, on every level forktry an alternative evidence groundread or measure the world joinmerge, count evidence once translatechange level, record ε description rewritechange a rule after a check rules one persistent memory under every level: each move is a new root, every read is recorded

Allocate is not a sixth move: it is the policy that chooses among them under one budget. Purposes are constraints on it, not prices.

Section 3 · A persistent memory model (6 min)

What we built: one memory under every level

3 · A persistent memory model

each level forks on its own datasnapshot files, codegit processcheckpoint model cacherecompute four mechanisms, four costs, no common record of what each branch read or changed one persistent memory under every level data files, code execution model cache values with structural sharing (copy-on-write) world data′ shared execution′ shared fork: one new root, stores only what changed every read and write is recorded, so branches join soundly every level can change while running, behind a checker

Persistent data structures: Driscoll, Sarnak, Sleator & Tarjan 1989; Okasaki 1998.

How a fork stays cheap: persistent data structures

version 1 r a b 7 3 5 2 version 2:one value changed r′ b′ 9 shared shared fork: a new root constant time update: one path about log n nodes reads: unchanged old version valid history, comparison, merge come with it cost: old versions need garbage collection Clojure's maps and vectors, Datahike's indices and git all work this way

Driscoll, Sarnak, Sleator & Tarjan 1989; Okasaki 1998.

One memory, many structures

Yggdrasilone fork / merge protocol across all of them, and git, ZFS Replikativ · Kabelreplication DatahikeDatalog Stratumcolumnar SQL Proximumvector index Scriptumfull text Geschichtegit PersistentSortedSet B+-tree, structural sharing, lazy nodes, range statistics Lucenesegments,shared git objectsin Datahike Konserveone key-value interface: files, S3, JDBC, LMDB … a fork of any of them is a new root; unchanged nodes are shared

All open source under github.com/replikativ; overview at datahike.io.

Forking the future

the run so far, shared savepoint: the restof the run is a value future Ae.g. one particle future Banother particle resume it twice
runtime the rest of a run is… cost
most interpreters and VMs not a value, or resumable once (generators, async) to try another future, start again
Anglican (Tolpin et al. 2016) a value: the whole program in CPS every call pays for the transform
partial-cps a value: CPS only where the run can suspend other code stays ordinary Clojure
Spindel a value, together with the reactive state fork in O(1), then commit or discard

With the future as a value, expectations over what happens next become computable: continue many particles from the same state and weight them, \(\mathbb{E}[f] \approx \sum_i w_i\, f(x_i)\); SMC forks the likely ones.

Inference over forkable worlds

defn model []:
  spin:
    mu := sample(dist/normal(0.0, 1.0), :id, :mu)
    observe(dist/normal(mu, 1.0), 1.0, :id, :y)
    mu
  end
end

def world: sp/create-execution-context()
def posterior: sp/with-context world:
  @infer/smc-infer(model(), 1000)
end
(defn model []
  (spin
   (let [mu (sample (dist/normal 0.0 1.0) :id :mu)]
     (observe (dist/normal mu 1.0) 1.0 :id :y)
     mu)))

(def world (sp/create-execution-context))
(def posterior
  (sp/with-context world
    @(infer/smc-infer (model) 1000)))
  • Foerster: every sample and observe site is a savepoint of a forkable world; particles branch from it, resampling prunes and copies, Markov chains walk the tree of worlds
  • the same machinery steers a process step by step, a simulator or a language model's turns, by SMC with a value estimate
  • and keeps the steered trajectories as training data, so what inference found can be amortised

SMC, particle MCMC, HMC, involutive MCMC, BBVI, interventions and counterfactuals, simulation-based calibration. Open source: github.com/replikativ/foerster. Steering language models with SMC: Lew et al. 2023.

Section 4 · Layered compilation as bounded-rational learning (4 min)

Compiling is planning with an uncertain machine

4 · Layered compilation as bounded-rational learning

semantic program P schedule: tile · layout kernels device run commit (decide) value: exact or ε cost: only a prior above Θ_hw catalogue probe microbench timing cheap, coarse dear, fine plan with posterior measurements update the hardware model, as likelihoods

measure \(c\) when \(\;\mathbb{E}\big[\,U(\text{plan after } c) - U(\text{plan now})\,\big] > \operatorname{cost}(c)\)

Value of computation: Russell & Wefald 1991. Raster on CPU: a LeNet-5 training step runs 1.7–2.4× faster than JAX.

Compiler, JIT, learning system: one loop

one loop: propose a cheaper representation → measure → adopt who rewriteswhen, against whatwhat licenses it AOT compilerbuild time, a cost model exact JITrun time, measured profiles exact guarded learning systemexperience: models, prompts guarded approximate exact:a proof that it computes the same→ Wandler guarded:a runtime check, a fallback if it fails→ Wandler's JIT approximate:checked against a dearer reference→ next slide each licence ends in a checker the system cannot change

Speculation with guards and deoptimisation: Hölzle, Chambers & Ungar 1992. In our stack the passes are values in the running system.

A cheap model is safe when something checks it

proposal coarse, cheap fine check result: exact ε → cost: rejections, re-measurement, deopt delayed-acceptance MCMC · JIT guard · autotuning measures survivors · proof gate substitute coarse, cheap result + ε ε stays in the claim

\(\displaystyle \mathbb{E}[P_L] = \mathbb{E}[P_0] + \sum_{l=1}^{L} \mathbb{E}[P_l - P_{l-1}]\) multilevel Monte Carlo: adjacent levels share their random numbers, so corrections are cheap

Christen & Fox 2005 (delayed acceptance); Giles 2008 (multilevel Monte Carlo); Hennig, Osborne & Kersting 2022 (probabilistic numerics).

Algebra plus measurement: rewrites a running system can trust

CompCert: Leroy, CACM 2009. Translation validation: Pnueli, Siegel & Singerman 1998; Necula 2000. Reflection behind a gate: Amin, LICS 2026.

  • laws proven once in Ansatz, on Lean 4's kernel: fusion, join elimination for any semiring, the incremental (DBSP) laws
  • measured selectivities choose among certified plans, re-planned while the system runs
  • a trust ledger: L0 proven law · L1 trusted lowering · L2 trusted measurement, which steers a cost and is never taken for a proof
  • like CompCert, but the point is speed: the proof licenses the fast plan (join elimination 4–22× faster, same certified answer)
a/defn only-known [xs :- List(Nat) ys :- List(Nat)] List(Nat):
  filter(x -> member(x, ys), xs)
end

w/explain('only-known)
;; {:verified? true,
;;  :rewrites ["List.elem_filter_eq_index_probe"]}
;; a hash semi-join instead of a nested scan
;; 1461 ms → 3.9 ms per call at 10k × 10k
(a/defn only-known [xs :- (List Nat), ys :- (List Nat)] (List Nat)
  (filter (fn [x] (member x ys)) xs))

(w/explain 'only-known)
;; {:verified? true,
;;  :rewrites ["List.elem_filter_eq_index_probe"]}
;; a hash semi-join instead of a nested scan
;; 1461 ms → 3.9 ms per call at 10k × 10k

Section 5 · Building simulations with agents (9 min)

Live: fork a running interpreter

5 · Building simulations with agents

The forkable SCI runtime from simm.is, running in the browser. Serve the deck over http for this slide (python3 -m http.server in deck/).

Dvergr: a programming model for rooms of agents

Rooms of participants (people, models, scripts) on a bus. Five primitives: tagged messages (the tag is the speech act) · subscriptions by tag · ask, with the reply as a value · fork a room, then merge or discard · a handle that swaps who decides.

escalation by capability coder :escalation/budget policy :directive/raise-budget subscribed by tag: neither names the other a probe in a fork room fork: ask "what wouldthe coder write?" read the reply discard: the real room never saw it simulate-reply = fork, ask, discard recursive workrooms room hire! workroomforked substrateanalyst, reviewer result, unused budget owned: cancelled, settled with the parent any decider agent loopmemory,budget model A model B a person a script race: first answer wins a handle swaps who decides; the loop stays

Discourse as reactive rational speech acts: Frank & Goodman 2012; Cohn-Gordon, Goodman & Potts 2019.

Agents are values; hiring is the effect

def analyst: {:id :analyst, :skills #{:research},
              :model-policy {:provider :anthropic, :model "sonnet"},
              :program {:kind :llm, :max-model-steps 32, :budget-dollars 0.5}}

def team: agent/roster({:id :investigation}) .> agent/make-agent(analyst)
def team-2: agent/revise-agent(team,
              :analyst, {:prompt "Challenge the strongest contrary case"})

spin:
  a := agent/hire!(team, :analyst, {:task claim, :settlement :review})
  b := agent/hire!(team-2, :analyst, {:task claim, :settlement :review})
  {:v1 :run/value(await(agent/result-spin(a))),
   :v2 :run/value(await(agent/result-spin(b)))}
end
(def analyst {:id :analyst :skills #{:research}
              :model-policy {:provider :anthropic :model "sonnet"}
              :program {:kind :llm :max-model-steps 32 :budget-dollars 0.5}})

(def team   (-> (agent/roster {:id :investigation})
                (agent/make-agent analyst)))
(def team-2 (agent/revise-agent team :analyst
              {:prompt "Challenge the strongest contrary case"}))

(spin                          ; a reactive computation
 (let [a (agent/hire! team   :analyst {:task claim :settlement :review})
       b (agent/hire! team-2 :analyst {:task claim :settlement :review})]
   ;; each Run works in its own fork of the room's world;
   ;; :review keeps both forks for a person to compare
   {:v1 (:run/value (await (agent/result-spin a)))
    :v2 (:run/value (await (agent/result-spin b)))}))

Two versions of a team run side by side, each in its own fork of the world. Runs compose like any other reactive value (await, race), and :review keeps both forks for a person to compare.

Dvergr: agents work in forks, and every read is recorded

a room files Datahike database its history budget, Kontor books allowed tools shell: Muschel people and agents attempts, each in its own fork attempt 1 · model A read · fetch · search attempt 2 · model A read · fetch · search attempt 3 · model B read · fetch · search copy-on-write: a fork is a new root every effect leaves a receipt review proposal per attempt: diff and receipts shared reads between attempts are shown a reviewer mergesor discards

When branches meet, shared evidence has to be counted once

branch 1 read branch 2 read Θ E₁ S E₂ shared records, read from what each branch fetched

\(\displaystyle p(\theta \mid e_1, e_2, s) \;\propto\; \frac{p(\theta \mid e_1, s)\;p(\theta \mid e_2, s)}{p(\theta \mid s)}\) exact iff \(E_1 \perp E_2 \mid \Theta, S\); naive error \(= I(E_1;E_2 \mid \Theta, S)\)

Grime & Durrant-Whyte 1994 (channel filter); Tresp 2000 (Bayesian committee machine); Goudie et al. 2019 (Markov melding); Green, Karvounarakis & Tannen 2007 (provenance semirings).

Measured: agents read the same pages

Task: find Simmis's competitors, each with a quote from a page the attempt fetched. On a frozen copy of the web, 51 pages saved from earlier runs, so every attempt sees the same web. Dvergr records every search and fetch.

taskade.com agentteams.live coworker.ai dust.tt openagents.org matrix-os.com platform.teamai.com symio.app asana.com context.ai lydo.chat onplana.com rhinoagents.com clickup.com cloud.google.com context-link.ai Haiku 1 Haiku 2 Haiku 3 Luna 1 Luna 2 Luna 3 each dot: the attempt fetched a page from that site overlap of two attempts pages both read ÷ pages either read same pagesame site Haiku, Haiku0.54–0.640.67–0.83 Luna, Luna0.09–0.250.20–0.33 Haiku, Luna0.06–0.360.15–0.50 coarser identity, more shared evidence: same page is a lower bound

Three attempts per model, Claude Haiku 5.5 and GPT-5.6 Luna, 9 October 2026. Searches are left out of the overlap, since attempts almost never repeat a query word for word.

Simmis: people and agents on shared, versioned state

Simmis: proposal review with semantic summary, code diff and knowledge diff

working now
rooms of people and agents
versioned, queryable company memory
branches across data, files, code and execution
proposal review: diff, conflicts, merge, discard
scheduled agent workflows
tool allowlists and spending limits per room
your own model keys

In progress: permissions for acting users, one interface for branches. Research: the organisation simulating itself on branched state (simm.is/roadmap).

Section 6 · Where it leads (6 min)

A benchmark is a regression test for a workflow

6 · Where it leads

BIRD, 100 questions, SQL SpreadsheetBench, 59 tasks 406080100 406080100 $0.001$0.01$0.1 $0.001$0.01$0.1$1 cost per correct answer (log scale) cost per passing task (log scale) % correct Luna 5.6HaikuDeepSeekGLMLuna 6Sol 6.1Astra 6 Luna 5.6Sol 5.6OpusHaikuSonnetLuna 6Sol 6.1Astra 6 GPT-5.6 GPT-6 Claude 5.5 open weights (Fireworks)

simm.is/blog/measuring-agent-workflows, measured 1–10 October 2026: BIRD, 100 questions in SQL; SpreadsheetBench, 59 tasks.

Improving a workflow, one measured step at a time

write a variant a sentence, a look at the data, a model measure on tuning cases each attempt in its own fork confirm on unseen cases so a tuned quirk does not pass the owner promotes it recorded where no agent can write deploy its history becomes new cases

One step, by hand, on BIRD: two sentences added to the description of Datalog.

workflow correct (of 100) input tokens
SQL on SQLite 59 8,880
Datalog, revised 63 14,042
Datalog, previous 58 16,684

Five more with less input, but p = 0.23: promising, to be confirmed before it is adopted.

working now a person or an agent proposes, Dvergr measures

building next the agent runs the whole loop

Merge when the cases show it is not worse: the rule a team applies to a code change.

Grounding is relative, and every chain has to end somewhere

evidence an agent's proposal a cheap model a finer simulator a measurement the world ε ε ε ε rules a rewrite of a rule tests, simulation a fixed proof kernel small enough to read purposes a subsystem's goal the organisation's a channel, e.g. Polis the people affected a loop that is checked only by its own simulator drifts: each chain has to end outside the loop

Computing tells a learner about its model, not about the world: Hennig, Osborne & Kersting 2022. Loops that feed on their own output: Shumailov et al., Nature 2024; Manheim & Garrabrant 2018.

How such projects fail

Brasília's Eixo Monumental seen from the TV tower: wide roads and lawns, the ministries and the Congress at the end of the axis

Brasília, the Eixo Monumental (photo: Roberto Castro / MTur, public domain).

"Certain forms of knowledge and control require a narrowing of vision."

James C. Scott, Seeing Like a State, 1998, opening line

  • a coarse view of a society replaced a checked one
  • the local knowledge it dropped (metis) was what made things work
  • the people affected were never asked for evidence

Each failure breaks a rule of this talk: a coarse model proposes and something checks; the error stays with the claim; those affected are the evidence about their own lives.

His own remedies: take small steps, favour reversibility, plan on surprises, plan on human inventiveness. Measured steps, forks, uncertainty, and people as evidence.

Leaving the cave does not mean seeing the real

Plato's cave: prisoners watch shadows on a wall while a few have turned towards the light at the entrance

Jan Saenredam after Cornelis van Haarlem, Antrum Platonicum, 1604 (Rijksmuseum, CC0).

  • the fear: a society that lives inside its own simulations, watching shadows
  • no learner sees the world directly; it infers it through what crosses its boundary
  • what keeps a simulation honest is the channel back, not an escape: predictions checked against measurements, purposes against the people affected
  • this holds for learners in any substrate, so we can coevolve with our agents

The real is never known directly, but it answers back.

Plato, Republic VII; Helmholtz 1867; Friston, J. R. Soc. Interface 2013 (Markov blankets); von Foerster 2003.

Purposes stay with the people they affect

"There is one quality more important than know-how … This is 'know-what': by which we determine not only how to accomplish our purposes, but what our purposes are to be."

Wiener, The Human Use of Human Beings, 1950, p. 210

A society of learners has to ground its purposes in the people they affect, who are the only source of evidence about their own lives.

Polis: a vote matrix, PCA, clustering into opinion groups, and the statements each group and all groups support

Such channels exist. Polis lets thousands of people write and vote on short statements, maps the opinion groups, and finds the statements agreed on across them; Taiwan's vTaiwan process uses it. I worked on modernising its PCA and clustering pipeline (2025). In preparation: "Polis as an inverse problem: a generative model of opinion elicitation". The same channel can debate forks of a city, like the Stuttgart scenarios from the start.

Small, Bjorkegren, Erkkilä, Shaw & Megill, Recerca 2021, Fig. 1 (CC BY-SA 4.0).

A society that rehearses its decisions

fork the cityalternatives, playable debatePolis-like channels decidewith the record field testa small, reversible step measureback into the model the Stuttgart modeland its posterior today: consultations, expert reports, pilots; ad hoc and fragmented

Wooden toy train tracks crossing over a bridge

We all learned this way: as children we rehearse the world in play. A society can rehearse its decisions.

Gopnik & Wellman 2012; Ullman, Spelke, Battaglia & Tenenbaum 2017. Photo: Thane Keller, CC0.

More humane, too: mistakes are made in forks before they are made in people's lives, and the people affected take part instead of being planned for.

The same rules bind every learner, including ones smarter than us: computing alone does not ground them, their evidence counts once, their budgets are conserved, their purposes come from those affected. We program the checks, records and budgets, and coexist inside them.

Agüera y Arcas, What Is Intelligence?, MIT Press 2025: life and intelligence as prediction, computation at the heart of the living.

Thank you

simm.is · github.com/replikativ · christian@weilbach.name

Calculus draft, diagrams and sources on request.

Backup

Python, Julia and this stack

Backup

  Python ecosystem Julia this stack (Clojure)
optimisation passes live in C++/CUDA libraries, each with its own build Julia IR passes; LLVM (C++) below Clojure data in the running image
iterate on a kernel or schedule rebuild and relink a library in Julia, down to LLVM at the REPL, same process
inspect the middle across opaque binaries Julia IR yes; LLVM via dumps every pass
database, proofs, runtime separate systems separate systems Datahike, Ansatz, Spindel in one host
fork a running world process level process level persistent values

Raster in more detail

deftm norm [x :- Double y :- Double] :- Double:
  sqrt(x * x + y * y)
end

par/map(f, xs)
par/reduce(+, 0, xs)
;; → primitive JVM bytecode, no boxing
;; fusion across function boundaries
;; → SIMD, OpenCL, Vulkan, Level Zero; CUDA in progress; HIP, FPGA planned
(deftm norm [x :- Double, y :- Double] :- Double
  (sqrt (+ (* x x) (* y y))))

(par/map f xs)
(par/reduce + 0 xs)
;; → primitive JVM bytecode, no boxing
;; fusion across function boundaries
;; → SIMD, OpenCL, Vulkan, Level Zero; CUDA in progress; HIP, FPGA planned
  • forward and reverse-mode AD in the same library
  • hardware descriptor with provenance: catalogue, probe, microbenchmark
  • fidelity is a schedule axis; every transformation carries an error model
  • LeNet-5 training step 1.7–2.4× faster than JAX on CPU; MLP within 1.5–1.6×; a Julia comparison is pending a side-by-side rerun

What the picture asks of the medium

The learner has to… So the medium provides…
try alternatives that share most of their state persistent values: a fork stores only what changed
count each piece of evidence once when branches meet immutable history, with every record's identity kept
describe itself in small languages with laws algebras as libraries, cheap to propose, test and replace
change those languages while running, and test the change code as data, staging, and a REPL in the running system
change its rules only through a check a proof kernel inside the host
know what its computation costs costs measured and recorded with the results

The structure lives in small algebras, and the host makes them cheap to try

  1. propose a small algebra with laws
  2. test it against the world: at the REPL, in benchmarks, with users
  3. compile what survives into the substrate, and keep revisiting it
algebra its laws give library
replicated data types convergence without coordination Replikativ
Datalog with time queries over any past state Datahike
parallel array operations fusion and lowering to devices Raster
calculus of inductive constructions checked proofs Ansatz

Trust ends at one checker; speed can go in circles

Raster pass its certificate fixed kernel (CIC)+ tracked axioms certified by checked by checker, compiled Raster compiles the checker checker runs faster Lean 4 kernel must agree with a cross-check is a join: worth only what is independent

A lattice of views, and a tower as one path

all records (finest) V₁ V₂ V₃ one summary (coarsest) V₁ ∧ V₂V₂ ∧ V₃ joining V₁, V₂ over V₁ ∧ V₂ is exact iff V₁ ⊥ V₂ | V₁ ∧ V₂ defect = I(V₁;V₂ | V₁∧V₂) tower: one gated path (refine step by step)

Which idealisations does this relax?

Idealisation Relaxed by Added here
the machine is exact probabilistic numerics; probabilistic rounding analysis the device as the lowest translation, error measured
computation is free metareasoning; resource-rational analysis; Ortega & Braun costs as measured entries in one ledger; viability
representation fixed from outside AutoML; Gödel machine; Genewein et al. (hierarchy from cost) representation as a value, changes priced and checked

The ledger and viability

\[ R_{t+1} = R_t + \Pi(o_t, w_t) - \kappa(o_t) - \mu(O_t), \qquad \text{viable while } R_t \in \mathcal V \]

Capture, minus the cost of acting and deciding, minus upkeep. Under ruin, maximising expected reserves is the wrong objective (Kelly; Peters 2019). Viability and purposes enter as constraints and are never traded for budget.

Four experiments

  Experiment Tests
1 the same system in Python, Clojure and a persistent IR, changed by agents the cost-of-change claim
2 observation and computation under one budget, at several fidelities allocation against SBI, BED, multi-fidelity methods
3 model-class revision from the Stuttgart mismatch, with recorded warrants "isn't this AutoML?"
4 verified adaptive execution: when to re-measure and re-plan grounding combined with rewriting

Does the calculus close on itself?

"Das Ganze ist das Unwahre." (The whole is the false.)

Adorno, Minima Moralia, 1951

No. It cannot ground itself, every translation keeps its error explicit, and agreement among similar learners is worth less than agreement among diverse ones. Applied to itself, it stays open: the calculus agrees with Adorno's warning against a closed system, by its own rules.

Isn't this AutoML?

AutoML optimises a pipeline against a given evaluation. Here the evaluation's warrant, the measurement and the organisation doing the search are part of the problem. Experiment 3 is the test.

Recursive self-improvement?

Yes, when each loop is checked against a reference it cannot change: a finer simulator, a measurement, a proof kernel. Computing alone tells a learner about its model, not about the world, so a loop that is checked only by itself drifts. Changing what the system is for needs authority recorded from the people it affects.

Scaling GSDM by training on subgraphs

CNN as graphical model and its attention mask

Our stack, level by level

Level What forks, and how Library
storage key–value stores and persistent B-trees, shared across forks Konserve, persistent-sorted-set
data Datalog database with queryable history Datahike
data, files, code one composite branch across several stores Yggdrasil
execution running programs and interpreters as forkable values Spindel, forkable SCI
inference probabilistic programs: SMC and MCMC over forked worlds Foerster
model cache a language model's KV cache with identity and copy-on-write pretrained-rstr
compilers, proofs passes as data; rewrites checked by a Lean-compatible kernel Raster, Wandler, Ansatz
agents, teams runs, receipts, budgets; review of proposals Dvergr, Simmis

Copying a world, and running a program you hold as data

copying data Δ AAA Pavlovic: a data service fork = copy a world cheap when memory is persistent: only the changes are new running a program held as data { } PAB Pavlovic: the program evaluator change your own levels = run a program you hold a function in a Lisp (eval, macros, staging)

Pavlovic, Programs as Diagrams (2023): a monoidal computer has data services, which copy and delete, and a program evaluator, so that programs are data.

The stack, layer by layer

what it providesours · where it comes from workspace documents, data and tasks, withsimulations and agents in the same space SimmisNotion or Roam, plus a simulator agents an LLM is a generative model; aturn is a sample site, steered by SMC Foerster · DvergrAnglican; Lew et al. 2023; RSA execution reactive (FRP), in step with modeltime; a change reruns what depends on it SpindelElliott & Hudak 1997; Acar 2005 control fork the future: the rest of arunning computation is a value partial-cpsAnglican's CPS, where needed numerics,proofs compiled and checked in the runningREPL, without a separate build Raster · AnsatzJVM, GPUs; Lean 4's kernel memory persistent values: isolation, forks,speculative execution, history Datahike · Yggdrasil · GeschichteGeschichte 2013 → Datahike one process, one REPL, one memory: every layer can be forked and changed while it runs

How the stack grew

organisation agents inference proofs compilers execution memory Aug 2025 Jan 2026 Jun 2026 Oct 2026 Geschichte (2013) → Replikativ → Datahike, Konserve (2018) Yggdrasil Geschichte partial-cps Spindel: forkable values and reactive execution, ongoing forkable SCI Raster Wandler Ansatz Foerster Dvergr Simmis: experiments, then the product each step madethe next one cheap dots: first public release; development began earlier for several

Coding agents wrote much of this, working at a REPL against the running system. Their mistakes show up there immediately, and the proof kernel catches the ones that matter most.

Changing the description can break a join

(J₁, J₂ ; J₀) in L J in L join (q*J₁, q*J₂ ; q*J₀) in L′ J′ in L′ join translate t translate t =? ledger sum and differencealways count each record onceiff it keeps which reports are equal beliefiff A₁ ⊥ A₂ | g(Θ), T merge distinct records: under-count, safe split one record: over-count, double counting

Learners that pool their resources form a level

  • they pool budgets and share evidence once, at the boundary
  • forking and spending need the group's admission
  • what crosses the boundary is an attested summary
  • leaving has a cost

Pooled reserves and pooled evidence are both worth only their independent part:

\(\displaystyle n_{\text{eff}} = \frac{n}{1 + (n-1)\,\bar r}\)

Laws, a programming model, a society

society of people and agents organisation · institutions agents models compiler · kernels device world physics, people, a city translate, ε ε ε ε fork join ground measure rewrite its rules through a gate
Layer Status
the laws proven
programming model partly built
the society open

If more of the work moves to agents, these laws still bind them. Programming such a society means writing its checks, records and budgets.

Stuttgart again: the model and the survey measure different things

  • the model predicts a mean shopping trip of 3.2 km (90 %: 2.2–4.1)
  • the national mobility survey reports about 1.65 km
  • given the survey as an observation, the model only moves to 2.8 km
  • the survey counts every shopping leg, including returns and trips chained from work; the model predicts where money is spent, and stops at 10 km

Before calling the model wrong, translate: compute the survey's quantity from the model, and let the survey enter as evidence in that shared description.

Dyer et al., NeurIPS 2024: interventionally consistent surrogates for agent-based models.

Fallback: the fork, as screenshots

The branch has counter 2; the original still has counter 0

Top: the branch after two increments. Bottom: the original, unchanged.

How a measurement runs

benchmark cases one row per case + recorded outcome certify ungradable cases excluded, with reasons experiment room every candidate on every case report intervals, failures, cost and time fork A × case 1 fork B × case 1 fork A × case 2 … checker verdict, or fault to run again

Certified cases enter an experiment room; each attempt runs in its own fork and is graded there; only the verdict is kept (simm.is/blog/measuring-agent-workflows).

Next: optimising whole systems

My prediction for the coming year: programming becomes inference and amortisation under a budget, and optimisation moves from network weights to whole systems.

What Status
many subsystems improve in parallel, each in its own fork, merged after review partly built
agents and simulators steered by SMC; the trajectories become training data built
training, inference and scientific computing planned together (Raster) research
an organisation's workflows as one probabilistic program to infer and plan over research

That is recursive self-improvement, spread over many small loops. Each loop has to be checked against something it cannot change.

Why divide by p(θ | s)?

Step 1. Bayes on all the evidence, with \(p(\theta \mid s)\) as the prior: \(\;p(\theta \mid e_1, e_2, s) \propto p(e_1, e_2 \mid \theta, s)\; p(\theta \mid s)\)

Step 2. Independence, used only here: \(\;p(e_1, e_2 \mid \theta, s) = p(e_1 \mid \theta, s)\; p(e_2 \mid \theta, s)\)

Step 3. A branch reports its posterior, not its likelihood; Bayes for one branch, rearranged: \(\;p(e_i \mid \theta, s) \propto \dfrac{p(\theta \mid e_i, s)}{p(\theta \mid s)}\)

Step 4. Substitute:

\(\displaystyle p(\theta \mid e_1, e_2, s) \;\propto\; \frac{p(\theta \mid e_1, s)}{p(\theta \mid s)} \cdot \frac{p(\theta \mid e_2, s)}{p(\theta \mid s)} \cdot p(\theta \mid s) \;=\; \frac{p(\theta \mid e_1, s)\; p(\theta \mid e_2, s)}{p(\theta \mid s)}\)

Independence decides whether the product is right; without it the error is the factor \(p(e_1, e_2 \mid \theta, s) / \big(p(e_1 \mid \theta, s)\, p(e_2 \mid \theta, s)\big)\), on average \(I(E_1;E_2 \mid \Theta, S)\). The division turns each posterior back into a likelihood, so the shared part counts once.

\(s\) must be the records both actually read, from the receipts: a shared page missing from \(s\) is still counted twice; a private page wrongly put into \(s\) is divided out and lost.

What a layered toolchain costs a learner

precompiled slices Python framework API (PyTorch, JAX) C++ core (ATen, XLA) kernels (cuDNN, Triton, CUDA) LLVM / PTX build boundary own build, release opaque from above leave the language one compiler, passes as values semantic program IR parallel IR (SOAC) schedule IR kernel graph target: JVM SIMD · OpenCL Vulkan · Level ZeroCUDA: WiP · HIP, FPGA: planned inspect, fork, rewrite passes passes certifiable (Ansatz)

Julia and Lean are extensible too. Whether one live host lowers the cost of change for people and agents is a hypothesis, and experiment 1 tests it.

References

  • Act 1. Weilbach, Beronov, Harvey & Wood, AISTATS 2020; Weilbach, Harvey & Wood, ICML 2023; Weilbach & Wood, Daphne, TMLR 2025. Still, Sivak, Bell & Crooks, PRL 2012; Kolchinsky & Wolpert, Interface Focus 2018; von Neumann, Theory of Self-Reproducing Automata, 1966; Horsman, Stepney, Wagner & Kendon, Proc. R. Soc. A 2014.
  • Sections 1–4. Hickey, "The Value of Values", 2012; Leroy, CACM 2009; Hölzle, Chambers & Ungar, PLDI 1992; Gershman, Horvitz & Tenenbaum, Science 2015; Levin, Front. Psychol. 2019; West, Fisher, Gardner & Kiers, PNAS 2015; Byrd, Ballantyne, Rosenblatt & Might, ICFP 2017; Ellis et al., PLDI 2021; Lake, Salakhutdinov & Tenenbaum, Science 2015; McCarthy, CACM 1960; Hennig, Osborne & Girolami, Proc. R. Soc. A 2015. Elliott & Hudak, ICFP 1997; Acar, PhD thesis, CMU 2005; Tolpin, van de Meent, Yang & Wood, IFL 2016; Loula et al., ICLR 2025; Clark & Brennan 1991; Frank & Goodman, Science 2012; Cohn-Gordon, Goodman & Potts, SCiL 2019; Weilbach, Kühne & Bieniusa, arXiv:1508.05545; Pavlovic, Programs as Diagrams, 2023; Driscoll, Sarnak, Sleator & Tarjan, JCSS 1989; Okasaki, Purely Functional Data Structures, 1998; Russell & Wefald, Artificial Intelligence 1991; Christen & Fox, JCGS 2005; Giles, Operations Research 2008; Hennig, Osborne & Kersting, Probabilistic Numerics, 2022; Amin, LICS 2026; Pnueli, Siegel & Singerman, TACAS 1998; Necula, PLDI 2000; Wheeler, ACSAC 2005; Lew, Zhi-Xuan, Grand & Mansinghka, arXiv:2306.03081.
  • Act 3. Grime & Durrant-Whyte, Control Eng. Practice 1994; Tresp, Neural Computation 2000; Goudie, Presanis, Lunn, De Angelis & Wernisch, Bayesian Analysis 2019; Green, Karvounarakis & Tannen, PODS 2007; Rischel & Weichwald, UAI 2021; Friston et al., arXiv:2407.20292; Zaghw, …, Friston & Da Costa, arXiv:2608.09512; Dyer et al., NeurIPS 2024; Kish, Survey Sampling, 1965; Maynard Smith & Szathmáry, The Major Transitions in Evolution, 1995; Scott, Seeing Like a State, 1998; Perdomo, Zrnic, Mendler-Dünner & Hardt, ICML 2020.
  • Section 6. Gopnik & Wellman, Psychological Bulletin 138 (2012); Battaglia, Hamrick & Tenenbaum, PNAS 2013; Ullman, Spelke, Battaglia & Tenenbaum, Trends Cogn. Sci. 2017; Agüera y Arcas, What Is Intelligence?, MIT Press 2025; Plato, Republic VII; Helmholtz, Handbuch der physiologischen Optik, 1867; Friston, "Life as we know it", J. R. Soc. Interface 2013; von Foerster, Understanding Understanding, 2003; Scott, Seeing Like a State, Yale University Press 1998; Adorno, Minima Moralia, 1951; Small, Bjorkegren, Erkkilä, Shaw & Megill, Recerca 2021; Hennig, Osborne & Kersting, Probabilistic Numerics, 2022; Shumailov et al., Nature 2024; Manheim & Garrabrant, arXiv:1803.04585; Wiener, The Human Use of Human Beings, 1950.
  • Backup. Ortega & Braun, Proc. R. Soc. A 2013; Genewein, Leibfried, Grau-Moya & Braun, Front. Robot. AI 2015; Wenger et al., NeurIPS 2022; Orseau & Ring, AGI 2012; Demski & Garrabrant, arXiv:1902.09469; Peters, Nature Physics 2019.