Validating transformers for redaction of text from electronic health records in real-world healthcare

Zeljko Kraljevic, Anthony Shek, Joshua Au Yeung, Ewart Jonathan Sheldon, Mohammad Al-Agil +6 more
10/5/2023
cs.CLcs.AI

Official code: CogStack/MedCAT (531 stars, Apache-2.0, last commit 2025-07-25).

Abstract

Protecting patient privacy in healthcare records is a top priority, and redaction is a commonly used method for obscuring directly identifiable information in text. Rule-based methods have been widely used, but their precision is often low causing over-redaction of text and frequently not being adaptable enough for non-standardised or unconventional structures of personal health information. Deep learning techniques have emerged as a promising solution, but implementing them in real-world environments poses challenges due to the differences in patient record structure and language across different departments, hospitals, and countries. In this study, we present AnonCAT, a transformer-based model and a blueprint on how deidentification models can be deployed in real-world healthcare. AnonCAT was trained through a process involving manually annotated redactions of real-world documents from three UK hospitals with different electronic health record systems and 3116 documents. The model achieved high performance in all three hospitals with a Recall of 0.99, 0.99 and 0.96. Our findings demonstrate the potential of deep learning techniques for improving the efficiency and accuracy of redaction in global healthcare data and highlight the importance of building workflows which not just use these models but are also able to continually fine-tune and audit the performance of these algorithms to ensure continuing effectiveness in real-world settings. This approach provides a blueprint for the real-world use of de-identifying algorithms through fine-tuning and localisation, the code together with tutorials is available on GitHub (https://github.com/CogStack/MedCAT).

View on arXivView PDF

Code Implementations(1)

CogStack/MedCATOfficial100%
Apache-2.0

Medical Concept Annotation Tool

531121Shell, PythonMar 17, 20191 years agoApache-2.0
collaboratecovid-19electronic-health-recordshealthcareinformation-extraction+6 more

Similar Papers

Cite this paper

@article{kraljevic2023validating,
  title  = {Validating transformers for redaction of text from electronic health records in real-world healthcare},
  author = {Zeljko Kraljevic and Anthony Shek and Joshua Au Yeung and Ewart Jonathan Sheldon and Mohammad Al-Agil and Haris Shuaib and Xi Bai and Kawsar Noor and Anoop D. Shah and Richard Dobson and James Teo},
  year   = {2023},
  eprint = {2310.04468},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2310.04468v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2310.04468.svg)](https://codeofpaper.com/paper/2310.04468)

Discussion