Causyx: deterministic, rewindable what-if simulation with language-model agents

Insurers increasingly want to test a decision, such as a price change, a catastrophe response or a customer campaign, in simulation before making it. For that to be useful in a regulated business, a simulation must give the same answer every time it is asked, must let an analyst go back to any point and change one thing, and must keep any language-model component from silently changing the result. This paper describes Causyx, a Rust engine of 26,326 lines (20,451 excluding blank lines and comments) in 11 crates, built around those three requirements: seeded per-agent randomness and ordered resolution of parallel decisions; a timeline of snapshots with rewind, fork-with-intervention and replay; and a bounded advisory layer in which a language model may only suggest actions, every suggestion passes a validator, and responses are cached by hash so a run can be replayed exactly. The engine's 400 automated tests all pass (0 failures), including same-seed runs of up to 5,000 steps and single- versus multi-thread comparisons. To measure the design end to end we built a small browser version that follows the engine's main design rules. Across 1,000 seeds, all 61,000 weekly states were rebuilt bit for bit, all 60,000 no-change branches matched the main timeline, the same digest of every state was produced in Node and in a Chromium browser, and sharing random numbers between a branch and the main line reduced the spread of measured what-if effects by 1.44 to 2.30 times. Back-testing against real insurance history is future work. Files: the paper (PDF, licensed CC BY 4.0) and causyx_paper_supplement.zip, which holds the experiment and measurement scripts, their saved outputs and the exact browser engine used (code licensed GNU AGPL-3.0). Live demo: https://vivekmitra.com/causyx.html

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-11-22
DOI
https://doi.org/10.5281/zenodo.24432675
Primary Topic
Simulation Techniques and Applications
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Causyx: deterministic, rewindable what-if simulation with language-model agents

Vivek Mitra
Zenodo (CERN European Organization for Nuclear Research)
Simulation Techniques and Applications
preprint

Causyx: deterministic, rewindable what-if simulation with language-model agents

Vivek Mitra
preprint en

Abstract

Insurers increasingly want to test a decision, such as a price change, a catastrophe response or a customer campaign, in simulation before making it. For that to be useful in a regulated business, a simulation must give the same answer every time it is asked, must let an analyst go back to any point and change one thing, and must keep any language-model component from silently changing the result. This paper describes Causyx, a Rust engine of 26,326 lines (20,451 excluding blank lines and comments) in 11 crates, built around those three requirements: seeded per-agent randomness and ordered resolution of parallel decisions; a timeline of snapshots with rewind, fork-with-intervention and replay; and a bounded advisory layer in which a language model may only suggest actions, every suggestion passes a validator, and responses are cached by hash so a run can be replayed exactly. The engine's 400 automated tests all pass (0 failures), including same-seed runs of up to 5,000 steps and single- versus multi-thread comparisons. To measure the design end to end we built a small browser version that follows the engine's main design rules. Across 1,000 seeds, all 61,000 weekly states were rebuilt bit for bit, all 60,000 no-change branches matched the main timeline, the same digest of every state was produced in Node and in a Chromium browser, and sharing random numbers between a branch and the main line reduced the spread of measured what-if effects by 1.44 to 2.30 times. Back-testing against real insurance history is future work. Files: the paper (PDF, licensed CC BY 4.0) and causyx_paper_supplement.zip, which holds the experiment and measurement scripts, their saved outputs and the exact browser engine used (code licensed GNU AGPL-3.0). Live demo: https://vivekmitra.com/causyx.html

Zenodo (CERN European Organization for Nuclear Research)
Simulation Techniques and Applications
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon