SIMAT v0.6
BRICS-AGAC 2026.11
AI FOR SCIENCE · COSMOLOGICAL SIMULATIONS

SIMAT

Human-AI Collaboration-Driven Cosmology Research: From One Sentence to Validated
Cosmological Simulations
Six-stage pipeline · 16 skills · 3 non-standard models · 1–2 orders of magnitude faster
Jiajun Zhang · Huanyuan Shan · Ting Tan
Shanghai Astronomical Observatory, CAS · CEA, IRFU, Université Paris-Saclay
→ Start / O Overview / F Fullscreen
01 · Paradigm

AI and science are moving from “tools” to “symbiosis”

SIMAT starts from AI in Science and grows toward AI and Science.

01
STAGE 01

AI for Science

Tools, used one at a time

AI is a guest at the door: it edits a snippet, finds a paper, and serves science passively.

Role: Tool
02
SIMAT now
STAGE 02

AI in Science

Efficiency, amplified

AI is a resident participant: it runs analysis, coding, compilation, execution and physical validation end to end.

Role: Process participant · humans judge at checkpoints
03
STAGE 03

AI and Science

Systems, co-built

AI and research co-evolve: experience, cases and criteria keep accumulating, so each task makes the next one easier.

Role: Co-evolution · stronger with use
The question is not what AI can generate, but what experts know — and how that knowledge is externalized and reused.
SIMAT · BRICS-AGAC 2026.11Paradigm · 01
02 · One pipeline

One sentence, six stages

The input is one sentence in natural language; the output is a clean-compiled, physically validated Gadget4 variant.

“Implement warm dark matter in Gadget4.”
1
Auto-analysis
Literature → spec
simat-analyze
2
Workspace
Isolated environment
simat-workspace
3
AI coding
Edit, then compile
simat-code
4
Code review
Static + semantic
simat-review
5
Simulation validation
Real runs + criteria
simat-verify
5.5
Diagnostic gate
Reason about the drift
simat-master
6
Distill experience
Skill library grows
simat-summarize
Humans judge only at checkpoints; AI analyzes, codes, compiles, runs and validates.
6
Stage pipeline
analyze → verify → summarize
16
Reusable skills
5-layer structure
3
Non-standard models
WDM · SIDM · Bianchi I
10²
Efficiency gain
Weeks–months → hours–a day
SIMAT · BRICS-AGAC 2026.11Pipeline · 02
03 · Bottleneck

The bottleneck is not physics — it is engineering

📄

Physics is already written

Models usually come with a complete mathematical description: equations, parameters, algorithms, earlier implementations.

Solved

What is missing is not the idea, but the people who turn it into correct code.

for(int i=0; i<N; i++){ double dx = pos[i] - ... if(dx > box/2) ... } /* gravity, drift, kick, I/O */ ...
🧱

Engineering is the bottleneck

Getting it right inside a 100,000+ line optimized C++ codebase — across the gravity solver, the time integrator, particle updates and I/O.

100,000+lines of C++
GADGET-4 / two decades of production use
Some models have been discussed for decades but never implemented in any N-body code. Engineering decides whether a model can be confronted with data.
SIMAT · BRICS-AGAC 2026.11Bottleneck · 03
04 · Efficiency

From “months” to “hours”

The same job under four working modes, measured in real hours; bar length is linear in manual effort.

Manual+ AI assistant+ Stage 1 specFull SIMAT

WDM warm dark matter

Manual
~1 month
+ AI
~2 weeks
+ Stage 1
~1 week
SIMAT
2 hours

SIDM self-interacting

Manual
~6 months
+ AI
~2 months
+ Stage 1
~2 weeks
SIMAT
1 day

Bianchi I anisotropic

Manual
~1 year
+ AI
~3 months
+ Stage 1
~2 weeks
SIMAT
1 day
The decisive change is in the last column: the full pipeline compresses manual effort by 1–2 orders of magnitude.
Relative to manual effort · linear scale
SIMAT · BRICS-AGAC 2026.11Efficiency · 04
05 · System

Six stages, one closed loop

Every stage leaves an artifact; every failure has a way back.

