Integrating Bayesian Inference and Machine Learning to Evaluate TAP and Trypsin-2 as Early Biomarkers of Systemic Inflammation in Acute Pancreatitis
Abstract
1. Introduction
1.1. Scope
1.2. Elements of Novelty
2. Materials and Methods
2.1. Research Setting and Demographic Data
2.2. Biomarker Assessments and Clinical Parameters
2.3. Statistical Evaluation
2.4. Mediation Analysis
2.5. Unsupervised Clustering
2.6. Supervised Learning in Machine Learning
2.7. Ethical Considerations and Data Availability
3. Results
3.1. Demographic and Clinical Characteristics
3.2. Bayesian Correlation Analysis
- Strongest BF (12.8): TAPser ↔ Age (strong evidence for positive correlation);
- Moderate evidence for: TAPser ↔ CRP (BF = 8.4), Trp2ur ↔ Amyl (BF = 6.9);
- Evidence against correlation: Trp2ser ↔ CRP (BF = 0.45 < 1).
3.3. Unsupervised K-Means Clustering
- Silhouette scores: k = 2 (0.42), k = 3 (0.51), k = 4 (0.45)
- Best clusters k = 3 (highest silhouette value)
3.4. Supervised Machine Learning for Predicting Inflammatory Intensity (CRP)
3.5. Practical Implications for Clinical Decision-Making
- 1.
- Biomarker Prioritization: When resources are limited, prioritize urinary trypsin-2 measurement over serum trypsin-2.
- 2.
- Age-Adjusted Interpretation: Develop age-specific reference ranges for TAP and trypsin-2.
- 3.
- Glucose Context: Always interpret biomarkers in context of glycemic control.
- 4.
- Monitoring Strategy: Use urinary trypsin-2 for longitudinal monitoring due to its stability.
4. Discussion
4.1. Key Findings and Physiological Explanation
4.2. Identification of Novel Patient Phenotypes
- Cluster 1 (“Low Biomarker Profile”) represents patients with low biomarker levels in all compartments, younger age, and low inflammation. This profile may correspond to cases with minimal trypsinogen activation.
- Cluster 2 (“Elevated Serum Biomarker Profile”) is characterized by elevated serum biomarkers but only moderate urinary levels. This may indicate significant release of pancreatic enzymes into the circulation without commensurate renal clearance, possibly due to variations in renal function or the timing of sample collection.
- Cluster 3 (“High Serum and Urine Biomarker Profile”) exhibits high levels of biomarkers in both serum and urine, particularly urinary trypsin-2, along with the highest CRP and the oldest age in our cohort. This cluster identifies a distinct phenotype characterized by pronounced biomarker elevation in both compartments. Significant differences in CRP (p = 0.032) and age (p = 0.047) between clusters suggest these subgroups capture biologically meaningful variation. This exploratory, biomarker-based stratification could serve as a hypothesis-generating complement to traditional scores, meriting further validation against clinical outcomes in larger studies.
4.3. Predictive Modeling and Clinical Translation
4.4. Advantages and Disadvantages
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Banks, P.A.; Bollen, T.L.; Dervenis, C.; Gooszen, H.G.; Johnson, C.D.; Sarr, M.G.; Tsiotos, G.G.; Vege, S.S.; Acute Pancreatitis Classification Working Group. Classification of acute pancreatitis—2012: Revision of the Atlanta classification and definitions by international consensus. Gut 2013, 62, 102–111. [Google Scholar] [CrossRef] [PubMed]
- Tenner, S.; Baillie, J.; DeWitt, J.; Vege, S.S. American College of Gastroenterology guideline: Management of acute pancreatitis. Am. J. Gastroenterol. 2013, 108, 1400–1415. [Google Scholar] [CrossRef] [PubMed]
- Papachristou, G.I.; Muddana, V.; Yadav, D.; O’Connell, M.; Sanders, M.K.; Slivka, A.; Whitcomb, D.C. Comparison of BISAP, Ranson’s, APACHE-II, and CTSI scores in predicting organ failure, complications, and mortality in acute pancreatitis. Am. J. Gastroenterol. 2010, 105, 435–441. [Google Scholar] [CrossRef] [PubMed]
- Leppäniemi, A.; Tolonen, M.; Tarasconi, A.; Segovia-Lohse, H.; Gamberini, E.; Kirkpatrick, A.W.; Ball, C.G.; Parry, N.; Sartelli, M.; Wolbrink, D.; et al. 2019 WSES guidelines for the management of severe acute pancreatitis. World J. Emerg. Surg. 2019, 14, 27. [Google Scholar] [CrossRef]
- Sah, R.P.; Garg, P.; Saluja, A.K. Pathogenic mechanisms of acute pancreatitis. Curr. Opin. Gastroenterol. 2012, 28, 507–515. [Google Scholar] [CrossRef]
- Gudgeon, A.M.; Heath, D.I.; Hurley, P.; Jehanli, A.; Patel, G.; Wilson, C.; Shenkin, A.; Austen, B.M.; Imrie, C.W.; Hermon-Taylor, J. Trypsinogen activation peptides assay in the early prediction of severity of acute pancreatitis. Lancet 1990, 335, 4–8. [Google Scholar] [CrossRef]
- Yasuda, H.; Kataoka, K.; Takeyama, Y.; Takeda, K.; Ito, T.; Mayumi, T.; Isaji, S.; Mine, T.; Kitagawa, M.; Kiriyama, S.; et al. Usefulness of urinary trypsinogen-2 and trypsinogen activation peptide in acute pancreatitis: A multicenter study in Japan. World J. Gastroenterol. 2019, 25, 107–117. [Google Scholar] [CrossRef]
- Neoptolemos, J.P.; Kemppainen, E.A.; Mayer, J.M.; Fitzpatrick, J.M.; Raraty, M.G.; Slavin, J.; Beger, H.G.; Hietaranta, A.J.; Puolakkainen, P.A. Early prediction of severity in acute pancreatitis by urinary trypsinogen activation peptide: A multicentre study. Lancet 2000, 355, 1955–1960. [Google Scholar] [CrossRef]
- Lempinen, M.; Stenman, U.H.; Finne, P.; Puolakkainen, P.; Haapiainen, R.; Kemppainen, E. Trypsinogen-2 and trypsinogen activation peptide (TAP) in urine of patients with acute pancreatitis. J. Surg. Res. 2003, 111, 267–273. [Google Scholar] [CrossRef]
- Kylänpää, L.; Rakonczay, Z., Jr.; O’Reilly, D.A. The clinical course of acute pancreatitis and the inflammatory mediators that drive it. Int. J. Inflamm. 2012, 2012, 360685. [Google Scholar] [CrossRef]
- Boxhoorn, L.; Voermans, R.P.; Bouwense, S.A.; Bruno, M.J.; Verdonk, R.C.; Boermeester, M.A.; van Santvoort, H.C.; Besselink, M.G. Acute pancreatitis. Lancet 2020, 396, 726–734. [Google Scholar] [CrossRef] [PubMed]
- Johnson, A.E.; Pollard, T.J.; Shen, L.; Lehman, L.W.; Feng, M.; Ghassemi, M.; Moody, B.; Szolovits, P.; Celi, L.A.; Mark, R.G. MIMIC-III, a freely accessible critical care database. Sci. Data 2016, 3, 160035. [Google Scholar] [CrossRef] [PubMed]
- Allemann, A.; Staubli, S.M.; Nebiker, C.A. Trypsin and trypsinogen activation peptide in the prediction of severity of acute pancreatitis. Life 2024, 14, 1055. [Google Scholar] [CrossRef] [PubMed]
- van den Berg, F.F.; de Bruijn, A.C.; van Santvoort, H.C.; Issa, Y.; Boermeester, M.A. Early laboratory biomarkers for severity in acute pancreatitis: A systematic review and meta-analysis. Pancreatology 2020, 20, 1302–1311. [Google Scholar] [CrossRef]
- Muramoto, Y.; Matsumori, T.; Uza, N. Gallbladder Carcinoma Accompanied by Pancreaticobiliary Maljunction With a Rare Double Common Bile Duct. Am. J. Gastroenterol. 2021, 116, 1577. [Google Scholar] [CrossRef]
- Collins, G.S.; Reitsma, J.B.; Altman, D.G.; Moons, K.G.M. Transparent Reporting of a multivariable prediction model for Individual Prognosis or Diagnosis (TRIPOD): The TRIPOD Statement. Ann. Intern. Med. 2015, 162, 55–63. [Google Scholar] [CrossRef]
- Huang, W.; de la Iglesia-García, D.; Baston-Rey, I.; Calviño-Suarez, C.; Lariño-Noia, J.; Iglesias-Garcia, J.; Shi, N.; Zhang, X.; Cai, W.; Deng, L.; et al. Exocrine pancreatic insufficiency following acute pancreatitis: Systematic review and meta-analysis. Dig. Dis. Sci. 2019, 64, 1985–2005. [Google Scholar] [CrossRef]
- Sternby, H.; Bolado, F.; Canaval-Zuleta, H.J.; Marra-López, C.; Hernando-Alonso, A.I.; Del-Val-Antoñana, A.; García-Rayado, G.; Rivera-Irigoin, R.; Grau-García, F.J.; Oms, L.; et al. Determinants of severity in acute pancreatitis: A multinational multicenter prospective cohort study. Ann. Surg. 2019, 270, 348–355. [Google Scholar] [CrossRef]
- Li, C.L.; Jiang, M.; Pan, C.Q.; Li, J.; Xu, L.-G. The global, regional, and national burden of acute pancreatitis in 204 countries and territories, 1990–2019. BMC Gastroenterol. 2021, 21, 332. [Google Scholar] [CrossRef]
- Yang, C.J.; Chen, J.; Phillips, A.R.J.; Windsor, J.A.; Petrov, M.S. Predictors of severe and critical acute pancreatitis: A systematic review. Dig. Liver Dis. 2014, 46, 446–451. [Google Scholar] [CrossRef]
- Resegotti, A.; Ribaldone, D.G. Is a Protective Stoma Mandatory in Anti–Tumor Necrosis Factor–Treated Crohn’s Disease Patients Undergoing Surgery? Gastroenterology 2023, 164, 307. [Google Scholar] [CrossRef]
- van Dijk, S.M.; Hallensleben, N.D.L.; van Santvoort, H.C.; Fockens, P.; van Goor, H.; Bruno, M.J.; Besselink, M.G. Acute pancreatitis: Recent advances through randomised trials. Gut 2017, 66, 2024–2032. [Google Scholar] [CrossRef]
- Parniczky, A.; Lantos, T.; Tóth, E.M.; Szakács, Z.; Gódi, S.; Hágendorn, R.; Illés, D.; Koncz, B.; Márta, K.; Mikó, A.; et al. Antibiotic therapy in acute pancreatitis: From global overuse to evidence-based recommendations. Pancreatology 2019, 19, 488–499. [Google Scholar] [CrossRef]
- Lee, P.J.; Papachristou, G.I. New insights into acute pancreatitis. Nat. Rev. Gastroenterol. Hepatol. 2019, 16, 479–496. [Google Scholar] [CrossRef]
- Schepers, N.J.; Bakker, O.J.; Besselink, M.G.; Ali, U.A.; Bollen, T.L.; Gooszen, H.G.; van Santvoort, H.C.; Bruno, M.J. Impact of characteristics of organ failure and infected necrosis on mortality in necrotising pancreatitis. Gut 2019, 68, 1044–1051. [Google Scholar] [CrossRef]

