Datasets:
scenario_id float64 | surgical_stress float64 | physiologic_buffer float64 | recovery_lag float64 | system_coupling float64 | drift_gradient float64 | drift_velocity float64 | drift_acceleration float64 | boundary_distance float64 | secondary_boundary_distance float64 | boundary_competition_ratio float64 | boundary_uncertainty float64 | trajectory_uncertainty float64 | regime_confidence float64 | regime_transition_score string | transition_direction float64 | regime_separation_margin float64 | transition_uncertainty float64 | transition_velocity float64 | perturbation_radius float64 | collapse_trigger string | recovery_distance float64 | recovery_gradient float64 | return_feasibility float64 | delta_surgical_stress float64 | delta_physiologic_buffer float64 | delta_recovery_lag float64 | delta_system_coupling float64 | trajectory_shift float64 | minimal_intervention_path string | stabilization_success int64 | label_postop_collapse int64 | __index_level_0__ string |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0.84 | 0.31 | 0.72 | 0.76 | 0.48 | 0.42 | 0.21 | 0.17 | 0.21 | 1.24 | 0.13 | 0.17 | 0.64 | 0.61 | inflammation_to_hemodynamic_collapse | 0.11 | 0.16 | 0.24 | 0.29 | 0.28 | occult_bleeding | 0.25 | -0.15 | 0.58 | -0.13 | 0.11 | -0.1 | -0.09 | -0.16 | fluid resuscitation; early transfusion; return to theatre review | 1 | 1 | POSTOP001 |
0.89 | 0.22 | 0.81 | 0.84 | 0.66 | 0.57 | 0.35 | 0.1 | 0.11 | 1.1 | 0.19 | 0.23 | 0.48 | 0.78 | hypovolemia_to_septic_collapse | 0.07 | 0.22 | 0.33 | 0.37 | 0.35 | anastomotic_leak | 0.36 | -0.04 | 0.27 | -0.05 | 0.02 | -0.03 | -0.02 | -0.06 | broad-spectrum antibiotics; source control imaging; ICU review | 0 | 0 | POSTOP002 |
0.77 | 0.39 | 0.63 | 0.68 | 0.29 | 0.24 | 0.12 | 0.25 | 0.39 | 1.56 | 0.1 | 0.13 | 0.73 | 0.34 | inflammation_to_ileus_decompensation | 0.18 | 0.12 | 0.15 | 0.2 | 0.21 | persistent_pain_stress | 0.2 | -0.13 | 0.69 | -0.1 | 0.09 | -0.08 | -0.07 | -0.14 | optimize analgesia; mobilization; electrolyte correction | 1 | 1 | POSTOP003 |
0.92 | 0.18 | 0.86 | 0.88 | 0.74 | 0.63 | 0.42 | 0.08 | 0.09 | 1.12 | 0.23 | 0.28 | 0.41 | 0.84 | hypovolemia_to_multiorgan_collapse | 0.06 | 0.27 | 0.41 | 0.4 | 0.39 | uncontrolled_hemorrhage | 0.41 | -0.02 | 0.19 | -0.03 | 0.01 | -0.01 | 0 | -0.03 | massive transfusion protocol; operative control; vasopressor bridge | 0 | 0 | POSTOP004 |
0.71 | 0.45 | 0.55 | 0.6 | 0.21 | 0.18 | 0.07 | 0.33 | 0.51 | 1.55 | 0.08 | 0.1 | 0.81 | 0.25 | stable_recovery_to_slow_decompensation | 0.22 | 0.09 | 0.1 | 0.16 | 0.17 | fluid_shift | 0.17 | -0.11 | 0.76 | -0.08 | 0.07 | -0.06 | -0.05 | -0.12 | maintenance fluids; electrolyte review; routine escalation watch | 1 | 1 | POSTOP005 |
0.86 | 0.26 | 0.78 | 0.82 | 0.58 | 0.5 | 0.29 | 0.13 | 0.14 | 1.08 | 0.16 | 0.21 | 0.55 | 0.76 | inflammation_to_hemodynamic_collapse | 0.08 | 0.2 | 0.31 | 0.33 | 0.31 | vasodilatory_instability | 0.31 | -0.05 | 0.34 | -0.05 | 0.03 | -0.03 | -0.01 | -0.07 | vasopressor support; fluids; serial lactate review | 0 | 0 | POSTOP006 |
0.74 | 0.41 | 0.59 | 0.64 | 0.25 | 0.21 | 0.09 | 0.28 | 0.34 | 1.21 | 0.11 | 0.12 | 0.77 | 0.47 | inflammation_to_ileus_decompensation | 0.14 | 0.13 | 0.17 | 0.22 | 0.19 | gut_dysmotility | 0.19 | -0.14 | 0.7 | -0.09 | 0.08 | -0.07 | -0.06 | -0.15 | bowel rest; decompression; electrolyte optimization | 1 | 1 | POSTOP007 |
0.94 | 0.16 | 0.89 | 0.91 | 0.8 | 0.68 | 0.47 | 0.06 | 0.07 | 1.17 | 0.25 | 0.3 | 0.36 | 0.88 | hypovolemia_to_multiorgan_collapse | 0.05 | 0.29 | 0.46 | 0.43 | 0.43 | refractory_shock | 0.44 | -0.01 | 0.15 | -0.01 | 0 | 0 | 0.01 | 0 | damage control strategy; ICU transfer; invasive monitoring | 0 | 0 | POSTOP008 |
0.69 | 0.47 | 0.53 | 0.57 | 0.18 | 0.15 | 0.05 | 0.36 | 0.54 | 1.5 | 0.07 | 0.09 | 0.83 | 0.19 | stable_recovery_to_slow_decompensation | 0.24 | 0.08 | 0.08 | 0.15 | 0.15 | postop_fluid_imbalance | 0.14 | -0.12 | 0.79 | -0.07 | 0.06 | -0.05 | -0.05 | -0.13 | watchful monitoring; fluid balance charting; nurse escalation protocol | 1 | 1 | POSTOP009 |
What this repo does
This repository provides a Clarus v0.8 clinical quad dataset for detecting and reasoning about postoperative collapse regime transitions.
The dataset models situations where a patient state is no longer contained within a single postoperative recovery basin but is shifting between competing regimes such as:
- inflammatory postoperative stress
- hemodynamic collapse
- septic deterioration
- multiorgan instability
This is the conceptual upgrade introduced in Clarus v0.8.
Earlier ladder versions detect instability, forecast deterioration, estimate collapse boundaries, model recovery geometry, and reason about intervention.
v0.8 introduces regime transition geometry.
The system now measures not only distance to the nearest failure boundary but also distance to the nearest competing regime boundary.
This allows models to detect:
- regime switching
- competing failure modes
- unstable regime identity
- transition-aware intervention reasoning
Core quad
The four core variables in this dataset are:
surgical_stressphysiologic_bufferrecovery_lagsystem_coupling
Operational definitions:
surgical_stress
Acute operative burden and inflammatory load imposed by surgery and its complications.
physiologic_buffer
Remaining adaptive reserve available to tolerate blood loss, inflammation, infection, and metabolic demand.
recovery_lag
Delay in returning toward expected postoperative stabilization.
system_coupling
Degree to which deterioration in one postoperative subsystem is propagating into broader multisystem instability.
Clinical variable mapping
| Quad Variable | Clinical Measurements | Typical Indicators |
|---|---|---|
| surgical_stress | Operative duration, blood loss, CRP, lactate | Long case, high blood loss, rising CRP, lactate elevation |
| physiologic_buffer | Hemoglobin reserve, albumin, frailty, cardiopulmonary reserve | Anemia, low albumin, frailty, poor reserve |
| recovery_lag | Time to mobilization, bowel recovery, MAP normalization | Delayed mobilization, ileus, prolonged hypotension |
| system_coupling | Creatinine rise, oxygen requirement, SOFA score | Rising creatinine, oxygen escalation, SOFA increase |
These mappings are illustrative rather than prescriptive.
The dataset encodes structural system state, not a single clinical protocol.
Why the second boundary matters
Most instability detectors estimate only one quantity:
distance to the nearest collapse boundary.
This is insufficient for real postoperative deterioration.
A patient may appear to be deepening within one recovery complication while the deeper reality is that they are crossing into a different failure basin.
v0.8 introduces:
secondary_boundary_distance
The model now measures:
distance to the current regime boundary
distance to the competing regime boundary
This enables detection of regime competition.
When the two distances converge, regime identity becomes unstable.
The derived signal
boundary_competition_ratio
secondary_boundary_distance / boundary_distance
acts as a marker of this instability.
Values approaching 1 indicate a system positioned between regimes.
Structural Note
This dataset is part of the Clarus ladder.
The ladder reconstructs instability geometry step by step:
v0.1 cascade detection
v0.2 trajectory awareness
v0.3 cascade forecasting
v0.4 boundary discovery
v0.5 recovery geometry
v0.6 intervention reasoning
v0.7 uncertainty-aware intervention
v0.8 regime transition geometry
Each rung increases resolution of the system state space.
v0.8 is the first rung where competition between instability basins is explicitly modeled.
That upgrade transforms Clarus from a collapse detector into a phase-transition instrument for complex systems.
Example regime competition row
A typical v0.8 postoperative transition scenario looks like this.
| Field | Example |
|---|---|
| surgical_stress | 0.89 |
| physiologic_buffer | 0.22 |
| recovery_lag | 0.81 |
| system_coupling | 0.84 |
| boundary_distance | 0.10 |
| secondary_boundary_distance | 0.11 |
| boundary_competition_ratio | 1.10 |
| regime_transition_score | 0.78 |
| transition_direction | hypovolemia_to_septic_collapse |
| regime_separation_margin | 0.07 |
| transition_uncertainty | 0.22 |
| transition_velocity | 0.33 |
| collapse_trigger | anastomotic_leak |
Interpretation:
The patient is close to the current regime boundary while a competing regime boundary is also nearby.
The system is transitioning from one unstable postoperative state into another more dangerous basin.
Prediction target
The prediction target is:
label_postop_collapse
Default label rule:
label = 1ifstabilization_success = 1andtrajectory_shift < -0.10
Relaxed variant:
label = 1ifstabilization_success = 1
This preserves consistency with v0.6 and v0.7 while extending the geometry into v0.8 regime transition reasoning.
Row structure
Each dataset row contains layered signals.
Core state
surgical_stress
physiologic_buffer
recovery_lag
system_coupling
Trajectory signals
drift_gradient
drift_velocity
drift_acceleration
Boundary geometry
boundary_distance
secondary_boundary_distance
boundary_competition_ratio
Uncertainty layer
boundary_uncertainty
trajectory_uncertainty
regime_confidence
Regime transition layer
regime_transition_score
transition_direction
regime_separation_margin
transition_uncertainty
transition_velocity
Perturbation and collapse markers
perturbation_radius
collapse_trigger
Recovery geometry
recovery_distance
recovery_gradient
return_feasibility
Intervention vector
delta_surgical_stress
delta_physiologic_buffer
delta_recovery_lag
delta_system_coupling
Outcome fields
trajectory_shift
minimal_intervention_path
stabilization_success
label_postop_collapse in train only
tester.csv excludes:
stabilization_success
label_postop_collapse
Files
data/train.csv
Training rows including outcome labels.
data/tester.csv
Evaluation rows with labels removed.
scorer.py
Reference v0.8 evaluation script.
Returns:
Classification metrics
accuracy
precision
recall
f1
confusion matrix
Regime transition diagnostics
recall_regime_transition_detection
false_stable_regime_rate
transition_direction_accuracy
high_uncertainty_transition_miss_rate
transition_detection_accuracy
false_transition_rate
missed_transition_rate
boundary_competition_error
misidentified_primary_regime_rate
Additional information
support counts
threshold transparency
dynamic label column discovery
benchmark_spec.json
Machine-readable benchmark contract describing task type, target label, withheld fields, metric definitions, thresholds, and prediction-file requirements.
Evaluation
Primary metrics
recall_regime_transition_detection
false_stable_regime_rate
Transition diagnostics
transition_direction_accuracy
high_uncertainty_transition_miss_rate
missed_transition_rate
boundary_competition_error
misidentified_primary_regime_rate
Additional reference diagnostics
transition_detection_accuracy
false_transition_rate
The goal of evaluation is not only to test whether a model predicts the correct label.
It tests whether the model correctly detects regime transitions and their geometry.
Note on transition_velocity
transition_velocity represents the rate at which the system moves toward the competing basin.
The variable is included in the dataset because it can help models reason about escalation speed.
The reference scorer does not yet evaluate this field directly.
Future versions may introduce velocity-aware diagnostics.
Production deployment
This dataset class functions best as a transition-aware monitoring layer rather than a standalone classifier.
Typical deployments include:
- surgical ward deterioration monitoring
- enhanced recovery pathway oversight
- ICU escalation support
- digital twin modeling of postoperative instability
- AI model auditing for competing failure-mode recognition
The value lies in representing where the patient sits between competing basins.
Enterprise and research collaboration
This dataset class is suitable for collaboration with:
- perioperative analytics teams
- surgical outcomes research groups
- critical care teams
- clinical AI safety researchers
- digital twin developers
- early-warning and escalation platforms
The framework provides explicit representation of:
- which regime a patient is leaving
- which regime is emerging
- how uncertain the transition is
- whether stabilization remains structurally feasible
License
MIT
- Downloads last month
- 19