cartae.app

Technical note · Twinz · v1.2

An individual, deterministic neural architecture at 128 bytes per inhabitant for large-scale urban simulation

Author: François (Twinz project, cartae.app)
Date: 25 November 2026 (Europe/Paris)
Platform: Twinz (twinzcities.com), first twin Paris (paris.twinzcities.com)
Version and data: v1.2 (5-seed consolidation + test on 75 real IRIS areas) · EMP 2019 (SDES, Licence Ouverte 2.0)

Companion article: an illustrated presentation with two interactive animations accompanies this note in 128 bytes to give a brain to 12 million inhabitants.

Abstract

Metropolitan-scale multi-agent urban simulations (more than ten million inhabitants) face a trade-off between decision realism and computational constraints. Linear models fail to represent non-linear contextual interactions, while large language models (LLMs) and multi-step reinforcement learning (RL) exceed latency and memory budgets on CPUs without GPUs. We propose a deterministic hybrid neural architecture in INT8/INT32 integers for the Twinz digital twin platform (first twin: Parix, 12,255,926 inhabitants of Île-de-France). It combines a shared 8,068-byte TasteNet-ResLogit trunk, calibrated offline on 31,820 real trips from the 2019 French national mobility survey (EMP 2019), with 128 contiguous bytes per inhabitant that combine a personal modulation (FiLM) and a bounded associative memory with controlled forgetting (Gated DeltaNet 8 × 8), updated in one step from real feedback and social stories.

On the frozen Île-de-France test set from EMP 2019 (1,003 trips), the INT8 trunk reduces negative log-likelihood (NLL) by -5.44% and gains +2.49 points of Top-1 accuracy over a strong linear multinomial Logit model with 400 parameters, for a measured latency of 410.4 ns per decision and bit-for-bit parity between ARM64 and x86-64. After diagnosing the failure of a direct replacement (campaign P3), a bounded residual hybrid coupling (P4), tested on a real 1.5 km sector in central Paris (44,853 inhabitants, 28 days), reduces mean distance by -7.73% and improves convenience by +12.76%. During a local shock on day 14 at 99 places (campaign P5), hybrid coupling combined with word of mouth between household members and colleagues brings week-4 avoidance to -10.25 points, against -7.17 points for the algorithmic control and -7.18 points without social stories (+43.0% measured amplitude), without contaminating an untouched control sector (-0.02 points) and for +0.94% CPU. Main limitation: the P5 social test still relies on a single seed on an extracted sector and on a synthetic shock; an independent replication over 5 seeds is under way and will be included in revision v1.1.

Keywords: urban multi-agent simulation, neural discrete choice models, fast associative memory, deterministic INT8 quantisation, social diffusion.

1. Introduction

Multi-agent urban simulations seek to reproduce the emergence of collective phenomena (congestion, retail footfall, readjustment after a transport failure, diffusion of local habits) from the individual decisions of inhabitants who only have their local perception. Two constraints hold back their scaling to a large metropolis: the fidelity of daily choices against observed data, and the memory and CPU cost of continuously simulating more than ten million individuals without resorting to background extras.

This work is part of Twinz (twinzcities.com), a platform of city digital twins that can be visited in 3D in a browser, designed without any municipality-specific code. Its first territory is Parix (paris.twinzcities.com), which simulates the 12,255,926 inhabitants of the 1,266 municipalities of Île-de-France on a single territorial package built from open public data (Insee, OpenStreetMap, IGN, Île-de-France Mobilités). The core engine, written in Rust with state stored in fixed-size columns and a deterministic discrete-event calendar, simulates 24 h of Île-de-France in a measured 370.25 s on 8 CPU cores without a graphics card (calculated average speed: ×233.36, measured peak RAM: 28.32 GiB, 0 accounting errors across five economic balances).

Earlier exploratory trials in early November 2026 had shown the failure of a naive neural approach: a multilayer perceptron (MLP) trained online by stochastic gradient descent (SGD) on a few visits produced unbounded weight drift (up to 39.7, measured), catastrophic forgetting of other places, and an error higher than the constant mean (0.264 against 0.226 over 4,767 feedback events) when the input variables were poor or noised by hashed identifiers. This finding motivated a complete redesign based on the 2018 to 2025 literature, organised around four explicit research questions:

The contributions presented in this note cover: (1) the complete formalisation of a hybrid INT8/INT32 neural architecture at 128 bytes per inhabitant; (2) its calibration and frozen evaluation on EMP 2019; (3) a transparent analysis of two intermediate failures (Trial 1 of P2 and the direct replacement P3) and of their causal corrections (orthogonal Hadamard-mode key and residual hybrid coupling P4); (4) a controlled three-arm experiment with a social ablation study and a negative control sector on 44,853 real inhabitants over 28 days (P5).

2. Related work

