A Two-Tier Blockchain Architecture for Verifiable Explainable-AI Audit Trails: Individual and Merkle-Batched Commitment of SHAP-Based Fraud-Detection Decisions
view PDF
view PDF

How to Cite

Karunarathne, Kavindu. 2026. “A Two-Tier Blockchain Architecture for Verifiable Explainable-AI Audit Trails: Individual and Merkle-Batched Commitment of SHAP-Based Fraud-Detection Decisions”. Journal of Artificial Intelligence and Capsule Networks 8 (4): 299-323. https://doi.org/10.36548/jaicn.2026.4.002.

Keywords

Explainable AI
SHAP
Smart Contracts
Merkle Tree
Fraud Detection
Gas Optimization
Non-Repudiation
Ethereum

Abstract

Machine learning systems that make automated decisions, including fraud flags, loan denials, and safety interlocks, typically generate an explanation (for example via SHAP) in the same trust domain as the model itself, leaving no independent proof that the explanation shown to an auditor is the one the model actually produced at decision time. This research presents and empirically evaluates a blockchain-anchored explainable-AI (XAI) audit-trail architecture that closes this gap by committing a canonical SHA-256 hash of each decision-and-explanation record to an Ethereum-compatible ledger, while keeping the full record, including the SHAP explanation, off-chain. The architecture is implemented end to end on a real fraud-detection pipeline consisting of a LightGBM classifier trained on the IEEE-CIS Fraud Detection dataset (590,540 transactions), a SHAP TreeExplainer layer producing per-transaction feature attributions, a canonical JSON serialization and hashing procedure, and two complementary Solidity smart contracts: one committing each audit record individually, and the other committing batches of records via a Merkle root. Using 500 audit records, the schemes are benchmarked on an Ethereum-compatible network across batch sizes of 10 to 500 records and extended with synthetic hashes to 1,000, 2,500, and 5,000 records. Individual commitment registers a record in 6.3 to 17.4 ms at 139,300 gas per record. Merkle-root batching reduces on-chain gas consumption by 91.6% at 10 records to 99.98% at 5,000 records, with reduction factors rising from roughly 12-fold to nearly 5,982-fold. Tamper-detection trials correctly flagged altered records in 100% of cases. The work contributes a reproducible, empirically costed reference architecture for verifiable AI explanation integrity, and a direct, quantified comparison of two on-chain commitment strategies across three orders of magnitude of batch size that prior blockchain-XAI proposals have not benchmarked head to head.

References

  1. Goodman, Bryce, and Seth Flaxman. “European Union Regulations on Algorithmic Decision-Making and a “Right to Explanation”.” AI Magazine 2017, vol. 38, no. 3, 50-57.
  2. Lundberg, Scott M., and Su-In Lee. “A Unified Approach to Interpreting Model Predictions.” Advances in Neural Information Processing Systems 2017, vol. 30, 1-10.
  3. Nakamoto, Satoshi, and A. Bitcoin. “A Peer-to-Peer Electronic Cash System.” Bitcoin.–URL: https://bitcoin. org/bitcoin. pdf 4, no. 2 (2008): 15.
  4. Vesta Corporation and IEEE Computational Intelligence Society, “IEEE-CIS Fraud Detection,” Kaggle Competition Dataset, 2019. [Online]. Available: https://www.kaggle.com/c/ieee-fraud-detection
  5. Malhotra, Diksha, Shubham Srivastava, Poonam Saini, and Awadhesh Kumar Singh. “Blockchain Based Audit Trailing of XAI Decisions: Storing on IPFS and Ethereum Blockchain.” International Conference on COMmunication Systems & NETworkS (COMSNETS), IEEE, 2021, 1-5.
  6. Kulothungan, Vikram. “Using Blockchain Ledgers to Record AI Decisions in IoT.” IoT 2025, vol. 6, no. 3, 37.
  7. Sachan, Swati, and Xi Liu. “Blockchain-based Auditing of Legal Decisions Supported by Explainable AI and Generative AI Tools.” Engineering Applications of Artificial Intelligence 2024, vol. 129, 107666.
  8. Akther, Afroja, Ayesha Arobee, Abdullah Al Adnan, Omum Auyon, A. S. M. Islam, and Farhad Akter. “Blockchain As a Platform for Artificial Intelligence (AI) Transparency.” arXiv preprint arXiv:2503.08699 (2025).
  9. Masla, Nitima, Vaibhav Vyas, Jyoti Gautam, Rabindra Nath Shaw, and Ankush Ghosh. “Reduction in Gas Cost for Blockchain Enabled Smart Contract.” 4th International Conference on Computing, Power and Communication Technologies (GUCON), IEEE, 2021, 1-6.
  10. Mizrahi, Avi, Noam Koren, Ori Rottenstreich, and Yuval Cassuto. “Traffic-aware Merkle Trees for Shortening Blockchain Transaction Proofs.” IEEE/ACM Transactions on Networking 2024, vol. 32, no. 6, 5326-5340.
  11. Merkle, Ralph C. “A Digital Signature Based on a Conventional Encryption Function.” In Conference on the Theory and Application of Cryptographic Techniques, Springer Berlin Heidelberg, 1987, 369-378.
  12. Ke, Guolin, Qi Meng, Thomas Finley, Taifeng Wang, Wei Chen, Weidong Ma, Qiwei Ye, and Tie-Yan Liu. “Lightgbm: A Highly Efficient Gradient Boosting Decision Tree.” Advances in Neural Information Processing Systems 2017, vol. 30, 1-9.
  13. Wood, Gavin. “Ethereum: A Secure Decentralised Generalised Transaction Ledger.” Ethereum Project Yellow Paper 2014, vol. 151, no. 2014, 1-32.
  14. Nomic Foundation, “Hardhat Documentation,” 2025. [Online]. Available: https://hardhat.org/docs
  15. Ethereum Foundation, “Solidity Documentation, v0.8.34,” 2025. [Online]. Available: https://docs.soliditylang.org