Mathematical Foundations & Generative Architecture
A detailed technical breakdown of the generative pipeline: state transition graphs, parametric emission sampling, population heterogeneity, and explicit synthetic data boundaries.
1. Generative Execution Pipeline
The simulation loop advances agents through discrete temporal steps. Each step samples internal state progression, evaluates condition rules, and emits observable features.
2. State Transition Model
BehaviorSim formalizes behavioral paths as a discrete-time Markov decision process without external reward feedback.
Let \mathcal{S} = \{s_1, s_2, \dots, s_K\} denote a finite state space of K discrete states. The transition dynamics between states are governed by a row-stochastic transition matrix P \in \mathbb{R}^{K \times K}, where each entry satisfies:
Absorbing / Terminal States
States such as Churned or Discharged act as absorbing states where P_ii = 1.0, terminating further trajectory progression for that specific agent.
Dynamic Condition Rules
In addition to static matrices, transition probabilities can be modulated dynamically using TransitionRule objects that evaluate historical aggregations (last, sum, max, mean, min).
3. Supported Parametric Feature Distributions
At each temporal step, observable continuous and discrete variables are emitted from probability distributions strictly conditioned on the active state.
| Distribution Key | Parameters | Description |
|---|---|---|
| normal | loc (mean), scale (std) | Gaussian continuous emissions |
| lognormal | mean, sigma | Right-skewed positive values (durations, volumes) |
| exponential | scale (1 / lambda) | Inter-arrival intervals and elapsed times |
| poisson | lam (rate) | Discrete event frequencies and counts |
| uniform | low, high | Bounded continuous intervals |
| uniform_discrete | low, high | Equiprobable integer sampling |
| bernoulli | p (probability) | Binary indicators, clicks, and event flags |
| categorical | categories, probabilities | Discrete non-numeric choices or classes |
4. Profiles, Presets & Reproducibility
Calibrating population diversity across cohorts with strict bitwise deterministic replay.
Profile Mixtures
When simulating populations of users, patients, or accounts, individual agents exhibit distinct baseline tendencies. BehaviorSim supports multiple profiles within a single simulator run, allocating profiles according to a calibrated mixture weight distribution.
Seeded Random Number Generation
Every stochastic decision—from initial state sampling to Gaussian noise generation—relies on an internal NumPy Generator initialized with the user-supplied seed. Re-running a simulation with identical configurations and seed guarantees bitwise identical trace outputs.
5. Scientific Boundary & Limitations
Essential disclosure regarding the synthetic nature of generated data and the scope of built-in domain presets.
Synthetic Nature: All data produced by BehaviorSim is entirely synthetic. It is generated from mathematical state machines and parametric distributions specified by configuration files or preset defaults.
Domain Presets Are Not Validated Real-World Models: Built-in presets for education, finance, healthcare, and mobile_app are illustrative scenario generators constructed for software testing, algorithm prototyping, and pipeline validation. They carry:
- NO clinical or medical validation: The healthcare preset must not be used as clinical evidence or diagnostic validation.
- NO financial or market predictive validity: The finance preset is not financial advice or econometric forecasting.
- NO educational efficacy certification: The education preset is a synthetic benchmark, not pedagogical validation.
Researchers and engineers must calibrate transition probabilities and emission parameters against empirical domain datasets before drawing real-world scientific conclusions.