dsfb-srd
Overview
dsfb-srd is a deterministic Structural Regime Dynamics (SRD) demonstrator for the paper Deterministic Causal Architecture for Safety-Critical Autonomous Systems. It generates a replayable structural event stream, evolves trust from residual envelopes, builds trust-gated causal graphs, sweeps trust thresholds, and exports CSV outputs plus a notebook that reconstructs the figures.
This crate exists to provide deterministic empirical support for the structural claims of the paper, but it is not operational validation of an autonomy system.
Why this crate exists
The paper makes internal structural claims about how trust gates causal topology:
- trust controls whether causal edges remain admissible,
- connectivity collapses monotonically as the trust threshold rises,
- a structural regime transition appears in the expansion observable
rho(tau), - that transition sharpens as event history size increases,
- degradation and shock intervals are locally detectable from graph statistics.
dsfb-srd is a narrow empirical demonstrator for those claims. It is intentionally simple, deterministic, and replayable.
Relation to the DSFB causal architecture paper
The crate operationalizes a compact structural model rather than a full autonomy stack:
- a deterministic latent signal is generated per event,
- observed values receive deterministic regime-dependent distortion,
- residual envelopes evolve as
e_i = max(decay * e_{i-1}, r_i), - trust evolves as
tau_i = exp(-beta * e_i), - causal edges are admitted only when ordering, windowing, compatibility, structural similarity, and source-trust constraints all hold.
The empirical role of the crate is to show how those deterministic rules induce trust-controlled causal topology and a threshold-sensitive connectivity transition.
Citation:
- de Beer, R. (2026). Deterministic Causal Dynamics for Safety-Critical Autonomous Systems - Trust-Controlled Causal Topology (TCCT) and Structural Regime Dynamics (SRD) (v1.0). Zenodo. https://doi.org/10.5281/zenodo.18976566
What is empirically demonstrated
- A deterministic event stream with no randomness by default.
- Deterministic trust evolution from residual envelopes.
- Trust-gated DAG construction over structural events.
- Threshold sweeps for the expansion observable
rho(tau). - Global coherence tracking with the giant-component fraction
G(tau). - Fragmentation tracking with the weak-component Shannon entropy
H(tau). - Finite-size sharpening across
N = 250, 500, 1000, 2000. - Time-local connectivity degradation across baseline, degradation, shock, and recovery intervals.
What is NOT being claimed
- This is not a production autonomy stack.
- This is not a probabilistic simulator.
- This is not an operational flight-data validator.
- This is not evidence that a real aircraft or robot is safe.
- This crate does not validate sensing, estimation, control, or certification claims.
The crate demonstrates deterministic structural behavior only.
Reproducibility and Run Identity
Each run computes a deterministic run_id from configuration parameters only.
- The crate constructs a canonical JSON object from
crate,version,n_events,n_channels,causal_window,tau_steps,shock_start,shock_end,beta, andenvelope_decay. - It computes a SHA-256 hash of that canonical JSON.
config_hashis the full 64-hex-character SHA-256 digest.run_idis the first 32 hex characters of that digest.
Two runs with identical configuration parameters will therefore produce identical run_id values, even though their timestamp folders differ. This lets results be checked independently while keeping output folders non-overlapping.
Why tau_steps defaults to 401
The default threshold sweep uses tau_steps = 401, which keeps the inclusive linspace grid over [0, 1] but reduces the spacing to Delta tau = 0.0025.
- The denser grid smooths
rho(tau)without changing the deterministic model. - It reduces finite-difference noise in
|d rho / d tau|. - It localizes the transition band more cleanly for the giant-component and entropy observables as well.
You can still override --tau-steps from the CLI, but 401 is the crate default because the structural transition is easier to inspect at that resolution.
Core observables
rho(tau): anchor-centered causal expansion, defined as the reachable fraction from the anchor event in the trust-gated DAG.G(tau): largest weakly connected component fraction, defined as|C_max(tau)| / |V|, and used here as the global graph-coherence order parameter.component_entropy(tau) = H(tau): Shannon entropy of weakly connected component sizes, used as a fragmentation indicator.
G(tau) and H(tau) are computed on weakly connected components of the thresholded graph. When one weak component spans all nodes, H(tau) = 0. When the graph fully fragments into isolated nodes, H(tau) rises toward ln(N). For a degenerate zero-node case, the implementation returns 0.
Why these observables matter
A monotonic decline in rho(tau) by itself could be criticized as a generic consequence of threshold pruning. This crate therefore exports three coordinated observables:
rho(tau)for anchor-centered expansion,G(tau)for global coherence,H(tau)for fragmentation.
When the derivative peak in |d rho / d tau| co-localizes with a rapid decline in G(tau) and a peak in H(tau), the resulting pattern is harder to dismiss as a purely local thresholding artifact. In this deterministic synthetic setting, the point is not to prove operational validity; it is to show that multiple independent graph observables align around the same structural regime boundary.
Crate layout
crates/dsfb-srd/
├── Cargo.toml
├── README.md
├── notebooks/
│ └── dsfb_srd_colab.ipynb
└── src/
├── compatibility.rs
├── config.rs
├── event.rs
├── experiments.rs
├── export.rs
├── graph.rs
├── lib.rs
├── main.rs
├── metrics.rs
├── signal.rs
└── trust.rs
Because this task avoids editing the repository root manifest, the crate is intentionally standalone. If you later want it in the workspace, add crates/dsfb-srd to the root Cargo.toml workspace members manually.
How to run the simulator
Default run:
Optional overrides:
Where results are written
Every run writes to a new timestamped directory at the repository root:
output-dsfb-srd/YYYYMMDD-HHMMSS/
Example:
output-dsfb-srd/20260312-214530/
The crate detects the repository root relative to crates/dsfb-srd, creates output-dsfb-srd/ if needed, allocates a fresh timestamp folder, and writes all CSV outputs there.
Explanation of CSV outputs
run_manifest.csv: one-row manifest withrun_id, timestamp folder name, full configuration hash, and primary run parameters.events.csv: the deterministic primary event stream with latent state, prediction, observation, residual, envelope, trust, and regime label.threshold_sweep.csv: trust-threshold sweep rows withrho(tau),G(tau), andH(tau)across the finite-size experiments.transition_sharpness.csv: discrete derivatives ofrho(tau)used to identify the structural transition and its sharpening.time_local_metrics.csv: windowed connectivity summaries across time for low, critical, and high trust thresholds.graph_snapshot_low.csv: active edges at a low trust threshold.graph_snapshot_critical.csv: active edges near the maximal transition sharpness.graph_snapshot_high.csv: active edges at a high trust threshold.graph_snapshot_tau_020.csv: fixed-threshold edge list near the connected regime.graph_snapshot_tau_030.csv: fixed-threshold edge list near the transition regime.graph_snapshot_tau_040.csv: fixed-threshold edge list near the fragmented regime.
threshold_sweep.csv always includes the paper-facing finite-size set 250, 500, 1000, 2000. If the primary --n-events differs from those sizes, the primary history size is included as an additional sweep size so the event stream and threshold diagnostics remain aligned.
How to use the Colab notebook
The notebook lives at:
crates/dsfb-srd/notebooks/dsfb_srd_colab.ipynb
Workflow:
- Open the notebook in Colab and run the setup cell.
- The setup cell clones the DSFB repository into
/content/dsfbif needed. - The setup cell installs Rust with
rustupifcargois not already available. - The setup cell runs
cargo run --manifest-path crates/dsfb-srd/Cargo.toml --release --bin dsfb-srd-generatefrom scratch. - The notebook then selects the newly created timestamped folder under
output-dsfb-srd/and uses that fresh run for every figure. - Run the remaining cells to produce the figures.
This notebook is intentionally wired to execute the crate and regenerate outputs rather than rely on bundled sample CSVs or manual output uploads. The plotting cells use only pandas and matplotlib; the setup cell may also invoke git, curl, and cargo inside Colab.
Interpretation of the figures
- Figure 1 plots
rho(tau)against the trust threshold for multiple event-history sizes. The expected pattern is monotone connectivity collapse, with a sharper transition for larger histories. - Figure 2 plots
|drho/dtau|against the midpoint threshold. The peak identifies the structural transition band and shows how the transition sharpens with system size. - Figure 3 plots
G(tau)against threshold and treats the giant-component fraction as the global coherence order parameter. - Figure 4 plots
H(tau), the Shannon entropy of weak-component sizes. The expected pattern is an entropy peak near the transition region where fragmentation is strongest. - Figure 5 plots time-local reachable fraction against event index and marks the shock interval. The expected pattern is a local connectivity drop during degradation and shock, with partial recovery afterward.
- Figure 6 visualizes fixed-threshold graph snapshots at
tau = 0.20,0.30, and0.40so the connected, transitional, and fragmented regimes are visually comparable.
Those figures support the paper's internal structural claims about trust-gated causal topology. They do not constitute operational validation of an autonomy system.