01
Auto-analysis
Literature → spec / tasks / test list
02
Workspace setup
Isolated environment · rollback-ready state
03
AI coding
Edit source → compile → auto-fix (≤5 rounds)
04
Code review
Static + semantic · blocker / major / minor
05
Run and validate
Clean rebuild · real run · physical criteria
5.5
Diagnostic gate
Wrong result? Hypothesize → test → patch and rerun
06
Distill experience
Skill library + case archive, reused next time
SIMAT six-stage pipeline Click to zoom
Figure 1 · six stages + diagnostic gate + user checkpoints
SIMAT · BRICS-AGAC 2026.11System · 05
06 · Diagnostic gate

When results are wrong, it reasons

It does not just raise an error; it works backwards from the deviation like an investigator.

01
Describe the discrepancy
Parameters, failing criteria, size of the deviation
02
Rank hypotheses
Experience library + debug patterns; each hypothesis gets a discriminating test
03
Extract the test data
Only the slice that separates the hypotheses
04
Patch → rerun
Once confirmed, change the code and return to Stage 5
≤3rounds
DiscrepancyWhat happened
HypothesesWhich fits best
TestLet the data decide
PatchFix and rerun
Check the pipeline before the physics
When results disagree, inspect the initial-condition power spectrum first.
Every decision is traceable
Diagnostic notes, code changes and raw data are all written to disk.
SIMAT · BRICS-AGAC 2026.11Diagnostics · 06
07 · Capability

16 skills, five layers

Hand-written specs × automatic accumulation: seed skills are injected by experts, grown skills emerge from real tasks.

1Orchestration
simat-masterGlobal routing · checkpoints · built-in gate
6Process
analyzeworkspacecodereviewverifysummarize
3Seed
gadget4-buildgadget4-paramsgadget4-test
5Grown
debug · 27code · 19review · 23verify · 38experience · 10 cases
1Interaction
simat-recallPost-task interview that surfaces tacit knowledge
16
skills · 5 layers
Seeds are written by experts; growth is grown from tasks.
SIMAT · BRICS-AGAC 2026.11Capability · 07
08 · Cases

Three models, three real deployments

Each case ran the full pipeline from one natural-language prompt; every deliverable passed physical validation.

WDM power spectrum
CASE 01

Warm dark matter (WDM)

Transfer-function cutoff plus thermal velocities, settled by IC-level validation.

IC deviation <0.4%11–12% difference at z=3
5.5hours · full pipeline
View →
SIDM stacked density profiles
CASE 02

Self-interacting dark matter (SIDM)

Monte Carlo scattering; the SIDM signature is reproduced.

σ/m = 1 cm² g⁻¹~10% central deficit
45.1hours · 256³ rerun
View →
Bianchi I nine-panel figure
CASE 03

Bianchi I anisotropy

A decades-old theory, implemented in an N-body code for the first time.

Hx : Hy : Hz = 1.03032.1M particles
24hours · first implementation
View →
SIMAT · BRICS-AGAC 2026.11Cases · 08
09 · Case 01

WDM: writing the free-streaming cutoff into the ICs

WDM matter power spectrum Click to zoom
Figure 2 · WDM matter power spectrum: the cutoff matches the literature
0.5
keV thermal relic
Bode+2001 T²(k)
<0.4%
IC-level deviation
Cross-checked by two independent paths
11–12%
Resolvable difference at z=3
Above the 10% criterion
5.5h
Full pipeline, one pass
No rollback
Large scales survive, small scales are erased — the visual signature of a correct free-streaming implementation.
SIMAT · BRICS-AGAC 2026.11WDM · 09
10 · Case 01 · Continued

Resolution convergence: not a numerical artifact

0.970.980.991.00 Literature 1.0001 0.974964³ 0.9902128³ 0.9962256³ z = 0, WDM/CDM ratio in the [2,4] band
1.0167
Absolute-spectrum drift 23%
the ratio drifts only 1.7%
15×
The ratio is more sensitive
~15× lower than the absolute spectrum
<0.1%
128³ vs 256³
Transfer function is resolution-independent
0.5%
[8,16] band vs literature
Only 256³ reaches it
The vanishing difference at 64³ is not physics — it is a lack of resolution.
SIMAT · BRICS-AGAC 2026.11WDM · 10
11 · Case 02

SIDM: making dark matter scatter