Our architecture brings together four lines of work published between 2018 and 2025. For each family, we state the mechanism we kept and the limitation that prevents applying it directly to twelve million deterministic agents.

2.1 Neural discrete choice models

In transport economics, random utility models (RUMs) such as the multinomial Logit (MNL) offer interpretable elasticities (extra time or cost reduces utility) but miss the non-linear interactions between profile, weather, distance and local supply. Hybrid models correct this weakness without becoming black boxes: L-MNL (Sifringer et al., 2020, arXiv:1812.09747) adds a learned residual to a parametric utility; ASU-DNN (Wang et al., 2020) separates the blocks by alternative; ResLogit (Wong and Farooq, 2021, arXiv:1905.10457) introduces residual connections into the Logit; TasteNet-MNL (Han et al., 2022, arXiv:2002.00922) has a small network produce taste coefficients specific to each socio-economic profile; RUMBoost (Salvadé and Hillel, 2025, arXiv:2401.11954) confirms the gain from monotonicity constraints. These models nevertheless remain static: they do not revise an inhabitant's beliefs after a bad local surprise. In France, eqasim-france (Hörl and Balac, 2021) shows how fruitful French public microdata are for synthetic mobility.

2.2 Compact personalisation and fast memory at inference time

Duplicating a full network per inhabitant would exceed 98 GB for 12.25 million people, while a strictly shared network erases individual heterogeneity, an observation formalised in multi-agent learning by HyperMARL (Tessera et al., NeurIPS 2025, arXiv:2412.04233). Feature-wise linear modulation, FiLM (Perez et al., AAAI 2018, arXiv:1709.07871), solves static personalisation in a few bytes per individual. For fast learning during the agent's life without global backpropagation, we build on the line of local plasticity (Miconi et al., ICML 2018, arXiv:1804.02464; Najarro and Risi, NeurIPS 2020, arXiv:2007.02686), Fast Weight Programmers (Schlag et al., ICML 2021, arXiv:2102.11174), Test-Time Training (Sun et al., 2024, arXiv:2407.04620), Titans (Behrouz et al., 2025, arXiv:2501.00663) and above all Gated DeltaNet (Yang et al., ICLR 2025, arXiv:2412.06464), which combines a forget gate and a Delta rule of error-driven correction in a compact matrix.

2.3 Deterministic integer inference on CPU

f32 floating-point arithmetic can differ in the last bit between ARM64 and x86-64 processors depending on the order of vector reductions and FMA instructions, which is enough to make a discrete simulation diverge. The NNUE family (Efficiently Updatable Neural Networks, popularised by Stockfish) shows that a small network quantised in i8 integers accumulated in i32, with a bounded integer activation (ClippedReLU) and SIMD vectorisation (NEON on ARM64, AVX2 on x86-64), achieves sub-microsecond times with strict bit-for-bit parity.

2.4 Massive urban simulations and the limits of online LLMs

LLM-based simulators such as LLMob (Wang et al., NeurIPS 2024, arXiv:2402.14744), AgentSociety (arXiv:2502.08691), GATSim (arXiv:2506.23306) or SocioVerse (arXiv:2504.10157) plateau at a few hundred or tens of thousands of active agents because of inference cost. At metropolitan scale, AgentTorch (Chopra et al., MIT, 2024, arXiv:2409.10568), with 8.4 million New Yorkers, groups agents into archetypes, while PufferLib (Suarez et al., 2024, arXiv:2406.12905) and JaxMARL (Rutherford et al., NeurIPS 2024, arXiv:2311.10090) focus on flat contiguous memory. Our contribution complements this space by keeping a neural memory specific to each individual (rather than to a collective archetype) in 128 bytes on an ordinary processor.

3. Model and method

3.1 Overview

Purpose: to give every inhabitant of a continuous urban simulator an individual decision and adaptation module that improves the fidelity of mobility and place choices against observed data, reacts without omniscience to local disruptions and social stories, and respects the invariants of deterministic execution.

Entities and state variables: the world comprises inhabitants grouped into households, activity places (homes, workplaces, shops, restaurants, leisure, sport, culture) carried by a single geographic description, and causal social links (members of the same household and co-present colleagues). Each inhabitant has an existing demographic and economic state, extended with a contiguous neural structure of exactly 128 bytes (two 64-byte CPU cache lines) backed by an immutable shared trunk of 8,068 bytes (0 bytes per inhabitant).

