> For the complete documentation index, see [llms.txt](https://docs.rootcause.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rootcause.ai/core-technologies/digital-twin-and-simulations.md).

# Digital Twin & Simulations

Once a causal graph has been discovered and validated, RootCause creates a Digital Twin: a live, data-driven model of your system. The twin acts as a sandbox where interventions, counterfactuals, and optimizations can be tested out, and their impacts evaluated, before being applied in real life.

***

#### Definition & Purpose

The Digital Twin is the execution layer of RootCause. It translates causal structure into decision support by:

* Simulating the effects of interventions in a controlled environment
* Providing explainable reasoning behind KPI changes
* Balancing trade-offs across multiple outcomes

This makes it possible to move beyond descriptive analytics and into prescriptive, causally sound decision-making.

***

#### How It Works

1. Baseline World – The twin samples outcomes from the learned causal model.
2. Intervention – One or more variables are modified (hard values, relative changes, or segment-specific).
3. Propagation – Effects flow through the causal graph, updating downstream nodes according to their dependencies.
4. Simulation Runs – Monte Carlo sampling produces distributions of possible futures.
5. Comparison – Baseline and intervention scenarios are compared, with uncertainty intervals provided.

***

#### Advanced Capabilities

* Bayesian Foundations – The twin runs on a causal Bayesian network whose conditional distributions are learned with Bayesian additive regression tree (BART) ensembles and sampled via Monte Carlo. In temporal causal discovery, Gaussian-process decomposition separates trend and seasonal structure before dependencies are tested.
* Ontology Integration – Variable dependencies are inferred from the ontology, ensuring simulations respect real-world structure.
* Scalability – A staged filter cascade prunes the pairwise search space before expensive independence tests run, keeping discovery tractable on high-dimensional datasets.
* Segment Analysis – Simulations can run across sub-populations (regions, customer cohorts, product lines) to uncover heterogeneous effects.
* Optimization – The system can recommend levers that maximize or minimize a target while accounting for secondary impacts.
* Natural Language Interface – Simulations can be configured via structured UI or plain-language queries.

***

#### Deployment & Performance

* Enterprise-Ready – Runs self-hosted for sensitive environments, with optional cloud execution for evaluation.
* Built for Volume – Memory requirements are estimated up front before discovery starts, panel data is sharded across entities, and the heavy computation runs in native Rust and C++ kernels, including tiled distance-correlation computation for wide datasets.
* Efficiency – Designed to operate in high-dimensional feature spaces where traditional causal inference becomes infeasible.

***

#### Types of Simulations

* Predictions – Estimate the outcome of a specified input, with uncertainty.
* Interventions – Test the effect of changing a driver variable.
* Optimizations – Automatically search for the best intervention to reach a desired outcome.
* Best Action – Find the minimal change that reaches a target outcome.
* Explanations – Identify which drivers most influenced a KPI shift.
* Root Cause Analysis & Anomaly Scan – Diagnose why a value came out anomalous.

See [Simulation Types](/more-details/digital-twin/simulation-types.md) for a practical guide to each simulation.
