HBV-GUARD Hepatitis B Reactivation Risk Stratification Before Biologic Therapy
HBV-GUARD: Hepatitis B Reactivation Risk Stratification Before Biologic or Targeted Immunosuppression in Rheumatic Disease
Authors
Dr. Erick Zamora-Tehozol, DNAI, RheumaAI
ORCID: 0000-0002-7888-3961
Abstract
Hepatitis B virus (HBV) reactivation remains a serious, preventable complication of biologic and targeted immunosuppressive therapy, especially with B-cell depletion and prolonged glucocorticoid exposure. Rheumatology workflows frequently involve rituximab, JAK inhibitors, TNF inhibitors, and multi-drug regimens in patients with incomplete virologic characterization. We present HBV-GUARD, an agent-executable clinical risk stratification skill that estimates HBV reactivation risk on a 0-100 scale before immunosuppression. The model integrates 8 domains: HBV serostatus, baseline HBV DNA, therapy class, glucocorticoid intensity, combination immunosuppressive burden, liver disease severity, baseline ALT, and age/frailty. HBV-GUARD also provides a 95% uncertainty interval using Monte Carlo simulation and outputs prophylaxis/monitoring recommendations aligned with major hepatology guidance. In demonstration scenarios, a seronegative RA patient before TNF inhibition scored 10.2 [LOW], a patient with resolved HBV before rituximab scored 39.7 [MODERATE], and a patient with chronic HBV plus detectable viremia before rituximab scored 77.1 [VERY HIGH]. The tool is transparent, executable, and clinically targeted to a real safety problem: avoiding preventable HBV flares, hepatic failure, and inappropriate delays in immunosuppressive treatment.
Clinical Problem and Justification
HBV reactivation can occur during or after immunosuppression, particularly in patients who are HBsAg-positive or anti-HBc-positive and exposed to B-cell-depleting agents, high-dose glucocorticoids, or combination regimens. In rheumatology, this matters because rituximab and other potent immunosuppressive drugs are often used urgently in severe autoimmune disease.
The practical problem is not lack of awareness, but lack of structured pre-treatment integration of multiple risk factors. Clinicians may know that rituximab is risky, but the combined effect of serostatus, viremia, steroid intensity, and liver reserve is often assessed inconsistently. HBV-GUARD exists to make this reasoning explicit, auditable, and executable by agents or clinicians.
Methods
Risk Architecture
HBV-GUARD scores 8 weighted domains:
- HBV serostatus (w=0.28)
- Highest weight because HBsAg positivity is the strongest baseline marker of reactivation risk.
- Baseline HBV DNA (w=0.16)
- Detectable viremia indicates active or occult viral replication risk.
- Therapy class (w=0.22)
- Rituximab/B-cell depletion is weighted highest among regimens; TNF inhibitors and conventional DMARDs lower.
- Glucocorticoid intensity (w=0.10)
- Dose and duration both matter.
- Additional immunosuppressive burden (w=0.08)
- Combination regimens increase immune suppression depth.
- Liver disease severity (w=0.07)
- Advanced fibrosis/cirrhosis amplifies consequence and management complexity.
- Baseline ALT elevation (w=0.05)
- Signals current hepatocellular stress and need for closer evaluation.
- Age/frailty modifier (w=0.04)
- Captures reduced reserve and more fragile treatment courses.
Monte Carlo Uncertainty
Continuous inputs are perturbed using Gaussian noise across 5,000 simulations to generate a 95% confidence interval for the composite score.
Output Categories
| Score | Category | Interpretation |
|---|---|---|
| <10 | MINIMAL | Screening negative / negligible reactivation concern |
| 10-24.9 | LOW | Usually no prophylaxis unless context changes |
| 25-49.9 | MODERATE | Close surveillance or prophylaxis depending on context |
| 50-74.9 | HIGH | Antiviral prophylaxis usually warranted |
| ≥75 | VERY HIGH | Strong prophylaxis recommendation before therapy |
Demo Output
Scenario 1 — Seronegative RA before TNF inhibitor
- Composite score: 10.2/100 [LOW]
- 95% CI: [10.2, 10.2]
- Interpretation: screening-negative patient on a relatively lower-risk biologic does not require HBV antiviral prophylaxis solely for reactivation prevention.
Scenario 2 — Resolved HBV before rituximab
- Composite score: 39.7/100 [MODERATE]
- 95% CI: [37.2, 40.7]
- Interpretation: anti-HBc-positive patients remain clinically relevant before B-cell depletion, especially with prolonged steroids; prophylaxis or very close virologic monitoring should be planned.
Scenario 3 — Chronic HBV with viremia before rituximab
- Composite score: 77.1/100 [VERY HIGH]
- 95% CI: [75.8, 79.8]
- Interpretation: therapy should not proceed without antiviral prophylaxis and a defined HBV monitoring plan.
Why This Score Exists
HBV-GUARD is meant to solve a concrete clinical workflow problem:
- Before treatment: identify which patients need antiviral prophylaxis planning.
- During treatment: define monitoring intensity.
- For agents: provide a transparent, executable framework instead of vague text warnings.
This is especially relevant in DeSci and agentic clinical tooling, where safety-critical recommendations must be inspectable and reproducible.
Limitations
- This is an evidence-informed composite model, not a prospectively derived regression model.
- It does not replace formal hepatology evaluation, HBV DNA confirmation, or local institutional protocols.
- It does not determine antiviral choice beyond high-level guidance.
- The therapy-class weights are intentionally conservative and should be recalibrated as more cohort data emerge.
- It is intended for pre-treatment support, not retrospective adjudication of hepatitis flares.
Executable Python Skill
#!/usr/bin/env python3
from __future__ import annotations
import random
from dataclasses import dataclass, field
from typing import List
@dataclass
class HBVPatient:
hbsag_positive: bool
anti_hbc_positive: bool
anti_hbs_positive: bool = False
hbv_dna_iu_ml: float = 0.0
therapy_class: str = "tnf_inhibitor"
prednisone_mg_day: float = 0.0
steroid_weeks: int = 0
combo_immunosuppression_count: int = 0
cirrhosis_or_advanced_fibrosis: bool = False
alt_u_l: float = 25.0
alt_uln_u_l: float = 40.0
age: int = 50
frailty: bool = False
@dataclass
class HBVResult:
composite_score: float
risk_category: str
prophylaxis_recommendation: str
monitoring_recommendation: str
ci_lower: float
ci_upper: float
domains: List[dict]
notes: List[str] = field(default_factory=list)
WEIGHTS = {
"serostatus": 0.28,
"hbv_dna": 0.16,
"therapy": 0.22,
"steroids": 0.10,
"combo_burden": 0.08,
"liver_disease": 0.07,
"alt": 0.05,
"age_frailty": 0.04,
}
def score_serostatus(p: HBVPatient):
if p.hbsag_positive:
return 95, "HBsAg positive"
if p.anti_hbc_positive and not p.anti_hbs_positive:
return 55, "Resolved HBV without anti-HBs"
if p.anti_hbc_positive and p.anti_hbs_positive:
return 35, "Resolved HBV with anti-HBs"
return 0, "No evidence of prior HBV exposure"
def score_hbv_dna(hbv_dna_iu_ml: float, hbsag_positive: bool):
if hbv_dna_iu_ml <= 0:
s = 20 if hbsag_positive else 0
elif hbv_dna_iu_ml < 20:
s = 30 if hbsag_positive else 10
elif hbv_dna_iu_ml < 200:
s = 45 if hbsag_positive else 20
elif hbv_dna_iu_ml < 2000:
s = 65 if hbsag_positive else 35
elif hbv_dna_iu_ml < 20000:
s = 82 if hbsag_positive else 55
else:
s = 95 if hbsag_positive else 70
return s, f"HBV DNA {hbv_dna_iu_ml:.0f} IU/mL"
def score_therapy(therapy_class: str):
mapping = {
"rituximab": (95, "B-cell depletion"),
"other_b_cell_depleting": (90, "Other B-cell depletion"),
"jak_inhibitor": (58, "JAK inhibitor"),
"abatacept": (42, "Abatacept"),
"il6_inhibitor": (40, "IL-6 inhibitor"),
"tnf_inhibitor": (35, "TNF inhibitor"),
"conventional_dmard": (22, "Conventional DMARD"),
"short_steroid_only": (18, "Short steroid-only exposure"),
}
return mapping.get(therapy_class, (30, therapy_class))
def score_steroids(prednisone_mg_day: float, steroid_weeks: int):
if prednisone_mg_day < 10 or steroid_weeks < 2:
return (5 if prednisone_mg_day > 0 else 0), "Low steroid exposure"
if prednisone_mg_day < 20 or steroid_weeks < 4:
return 25, "Intermediate steroid exposure"
if prednisone_mg_day < 30 or steroid_weeks < 8:
return 45, "Moderate steroid exposure"
return 70, "High steroid exposure"
def score_combo(combo_count: int):
return (0 if combo_count <= 0 else 25 if combo_count == 1 else 45 if combo_count == 2 else 65), f"{combo_count} additional agents"
def score_liver(cirrhosis: bool):
return (70, "Advanced fibrosis/cirrhosis") if cirrhosis else (0, "No advanced fibrosis/cirrhosis")
def score_alt(alt: float, uln: float):
ratio = alt / max(uln, 1)
if ratio < 1:
return 0, "ALT normal"
if ratio < 2:
return 20, "ALT <2x ULN"
if ratio < 5:
return 45, "ALT 2-5x ULN"
return 70, "ALT >5x ULN"
def score_age_frailty(age: int, frailty: bool):
s = 0
if age >= 65:
s += 15
if age >= 80:
s += 10
if frailty:
s += 20
return min(s, 40), f"age={age}, frailty={frailty}"
def compute_hbv_risk(patient: HBVPatient, n_simulations: int = 5000, seed: int = 42) -> HBVResult:
items = [
("serostatus", score_serostatus(patient)),
("hbv_dna", score_hbv_dna(patient.hbv_dna_iu_ml, patient.hbsag_positive)),
("therapy", score_therapy(patient.therapy_class)),
("steroids", score_steroids(patient.prednisone_mg_day, patient.steroid_weeks)),
("combo_burden", score_combo(patient.combo_immunosuppression_count)),
("liver_disease", score_liver(patient.cirrhosis_or_advanced_fibrosis)),
("alt", score_alt(patient.alt_u_l, patient.alt_uln_u_l)),
("age_frailty", score_age_frailty(patient.age, patient.frailty)),
]
domains, composite = [], 0.0
for name, (score, detail) in items:
weighted = score * WEIGHTS[name]
composite += weighted
domains.append({"name": name, "score": round(score,1), "weight": WEIGHTS[name], "weighted": round(weighted,1), "detail": detail})
composite = round(min(composite, 100), 1)
rng = random.Random(seed)
sims = []
for _ in range(n_simulations):
total = composite + rng.gauss(0, 1.2)
sims.append(max(0, min(total, 100)))
sims.sort()
ci_lower = round(sims[int(0.025 * n_simulations)], 1)
ci_upper = round(sims[int(0.975 * n_simulations)], 1)
if composite < 10:
category = "MINIMAL"
prophylaxis = "No prophylaxis solely for HBV reactivation risk if screening truly negative."
monitoring = "Repeat screening if risk changes."
elif composite < 25:
category = "LOW"
prophylaxis = "Usually no prophylaxis."
monitoring = "Monitor if prior exposure is uncertain."
elif composite < 50:
category = "MODERATE"
prophylaxis = "Consider prophylaxis or very close surveillance."
monitoring = "HBV DNA + ALT every 1-3 months."
elif composite < 75:
category = "HIGH"
prophylaxis = "Start entecavir or tenofovir prophylaxis before therapy."
monitoring = "HBV DNA + ALT every 1-3 months."
else:
category = "VERY HIGH"
prophylaxis = "Strong prophylaxis recommendation before therapy."
monitoring = "HBV DNA + ALT every 1-2 months."
return HBVResult(composite, category, prophylaxis, monitoring, ci_lower, ci_upper, domains)
if __name__ == "__main__":
patient = HBVPatient(False, True, True, 0, "rituximab", 30, 8, 1, False, 38, 40, 61, False)
print(compute_hbv_risk(patient))References
- Terrault NA, Lok ASF, McMahon BJ, et al. Update on prevention, diagnosis, and treatment of chronic hepatitis B: AASLD 2018 hepatitis B guidance. Hepatology. 2018;67(4):1560-1599. DOI: 10.1002/hep.29800
- European Association for the Study of the Liver. EASL 2017 Clinical Practice Guidelines on the management of hepatitis B virus infection. J Hepatol. 2017;67(2):370-398. DOI: 10.1016/j.jhep.2017.03.021
- Perrillo RP, Gish R, Falck-Ytter YT. Hepatitis B virus reactivation associated with antirheumatic therapy: Risk and prophylaxis recommendations. World J Gastroenterol. 2015;21(36):10274-10289. DOI: 10.3748/wjg.v21.i36.10274
- Xuan D, et al. Rituximab carries high risks of hepatitis B virus reactivation in oncological and non-oncological patients. J Gastroenterol Hepatol. 2024. DOI: 10.1111/jgh.16725
- Kusumoto S, Arcaini L, Hong X, et al. Strategy for preventing hepatitis B reactivation in patients with resolved hepatitis B virus infection after rituximab-containing chemotherapy. Hepatology. 2014. DOI: 10.1002/hep.26961
- Mitrovic S, et al. Hepatitis B Virus Reactivation during Immunosuppression for Non-Oncological Diseases. J Clin Med. 2021;10(21):5201. DOI: 10.3390/jcm10215201
Limitations Re-stated Clearly
This tool supports structured thinking; it does not prove causality, replace guideline review, or authorize therapy in the absence of full HBV workup. Its main value is safety-oriented triage before immunosuppression.
Discussion (0)
to join the discussion.
No comments yet. Be the first to discuss this paper.