journal article·2026-02-08Open access

De-Identification of Electronic Health Records Using Deep Learning and Transformers

Fatih Dilmaç, Adil Alpkocak

Applied Sciences· Volume 16· Issue 4

Abstract

Adoption of electronic health records (EHRs) has significantly advanced healthcare by enabling extensive data storage and analysis for clinical decisions and research. However, sensitive personally identifiable information (PII) within EHRs presents major challenges concerning patient privacy, data security, and regulatory compliance. Effective automated de-identification techniques for detecting and removing protected health information (PHI) are thus essential. This study presents one of the first focused studies on Turkish EHR de-identification, comparing traditional sequence-based neural architectures with advanced transformer-based large language models (LLMs) for PHI detection. We introduce and publicly release a manually annotated benchmark dataset of TEHRs, covering diverse PHI types, supporting further research in Turkish clinical text. Two methodologies were evaluated: bidirectional long short-term memory (BiLSTM) models (with and without Conditional Random Fields (CRFs)) and six fine-tuned pre-trained LLMs. Experiments demonstrated the superior performance of transformer-based LLMs, achieving a macro F1 score of 92.20%, significantly outperforming traditional methods. Among sequence-based models, BiLSTM + CRF attained an 83.00% F1 score, exceeding the baseline BiLSTM 78.40%. Results highlight the potential of transformer-based models for privacy-preserving Turkish clinical text and underscore the importance of annotated benchmark datasets.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Machine Learning in Healthcare · Topic Modeling · Electronic Health Records Systems

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

Department of Computer Engineering, Dokuz Eylul University, 35001 İzmir, Turkey

Department of Computer Engineering, Bakırçay University, 35665 İzmir, Turkey

References (39)