SIDM vs CDM stacked density profiles Click to zoom
Figure 3 · top: stacked 2D density; bottom: 1D radial profiles
1
cm² g⁻¹ · σ/m
Configurable default
256³
16,777,216 particles
20 jobs · rerun
~10%
Central deficit
0.903 ± 0.026 ≈ 3.8σ
45.1h
SIDM pipeline runtime
256³ rerun
The SIDM signature is reproduced; one 256³ rerun takes 45.1 hours of pipeline time.
SIMAT · BRICS-AGAC 2026.11SIDM · 11
12 · Case 02 · Rerun

Two decisive pipeline findings

256³ rerun45.1 hours16,777,216 particles
Finding A

Same seed ≠ same ICs

37.5%identical particle positions

Same binary, same parameters, four consecutive 256³ IC generations.

max velocity difference 1587 km/s · after the fix r(k) +1.0000 → +1.0006 · halo match 87.1%
4 runs, same binary and parameters: 37.5% identical positions
Finding B

Fixed smoothing length

3.1–18.9×core scattering rate underestimated

12,779 reports contain only 2,156 scattering pairs in total; physics expects 10⁵–10⁶.

ρ_est barely varies with radius · fixed h ⇒ dense regions are over-smoothed
3.1×
6.2×
18.9×
11.5×
Density underestimate factor in halo cores
Null result ≠ validation

The 32³ first pass reported “0 scattering pairs” as if it were the expectation; the P0 defect only surfaced after a 256³ run of 45 hours. It is now frozen as criteria #033 / #037.

SIMAT · BRICS-AGAC 2026.11SIDM · 12
13 · An honest lesson

Failure, systematically converted into capability

““Null result”
is not validation.
32³0 scattering pairsonce written as the expectation
→
256³45 hoursthe P0 defect appears
Criterion #033: every null result must be compared quantitatively with the analytic expectation.
Criterion #037: measured and analytic rates are printed on the same line.
SIMAT · BRICS-AGAC 2026.11An honest lesson · 13
14 · Case 03

Bianchi I: into an N-body code for the first time

Bianchi I nine-panel figure Click to zoom
Figure 4 · left: isotropic; middle: Bianchi I; right: expansion / power spectrum / velocity PDF
0 → 1
Decades-old theory · first N-body
No answer in the training data
1.0303
Hx : Hy : Hz
Direction-dependent expansion rate
2.1M
particles · evolved to z ≈ 20
A = 0.05
24h
First implementation completed
Expert estimate: 2 months
Lower power along x, smaller velocity dispersion — the anisotropy is genuinely simulated.
SIMAT · BRICS-AGAC 2026.11Bianchi I · 14
15 · Case 03 · Physical consistency

Direction dependence: three panels, one story

The anisotropy of Bianchi I is not a slogan: it leaves the same directional imprint on the expansion history, the power spectrum and the velocity distribution.

Expansion history
g · Expansion history: x, y and z expand at different rates — this is how Bianchi I enters a numerical simulation.
Direction-dependent power spectrum
h · Matter power spectrum: x sits clearly below y and z — x expands faster, so structure growth is suppressed.
Velocity PDF
i · Velocity PDF: the x distribution is narrower — x expands faster, so the dispersion is smaller.
1.0303
Hx : Hy : Hz
Direction-dependent expansion rate
P_x < P_yz
Lower power along x
Faster expansion ⇒ suppressed growth
σ_x < σ_yz
Narrower velocities along x
Faster expansion ⇒ smaller dispersion
From expansion rate to power spectrum to velocity distribution, the directional imprints are mutually consistent; both the qualitative trends and the quantitative magnitudes match the physics of Bianchi I well enough to convince a human expert.
SIMAT · BRICS-AGAC 2026.11Bianchi I · 15
16 · Growth

Every finished case makes the next one easier

Stronger with useEXPERTISE FLYWHEEL
TaskA real science question
DistillSuccess and failure
Skill libraryPatterns / criteria / cases
Next taskInherited directly
Skill library entriesAt paper time → v0.6
debug-patterns
1327
code-patterns
1419
review-patterns
2023
verify-criteria
2138
What makes the speed-up possible is not a stronger language model, but the distillation and reuse of expert reasoning.
10 case filesGlobal experience indexDiagnostic decision tree
SIMAT · BRICS-AGAC 2026.11Growth · 16
17 · Engineering