| Parameter | Mean ± SD | Median (IQR) | Range | Missing Values |
|---|---|---|---|---|
| Age (years) | 48.3 ± 16.7 | 46.0 (34–57) | 20–81 | 0% |
| Glucose (mg/dL) | 105.2 ± 47.8 | 97.5 (78–125) | 66–269 | 25.9% |
| CRP (mg/L) | 12.6 ± 13.3 | 7.5 (2.2–20.9) | 0.1–40.7 | 7.4% |
| Amylase (U/L) | 647.4 ± 764.2 | 368.5 (144–972) | 43–2288 | 37.0% |
| Lipase (U/L) | 1768.9 ± 2406.5 | 690.0 (242–1485) | 6–7942 | 38.9% |
| TAP serum (ng/mL) | 4.63 ± 2.50 | 3.92 (2.87–5.92) | 1.21–11.17 | 0% |
| TAP urine (ng/mL) | 6.43 ± 9.40 | 1.35 (0.08–5.42) | 0–42.19 | 0% |
| Trypsin-2 serum (pg/mL) | 2790.7 ± 4785.2 | 486.2 (148.1–1734.0) | 23.9–15,707.3 | 0% |
| Trypsin-2 urine (pg/mL) | 8800.4 ± 10,627.1 | 5533.8 (143.8–5903.5) | 29.1–38,662.7 | 0% |
| Biomarker Pair | BF10 | Evidence Strength | Posterior r Mean | 95% Credible Interval | Probability Direction |
|---|---|---|---|---|---|
| TAP serum vs. CRP | 8.42 | Moderate | 0.41 | (0.18, 0.60) | 99.2% positive |
| TAP serum vs. Amylase | 2.15 | Anecdotal | 0.28 | (0.02, 0.51) | 97.8% positive |
| TAP serum vs. Lipase | 1.87 | Anecdotal | 0.26 | (−0.01, 0.50) | 96.5% positive |
| Trypsin-2 serum vs. CRP | 0.45 | Moderate against | −0.15 | (−0.40, 0.11) | 85.3% negative |
| Trypsin-2 serum vs. Lipase | 3.21 | Moderate | 0.34 | (0.09, 0.55) | 98.9% positive |
| Trypsin-2 urine vs. Amylase | 6.89 | Moderate | 0.39 | (0.15, 0.59) | 99.1% positive |
| Age vs. TAP serum | 12.75 | Strong | 0.47 | (0.25, 0.65) | 99.9% positive |
| Glucose vs. Trypsin-2 urine | 0.32 | Moderate against | −0.22 | (−0.46, 0.04) | 94.8% negative |
| Pathway | Direct Effect (c’) | Indirect via TAP Serum | Indirect via Trypsin-2 Serum | Total Indirect | Total Effect (c) | Proportion Mediated |
|---|---|---|---|---|---|---|
| CRP → Amylase | 0.28 * | 0.15 ** | 0.07 | 0.22 ** | 0.50 *** | 44.0% |
| CRP → Lipase | 0.31 ** | 0.11 * | 0.12 * | 0.23 ** | 0.54 *** | 42.6% |
| Characteristic | Cluster 1 (n = 19) | Cluster 2 (n = 22) | Cluster 3 (n = 13) | ANOVA p-Value |
|---|---|---|---|---|
| TAP serum (ng/mL) | 2.98 ± 1.34 | 4.28 ± 1.85 | 8.21 ± 1.94 | <0.001 |
| TAP urine (ng/mL) | 1.62 ± 2.51 | 4.01 ± 6.32 | 18.26 ± 13.58 | <0.001 |
| Trypsin-2 serum (pg/mL) | 548.3 ± 498.1 | 2188.7 ± 2521.4 | 8967.4 ± 7583.2 | <0.001 |
| Trypsin-2 urine (pg/mL) | 3125.4 ± 3832.1 | 7479.8 ± 7255.6 | 20,980.3 ± 15,124.7 | <0.001 |
| CRP (mg/L) | 8.2 ± 8.1 | 11.9 ± 13.5 | 20.8 ± 16.4 | 0.032 |
| Age (years) | 43.1 ± 15.2 | 47.8 ± 16.1 | 57.3 ± 17.8 | 0.047 |
| Metric | Elastic Net | Random Forest | Baseline (Mean) |
|---|---|---|---|
| RMSE | 0.82 | 0.79 | 1.15 |
| R2 | 0.49 | 0.53 | 0.00 |
| MAE | 0.61 | 0.58 | 0.89 |
| Rank | Elastic Net (Standardized β) | Random Forest (Gini Importance) |
|---|---|---|
| 1 | Trypsin-2 urine (β = 0.38) | Trypsin-2 urine (0.32) |
| 2 | Age (β = 0.27) | Age (0.28) |
| 3 | TAP serum (β = 0.19) | TAP serum (0.18) |
| 4 | Glucose (β = −0.15) | Glucose (0.14) |
| 5 | TAP urine (β = 0.08) | Trypsin-2 serum (0.05) |
| 6 | Trypsin-2 serum (β = 0.00) | TAP urine (0.03) |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Published by MDPI on behalf of the Lithuanian University of Health Sciences. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Calin Frij, A.; Velicescu, C.; Andone, A.; Covali, R.; Ciubotaru, A.; Grigorovici, R.; Popa, C.; Cosntantinescu, D.; Pavel-Tanasa, M.; Grigorovici, A. Integrating Bayesian Inference and Machine Learning to Evaluate TAP and Trypsin-2 as Early Biomarkers of Systemic Inflammation in Acute Pancreatitis. Medicina 2026, 62, 116. https://doi.org/10.3390/medicina62010116
Calin Frij A, Velicescu C, Andone A, Covali R, Ciubotaru A, Grigorovici R, Popa C, Cosntantinescu D, Pavel-Tanasa M, Grigorovici A. Integrating Bayesian Inference and Machine Learning to Evaluate TAP and Trypsin-2 as Early Biomarkers of Systemic Inflammation in Acute Pancreatitis. Medicina. 2026; 62(1):116. https://doi.org/10.3390/medicina62010116
Chicago/Turabian StyleCalin Frij, Alina, Cristian Velicescu, Andrei Andone, Roxana Covali, Alin Ciubotaru, Roxana Grigorovici, Cristina Popa, Daniela Cosntantinescu, Mariana Pavel-Tanasa, and Alexandru Grigorovici. 2026. "Integrating Bayesian Inference and Machine Learning to Evaluate TAP and Trypsin-2 as Early Biomarkers of Systemic Inflammation in Acute Pancreatitis" Medicina 62, no. 1: 116. https://doi.org/10.3390/medicina62010116
APA StyleCalin Frij, A., Velicescu, C., Andone, A., Covali, R., Ciubotaru, A., Grigorovici, R., Popa, C., Cosntantinescu, D., Pavel-Tanasa, M., & Grigorovici, A. (2026). Integrating Bayesian Inference and Machine Learning to Evaluate TAP and Trypsin-2 as Early Biomarkers of Systemic Inflammation in Acute Pancreatitis. Medicina, 62(1), 116. https://doi.org/10.3390/medicina62010116