Show source-provided references
1. Berg, H., and Dalianis, H. (2020, January 11–16). A Semi-supervised Approach for De-identification of Swedish Clinical Text. Proceedings of the Twelfth Language Resources and Evaluation Conference, Marseille, France.
2. State-of-the-art Anonymization of Medical Records Using an Iterative Machine Learning Framework10.1197/jamia.M2441 ↗
3. De-identification of patient notes with recurrent neural networks10.1093/jamia/ocw156 ↗
4. Marimon, M., Gonzalez-Agirre, A., Intxaurrondo, A., Rodríguez, H., Martin, J.A.L., Villegas, M., and Krallinger, M. (2019, January 24). Automatic de-identification of medical texts in Spanish: The Meddocan track, corpus, guidelines, methods and evaluation of results. Proceedings of the Iberian Languages Evaluation Forum (IberLEF 2019), Bilbao, Spain.
5. Emam, K.E., Jonker, E., Arbuckle, L., and Malin, B. (2011). A Systematic Review of Re-Identification Attacks on Health Data. PLoS ONE, 6.10.1371/journal.pone.0028071 ↗
6. De-Identification of Electronic Health Records Data10.1007/978-3-030-23762-2_29 ↗
7. Friedrich, M., Köhn, A., Wiedemann, G., and Biemann, C. (2019). Adversarial learning of privacy-preserving text representations for de-identification of medical records. arXiv.10.18653/v1/P19-1584 ↗
8. Yogarajan, V., Mayo, M., and Pfahringer, B. (2018). A survey of automatic de-identification of longitudinal clinical narratives. arXiv.
9. De-identification and anonymization: Legal and technical approaches10.51788/tsul.lr.5.1./TCYN1311 ↗
10. Addressing the failure of anonymization: Guidance from the European union’s general data protection regulation
11. Yapay Zeka Karşısında Kişisel Verilerin Korunması ve Revizyon İhtiyacı
12. Personal data protection model in IOMT-blockchain on secured bit-count transmutation data encryption approach10.54216/FPA.160111 ↗
13. Do, H., Huang, K.Y., Cheng, S., Njiru, L.N., Mwavua, S.M., Obondo, A.A., and Kumar, M. (2025). Apply Machine Learning to Predict Risk for Adolescent Depression in a Cohort of Kenyan Adolescents. Healthcare, 13.10.3390/healthcare13202620 ↗
14. SQUIREDL: Sparse Sequence-to-Sequence Uncertainty Estimation in Evidential Deep Learning10.1145/3723049 ↗
15. Yang, X., Lyu, T., Li, Q., Lee, C.Y., Bian, J., Hogan, W.R., and Wu, Y. (2019). A study of deep learning methods for de-identification of clinical notes in cross-institute settings. BMC Med. Inform. Decis. Mak., 19.10.1186/s12911-019-0935-4 ↗
16. Trienes, J., Trieschnigg, D., Seifert, C., and Hiemstra, D. (2020). Comparing rule-based, feature-based and deep neural methods for de-identification of dutch medical records. arXiv.
17. Van Toledo, C., Van Dijk, F., and Spruit, M. (2021). Dutch Named Entity Recognition and De-Identification Methods for the Human Resource Domain. arXiv.10.5121/csit.2020.101520 ↗
18. Harnessing Large Language Models for Clinical Information Extraction: A Systematic Literature Review10.1145/3744660 ↗
19. Alkhalaf, M., Vithanage, D., Shen, J., Chang, H.C.R., Deng, C., and Yu, P. (2025). Fine-Tuning Large Language Models for Effective Nutrition Support in Residential Aged Care: A Domain Expertise Approach. Healthcare, 13.10.3390/healthcare13202614 ↗
20. Biomedical Named Entity Recognition via Knowledge Guidance and Question Answering10.1145/3465221 ↗
21. A context-enhanced de-identification system
22. Oflazer, K., and Kuruoz, I. (1994). Tagging and morphological disambiguation of Turkish text. arXiv.10.3115/974358.974391 ↗
23. A review of automatic end-to-end de-identification: Is high accuracy the only metric?10.1080/08839514.2020.1718343 ↗
24. Suzdaltseva, M., Shamakhova, A., and Dobrenko, N. (2021, January 24–26). De-identification of Medical Information for Forming Multimodal Datasets to Train Neural Networks. Proceedings of the ICT4AWE 221-Conference, Online.
25. The MITRE Identification Scrubber Toolkit: Design, training, and assessment10.1016/j.ijmedinf.2010.09.007 ↗
26. Automatic de-identification of electronic medical records using token-level and character-level conditional random fields10.1016/j.jbi.2015.06.009 ↗
27. Keyword extraction using support vector machine
28. Chen, W., and Li, J. (2021). Forecasting Teleconsultation Demand Using an Ensemble CNN Attention-Based BILSTM Model with Additional Variables. Healthcare, 9.10.3390/healthcare9080992 ↗
29. Automated systems for the de-identification of longitudinal clinical10.1016/j.jbi.2015.06.007 ↗
30. Comparative analysis of word embeddings for multiclass cyberbullying detection10.21928/uhdjst.v8n1y2024.pp55-63 ↗
31. Survey on RNN and CRF models for de-identification of medical free text10.1186/s40537-020-00351-4 ↗
32. Akın¸seker, G., Akın¸seker, A., Gül¸sen, G., and Git, E. (2012, January 8–15). Initial explorations on using CRFs for Turkish Named Entity Recognition. Proceedings of the COLING 2012, Mumbai, India.
33. A hybrid deep learning approach for intrusion detection in IoT networks10.4316/AECE.2022.01001 ↗
34. Ahmed, N., Dilmaç, F., and Alpkocak, A. (2020). Classification of Biomedical Texts for Cardiovascular Diseases with Deep Neural Network Using a Weighted Feature Representation Method. Healthcare, 8.10.3390/healthcare8040392 ↗
35. Classification of Diabetic Retinopathy Disease with Transfer Learning using Deep Convolutional Neural Networks10.4316/AECE.2021.03006 ↗
36. Attention is all you need
37. Analysis of Comprehensive Loss Model of Dry-type Transformer Based on Combined Objective Weighting Method10.4316/AECE.2024.03005 ↗
38. Devlin, J., Chang, M.W., Lee, K., and Toutanova, K. (2019). Bert: Pre-training of deep bidirectional transformers for language understanding. Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), Association for Computational Linguistics.
39. Kumar, D., Pawar, P.P., Ananthan, B., Indhumathi, S., and Murugan, M.S. (2024, January 3–4). CHOS_LSTM: Chebyshev Osprey optimization-based model for detecting attacks. Proceedings of the 2024 3rd International Conference on Artificial Intelligence For Internet of Things (AIIoT), Vellore, India.10.1109/AIIoT58432.2024.10574586 ↗