Segment of the individual neural state Format Bytes / inh. Calculated total (12.25 M inh.) Functional role
Personal modulation (FiLM) 16 × i8 16 187.0 MiB Affine modulation of the shared trunk's intermediate activations according to the individual profile.
Free habit biases 16 × i8 16 187.0 MiB Personal preferences per mode and broad activity family (frozen during constrained episodes).
Confidence and plasticity 16 × u8 16 187.0 MiB Cumulative exposure and gradual damping of plasticity in known domains.
Counters and metadata 16 × u8 16 187.0 MiB Segment version, counters of direct visits, free visits and social stories, time markers.
Associative memory (Gated DeltaNet) 8 × 8 × i8 64 748.1 MiB Fast-weight matrix linking the key of a place or mode to the 8 dimensions of experience.
Individual total (2 cache lines) Contiguous, 64 B aligned 128 1.46 GiB Stored in hot columns per partition, persisted in Zstd-compressed binary format.

Table 1: Exact structure of the 128 personal bytes per inhabitant (measured: 5,741,184 bytes for 44,853 inhabitants; calculated: 1,568,758,528 bytes, i.e. 1.46 GiB, for 12,255,926 inhabitants). The shared TasteNet-ResLogit trunk weighs 8,068 unique bytes (0 bytes/inhabitant).

Scales and scheduling: the simulator runs in discrete continuous time (millisecond resolution) on 500 m spatial tiles. A decision cycle follows four ordered steps: (1) the activity engine gathers up to 8 admissible offers given schedules, budget and hard constraints; (2) the neural module computes a bounded personal residual ΔU_neural added to the base score; (3) the inhabitant commits to a complete timed trip plan up to the door of the place; (4) when the act closes, the real experience (satisfaction and convenience) updates the 8 × 8 matrix in one step and may emit a timed social story to a relative or a co-present colleague.

3.2 Design concepts

Criterion Supervised offline (EMP 2019) Online real feedback (Twinz, 1 step) Multi-step RL (DQN / PPO)
Learning signal Real choices observed in a public survey (31,820 trips) Immediate gap experienced - expected after a visit or a social story Delayed reward R_T after a sequence of T actions
Time horizon Static (single offline calibration) 1 immediate step (close to a contextual bandit) Multi-step via V(s) and Q(s, a) (Bellman)
Adaptation pace Frozen in INT8 integers 1 to 2 real visits or a few stories Thousands to millions of episodes with a replay buffer
Memory and compute cost 8,068 B shared (0 B/inh), 410.4 ns/decision 128 B/inh, 55.6 ns/update, 0 GPU High (buffers, sequential backpropagation, GPU)
Role in Twinz Shared trunk (validated in P1) Individual 8 × 8 associative memory (P2 to P5) Not used day to day; considered for multi-year choices

Table 2: Comparison of the three learning regimes distinguished in the Twinz architecture.

3.3 Details

Public data for initialisation and calibration: offline calibration relies on the 2018-2019 French national mobility survey (Enquête Mobilité des Personnes, EMP 2019, SDES, Ministry of Transport, Licence Ouverte Etalab 2.0, public archive verified by checksum). The dense urban subset retained contains 31,820 trips from 10,719 households, split strictly by household (no household shared between sets): 70% training (22,382 trips, 7,503 households), 15% validation (4,741 trips, 1,607 households) and 15% frozen test (4,697 trips, 1,609 households, 1,003 of them in Île-de-France). The target has 8 joint alternatives: 4 modes (walking, cycling or powered two-wheeler, car, public transport) crossed with 2 time slots (off-peak, peak). The input gathers 12 individual profile variables and 36 context variables observable at departure (zero future variables). The simulation's geographic and demographic data come from Insee, OpenStreetMap (ODbL), IGN (LiDAR HD and BD TOPO) and Île-de-France Mobilités.

Sub-model equations:

1. Structured trunk (TasteNet-ResLogit) with economic sign constraints:
   U_trunk(j) = dot(beta_i, x_rum(j)) + r_res(x_context, j ; film_i)   with beta_time <= 0 and beta_cost <= 0
2. Integer FiLM personal modulation on the 16 hidden activations h:
   h'[k] = h[k] + (film_i[k] * h[k]) / 128   (film_i[k] bounded in [-64, +64])
3. Reading and writing the Gated DeltaNet associative memory (matrix S_i of 8 × 8 integers):
   v_hat(j) = (S_i * k_j) / 128   ;   e = v_real - v_hat(j)
   S_i <- clamp_[-127, +127]( alpha * S_i + beta * (e * k_j^T) )
4. Bounded residual hybrid coupling, centred per activity (Batch P4):
   U_total(j) = U_base(j) + clamp_[-24, +24]( DeltaU_raw(j) - mean_activity(DeltaU_raw) )

The keys k_j combine an orthogonal structure (Hadamard type) between broad categories with the place's or mode's own identity, which guarantees that a social story received from a neighbour targets the same memory direction without overwriting the orthogonal directions. On four simplified columns, two orthogonal keys k_A = [+1, -1, +1, +1] and k_B = [+1, +1, -1, +1] satisfy dot(k_A, k_B) = +1 - 1 - 1 + 1 = 0: writing +10 × k_A into the row leaves the reading of k_B strictly unchanged (contribution +10 × 0 = 0). In an 8-dimensional space, there are exactly 8 mutually orthogonal directions; beyond that, a slight overlap appears, damped by the forgetting factor alpha.

