Inspiration Sepsis can turn deadly in a few hours, and every hour of delay in treatment makes it worse. Hospitals use warning scores like NEWS2 to catch it early. The problem is those alarms go off so often that nurses start tuning them out. This is called alarm fatigue. I wanted to answer one fair question. If a model and NEWS2 are allowed the same number of alarms, can the model warn just as well with fewer false alarms, and can it explain why it alerted?

What it does SepsisLens is a sepsis early warning research tool with a web dashboard. It has four parts.

  • Patient Replay lets you step through a real ICU stay hour by hour. It only shows what doctors would have known at that hour, so it never peeks at the future. You see the model score, its alerts, and the NEWS2 style score side by side.
  • Explanations show which vital signs and lab values pushed the score up for each alert, using SHAP.
  • Alarm Budget lets you pick how many alerts per 100 patient hours you allow and a cooldown, then compares catch rates against NEWS2 style and qSOFA style scores.
  • Trust and Validation shows the full results, confidence intervals, subgroup checks, and every limit.

My main result is on Hospital B, a hospital the model never trained on. At a target of 5 alerts per 100 patient hours with a 12 hour cooldown, SepsisLens had about 14% fewer false alarms than the NEWS2 style score (27,340 vs 31,841). It still caught about the same share of septic patients, 69.0% (634 of 919) vs 67.0% (616 of 919). That 2 point gap is within noise, so I don't claim it catches more. The win is fewer false alarms at the same catch rate.

In the demo case, SepsisLens alerts 12 hours before the inferred onset and 10 hours before NEWS2. That is a best case, and I say so in the app. The app also has buttons that open a case the model missed and a case where NEWS2 was faster.

How I built it

  • Data: the PhysioNet/CinC Challenge 2019 ICU dataset (CC BY 4.0). I trained and set alarm thresholds on Hospital A only. Hospital B (20,000 patients, 761,995 patient hours) is the outside test.
  • Model: LightGBM on hourly features that only use current and past data. Patients never appear in both train and test. SHAP explains every alert.
  • Alarm rules: thresholds are picked on Hospital A for each alarm budget, plus a cooldown so the same patient doesn't get spammed. NEWS2 and qSOFA get the exact same rules, so the comparison is fair.
  • Testing: a "catch" means at least one alert in the 12 hours before onset. Alerts outside that window count as false alarms. I used 500 bootstrap resamples for confidence intervals and also ran the official PhysioNet scorer unchanged.
  • App: Streamlit with a small preloaded demo set of 300 Hospital B patients, so it runs with no uploads. 20 tests and a smoke test cover every control.

=Challenges I ran into

  • Making the comparison fair was harder than I expected. Thresholds are set on Hospital A, but the real alarm rate shifts on Hospital B. So I report both the target rate and the real rate for every method.
  • Sepsis onset isn't recorded in the data. I estimate it from the first positive label hour plus 6, so warning times are estimates.
  • The catch rate gain is small. The paired bootstrap interval runs from about -1.6 to +5.6 points, so I chose to say that instead of overclaiming.
  • I had looked at Hospital B before my final changes, so I locked the model and rules by hash and call it an outside check, not a perfect holdout.

Accomplishments that I'm proud of

  • A real cross hospital test, with thresholds locked before testing on the new hospital.
  • About 14% fewer false alarms than NEWS2 style at the same alarm target, with a similar catch rate and higher hourly AUROC (0.726 vs 0.643).
  • A demo that shows its own misses, not just the best case.
  • Every alert can be explained, and the replay never shows the future.
  • I kept the result where NEWS2 looks better. At a tighter 2 alerts per 100 hours target, NEWS2 style catches slightly more (36.6% vs 34.8%), but it fires about twice as many alarms (1.61 vs 0.82 per 100 hours).

What I learned

  • A better AUROC doesn't automatically mean more patients get caught. You have to test at a real alarm setting.
  • The alarm rules matter a lot. Part of the improvement comes from the cooldown, not just the model.
  • Simple numbers that people can check build more trust than big claims.

What's next for SepsisLens

  • Test it on more hospitals and in real time, with doctors and nurses helping define useful alert windows.
  • Use the full NEWS2 and qSOFA definitions instead of partial versions.
  • Do a deeper fairness check than my sex and age group audit.
  • Study how alerts would fit into a real hospital workflow before claiming it helps patients.

This is a research prototype. It is not a medical device and is not for clinical use.

Built With

Share this project:

Updates

Submission history