Two layers, four ways to use it

Analysis belongs to the Python multi-agent layer, actions to Skills; one /simat-master orchestrates both.

🐍

Python multi-agent pipeline

Analytical work: literature search, code analysis, spec and report generation.

🧩

Skills · plain-text instruction sets

Direct actions: editing, compiling, running simulations, distilling experience; the instructions are themselves executable specs.

01 Qoder CLI skill mode
02 DeepSeek Harness plugin
03 Plain CLI · Stage 1 only
04 Web UI · Stage-1 assistant
No GPU requiredFull pipeline on LinuxMIT open source16 skills auto-registered
Qoder CLI screenshot
Qoder CLI · the six-stage pipeline running in a terminalClick to zoom
One /simat-master command, two deployment modes; humans always keep control of the checkpoints.
SIMAT · BRICS-AGAC 2026.11Implementation · 17
18 · Boundaries

Three limitations we must admit

It is powerful, but not omnipotent; clear boundaries show where to go next.

🧬

It inherits the strengths and weaknesses of the base model

It cannot invent an algorithm the literature has not yet pinned down; it can only implement what has already been described clearly.

It is a powerful accelerator, not a substitute for theory.
⚖️

It depends on the quality of the validation criteria

With incomplete criteria, the gate may accept wrong results or reject correct ones. Maintenance by domain experts remains essential.

The pipeline findings exposed by the SIDM rerun are a direct consequence of missing criteria.
🔌

Code analysis must be retrained per codebase

The architecture is code-agnostic; moving SIMAT to Arepo, Enzo or RAMSES only requires retraining the code analysis.

Everything else transfers directly.
As more researchers contribute their expertise to the skill library, the barrier to non-standard cosmology keeps falling.
SIMAT · BRICS-AGAC 2026.11Boundaries · 18
19 · Conclusion

Turning “months”
into “hours”

Cosmology moves from “testing a few”
to “exploring all of them”.
5.5h
WDM
1 day
SIDM
1 day
Bianchi I
⚙️ Engineering bottleneck sets the pace of model–data confrontation
🔁 Validation loop six stages + a diagnostic gate that reasons
📈 Stronger with use the skill library grows as it is used
🧑‍🔬 Expert reasoning distilled, reused, shareable
SIMAT · BRICS-AGAC 2026.11Conclusion · 19
20 · Open source

Open source — use it with us

MIT / GPLv3 · questions, reuse, modifications and derivative work are all welcome.

OPEN SOURCE REPOSITORY
gitee.com/shao-eor/simat

docs · demo · 10 cases · 16 skills · GADGET-4 reference source

MIT · SIMAT original partsGPLv3 · GADGET-4v0.6 · 2026-10-06
Jiajun Zhang WeChat QR code
Scan to connect on WeChatQuestions, reuse, modifications and derivative work are welcome.
Jiajun ZhangSHAO, CAS
Shanghai Astronomical Observatory, CASSystem design · core architecture · case studies · paperjjzhang@shao.ac.cn
Huanyuan ShanSHAO, CAS
Shanghai Astronomical Observatory, CASKey help and insight on system design · paperhyshan@shao.ac.cn
Ting TanCEA, IRFU
CEA, IRFU, Université Paris-SaclayKey help and insight on system design · paperting.tan@cea.fr
SIMAT · BRICS-AGAC 2026.11Open source · 20
SIMAT · BRICS-AGAC 2026.11

Thank you

It starts with one sentence.
Jiajun Zhang · Huanyuan Shan · Ting Tan  |  gitee.com/shao-eor/simat
SIMAT · internal learning exchangeThank you · 21
01 / 22

Overview

Click any slide to jump · Esc to close · O to toggle
×

Controls and printing

This is a 16:9 deck; it scales to fit any screen and prints landscape at 13.33 × 7.5 inches.

← / →Previous / next slide
Space / PgDnNext slide
Home / EndFirst / last slide
OOpen / close the overview
PAutoplay / pause (one slide every 9 s)
FPresent fullscreen
?Open this help
EscClose overlays / exit zoom