Step-by-step numerical example (1 step of real feedback + centring per activity)

A. DeltaNet update on a bakery: simplified key on 4 columns k_L = [+1, +1, -1, +1], initial memory row [+8, +8, -8, +8] giving a read-back expectation ŷ = (+8 + 8 + 8 + 8) / 4 = +8.00 (corresponding to an expected 3 min wait). On a bad visit (12 min queue), the converted experience is y = -16. The error is e = -16 - (+8) = -24. With an illustrative forgetting factor alpha = 0.97 and a step eta = 0.25, each cell becomes 0.97 × c_k + 0.25 × (-24) × k_L[k], which immediately brings the read-back expectation down to 0.97 × 8 - 6 = +1.76. A second visit at 12 min (e = -17.76) tips the score into negative at -2.73: the inhabitant switches shop after 2 real experiences.

B. Zero-mean centring per activity: faced with three restaurants rated R1 = +12, R2 = +2, R3 = -2 (mean +4) and a gym S1, subtracting the within-activity mean gives R1 = +8, R2 = -2, R3 = -6 (zero sum). The relative gap of 14 points between R1 and R3 is fully preserved without biasing the trade-off between eating out and sport.

Local inputs Profile (12 var.) Context and offers (36) Zero hidden variables TasteNet-ResLogit trunk 8,068 B frozen INT8 (0 B/inh) beta_time, beta_cost <= 0 Modulated by FiLM (16 B/inh) Contiguous personal state: 128 bytes / inhabitant (2 cache lines) FiLM (16 B) + Free biases (16 B) + Confidence (16 B) + Meta (16 B) + Gated DeltaNet 8 × 8 associative matrix (64 B, bounded [-127, +127]) 1-step update (55.6 ns): direct experience (×1) or household/colleague social story (÷4) Hybrid coupling U_base (rules) + ΔU_neural Bounded [-24, +24] Centred on mean 0 per activity Decision Gumbel-Max 256 quantiles 410.4 ns / decision ARM64 == x86-64
Figure 1. Complete decision architecture of Option 2, retained in Twinz: an INT8-quantised shared trunk calibrated on EMP 2019, a 128-byte individual memory and residual hybrid coupling.

4. Experimental protocol (campaigns P1 to P5)

The evaluation is organised in five sequential campaigns, each isolating a specific factor with matched controls that are strictly identical at the initial instant (same inhabitants, same places, same seeds, same weather).

Definition of the metrics: NLL (negative log-likelihood -ln(p), lower = better), Top-1 (share of top-ranked choices that match the observed choice), oracle regret (in P2, the gap between the maximum attainable satisfaction and that of the choice made, the oracle remaining unknown to the agents), shareShockedA (proportion of sector A visits still going to the 99 degraded places), satisfaction and convenience (mean of the effects perceived when acts close, on [-1, +1], higher = better), Shannon entropy of the places visited (spatial diversity in bits), and an accounting balance checked at every simulated midnight (0-cent gap tolerated).

5. Measured results and costs

5.1 EMP 2019 calibration and performance of the deterministic kernel (P1)

Model (frozen EMP 2019 test set, measured) NLL 8 opt. (urban, n=4,697) Top-1 (urban) NLL 8 opt. (IDF, n=1,003) Top-1 (IDF)
T1 Empirical frequencies (floor) 1.6798 36.51% 1.9548 25.32%
T3 Simple linear formula (16 parameters) 1.2451 49.52% 1.3533 46.26%
T2 Strong linear MNL (400 parameters, 48 var.) 1.0653 55.27% 1.1280 54.34%
Floating-point f32 TasteNet-ResLogit trunk 1.0391 56.99% 1.0685 56.53%
Quantised INT8/INT32 trunk (8,068 bytes) 1.0398 57.46% 1.0666 56.83%

Table 3: Results measured on the EMP 2019 household-split frozen test set. Against the strong MNL T2, the INT8 trunk reduces NLL by -5.44% and gains +2.49 Top-1 points in Île-de-France (-2.40% NLL, 95% CI [+0.0086, +0.0408] and +2.19 Top-1 points, 95% CI [+1.13, +3.24] on the whole dense urban set). INT8 vs f32 quantisation loss: +0.067% on dense urban (-0.180% in IDF). Economic signs respected on 100% of options.

On a Rust micro-benchmark compiled in release mode, a decision over 8 options takes a measured 410.4 ns on an x86-64 AVX2 server (314.6 ns on ARM64 NEON in P2), and a Gated DeltaNet update takes 55.6 ns on x86-64 (37.5 ns on ARM64). Bit-for-bit parity between Python INT8, the scalar path, ARM64 NEON and x86-64 AVX2 is exact on 16/16 EMP 2019 reference vectors and 10,000/10,000 SIMD vectors.

