PharmGuard: A blockchain and LLM-integrated framework with provenance-aware anomaly scoring for securing pharmaceutical supply chains
Discuss this preprint
Start a discussion What are Sciety discussions?Listed in
This article is not in any list yet, why not save it to one of your lists.Abstract
Counterfeit and substandard medicines remain a major global health threat, underscoring the need for end-to-end traceability and proactive monitoring across pharmaceutical supply chains. This paper presents PharmGuard, a framework that combines a permissioned blockchain ledger (Hyperledger Fabric) for tamper-evident provenance with a large-language-model analytics layer for detecting anomalous event sequences and answering natural-language provenance queries. The core contribution of this research is Provenance-Aware Anomaly Scoring (PAAS), which fuses structured provenance features derived from on-chain custody records with LLM-based anomaly signals via a calibrated fusion model. A threat model is proposed that covers external counterfeit insertion, compromised insiders, and colluding actors, mapping each threat to corresponding provenance and behavioral indicators. On a large-scale simulated dataset of 120,000 supply chain events with 600 injected anomalies across five categories, PharmGuard achieves F1 0.941 and AUROC 0.976, outperforming rule-based validation, Isolation Forest, LSTM Autoencoder, Graph Deviation Network, and Anomaly Transformer. The system is further evaluated using a natural language query interface, achieving 94\% accuracy on 50 provenance queries. Deployment cost trade-offs are analyzed, and privacy-preserving deployment options are considered, including on-premises LLM hosting and cryptographic techniques for selective disclosure. These results suggest that unifying immutable provenance with learned sequence analysis can improve detection coverage for both deterministic compliance violations and subtle multi-stage irregularities.