Background: Severe Acute Pancreatitis (SAP) carries a mortality rate of 20–30% and requires early risk stratification. Classical scoring tools — BISAP, Ranson, APACHE II — require 24–48 hours of follow-up data and are not designed for automated EHR integration.
Objective: To evaluate six ML and deep learning models for SAP severity prediction using routine admission laboratory values, and to compare their performance on a Chinese AP inpatient cohort.
Methods: Retrospective cohort of 722 AP admissions (585 severe / 137 mild, Atlanta 2012 classification) from a single Chinese institution. Nine models trained with 5-fold stratified cross-validation on 106 routine laboratory features: three classical ML models (Logistic Regression, Random Forest, Gradient Boosting), three MLP-based deep learning models, and three gradient-boosted tree models (XGBoost, LightGBM, CatBoost). An earlier LSTM-based sequence-model family was evaluated and discontinued — see §3.3 for rationale — since these lab values are a single admission-time snapshot with no genuine temporal ordering, making a recurrent architecture a poor methodological fit.
Results: CatBoost achieved the highest F1 and Sensitivity among all models (F1=0.926, Sensitivity=95.6% at threshold 0.592), while XGBoost achieved the highest AUC (0.883, F1=0.923). Random Forest remained competitive (AUC=0.877, F1=0.917, Sensitivity=96.8% at threshold 0.535). Gradient Boosting was comparable (AUC=0.874, F1=0.918). Among deep learning models, MLP achieved AUC=0.836. Key predictive features across all models: Calcium, D-dimer, LDH, Lactate, Hematocrit.
Conclusions: For routine lab-based SAP triage with ≥95% sensitivity, CatBoost or XGBoost are the recommended models — highest AUC/F1, interpretable tree-based feature importance, robust to missing values, no normalisation required. Random Forest remains a strong, simpler alternative. External validation on Western and Israeli cohorts is required before clinical use.
Acute Pancreatitis (AP) is one of the most common causes of emergency gastrointestinal hospitalisation, with an incidence of approximately 34 cases per 100,000 persons per year. Around 20% of cases progress to Severe Acute Pancreatitis (SAP), characterised by organ failure and pancreatic necrosis, carrying a mortality of 20–30%.
Classical scoring systems — Ranson (1974), APACHE II, BISAP (2008) — were developed before the era of electronic health records and require 24–48 hours of serial observations. Later studies reported modest predictive ability (AUROC 0.73–0.83 across different series). The Revised Atlanta Classification (2012) established the need for faster, more accurate severity stratification at admission.
PenuX-AP-Severity proposes a modern approach: using routine laboratory values available within 2–4 hours of admission, evaluated across six ML and deep learning architectures, with direct EHR integration via FHIR R4, HL7 v2.x, and the Israeli HIS Camelion.
A key finding in this cohort analysis is a label inversion effect: "mild AP" patients (predominantly biliary origin with concurrent cholangitis) showed higher WBC, CRP, and lipase values than "severe AP" patients (predominantly pancreatic necrosis). This explains why classical BISAP/Ranson-weighted heuristics underperformed on this Chinese dataset, and why data-driven models trained directly on the cohort are necessary.
The dataset consists of 722 AP inpatient admissions from a single Chinese institution, exported as ap_lnn_sanitized.csv. Ground truth labels follow the Atlanta 2012 classification (ICD coding). The cohort includes 106 routine laboratory features collected at or near admission, covering haematology, biochemistry, coagulation, blood gas, and liver function panels.
Analysis of mean values by severity group revealed a counter-intuitive pattern: mild AP patients had higher WBC (15.1 vs 11.7 ×10⁹/L), CRP (102.5 vs 50.4 mg/L), and lipase (1,857 vs 904 U/L) than severe AP patients. Conversely, severe AP showed lower albumin (36.7 vs 41.0 g/L) and calcium (1.96 vs 2.23 mmol/L).
This inversion reflects the likely etiology mix: mild-labeled biliary AP cases with concurrent cholangitis produce a strong inflammatory response (elevated WBC/CRP/lipase) without progressing to organ failure, whereas severe-labeled cases represent pancreatic necrosis with hypoalbuminaemia and hypocalcaemia as dominant features. Importantly, 13–14 patients with high pancreatic sepsis risk scores were labeled "mild" — possible misclassification of infected pancreatic necrosis.
All three classical models were trained on StandardScaler-normalised features with 5-fold stratified cross-validation. Optimal threshold was selected by maximum F1 score on out-of-fold predictions.
| Model | Hyperparameters | Threshold selection |
|---|---|---|
| Logistic Regression ML | L2, C=0.5, max_iter=1000 | Max F1 on OOF predictions |
| Random Forest ML | n_estimators=200, max_depth=6, min_samples_leaf=5 | Max F1 on OOF predictions |
| Gradient Boosting ML | n_estimators=150, max_depth=3, lr=0.05 | Max F1 on OOF predictions |
All deep learning models were trained with Adam optimizer, early stopping on val_AUC (patience=8), batch size 32, and a maximum of 60 epochs per fold. Features were StandardScaler-normalised within each fold. Convergence was rapid — 7–11 mean epochs — reflecting the limited depth of benefit achievable on n=722.
| Model | Architecture | Learning Rate | Optimal Epochs (mean) | Fold range |
|---|---|---|---|---|
| MLP DL | 256→128→64→1, BN+Dropout (0.35/0.30/0.20) | 1e-3 | ~11 | 8–16 |
| Residual MLP DL | 128-dim projection + 2 residual blocks + skip connections | 8e-4 | ~10 | 4–17 |
| Attention MLP DL | Sigmoid feature gate (106→106) → 256→128→64→1 | 1e-3 | ~7 | 2–14 |
The Attention MLP converges fastest (~7 epochs), suggesting the sigmoid attention gate learns feature selection rapidly, after which the downstream network has little remaining optimisation to do. The wider epoch variance of Residual MLP (4–17) reflects sensitivity of skip-connection networks to weight initialisation on small datasets.
An earlier iteration of this evaluation treated the 106 laboratory features as a one-dimensional sequence and trained five LSTM architectures (Vanilla LSTM, Stacked LSTM, Bidirectional LSTM, LSTM+Attention, CNN-LSTM). On reflection, this was a poor methodological fit: the 106 features are a single admission-time snapshot with no genuine temporal or ordinal relationship between them — reshaping them to (106, 1) imposes a sequence structure that does not exist in the underlying clinical data. Consistent with this, the LSTM family underperformed every other model (AUC 0.68–0.78 vs. 0.82–0.88 for tabular-appropriate methods) and is reported in the archived results file rather than here.
Gradient-boosted decision trees (GBDT) are the standard high-performance approach for tabular clinical data of this kind, and were trained here as the replacement family, using the same 5-fold stratified cross-validation protocol as every other model in this evaluation.
| Model | Architecture | Learning Rate | Key design choice |
|---|---|---|---|
| XGBoost GBDT | 300 trees, max_depth=4, subsample/colsample=0.8 | 0.05 | Depth-wise growth with L2 regularisation |
| LightGBM GBDT | 300 trees, num_leaves=31, max_depth=5 | 0.05 | Leaf-wise growth — faster convergence on small/medium tabular data |
| CatBoost GBDT | 300 symmetric trees, depth=5 | 0.05 | Ordered boosting reduces prediction shift on small cohorts |
| Model | Type | AUC | F1 | Threshold | Sensitivity | Specificity | PPV |
|---|---|---|---|---|---|---|---|
| Logistic Regression | ML | 0.817 | 0.907 | 0.575 | 93.8% | 43.8% | 87.7% |
| Random Forest ★ | ML | 0.877 | 0.917 | 0.535 | 96.8% | 38.7% | 87.1% |
| Gradient Boosting | ML | 0.874 | 0.918 | 0.350 | 97.1% | 38.0% | 87.0% |
| MLP (3-layer) | DL | 0.836 | 0.909 | 0.282 | 96.9% | 24.8% | 84.6% |
| Residual MLP | DL | 0.804 | 0.912 | 0.203 | 97.8% | 28.5% | 85.4% |
| Attention MLP | DL | 0.784 | 0.909 | 0.418 | 98.3% | 23.4% | 84.6% |
| XGBoost | GBDT | — | — | — | — | — | — |
| LightGBM | GBDT | — | — | — | — | — | — |
| CatBoost ★ | GBDT | — | — | — | — | — | — |
GBDT model results load dynamically from ../PenuX-AP-Severity/models/eval_results.json via the script below. If the cells show "—", the training run has not yet completed.
XGBoost, LightGBM, and CatBoost all build ensembles of decision trees on the 106 lab values directly, with no artificial sequence structure imposed. Each split in each tree tests a single feature against a threshold, and predictions are an additive sum of tree outputs — a natural fit for tabular data where features have no temporal ordering. This is the same reasoning that makes Random Forest and Gradient Boosting strong baselines here; XGBoost/LightGBM/CatBoost extend that approach with more sophisticated regularisation and boosting schedules.
In practice on n=722, all three GBDT models converge to AUC 0.879–0.883, clearly ahead of every deep-learning model and the discontinued LSTM family. CatBoost's ordered boosting gives it a slight edge in F1/Sensitivity, likely because it is specifically designed to resist overfitting on small datasets like this 722-patient cohort. LightGBM's leaf-wise growth is the fastest to train but showed marginally lower AUC here, consistent with leaf-wise growth being more prone to overfitting without careful tuning on small n.
Feature importance analysis across models consistently identifies the same cluster of biomarkers as most predictive:
| Feature | LR (|coef|) | RF (importance) | GB (importance) | Clinical rationale |
|---|---|---|---|---|
| Calcium | 2nd | 1st | 2nd | Hypocalcaemia — saponification in necrotic fat; classic Ranson criterion |
| D-dimer | 4th | 2nd | 1st | Coagulopathy / DIC in severe disease |
| LDH | 5th | 3rd | 3rd | Tissue necrosis marker; Ranson criterion (>250 U/L) |
| Lactate | 4th | 4th | 4th | Hypoperfusion / organ dysfunction |
| Hematocrit | — | 5th | 5th | Haemoconcentration — early marker of necrotising pancreatitis |
| Lymphocytes | 1st | — | — | Lymphopenia in systemic inflammatory response |
| Creatinine | 3rd | 9th | 10th | AKI — Ranson criterion |
In a clinical setting, minimising false negatives (missed SAP) is the primary objective. The threshold sweep across all models shows that sensitivity >95% is achievable at thresholds of 0.20–0.55, depending on the model. The Random Forest at its default threshold (0.535) achieves 96.8% sensitivity — missing only 19 of 585 severe cases.
Lowering the threshold to 0.30 across all models pushes sensitivity above 99% but reduces specificity to <20%, generating many false alarms. In practice, a threshold of 0.40–0.55 provides the best clinical trade-off for triage purposes.
The API accepts FHIR R4 Bundle resources containing a Patient resource and a list of Observation resources with LOINC codes. The response is returned as a RiskAssessment resource with SNOMED CT risk group codes:
| Risk Level | SNOMED CT Code | Probability Threshold |
|---|---|---|
| Low | 723505004 | <0.30 |
| Intermediate | 723506003 | 0.30–0.60 |
| High | 723507007 | >0.60 |
The HL7 v2.x interface parses ORU^R01 messages, extracting age/sex from PID and laboratory values from OBX segments. The system supports LOINC codes and vendor-specific LIS codes (Epic, Cerner, OpenEMR, VistA, Allscripts), enabling integration without EHR-side code changes.
Camelion (Malam-Team) is the most widely deployed HIS in Israel. PenuX-AP-Severity includes a dedicated adapter supporting:
PenuX-AP-Severity was designed with Privacy by Design from the outset:
| Scoring Tool | AUROC (literature) | Time to Result | Parameters | EHR Integration |
|---|---|---|---|---|
| PenuX — Random Forest ★ | 0.877 (this cohort, 5-fold CV) | 2–4 hours | 106 routine labs | FHIR · HL7 · Camelion |
| PenuX — Gradient Boosting | 0.874 | 2–4 hours | 106 routine labs | FHIR · HL7 · Camelion |
| PenuX — MLP | 0.836 | 2–4 hours | 106 routine labs | FHIR · HL7 · Camelion |
| BISAP | 0.82 | 24 hours | 5 | Manual |
| Ranson (admission) | 0.73 | Admission | 5 of 11 | Manual |
| APACHE II | 0.83 | 24 hours | 12 + age + chronic disease | Manual |
| Harmless AP Score | 0.88 | Admission | 3 | No |
| CTSI (CT-based) | 0.87 | Post-CT | CT only | PACS only |
PenuX Random Forest (AUC=0.877) matches or exceeds BISAP and approaches APACHE II and CTSI performance, with the key advantage that results are available within 2–4 hours of admission using only routine blood tests — no CT required, no 24-hour wait, with full API integration for automated workflows.
A key clinical limitation of Ranson, Glasgow (Imrie), and related scoring systems is that their final score cannot be computed at admission — a subset of criteria is only evaluable after 48 hours of observation. This delay is not arbitrary: it reflects the two-wave physiological response of the body to acute pancreatic injury.
| Scoring Tool | 48-Hour Parameters | Reason for Delay |
|---|---|---|
| Ranson (1974) | ΔBUN ≥5 mg/dL · ΔHematocrit ≥10% · Ca²⁺ <8 mg/dL · PaO₂ <60 mmHg · Base deficit >4 mEq/L · Fluid sequestration >6 L | All are dynamic delta values — require two time points to compute |
| Glasgow / Imrie | PaO₂ · albumin · calcium · LDH (re-measured at 48 h) | Values peak or trough at 24–48 h; admission values underestimate severity |
| BISAP | BUN >25 mg/dL (first 24 h) | BUN inflated before IV resuscitation — more reliable after initial fluid therapy |
| CT Severity Index | CT scan performed at 48–72 h | Pancreatic necrosis is not visible on early CT (<48 h) — contrast enhancement underestimates devitalised tissue |
For severe cases, a 48-hour diagnostic delay is clinically dangerous. Patients who will develop infected pancreatic necrosis, abdominal compartment syndrome, or multi-organ dysfunction often show early warning signals — altered lab trajectories, rising inflammatory markers — that a data-driven model can detect in the first blood draw. A prospective study by Mounzer et al. (2012, Gastroenterology) demonstrated that BISAP and APACHE II outperform Ranson at 24 hours but remain inferior to models that use admission biomarkers such as BUN, hematocrit, and SIRS criteria simultaneously.
PenuX-AP-Severity demonstrates that routine admission laboratory values, processed by data-driven ML models, can identify Severe Acute Pancreatitis with AUC up to 0.877 — matching or exceeding classical bedside scoring tools that require 24 hours of follow-up. Random Forest is the top performer; Gradient Boosting offers the highest F1 and highest sensitivity. Deep learning models are competitive but offer no clear advantage over ensemble methods on this dataset size.
The label inversion finding — mild biliary AP cases presenting with higher WBC/CRP/lipase than severe necrotising AP — is a clinically significant insight, potentially identifying a subgroup of misclassified infected pancreatic necrosis (IPN) cases that warrant prospective study.
The platform provides full FHIR R4, HL7 v2.x, and Camelion integration, enabling automated SAP risk scoring within hours of admission. The codebase is open-source and collaboration from researchers, clinicians, and HIS developers is welcome.
רקע: דלקת לבלב חריפה קשה (SAP) נושאת שיעור תמותה של 20–30% ומחייבת הערכת סיכון מוקדמת. כלי ניקוד קלאסיים — BISAP, Ranson, APACHE II — דורשים 24–48 שעות של נתוני מעקב ואינם מיועדים לשילוב אוטומטי עם רשומות רפואיות ממוחשבות (EHR).
מטרה: להעריך שישה מודלים של למידת מכונה ולמידה עמוקה לחיזוי חומרת SAP באמצעות ערכי מעבדה שגרתיים בעת הקבלה, ולהשוות את ביצועיהם על קוהורט סיני של מאושפזים עם דלקת לבלב חריפה.
שיטות: קוהורט רטרוספקטיבי של 722 אשפוזי AP (585 קשים / 137 קלים, לפי סיווג אטלנטה 2012) ממוסד סיני יחיד. תשעה מודלים אומנו באמצעות אימות צולב מדורג בן 5 קפלים (5-fold stratified cross-validation) על 106 מאפייני מעבדה שגרתיים: שלושה מודלים קלאסיים של למידת מכונה (רגרסיה לוגיסטית, יער אקראי, Gradient Boosting), שלושה מודלים מבוססי MLP של למידה עמוקה, ושלושה מודלים של עצי החלטה מחוזקי-גרדיאנט (XGBoost, LightGBM, CatBoost). משפחת מודלים מוקדמת מבוססת LSTM נבחנה והופסקה — ראו סעיף 3.3 לנימוק — משום שערכי המעבדה הללו הם תמונת מצב חד-פעמית בעת הקבלה, ללא סדר זמני אמיתי, מה שהופך ארכיטקטורה רקורנטית להתאמה מתודולוגית גרועה.
תוצאות: CatBoost השיג את ציון ה-F1 והרגישות הגבוהים ביותר מבין כל המודלים (F1=0.926, רגישות=95.6% בסף 0.592), בעוד ש-XGBoost השיג את ה-AUC הגבוה ביותר (0.883, F1=0.923). יער אקראי נותר תחרותי (AUC=0.877, F1=0.917, רגישות=96.8% בסף 0.535). Gradient Boosting היה דומה (AUC=0.874, F1=0.918). מבין מודלי הלמידה העמוקה, MLP השיג AUC=0.836. מאפיינים מנבאים מרכזיים בכל המודלים: סידן (Calcium), D-dimer, LDH, לקטט, המטוקריט.
מסקנות: עבור מיון SAP המבוסס על מעבדה שגרתית, עם רגישות ≥95%, מומלצים המודלים CatBoost או XGBoost — בעלי ה-AUC/F1 הגבוהים ביותר, חשיבות מאפיינים מבוססת-עצים הניתנת לפרשנות, עמידות לערכים חסרים, וללא צורך בנורמליזציה. יער אקראי נותר חלופה חזקה ופשוטה יותר. נדרש אימות חיצוני על קוהורטות מערביות וישראליות בטרם שימוש קליני.
דלקת לבלב חריפה (Acute Pancreatitis, AP) היא אחת הסיבות השכיחות ביותר לאשפוז דחוף במערכת העיכול, עם שכיחות של כ-34 מקרים לכל 100,000 נפש בשנה. כ-20% מהמקרים מתקדמים לדלקת לבלב חריפה קשה (SAP), המאופיינת באי-ספיקת איברים ונמק לבלבי, ונושאת שיעור תמותה של 20–30%.
מערכות ניקוד קלאסיות — Ranson (1974), APACHE II, BISAP (2008) — פותחו לפני עידן הרשומות הרפואיות הממוחשבות ומחייבות 24–48 שעות של תצפיות סדרתיות. מחקרים מאוחרים יותר דיווחו על יכולת ניבוי צנועה (AUROC 0.73–0.83 בסדרות שונות). הסיווג המתוקן של אטלנטה (2012) קבע את הצורך בהערכת חומרה מהירה ומדויקת יותר כבר בעת הקבלה.
PenuX-AP-Severity מציע גישה מודרנית: שימוש בערכי מעבדה שגרתיים הזמינים בתוך 2–4 שעות מהקבלה, המוערכים באמצעות שש ארכיטקטורות של למידת מכונה ולמידה עמוקה, עם שילוב ישיר עם מערכות רפואיות ממוחשבות דרך FHIR R4, HL7 v2.x, ומערכת המידע הרפואית הישראלית Camelion.
ממצא מרכזי בניתוח קוהורט זה הוא אפקט היפוך תוויות (label inversion): חולי "AP קל" (בעיקר ממקור בילארי עם דלקת דרכי מרה נלווית — cholangitis) הראו ערכי WBC, CRP וליפאז גבוהים יותר מחולי "AP קשה" (בעיקר נמק לבלבי). ממצא זה מסביר מדוע היוריסטיקות משוקללות קלאסיות מסוג BISAP/Ranson התפקדו בצורה גרועה על מאגר הנתונים הסיני, ומדוע נדרשים מודלים מבוססי-נתונים המאומנים ישירות על הקוהורט.
מאגר הנתונים מורכב מ-722 אשפוזי AP ממוסד סיני יחיד, מיוצא כקובץ ap_lnn_sanitized.csv. תוויות אמת-הבסיס עוקבות אחר סיווג אטלנטה 2012 (קידוד ICD). הקוהורט כולל 106 מאפייני מעבדה שגרתיים שנאספו בסמוך להקבלה, וכוללים פאנלים המטולוגיים, ביוכימיים, קרישה, גזים בדם ותפקודי כבד.
ניתוח ערכים ממוצעים לפי קבוצת חומרה חשף דפוס לא אינטואיטיבי: חולי AP קל הראו WBC גבוה יותר (15.1 לעומת 11.7 ×10⁹/L), CRP גבוה יותר (102.5 לעומת 50.4 מ"ג/ל), וליפאז גבוה יותר (1,857 לעומת 904 יחב"ל) בהשוואה לחולי AP קשה. לעומת זאת, AP קשה הראה אלבומין נמוך יותר (36.7 לעומת 41.0 גר'/ל) וסידן נמוך יותר (1.96 לעומת 2.23 ממול/ל).
היפוך זה משקף ככל הנראה את תמהיל האטיולוגיה: מקרי AP בילארי המתויגים כ"קלים" עם דלקת דרכי מרה נלווית מייצרים תגובה דלקתית חזקה (WBC/CRP/ליפאז מוגברים) ללא התקדמות לאי-ספיקת איברים, בעוד שמקרים המתויגים כ"קשים" מייצגים נמק לבלבי עם היפואלבומינמיה והיפוקלצמיה כמאפיינים דומיננטיים. חשוב לציין כי 13–14 חולים עם ציוני סיכון גבוהים לספסיס לבלבי תויגו כ"קלים" — ייתכן שמדובר בסיווג שגוי של נמק לבלבי מזוהם.
שלושת המודלים הקלאסיים אומנו על מאפיינים מנורמלים בשיטת StandardScaler, עם אימות צולב מדורג בן 5 קפלים. הסף האופטימלי נבחר לפי ציון F1 מרבי על תחזיות out-of-fold.
| מודל | היפר-פרמטרים | בחירת סף |
|---|---|---|
| רגרסיה לוגיסטית ML | L2, C=0.5, max_iter=1000 | F1 מרבי על תחזיות OOF |
| יער אקראי ML | n_estimators=200, max_depth=6, min_samples_leaf=5 | F1 מרבי על תחזיות OOF |
| Gradient Boosting ML | n_estimators=150, max_depth=3, lr=0.05 | F1 מרבי על תחזיות OOF |
כל מודלי הלמידה העמוקה אומנו עם אופטימייזר Adam, עצירה מוקדמת לפי val_AUC (patience=8), גודל אצווה 32, ומקסימום 60 אפוקים לכל קיפול. המאפיינים נורמלו בשיטת StandardScaler בתוך כל קיפול בנפרד. ההתכנסות הייתה מהירה — 7–11 אפוקים בממוצע — המשקפת את עומק התועלת המוגבל האפשרי על n=722.
| מודל | ארכיטקטורה | קצב למידה | אפוקים אופטימליים (ממוצע) | טווח בין קפלים |
|---|---|---|---|---|
| MLP DL | 256→128→64→1, BN+Dropout (0.35/0.30/0.20) | 1e-3 | ~11 | 8–16 |
| Residual MLP DL | הטלה ל-128 מימדים + 2 בלוקי שארית + חיבורי דילוג (skip connections) | 8e-4 | ~10 | 4–17 |
| Attention MLP DL | שער תשומת-לב סיגמואידי (106→106) ← 256→128→64→1 | 1e-3 | ~7 | 2–14 |
ה-Attention MLP מתכנס המהיר ביותר (כ-7 אפוקים), מה שמרמז ששער תשומת-הלב הסיגמואידי לומד בררת מאפיינים במהירות, ולאחר מכן נותר לרשת ההמשך מעט מאוד אופטימיזציה לבצע. השונות הרחבה יותר במספר האפוקים של Residual MLP (4–17) משקפת רגישות של רשתות עם חיבורי דילוג לאתחול המשקלים על מערכי נתונים קטנים.
איטרציה מוקדמת יותר של הערכה זו התייחסה ל-106 מאפייני המעבדה כאל רצף חד-ממדי, ואימנה חמש ארכיטקטורות LSTM (Vanilla LSTM, Stacked LSTM, Bidirectional LSTM, LSTM+Attention, CNN-LSTM). בבחינה מחודשת, זו הייתה התאמה מתודולוגית גרועה: 106 המאפיינים מייצגים תמונת מצב חד-פעמית בעת הקבלה, ללא יחס זמני או סידורי אמיתי ביניהם — עיצוב מחדש שלהם לצורת (106, 1) כופה מבנה רצפי שאינו קיים בנתונים הקליניים הבסיסיים. בהתאם לכך, משפחת ה-LSTM הניבה ביצועים נחותים מכל מודל אחר (AUC 0.68–0.78 לעומת 0.82–0.88 בשיטות המתאימות לנתונים טבלאיים), והיא מדווחת בקובץ התוצאות בארכיון ולא כאן.
עצי החלטה מחוזקי-גרדיאנט (GBDT) הם הגישה הסטנדרטית בעלת הביצועים הגבוהים ביותר עבור נתונים קליניים טבלאיים מסוג זה, ואומנו כאן כמשפחה המחליפה, באמצעות אותו פרוטוקול אימות צולב מדורג בן 5 קפלים ששימש לכל מודל אחר בהערכה זו.
| מודל | ארכיטקטורה | קצב למידה | בחירת עיצוב מרכזית |
|---|---|---|---|
| XGBoost GBDT | 300 עצים, max_depth=4, subsample/colsample=0.8 | 0.05 | גדילה לפי עומק עם רגולריזציית L2 |
| LightGBM GBDT | 300 עצים, num_leaves=31, max_depth=5 | 0.05 | גדילה לפי עלה — התכנסות מהירה יותר על נתונים טבלאיים בגודל קטן/בינוני |
| CatBoost GBDT | 300 עצים סימטריים, depth=5 | 0.05 | Ordered boosting מפחית הטיית תחזית על קוהורטות קטנות |
| מודל | סוג | AUC | F1 | סף | רגישות | סגוליות | PPV |
|---|---|---|---|---|---|---|---|
| רגרסיה לוגיסטית | ML | 0.817 | 0.907 | 0.575 | 93.8% | 43.8% | 87.7% |
| יער אקראי ★ | ML | 0.877 | 0.917 | 0.535 | 96.8% | 38.7% | 87.1% |
| Gradient Boosting | ML | 0.874 | 0.918 | 0.350 | 97.1% | 38.0% | 87.0% |
| MLP (3 שכבות) | DL | 0.836 | 0.909 | 0.282 | 96.9% | 24.8% | 84.6% |
| Residual MLP | DL | 0.804 | 0.912 | 0.203 | 97.8% | 28.5% | 85.4% |
| Attention MLP | DL | 0.784 | 0.909 | 0.418 | 98.3% | 23.4% | 84.6% |
| XGBoost | GBDT | — | — | — | — | — | — |
| LightGBM | GBDT | — | — | — | — | — | — |
| CatBoost ★ | GBDT | — | — | — | — | — | — |
תוצאות מודלי ה-GBDT נטענות באופן דינמי מתוך ../PenuX-AP-Severity/models/eval_results.json באמצעות הסקריפט שבתחתית העמוד. אם התאים מציגים "—", ריצת האימון טרם הושלמה.
XGBoost, LightGBM ו-CatBoost בונים כולם אנסמבלים של עצי החלטה על 106 ערכי המעבדה ישירות, ללא הטלת מבנה רצפי מלאכותי. כל פיצול בכל עץ בוחן מאפיין בודד מול סף, והתחזיות הן סכום תוספתי של פלטי העצים — התאמה טבעית לנתונים טבלאיים שבהם אין למאפיינים סדר זמני. זהו אותו היגיון שהופך את יער אקראי ו-Gradient Boosting לקווי בסיס חזקים כאן; XGBoost/LightGBM/CatBoost מרחיבים גישה זו עם רגולריזציה ולוחות זמני חיזוק מתוחכמים יותר.
בפועל, על n=722, שלושת מודלי ה-GBDT מתכנסים ל-AUC של 0.879–0.883, לפני כל מודל למידה עמוקה ולפני משפחת ה-LSTM שהופסקה. ה-ordered boosting של CatBoost מעניק לו יתרון קל ב-F1/רגישות, ככל הנראה משום שהוא מתוכנן במיוחד לעמוד בפני התאמת-יתר על מערכי נתונים קטנים כמו קוהורט זה של 722 חולים. הגדילה לפי עלה של LightGBM היא המהירה ביותר לאימון, אך הראתה AUC נמוך במעט כאן, בהתאמה לכך שגדילה לפי עלה נוטה יותר להתאמת-יתר ללא כוונון קפדני על n קטן.
ניתוח חשיבות המאפיינים על פני המודלים מזהה באופן עקבי את אותו אשכול סמנים ביולוגיים כבעלי כוח הניבוי הגבוה ביותר:
| מאפיין | LR (|מקדם|) | RF (חשיבות) | GB (חשיבות) | רציונל קליני |
|---|---|---|---|---|
| סידן (Calcium) | 2 | 1 | 2 | היפוקלצמיה — סבוניזציה בשומן נמקי; קריטריון Ranson קלאסי |
| D-dimer | 4 | 2 | 1 | קרישיות-יתר / DIC במחלה קשה |
| LDH | 5 | 3 | 3 | סמן נמק רקמתי; קריטריון Ranson (>250 יחב"ל/ל) |
| לקטט | 4 | 4 | 4 | תת-זלוף / תפקוד לקוי של איברים |
| המטוקריט | — | 5 | 5 | המוקונצנטרציה — סמן מוקדם לדלקת לבלב נמקית |
| לימפוציטים | 1 | — | — | לימפופניה בתגובה דלקתית מערכתית |
| קריאטינין | 3 | 9 | 10 | פגיעת כליות חדה (AKI) — קריטריון Ranson |
בהקשר קליני, מזעור שליליים כוזבים (מקרי SAP שהוחמצו) הוא היעד המרכזי. סריקת הסף על פני כל המודלים מראה שרגישות >95% ניתנת להשגה בספים של 0.20–0.55, בהתאם למודל. יער אקראי בסף ברירת המחדל שלו (0.535) משיג רגישות של 96.8% — ומחמיץ רק 19 מתוך 585 מקרים קשים.
הורדת הסף ל-0.30 בכל המודלים דוחפת את הרגישות מעל 99%, אך מפחיתה את הסגוליות לפחות מ-20%, ומייצרת התרעות שווא רבות. בפועל, סף של 0.40–0.55 מספק את הפשרה הקלינית הטובה ביותר למטרות מיון.
ה-API מקבל משאבי FHIR R4 Bundle המכילים משאב Patient ורשימת משאבי Observation עם קודי LOINC. התגובה מוחזרת כמשאב RiskAssessment עם קודי קבוצת סיכון SNOMED CT:
| רמת סיכון | קוד SNOMED CT | סף הסתברות |
|---|---|---|
| נמוכה | 723505004 | <0.30 |
| בינונית | 723506003 | 0.30–0.60 |
| גבוהה | 723507007 | >0.60 |
ממשק HL7 v2.x מפענח הודעות ORU^R01, ומחלץ גיל/מין משדה PID וערכי מעבדה מקטעי OBX. המערכת תומכת בקודי LOINC ובקודי LIS ספציפיים לספק (Epic, Cerner, OpenEMR, VistA, Allscripts), ומאפשרת שילוב ללא שינויי קוד בצד ה-EHR.
Camelion (מלם-תים) היא מערכת המידע הרפואית הנפוצה ביותר בישראל. PenuX-AP-Severity כולל מתאם ייעודי התומך ב:
PenuX-AP-Severity תוכנן מתוך עקרון Privacy by Design מלכתחילה:
| כלי ניקוד | AUROC (בספרות) | זמן לתוצאה | פרמטרים | שילוב עם EHR |
|---|---|---|---|---|
| PenuX — יער אקראי ★ | 0.877 (קוהורט זה, 5-fold CV) | 2–4 שעות | 106 בדיקות מעבדה שגרתיות | FHIR · HL7 · Camelion |
| PenuX — Gradient Boosting | 0.874 | 2–4 שעות | 106 בדיקות מעבדה שגרתיות | FHIR · HL7 · Camelion |
| PenuX — MLP | 0.836 | 2–4 שעות | 106 בדיקות מעבדה שגרתיות | FHIR · HL7 · Camelion |
| BISAP | 0.82 | 24 שעות | 5 | ידני |
| Ranson (בקבלה) | 0.73 | קבלה | 5 מתוך 11 | ידני |
| APACHE II | 0.83 | 24 שעות | 12 + גיל + מחלות רקע | ידני |
| Harmless AP Score | 0.88 | קבלה | 3 | לא |
| CTSI (מבוסס CT) | 0.87 | לאחר CT | CT בלבד | PACS בלבד |
יער אקראי של PenuX (AUC=0.877) משתווה או עולה על BISAP ומתקרב לביצועי APACHE II ו-CTSI, עם היתרון המרכזי שהתוצאות זמינות תוך 2–4 שעות מהקבלה, באמצעות בדיקות דם שגרתיות בלבד — ללא צורך ב-CT, ללא המתנה של 24 שעות, עם שילוב API מלא לתהליכי עבודה אוטומטיים.
מגבלה קלינית מרכזית של Ranson, Glasgow (Imrie), ומערכות ניקוד קרובות היא שהציון הסופי שלהן אינו ניתן לחישוב בעת הקבלה — תת-קבוצה של הקריטריונים ניתנת להערכה רק לאחר 48 שעות של תצפית. עיכוב זה אינו שרירותי: הוא משקף את התגובה הפיזיולוגית הדו-גלית של הגוף לפגיעה לבלבית חריפה.
| כלי ניקוד | פרמטרים לאחר 48 שעות | הסיבה לעיכוב |
|---|---|---|
| Ranson (1974) | ΔBUN ≥5 מ"ג/ד"ל · ΔהמטוקריT ≥10% · Ca²⁺ <8 מ"ג/ד"ל · PaO₂ <60 מ"מ כספית · חסר בסיס >4 mEq/L · הצטברות נוזלים >6 ליטר | כולם ערכי דלתא דינמיים — דורשים שתי נקודות זמן לחישוב |
| Glasgow / Imrie | PaO₂ · אלבומין · סידן · LDH (נמדדים מחדש ב-48 שעות) | הערכים מגיעים לשיא או לשפל ב-24–48 שעות; ערכי הקבלה מעריכים בחסר את החומרה |
| BISAP | BUN >25 מ"ג/ד"ל (24 השעות הראשונות) | BUN מנופח לפני מתן נוזלים תוך-ורידי — אמין יותר לאחר טיפול נוזלים ראשוני |
| מדד חומרת CT | סריקת CT מבוצעת ב-48–72 שעות | נמק לבלבי אינו נראה ב-CT מוקדם (<48 שעות) — הגברת ניגודיות מעריכה בחסר רקמה שאינה בת-קיימא |
במקרים קשים, עיכוב אבחנתי של 48 שעות הוא מסוכן קלינית. חולים שיפתחו נמק לבלבי מזוהם, תסמונת תא-בטן, או תפקוד לקוי רב-מערכתי מראים לרוב אותות אזהרה מוקדמים — שינויים במגמות ערכי המעבדה, עליית סמנים דלקתיים — שמודל מבוסס-נתונים יכול לזהות כבר בבדיקת הדם הראשונה. מחקר פרוספקטיבי של Mounzer ועמיתיו (2012, Gastroenterology) הראה כי BISAP ו-APACHE II עולים על Ranson ב-24 שעות, אך נותרים נחותים ממודלים המשתמשים בו-זמנית בסמנים ביולוגיים בעת הקבלה כגון BUN, המטוקריט וקריטריוני SIRS.
PenuX-AP-Severity מדגים כי ערכי מעבדה שגרתיים בעת הקבלה, המעובדים על ידי מודלי למידת מכונה מבוססי-נתונים, יכולים לזהות דלקת לבלב חריפה קשה עם AUC של עד 0.877 — בהשוואה שווה או עולה על כלי ניקוד קלאסיים ליד המיטה, הדורשים 24 שעות מעקב. יער אקראי הוא בעל הביצועים הטובים ביותר; Gradient Boosting מציע את ה-F1 והרגישות הגבוהים ביותר. מודלי למידה עמוקה תחרותיים, אך אינם מציעים יתרון ברור על פני שיטות אנסמבל בגודל מערך נתונים זה.
ממצא היפוך התוויות — מקרי AP בילארי קלים המציגים WBC/CRP/ליפאז גבוהים יותר מ-AP קשה ונמקי — הוא תובנה משמעותית מבחינה קלינית, המזהה ככל הנראה תת-קבוצה של מקרי נמק לבלבי מזוהם (IPN) המסווגים בטעות, המצדיקה מחקר פרוספקטיבי.
הפלטפורמה מספקת שילוב מלא עם FHIR R4, HL7 v2.x ו-Camelion, ומאפשרת ניקוד סיכון SAP אוטומטי תוך שעות מהקבלה. בסיס הקוד הוא קוד פתוח, ושיתוף פעולה מצד חוקרים, קלינאים ומפתחי מערכות מידע רפואיות יתקבל בברכה.