5.2 28-day longitudinal bench and correction with a Hadamard-mode key (P2)

A first trial with the raw P1 kernel on 44,853 inhabitants over 28 days revealed two limitations: a DeltaNet penalty amplitude too small compared with the EMP 2019 logit gaps (the public transport share in the affected corridor dropped by only -2.01 points) and individual keys too poorly aligned between neighbours (cycling diffusion in the novelty neighbourhood almost nil at +0.10 points). Introducing an orthogonal Hadamard-mode key structure (0 extra bytes) and an adjusted utility scale unlocked both behaviours:

5.3 Instructive failure of direct replacement (P3) and hybrid correction (P4)

Integration into the full engine on the central Paris sector of 44,853 inhabitants over 28 days confirmed the value of keeping negative results. In P3, directly replacing the activity decision with the network calibrated on trips severely distorted the daily mix (meals out ×3.62, sport -70.1%, cultural outings -85.1%) and worsened every experience indicator. Switching to bounded residual hybrid coupling [-24, +24], centred per activity (P4), fixes the root cause and reverses every indicator.

Indicator (1.5 km central sector, 44,853 inh., 28 days measured) Control without network Direct replacement (P3) Hybrid coupling (P4) P4 vs control
Perceived convenience (scale [-1, +1]) -0.07257 -0.09515 -0.06331 +12.76%
Average walking distance 196.11 m 229.47 m 180.95 m -7.73%
“Meal out” trips 71,899 260,526 (×3.62) 73,912 +2.80%
“Sport” trips 166,264 49,780 (-70.1%) 164,923 -0.81%
“Cultural outing” trips 86,752 12,946 (-85.1%) 84,684 -2.38%
Missed activities 7,662 10,130 (+32.2%) 7,351 -4.06%
Spatial diversity (distinct places / entropy) 4,700 / 9.692 bits 4,673 / 10.199 bits 4,709 / 9.701 bits +0.19% places
28-day wall-clock time (4 partitions) 111.20 s 115.03 s (+4.31%) 110.59 s -0.55%
Total CPU (user + sys) / Peak RSS 232.27 s / 3.51 GiB 237.70 s / 3.89 GiB 233.44 s / 3.40 GiB +0.50% / -3.2%
DeltaNet cells saturated at ±127 (out of 2.87 M) n/a 0 0 (max 12) 0 saturation

Table 4: Direct comparison of P3 against P4 on the central Paris sector (44,853 inhabitants, 28 days, 22.6 M events per arm). In P4, shorter trips reduce boundary crossings between partitions by -6.93%, offsetting the INT8 inference cost. Accounting balance: 0-cent gap on 28/28 midnights in every arm.

5.4 Local shock on day 14, real satisfaction and social ablation (P5)

In campaign P5, real experienced satisfaction and social stories between household members and colleagues are switched on. Over 28 days, 204,741 social updates (in addition to 455,727 direct updates) reach 26,081 inhabitants (58.15% of the population, median 3 stories per inhabitant, p90 11, max 91), without saturating a single one of the 2,870,592 DeltaNet cells (maximum observed: 75 out of 127). The test also made it possible to detect and fix two latent defects in the synchronisation and sizing of story mailboxes under heavy social load at 44,853 inhabitants.

Window and indicator (44,853 inh., measured / calculated) Control + social Hybrid P4 + social Ablation P4 without social Gap vs control
Pre-shock D1..D14: share of the 99 places in A 58.78% 59.00% 58.80% +0.22 pts
Post-shock W3 (D15..D21): share of degraded places / avoidance 55.85% (-2.93 pts) 54.76% (-4.24 pts) 56.35% (-2.45 pts) -1.31 pts (+44.7%)
Post-shock W4 (D22..D28): share of degraded places 51.61% 48.75% 51.62% -2.86 pts
Post-shock W4: net avoidance vs pre-shock -7.17 pts -10.25 pts -7.18 pts -3.08 pts (+43.0%)
Negative control sector B (east): difference-in-differences 39.34% -> 35.68% 39.10% -> 35.42% 39.37% -> 36.15% -0.02 pts (untouched)
Experienced satisfaction W4 ([-1, +1]) -0.1639 -0.1404 -0.1530 +14.34% (+8.26% social)
Convenience over 28 days / Average distance -0.0735 / 199.11 m -0.0656 / 186.96 m -0.0656 / 187.13 m +10.80% / -6.10%
28-day wall-clock time / Total CPU / Peak RSS 120.28 s / 245.06 s / 3.51 GiB 121.28 s / 247.37 s / 3.44 GiB 117.10 s / 239.21 s / 3.45 GiB +0.83% / +0.94% / -1.98%

