Datasets:
scenario_id string | oxygen_demand float64 | buffer_capacity float64 | lag_burden float64 | coupling_stress 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 float64 | transition_direction string | regime_separation_margin float64 | transition_uncertainty float64 | transition_velocity float64 | intervention_leverage_score float64 | intervention_alignment_score float64 | rescue_window_width float64 | pathway_divergence_margin float64 | intervention_competition_ratio float64 | primary_intervention_path string | secondary_intervention_path string | intervention_uncertainty float64 | pathway_switch_velocity float64 | control_sequence_alignment_score float64 | control_horizon int64 | feedback_response_score float64 | intervention_timing_score float64 | adaptation_latency int64 | control_stability_margin float64 | sequence_divergence_margin float64 | controller_confidence float64 | recovery_consistency_score float64 | control_recalibration_count int64 | terminal_pathway_state string | feedback_noise_ratio float64 | controller_oscillation_score float64 | rollback_trigger_count int64 | perturbation_radius float64 | collapse_trigger string | recovery_distance float64 | recovery_gradient float64 | return_feasibility float64 | delta_oxygen_demand float64 | delta_buffer_capacity float64 | delta_lag_burden float64 | delta_coupling_stress float64 | trajectory_shift float64 | minimal_intervention_path string | stabilization_success int64 | label_respiratory_collapse int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
resp001 | 0.86 | 0.28 | 0.73 | 0.79 | 0.67 | 0.6 | 0.21 | 0.18 | 0.34 | 0.7 | 0.17 | 0.23 | 0.82 | 0.78 | toward_failure | 0.42 | 0.2 | 0.55 | 0.82 | 0.77 | 0.41 | 0.25 | 0.62 | oxygen_then_noninvasive_ventilation | bronchodilator_then_oxygen | 0.18 | 0.15 | 0.8 | 3 | 0.75 | 0.79 | 1 | 0.72 | 0.23 | 0.81 | 0.77 | 1 | stabilized | 0.11 | 0.1 | 0 | 0.42 | desaturation_spike | 0.3 | -0.4 | 0.75 | -0.18 | 0.21 | -0.15 | -0.18 | -0.22 | oxygen_then_noninvasive_ventilation | 1 | 1 |
resp002 | 0.91 | 0.22 | 0.8 | 0.86 | 0.75 | 0.68 | 0.27 | 0.12 | 0.28 | 0.79 | 0.23 | 0.28 | 0.78 | 0.85 | toward_failure | 0.36 | 0.24 | 0.62 | 0.79 | 0.69 | 0.3 | 0.2 | 0.67 | intubation_then_peep_escalation | oxygen_then_noninvasive_ventilation | 0.27 | 0.24 | 0.55 | 1 | 0.5 | 0.54 | 3 | 0.35 | 0.19 | 0.65 | 0.43 | 3 | unstable_recovery | 0.17 | 0.3 | 1 | 0.57 | hypercapnic_fatigue | 0.46 | -0.17 | 0.4 | -0.08 | 0.05 | -0.04 | -0.06 | -0.05 | intubation_then_peep_escalation | 0 | 0 |
resp003 | 0.78 | 0.36 | 0.62 | 0.68 | 0.5 | 0.44 | 0.13 | 0.28 | 0.43 | 0.56 | 0.15 | 0.18 | 0.85 | 0.65 | toward_failure | 0.49 | 0.16 | 0.4 | 0.74 | 0.7 | 0.54 | 0.17 | 0.56 | bronchodilator_then_oxygen | oxygen_then_monitoring | 0.14 | 0.1 | 0.74 | 2 | 0.75 | 0.76 | 1 | 0.69 | 0.16 | 0.78 | 0.73 | 1 | partially_stabilized | 0.08 | 0.12 | 0 | 0.34 | bronchospasm_drift | 0.27 | -0.3 | 0.71 | -0.13 | 0.16 | -0.1 | -0.12 | -0.14 | bronchodilator_then_oxygen | 1 | 1 |
resp004 | 0.94 | 0.19 | 0.84 | 0.89 | 0.81 | 0.73 | 0.3 | 0.09 | 0.24 | 0.86 | 0.27 | 0.32 | 0.75 | 0.91 | toward_failure | 0.3 | 0.27 | 0.7 | 0.76 | 0.58 | 0.22 | 0.15 | 0.72 | intubation_then_proning | recruitment_then_peep_escalation | 0.33 | 0.3 | 0.44 | 0 | 0.39 | 0.41 | 4 | 0.24 | 0.14 | 0.58 | 0.31 | 4 | relapse | 0.22 | 0.38 | 2 | 0.65 | refractory_ards_transition | 0.55 | -0.1 | 0.25 | -0.03 | 0.02 | -0.02 | -0.03 | -0.03 | intubation_then_proning | 0 | 0 |
resp005 | 0.82 | 0.32 | 0.68 | 0.74 | 0.58 | 0.51 | 0.16 | 0.23 | 0.39 | 0.62 | 0.16 | 0.21 | 0.84 | 0.72 | toward_failure | 0.45 | 0.18 | 0.47 | 0.8 | 0.75 | 0.47 | 0.22 | 0.6 | oxygen_then_noninvasive_ventilation | bronchodilator_then_oxygen | 0.17 | 0.13 | 0.77 | 2 | 0.79 | 0.78 | 1 | 0.72 | 0.2 | 0.8 | 0.77 | 1 | stabilized | 0.1 | 0.09 | 0 | 0.4 | postop_atelectatic_shift | 0.32 | -0.34 | 0.74 | -0.15 | 0.19 | -0.13 | -0.16 | -0.17 | oxygen_then_noninvasive_ventilation | 1 | 1 |
resp006 | 0.87 | 0.27 | 0.76 | 0.81 | 0.69 | 0.62 | 0.23 | 0.16 | 0.31 | 0.74 | 0.2 | 0.25 | 0.81 | 0.8 | toward_failure | 0.39 | 0.22 | 0.57 | 0.81 | 0.65 | 0.33 | 0.19 | 0.64 | recruitment_then_peep_escalation | oxygen_then_noninvasive_ventilation | 0.24 | 0.2 | 0.62 | 1 | 0.58 | 0.61 | 2 | 0.49 | 0.19 | 0.69 | 0.59 | 2 | unstable_recovery | 0.15 | 0.26 | 1 | 0.49 | alveolar_collapse_persistence | 0.41 | -0.21 | 0.46 | -0.07 | 0.07 | -0.05 | -0.08 | -0.07 | recruitment_then_peep_escalation | 1 | 0 |
resp007 | 0.75 | 0.4 | 0.57 | 0.61 | 0.42 | 0.36 | 0.1 | 0.34 | 0.49 | 0.5 | 0.12 | 0.16 | 0.87 | 0.57 | toward_failure | 0.53 | 0.14 | 0.33 | 0.7 | 0.67 | 0.58 | 0.16 | 0.54 | oxygen_then_monitoring | bronchodilator_then_oxygen | 0.13 | 0.09 | 0.71 | 2 | 0.72 | 0.74 | 1 | 0.67 | 0.15 | 0.76 | 0.7 | 1 | partially_stabilized | 0.08 | 0.12 | 0 | 0.3 | transient_wheeze_instability | 0.26 | -0.26 | 0.68 | -0.12 | 0.14 | -0.09 | -0.11 | -0.13 | oxygen_then_monitoring | 1 | 1 |
resp008 | 0.9 | 0.23 | 0.79 | 0.85 | 0.77 | 0.7 | 0.28 | 0.11 | 0.26 | 0.82 | 0.25 | 0.29 | 0.77 | 0.88 | toward_failure | 0.34 | 0.25 | 0.65 | 0.76 | 0.54 | 0.26 | 0.16 | 0.7 | intubation_then_proning | intubation_then_peep_escalation | 0.31 | 0.28 | 0.45 | 0 | 0.4 | 0.4 | 4 | 0.23 | 0.14 | 0.55 | 0.3 | 4 | irreversible_collapse | 0.23 | 0.41 | 2 | 0.67 | refractory_hypoxemia | 0.6 | -0.08 | 0.2 | -0.02 | 0.01 | -0.01 | -0.02 | -0.03 | intubation_then_proning | 0 | 0 |
resp009 | 0.79 | 0.35 | 0.65 | 0.7 | 0.53 | 0.47 | 0.15 | 0.25 | 0.41 | 0.58 | 0.15 | 0.19 | 0.85 | 0.68 | toward_failure | 0.47 | 0.17 | 0.44 | 0.79 | 0.73 | 0.49 | 0.2 | 0.58 | oxygen_then_noninvasive_ventilation | recruitment_then_peep_escalation | 0.17 | 0.12 | 0.75 | 3 | 0.76 | 0.77 | 1 | 0.7 | 0.18 | 0.79 | 0.74 | 1 | stabilized | 0.09 | 0.1 | 0 | 0.37 | mixed_vq_shift | 0.29 | -0.32 | 0.73 | -0.14 | 0.18 | -0.12 | -0.14 | -0.15 | oxygen_then_noninvasive_ventilation | 1 | 1 |
ClarusC64/clinical-quad-oxygen-demand-buffer-lag-coupling-respiratory-collapse-v1.0
What this repo does
This repository provides a Clarus v1.0 benchmark for respiratory collapse under a four-variable clinical quad:
- oxygen_demand
- buffer_capacity
- lag_burden
- coupling_stress
The v1.0 upgrade is Closed-Loop Control Geometry.
The task is no longer limited to detecting deterioration or ranking one intervention against another.
It tests whether a controller can:
- choose the right path
- apply the path in the right sequence
- read feedback from the system
- adapt in time
- maintain durable recovery
Concept ladder
| Version | Capability |
|---|---|
| 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 |
| v0.9 | intervention competition geometry |
| v1.0 | closed-loop control geometry |
Core quad
oxygen_demand
Total respiratory and metabolic demand pressing the system toward oxygen failure.
buffer_capacity
Remaining reserve available to absorb respiratory strain.
lag_burden
Delayed correction pressure caused by unresolved respiratory instability.
coupling_stress
Cross-system destabilization linking lungs, perfusion, metabolism, and hemodynamics.
Clinical variable mapping
| Variable | Clinical interpretation | Typical measurement proxies |
|---|---|---|
| oxygen_demand | respiratory and metabolic burden | work of breathing, oxygen extraction, respiratory rate |
| buffer_capacity | remaining reserve | oxygen delivery margin, ventilatory reserve, compensatory reserve |
| lag_burden | unresolved instability debt | delayed airway support, persistent hypoxemia, unresolved fatigue |
| coupling_stress | cross-organ destabilization | V/Q mismatch, hemodynamic strain, metabolic spillover |
These four variables define the structural state of the respiratory system rather than a single physiological measurement.
Prediction target
The target is label_respiratory_collapse.
Default stronger v1.0 rule
label = 1 if all of the following hold:
stabilization_success = 1trajectory_shift < -0.10intervention_alignment_score >= 0.60control_sequence_alignment_score >= 0.60recovery_consistency_score >= 0.60
Mid-strength variant
label = 1 if:
stabilization_success = 1trajectory_shift < -0.10control_sequence_alignment_score >= 0.60
Relaxed variant
label = 1 if stabilization_success = 1
Example row
The following simplified row shows a near-miss under the strict v1.0 label rule.
| Field | Value |
|---|---|
| stabilization_success | 1 |
| trajectory_shift | -0.11 |
| intervention_alignment_score | 0.64 |
| control_sequence_alignment_score | 0.59 |
| recovery_consistency_score | 0.74 |
Four of the five conditions are satisfied.
But control_sequence_alignment_score = 0.59 falls below the threshold of 0.60.
Therefore:
label = 0
This illustrates why v1.0 measures true closed-loop control quality, not temporary improvement alone.
Row structure
Each row represents a respiratory deterioration scenario with:
- quad state variables
- trajectory signals
- boundary geometry
- regime transition signals
- intervention competition signals
- closed-loop control signals
- perturbation and recovery signals
- delta signals
- intervention path and final label
Signal groups
Quad state variables
- oxygen_demand
- buffer_capacity
- lag_burden
- coupling_stress
Trajectory signals
- drift_gradient
- drift_velocity
- drift_acceleration
- trajectory_shift
Boundary geometry
- boundary_distance
- secondary_boundary_distance
- boundary_competition_ratio
Uncertainty signals
- boundary_uncertainty
- trajectory_uncertainty
- regime_confidence
- transition_uncertainty
- intervention_uncertainty
- controller_confidence
- feedback_noise_ratio
Regime transition signals
- regime_transition_score
- transition_direction
- regime_separation_margin
- transition_velocity
Intervention signals
- intervention_leverage_score
- intervention_alignment_score
- rescue_window_width
- pathway_divergence_margin
- intervention_competition_ratio
- primary_intervention_path
- secondary_intervention_path
- pathway_switch_velocity
- minimal_intervention_path
Closed-loop control signals (v1.0)
- control_sequence_alignment_score
- control_horizon
- feedback_response_score
- intervention_timing_score
- adaptation_latency
- control_stability_margin
- sequence_divergence_margin
- controller_confidence
- recovery_consistency_score
- control_recalibration_count
- terminal_pathway_state
Possible terminal pathway states include:
- stabilized
- partially_stabilized
- unstable_recovery
- relapse
- irreversible_collapse
Optional control diagnostics included
- feedback_noise_ratio
- controller_oscillation_score
- rollback_trigger_count
Recovery signals
- recovery_distance
- recovery_gradient
- return_feasibility
Perturbation signals
- perturbation_radius
- collapse_trigger
Delta signals
- delta_oxygen_demand
- delta_buffer_capacity
- delta_lag_burden
- delta_coupling_stress
Dataset construction
Each scenario is generated using a structured simulation of respiratory deterioration and intervention sequences.
1. System initialization
A baseline respiratory state is sampled across the quad variables.
2. Instability evolution
The system evolves using trajectory signals that determine movement toward deterioration or recovery boundaries.
3. Intervention competition
Candidate interventions are evaluated using intervention competition geometry.
4. Closed-loop control execution
A selected control path is applied through a sequence of actions.
Control signals measure:
- sequence alignment
- timing
- feedback interpretation
- adaptation speed
- durability of recovery
The final state determines:
stabilization_successterminal_pathway_statelabel_respiratory_collapse
Files
data/train.csv
Labeled training set with the full v1.0 schema.data/tester.csv
Test-style file.stabilization_successis withheld.scorer.py
Reference scorer for binary metrics and v1.0 control diagnostics.benchmark_spec.json
Canonical machine-readable benchmark spec.dataset_schema.json
Machine-readable structural schema with column groups, types, ranges, and row order.
Evaluation
Primary metric
recall_correct_control_sequence_selection
Secondary metric
false_effective_control_rate
Binary metrics
- accuracy
- precision
- recall
- f1
- confusion matrix
Closed-loop diagnostics
- primary_intervention_path_accuracy
- secondary_intervention_path_accuracy
- control_sequence_alignment_accuracy
- control_horizon_error
- feedback_response_accuracy
- intervention_timing_accuracy
- high_uncertainty_control_miss_rate
- narrow_window_control_miss_rate
- adaptation_latency_error
- control_stability_error
- recovery_consistency_error
- recalibration_overuse_rate
- controller_oscillation_misread_rate
- terminal_pathway_state_accuracy
Structural interpretation
Earlier Clarus datasets asked:
Which intervention is best?
v1.0 asks a harder question:
Can the controller stay aligned with reality while the system evolves?
Real systems fail not only because the first action is wrong.
They also fail because:
- feedback is misread
- adaptation is delayed
- interventions are mistimed
- control oscillations destabilize recovery
v1.0 measures these failure modes directly.
Dataset limitations
This dataset models structural control dynamics, not detailed clinical treatment protocols.
Important limitations:
- intervention paths are simplified abstractions
- control signals represent structural decision quality, not pharmacological precision
- physiological variables are normalized system indicators rather than raw bedside measurements
- the dataset does not capture the full biological variability of real respiratory collapse
The benchmark evaluates control reasoning, not medical safety.
Intended use
This dataset is intended for research on:
- instability prediction
- sequential decision reasoning
- closed-loop control modeling
- intervention planning under uncertainty
- AI robustness in dynamic clinical-like environments
Not intended for
This dataset must not be used for:
- real clinical decision support
- medical diagnosis
- treatment recommendation systems
- automated ICU control systems
- deployment in patient care environments
Structural note
This v1.0 dataset marks the move from intervention competition to actual control logic.
The benchmark asks whether the controller stays aligned with reality across time.
That is the threshold where Clarus becomes a control-layer instrument rather than only a detection or ranking layer.
Production deployment
This dataset format is suitable for controlled benchmarking in domains where sequential intervention quality matters more than one-shot classification.
Examples include:
- respiratory failure stabilization
- oxygenation collapse monitoring
- ventilatory escalation planning
- distributed system control
- multi-step recovery planning
Enterprise and research collaboration
This repo is part of the broader Clarus ladder for modeling instability, recovery, and control under feedback.
It is designed for:
- benchmark development
- model evaluation
- intervention policy testing
- control-sequence auditing
- future cross-domain transfer into other high-stakes systems
License
MIT
- Downloads last month
- 29