SFR-BR is a deterministic systems framework for analyzing the stability of stateful AI recovery under strict hardware constraints.
It models recovery as a bounded-resource dynamical system where nonlinear recomputation cost, probabilistic detection delay, and hard infrastructure caps interact to determine whether recovery succeeds or collapses.
Modern AI systems implicitly assume unlimited compute during recovery.
In real-world systems:
- Compute budgets are capped
- Memory is bounded
- Detection is delayed
- Recovery consumes infrastructure resources
- Hard failures can occur before logical correction completes
SFR-BR demonstrates that recovery stability becomes a nonlinear phase transition problem under bounded compute.
The framework exposes collapse boundaries, inversion regimes, and the structural limits of robustness under infrastructure constraints.
Under bounded compute, when does recovery succeed before infrastructure collapse — and when do resource limits induce failure?
SFR-BR reframes recovery as a resource-constrained stability problem rather than a purely logical robustness problem.
Stateful AI agents maintain persistent internal context (e.g., KV-cache memory).
When silent corruption occurs:
- Corruption propagates undetected.
- Detection occurs probabilistically.
- Recovery triggers recomputation.
- Recompute cost grows nonlinearly with corruption depth.
- A hard cost cap may be exceeded.
- Infrastructure collapse occurs if cumulative cost ≥ cap.
Recovery stability depends on:
- Corruption depth (D)
- Detection probability (p)
- Nonlinear recomputation scaling
- Hard cost cap (C)
- RecoveryExecutor — bounded recovery execution engine
- Hardware Constraint Vector (HCV) — explicit hard cost cap model
- CostSimulator — nonlinear cumulative cost accounting
- Latent KV-cache corruption model
- Geometric detection delay process
- Stability phase experiment framework
- Theoretical stability inequality solver
All experiments are deterministic and reproducible.
We sweep across:
- Corruption Depth (D)
- Hard Cost Cap (C)
- Detection Probability (p)
Each configuration is classified as:
- Stable
- Infrastructure Collapse
This produces empirical stability phase diagrams.
Regions where robustness expands or shrinks stability:
Legend:
- Green → Robust expands stability
- Red → Robust shrinks stability
- Gray → Equal stability
Maximum stable corruption depth per hardware cap:
This figure overlays:
- Empirical Cheap boundary
- Empirical Robust boundary
- Theoretical predicted boundary
Empirical collapse aligns qualitatively with the derived nonlinear stability inequality.
Total recovery cost is modeled as:
c_a · D + k · f(D)
Stable recovery requires:
c_a · D + k · f(D) < C
Infrastructure collapse occurs when:
c_a · D + k · f(D) ≥ C
Under probabilistic detection:
c_a · (1/p) + k · f(1/p) < C
Where:
- D = Corruption depth
- C = Hard cost cap
- c_a = Linear action cost coefficient
- k · f(D) = Nonlinear recomputation growth
- p = Detection probability
A numerical solver estimates theoretical collapse depth and compares it against empirical phase boundaries.
Under specific detection probabilities and cost caps:
A cheaper recovery strategy remains stable
while a robustness-aware strategy collapses due to additional overhead.
This inversion arises from nonlinear recomputation scaling interacting with hard cost constraints.
Robustness is therefore conditional under bounded compute.
From the final stability sweep:
- Total grid points evaluated: 56
- Cheap stable regions: 3
- Robust stable regions: 0
- Stability inversion observed under moderate detection probabilities
- Empirical collapse boundary aligns with nonlinear theoretical prediction
These results demonstrate that recovery stability is governed by bounded nonlinear cost accumulation rather than logical robustness alone.
SFR_BR_PROJECT/
├── analysis/ # Stability analysis & theoretical boundary solver
├── archive/ # Archived experimental components
├── core/ # Core execution system
│ ├── agent/ # Cheap & Robust agent policies
│ ├── harness/ # Recovery executor, cost simulator, HCV
│ ├── judge/ # Semantic validation logic
│
├── experiments/ # Stability phase & inversion sweeps
│ ├── stability_phase.py
│ ├── stability_inversion.py
│
├── figures/ # Generated figures (PNG + PDF)
│ ├── stability_surface_Cheap.png
│ ├── stability_surface_Robust.png
│ ├── differential_stability.png
│ ├── stability_boundary.png
│
├── plots/ # Plot generation utilities
├── results/ # Experimental result collectors
├── tasks/ # Task definitions
├── tests/ # Testing modules
│
├── main.py # Master experiment runner
├── requirements.txt
├── LICENSE
├── README.md
└── DOCUMENTATION.md
Install dependencies:
pip install -r requirements.txt
Run full experiment:
python main.py
All figures will be generated and saved inside:
figures/
SFR-BR ensures:
- Fixed random seed
- Deterministic corruption injection
- Explicit hard cap enforcement
- Controlled probabilistic detection model
- No external API calls
- Fully replayable parameter sweeps
All stability diagrams are reproducible from source.
SFR-BR provides:
- A deterministic benchmark for stateful recovery under bounded compute
- Empirical stability phase diagrams
- Nonlinear collapse boundary extraction
- Stability inversion identification
- Analytical stability condition validation
This framework formalizes recovery as a bounded-resource phase transition problem and exposes structural limits of robustness under infrastructure constraints.
Amulya Biradar
CSE (AI & ML)