Table 5: Results of the three-arm matched P5 test (22.99 M events per arm, 0-cent accounting gap on 56/56 checks, 0 swap). Only the hybrid + social arm pushes the 88 alternatives above 50% of visits in week 4 (51.25% against 48.39% and 48.38%).

65% 60% 55% 50% 45% Shock D14 D12 D13 D14 D15 D16 D17 D18 D19 D20 D21 D22 D23 D24 D25 D26 D27 44.73% 48.94% Hybrid P4 + social Algorithmic control + social Ablation P4 without social
Figure 2. Measured daily trend from D12 to D27 (partial D28 not plotted) of the share of visits going to the 99 degraded places in the western sector (44,853 inhabitants). Hybrid coupling + social drops below 50% from D21 (49.81%) and keeps a -3.78-point gap with the control at D27.

The ablation study settles the causal mechanism: deprived of social stories, hybrid coupling achieves in week 4 the same avoidance as the algorithmic control with social stories (-7.18 points against -7.17 points). By contrast, combining the two building blocks brings avoidance to -10.25 points (+43.0%), and the mean satisfaction of the hybrid + social arm beats the two other arms on every day from D1 to D28 without exception.

5.5 Measured costs and calculated projection at 12.25 million inhabitants

Configuration (all of Île-de-France, 12,255,926 inh., 8 cores) 24 h speed 24 h duration Steady-state RAM Status
Rust engine without the neural module (active reference) ×233.36 6.17 min 24.9 to 28.3 GiB Measured over 24 h
With the P4 neural module (direct projection, excluding L3 effect) ~×231 to ×234 ~6.14 to 6.22 min ~26.4 to 29.8 GiB (+1.46 GiB) Calculated
With the P4 neural module (cautious L3 cache margin: +1 to +5%) ~×220 to ×232 ~6.20 to 6.55 min ~26.4 to 29.8 GiB (+1.46 GiB) Estimated, to be measured

Table 6: Measured cost of the regional engine without the neural module, and calculated then cautious projections with 128 bytes per inhabitant. On disk in a Zstd save (D7 on the central sector), the neural layer weighs a measured 54,732 bytes (1.22 bytes/inh., i.e. about 14.2 MiB calculated at 12.25 M inh.).

6. Limitations and threats to validity

Multi-seed consolidation of P5 (added in v1.1 · 5 independent seeds × 3 arms × 28 days)

The full replication campaign over 5 independent seeds (15 simulations of 28 days on 44,853 inhabitants, 420/420 accounting midnights with a 0-cent gap, 0 swap, 0 saturated associative cells) confirms each effect with a sign consistency of 5/5:

  • Post-shock avoidance (D15..D27): P4+social - Control = -2.24 ± 0.25 pts (95% Student CI [-2.54 ; -1.93], bootstrap [-2.43 ; -2.05]), of which -2.19 ± 0.06 pts is the pure social share. In post - pre difference-in-differences: -2.41 ± 0.23 pts, i.e. +45.0 ± 5.2% additional relative avoidance in the face of the shock (95% CI [+38.5% ; +51.5%]).
  • Majority switch to the improved places at D27: P4+social = 51.30 ± 0.62% (95% CI [50.53% ; 52.07%], 5/5 seeds above 50%), against 0/5 for the control (47.43%) and 0/5 for P4 without social (48.77%).
  • Experienced quality and negative control: satisfaction +11.41 ± 0.45% over D15..D27 (+19.98 ± 1.58% at D27, of which +10.17% is purely social), convenience +10.13 ± 0.09%, distance -5.57 ± 0.07%. In the eastern sector without a shock (119 places), the difference-in-differences is -0.082 ± 0.118 pts (95% CI [-0.229 ; +0.065], covering zero: no spatial contamination).
  • Cost measured over 5 seeds: peak RSS memory -2.09 ± 0.77% below the control (5/5), median wall-clock overhead +1.68% (median CPU +1.53%; raw mean +4.70% wall-clock, including a one-off host disturbance on the last draw).

6.1 Internal validity

6.2 External validity and scale

6.3 Realism limits compared with human behaviour

7. Discussion, neighbourhood cultures and outlook

The results obtained from P1 to P5 show that there is no need to choose between rigid linear rules and large language models that are impractical at regional scale. Combining a structured trunk with economic constraints (calibrated on a public survey), a bounded individual fast memory in 128 bytes and centred hybrid coupling meets all three criteria at once: measured usefulness, causal plausibility and a CPU cost below 1%.

7.1 Outlook: neighbourhood cultures, rumours and the hot stove effect

