IINTS-AF SDK v1.5.13 Release Notes¶
v1.5.13 documents and hardens the AI Red-Team Realism Auditor workflow for long Jetson and AdvancedMetabolicModel runs.
Highlights¶
1. AI Realism Auditor (The "Red Team")¶
We have introduced a powerful new tool designed to mathematically stress-test the core SDK physics: iints.tools.ai_realism_auditor. This module acts as an autonomous clinical auditor:
- Heuristic Filtering: Instantly scans massive CSV datasets for physiologically impossible edge-cases (e.g., negative glucose, impossible rates of change, exploding ketones).
- Dual Compatibility: Natively supports both scratch AdvancedMetabolicModel outputs (time_min, glucose, ffa, ketones) and official Jetson Endurance telemetry (time_minutes, glucose_actual_mgdl).
- Ollama/Mistral Verdicts: Extracts specific anomalous time-windows and passes them to a local LLM for a clinical verdict on whether the event is a rare physiological extreme or a true mathematical flaw in the SDK.
- Deterministic Fallback: Added a --no-ai flag to allow CI/CD and offline Jetson execution of the heuristic filter without requiring the heavy LLM backend.
2. Endurance Generation¶
To support the Auditor, we introduced examples/jetson_endurance_test.py. This acts as an adversarial data generator that deliberately injects skipped boluses, immense carbohydrate intakes, and multi-hour pump failures into the AdvancedMetabolicModel over a simulated 14-day timeline.
3. Comprehensive Documentation¶
A new comprehensive documentation file has been added at docs/AI_RED_TEAM_AUDITOR.md, containing booth-safe commands and the mathematical underpinning behind the lipotoxicity and ketone models.
Corrected Claims¶
The previous scratch walkthrough described the 14-day demo as “almost half a million datapoints.” The verified 5-minute, 14-day configuration produces:
With 8 exported columns, that is about:
That is still a useful endurance stress file, but it should not be described as half a million rows.
The scratch demo also claimed that a hidden G=-50 model glitch is directly produced by the physiology. In the guarded implementation, normal model output is clipped by the glucose-transition guard:
So negative glucose should be treated as deliberate corruption or a true data/model bug, not normal physiology.
Mathematical Core¶
The 18-state advanced model uses:
Free fatty acids:
Ketones:
Lipotoxicity:
Beta-cell decay:
T1D glucose instability:
Verified Locally¶
Smoke checks performed:
PYTHONPATH=src python3 -m pytest -q -p no:cacheprovider tests/tools/test_ai_realism_auditor.py
PYTHONPATH=src python3 examples/jetson_endurance_test.py --days 0.05 --output /tmp/iints_redteam_demo.csv --inject-demo-glitch
PYTHONPATH=src python3 -m iints.tools.ai_realism_auditor /tmp/iints_redteam_demo.csv --report /tmp/iints_redteam_demo.md --no-ai
The official Jetson endurance command also works when report dependencies such as matplotlib are installed:
iints jetson endurance start --algo algorithms/example_algorithm.py --duration 1h --output-dir /tmp/iints_endurance_smoke --profile mixed_adversarial --seed 42
If this command fails with ModuleNotFoundError: matplotlib, install the SDK with report extras:
python3 -m pip install -e ".[full]"