The fact that the clearest synergy in P5 comes from coupling individual associative memory with stories shared between people close to each other opens a natural line of work: the emergence of local cultures per neighbourhood. In our preparatory work on local social networks, a shared network that aggregates everyone's experiences produces a swarm that is too optimal, with no rumours and no local inertia. Conversely, when inhabitants rely on their bounded memory and on a local neighbourhood, persistent minority beliefs appear, dominated by the underestimation of places rated badly the first time (83% to 95% underestimations in our earlier trials), in line with the hot stove effect described by Denrell and March (2001): people avoid a place after a bad surprise and stop testing it, which freezes its bad reputation even if it later improves.

The P5 protocol now provides the instrument to measure this dynamic at large scale on real Paris neighbourhoods: compare a degrading shock followed by a restoration on day 28, in order to observe how long a damaged reputation persists, neighbourhood by neighbourhood, without ever injecting arbitrary bias into the code.

First controlled trial of nightly cultures (added in v1.1): we tested adding a 16-byte cultural vector per neighbourhood, updated only at simulated midnight (20% contraction per night), on a bench of 25,200 inhabitants spread over 3 initially identical neighbourhoods plus 1,200 neutral newcomers on day 21 (5 seeds). A purely multiplicative modulation suffered from dead ReLU channels; switching to an additive offset beta_q with a shrunk mean per alternative removes this limitation. On 5/5 seeds, neighbourhoods diverge according to their experience (cos = -0.394 at night 14), a local shock reverses with a half-response of 3.0 nights, with 0 daytime leakage, 0 bits of telepathy between neighbourhoods and 0.000 drift in the neutral control neighbourhood. From the day they arrive (D21), neutral newcomers adopt the local norm (+4.70 ± 0.49 pts of cycling in the cycling neighbourhood, -5.48 ± 0.93 pts of degraded transport in the shocked neighbourhood), for a measured cost of 113.8 ns per neighbourhood per night and +0.81% overall time. We then plugged the same mechanism into the 75 real IRIS neighbourhoods of the Contrescarpe extract (1,200 bytes in total, 5 seeds × 28 days, 0 daytime leakage, 0 contamination of the eastern sector, median wall-clock overhead of +0.11%). Under this regime, currently 100% pedestrian and without newcomers, the effect on top of P4+social is consistent (5/5 seeds) but modest: -0.21 ± 0.04 pts on the degraded places and +0.42 ± 0.09% satisfaction. Three causes explain it: 12 channels at neighbourhood level suffer collisions when facing 187 interleaved individual places, individual place memory already covers most of the shock in a closed population, and multimodal choice (walking, cycling, public transport, car) is not yet active on this extract. We therefore chose not to integrate this layer into the engine until real multimodal choice and newcomer flows are in place.

7.2 Long horizon and Twinz portability

For rare decisions whose reward is genuinely delayed over several months or years (building up precautionary savings, choosing a move that trades rent against commuting time, a shop's opening-hours strategy over several seasons), lightweight low-dimensional reinforcement learning may be evaluated separately against simple controls. Finally, since no rule of the architecture depends on Paris, the same scheme (a trunk calibrated on the national mobility survey of the country concerned + 128 individual bytes) applies directly to the next twins of twinzcities.com.

8. Glossary and bibliography

8.1 Glossary of acronyms and notation

Term Expansion Definition in this paper
EMP 2019Enquête Mobilité des Personnes (2018-2019)French public national survey (SDES) of households' real daily trips.
FiLMFeature-wise Linear ModulationPersonal 16-byte vector modulating the hidden activations of a shared trunk.
Gated DeltaNetAssociative memory with a forget gate and Delta rule8 × 8 grid of integers bounded to [-127, +127] combining controlled forgetting and correction by the experienced - expected gap.
INT8 / i8 / i328-bit / 32-bit signed integerInteger quantisation guaranteeing bit-for-bit parity between ARM64 and x86-64 processors.
L-MNL / ResLogitLearning / Residual Multinomial LogitFamily of hybrid models combining a structured economic utility and a neural residual.
LLMLarge Language ModelUnusable online for 165,000 decisions per second on CPU.
NLLNegative Log-LikelihoodMean negative log-likelihood -ln(p) measuring probabilistic quality (lower = better).
NNUEEfficiently Updatable Neural NetworkCompact integer SIMD networks on CPU, inspired by the Stockfish chess engine.
RL / DQN / PPOReinforcement LearningMulti-step reinforcement learning estimating V(s) or Q(s, a) under delayed reward.
RUM / MNLRandom Utility Model / Multinomial LogitClassic economic framework for discrete choice between competing alternatives.
SDESService des données et études statistiquesStatistical service of the French Ministry of Transport (producer of EMP 2019).
SGDStochastic Gradient DescentUsed offline on EMP 2019 (but unstable online on few visits).
SIMDSingle Instruction, Multiple DataProcessor vector instructions (NEON on ARM64, AVX2 on x86-64) processing 16 to 32 integers in one cycle.
ZstdZstandardLossless compression used to persist the world's state without a reset.

8.2 Verified bibliography

  1. SDES, French Ministry of Transport (2021). Enquête Mobilité des Personnes 2018-2019 (EMP 2019), public microdata, Licence Ouverte Etalab 2.0, data.gouv.fr.
  2. Han, Y., Pereira, F. C., Ben-Akiva, M. and Zegras, C. (2022). “A neural-embedded discrete choice model: Learning taste representation with strengthened interpretability” (TasteNet-MNL), Transportation Research Part B: Methodological, arXiv:2002.00922.
  3. Wong, M. and Farooq, B. (2021). “ResLogit: A residual neural network logit model for data-driven choice modelling”, Transportation Research Part C: Emerging Technologies, arXiv:1905.10457.
  4. Sifringer, B., Lurkin, V. and Alahi, A. (2020). “Enhancing Discrete Choice Models with Representation Learning” (L-MNL), Transportation Research Part B: Methodological, vol. 140, pp. 236-261, arXiv:1812.09747.
  5. Wang, S., Mo, B. and Zhao, J. (2020). “Deep neural networks for choice analysis: Architecture design with alternative-specific utility functions” (ASU-DNN), Transportation Research Part C: Emerging Technologies, vol. 112.
  6. Salvadé, N. and Hillel, T. (2025). “RUMBoost: Gradient Boosted Random Utility Models”, Transportation Research Part C: Emerging Technologies, arXiv:2401.11954.
  7. Perez, E., Strub, F., de Vries, H., Dumoulin, V. and Courville, A. (2018). “FiLM: Visual Reasoning with a General Conditioning Layer”, AAAI 2018, arXiv:1709.07871.
  8. Tessera, K., Rahman, M. A., Storkey, A. and Albrecht, S. (2025). “HyperMARL: Adaptive Hypernetworks for Multi-Agent RL”, NeurIPS 2025, arXiv:2412.04233.
  9. Yang, S., Kautz, J. and Hatamizadeh, A. (2025). “Gated Delta Networks: Improving Mamba2 with Delta Rule”, ICLR 2025, arXiv:2412.06464.
  10. Schlag, I., Irie, K. and Schmidhuber, J. (2021). “Linear Transformers Are Secretly Fast Weight Programmers”, ICML 2021, arXiv:2102.11174.
  11. Sun, Y., Li, X., Dalal, K., Xu, J., Vikram, A., Zhang, G., Dubois, Y., Chen, X., Wang, X., Koyejo, S., Hashimoto, T. and Guestrin, C. (2024). “Learning to (Learn at Test Time): RNNs with Expressive Hidden States”, arXiv:2407.04620.
  12. Behrouz, A., Zhong, P. and Mirrokni, V. (2025). “Titans: Learning to Memorize at Test Time”, Google Research, arXiv:2501.00663.
  13. Miconi, T., Stanley, K. and Clune, J. (2018). “Differentiable plasticity: training plastic neural networks with backpropagation”, ICML 2018, arXiv:1804.02464.
  14. Najarro, E. and Risi, S. (2020). “Meta-Learning through Hebbian Plasticity in Random Networks”, NeurIPS 2020, arXiv:2007.02686.
  15. Chopra, A., Kumar, N., Nurmela, A. et al. (2024). “On the Limits of Agency in Agent-Based Models” (AgentTorch), MIT Media Lab, arXiv:2409.10568.
  16. Suarez, J. et al. (2024). “PufferLib: Making Reinforcement Learning Libraries and Environments Play Nice”, arXiv:2406.12905.
  17. Rutherford, A. et al. (2024). “JaxMARL: Multi-Agent RL Environments and Algorithms in JAX”, NeurIPS 2024, arXiv:2311.10090.
  18. Wang, J. et al. (2024). “Large Language Models as Urban Residents: An LLM Agent Framework for Personal Mobility Generation” (LLMob), NeurIPS 2024, arXiv:2402.14744.
  19. Zhu, Y. et al. (2023). “DiffTraj: Generating GPS Trajectory with Diffusion Probabilistic Model”, NeurIPS 2023, arXiv:2305.05980.
  20. Piao, J. et al. (2025). “AgentSociety: Large-Scale Simulation of LLM-Driven Generative Agents Advances Understanding of Human Behaviors and Society”, arXiv:2502.08691; GATSim (arXiv:2506.23306); SocioVerse (arXiv:2504.10157).
  21. Hörl, S. and Balac, M. (2021). “Synthetic population and travel demand for Paris and Île-de-France based on open and publicly available data” (eqasim-france), Transportation Research Part C, vol. 130, 103291.
  22. Stockfish Developers (2020-2026). NNUE: Efficiently Updatable Neural Networks, github.com/official-stockfish/Stockfish.
  23. Denrell, J. and March, J. G. (2001). “Adaptation as Information Restriction: The Hot Stove Effect”, Organization Science, 12(5), 523-538.