Skip to content
DraconiticResearch
Search Sources API
203,234 studies31 sourcesUpdated 40 min ago
Peer-reviewedCC BY 4.0Scientific Reports

BERT-based medical chatbot with application-level cryptographic protection

Abstract

Artificial Intelligence technology has been frequently used in the personalized healthcare services domain in recent years. The quality of medical services has been improved and a new era has started for healthcare services with the use of Artificial Intelligence. Simultaneously, deep learning models, which are qualified as a special use of Artificial Intelligence, are preferred depending on the number of users and the amount of data increasing with each passing day. This study proposes a BERT-based medical chatbot architecture that combines contextual natural language processing with an application-level cryptographic protection layer for client-server communication. The cryptographic mechanism is intended as an additional protection layer around the transmitted chatbot payload and is not presented as a replacement for standard TLS or as a mechanism for protecting plaintext data during server-side inference. The NLP component uses a BERT-based Transformer model to process medical queries from the HealthFC and TREC-Health datasets. The experimental implementation was developed using the Hugging Face Transformers library with TensorFlow and spaCy, and the model was evaluated using accuracy, precision, recall, F1-score, and AUC-ROC. Five-fold stratified cross-validation was also employed to examine the consistency of the classification performance across data partitions. For communication security, RSA is used for the distribution of the AES secret key, AES is used to encrypt the transmitted medical payload, and SHA-256-based HMAC is employed to provide message integrity and authentication. The proposed model achieved 99% accuracy, 99% precision, 97% recall, 98% F1-score, and 97% AUC-ROC. In the five-fold evaluation, the accuracy values were 1.00, 0.99, 0.99, 0.98, and 0.99, respectively. Compared with the evaluated LSTM, SVM, and Bi-LSTM baselines, which achieved accuracies of 0.88, 0.91, and 0.94, respectively, the proposed BERT-based model achieved the highest classification performance. These results indicate strong classification performance on the evaluated benchmark datasets, while the cryptographic layer provides an additional application-level mechanism for protecting medical information during client-server communication. The proposed security mechanism should be interpreted within this scope: it complements, rather than replaces, TLS and does not protect plaintext medical data after decryption on the server during inference. The study establishes a BERT-based and security-oriented architecture for medical chatbot applications; however, clinical safety, external validation, paraphrase-aware leakage analysis, end-to-end latency, and multilingual or voice-based capabilities require further experimental evaluation.

Related

  1. Utilization of a HIPAA-compliant large language model chatbot in an academic pediatric medical center
    Benjamin Rader, Dinesh K. Rai, Melissa L. Stewart +8
    PLOS Digital HealthPeer-reviewedCC BY 4.0Full textNeuroscienceObstetrics, gynaecology & paediatricsPLOS
  2. Sun protection knowledge, attitudes and practices, skin pigmentation and personal UVB exposure among Malaysian national-level outdoor athletes
    Nurul Huda Shamsuri, Ching Suen Tham, Kai Li Foo +5
    Scientific ReportsPeer-reviewedCC BY-NC-ND 4.0Full textGeneral medicineCrossref
  3. Exploring Medical Professionals’ Perspectives on Cannabinoid Use in Professional and Elite-Level Contact Sports: A Qualitative Inquiry
    Elizabeth S. Thompson, Jane Alcorn, Robert B. Laprairie +3
    Sports healthPeer-reviewedCC BYFull textGeneral medicineEurope PMC
  4. MedLP-HAFB-CLIP: Hierarchical Adaptive Large Model With Learnable Medical Prompts for Level II Ultrasound Standard Plane Identification
    Jiaxin Cai, Chenquan Dai, Runqing Xiong +4
    Ultrasound in Medicine & BiologyPeer-reviewedLicence not stated11 citedEpidemiology & public healthOpenAlex
  5. Time to Treatment Failure as a Recorded Treatment-Process Measure in C-CAT. Reply to Comment on “Facility-Level Medical Oncology Specialist Availability and First-Line Time to Treatment Failure in Lung Cancer: A Nationwide C-CAT Registry Analysis. Curr. Oncol. 2026, 33, 462”
    Shinya Kajiura, Hironaga Satake, Ryuji Hayashi +1
    Current oncology (Toronto, Ont.)Peer-reviewedCC BYFull textGeneral medicineEurope PMC
BibTeX
@article{altunay2026bertbased,
  title = {{BERT-based medical chatbot with application-level cryptographic protection}},
  author = {Hakan Can Altunay and Ahmet Doğukan Sarıyalçınkaya},
  journal = {Scientific Reports},
  year = {2026},
  month = oct,
  doi = {10.1038/s41598-026-72040-w},
  url = {https://www.nature.com/articles/s41598-026-72040-w},
  note = {CC BY 4.0},
}
RIS
TY  - JOUR
TI  - BERT-based medical chatbot with application-level cryptographic protection
AU  - Hakan Can Altunay
AU  - Ahmet Doğukan Sarıyalçınkaya
PY  - 2026
DA  - 2026/10/07
JO  - Scientific Reports
DO  - 10.1038/s41598-026-72040-w
UR  - https://www.nature.com/articles/s41598-026-72040-w
AB  - Artificial Intelligence technology has been frequently used in the personalized healthcare services domain in recent years. The quality of medical services has been improved and a new era has started for healthcare services with the use of Artificial Intelligence. Simultaneously, deep learning models, which are qualified as a special use of Artificial Intelligence, are preferred depending on the number of users and the amount of data increasing with each passing day. This study proposes a BERT-based medical chatbot architecture that combines contextual natural language processing with an application-level cryptographic protection layer for client-server communication. The cryptographic mechanism is intended as an additional protection layer around the transmitted chatbot payload and is not presented as a replacement for standard TLS or as a mechanism for protecting plaintext data during server-side inference. The NLP component uses a BERT-based Transformer model to process medical queries from the HealthFC and TREC-Health datasets. The experimental implementation was developed using the Hugging Face Transformers library with TensorFlow and spaCy, and the model was evaluated using accuracy, precision, recall, F1-score, and AUC-ROC. Five-fold stratified cross-validation was also employed to examine the consistency of the classification performance across data partitions. For communication security, RSA is used for the distribution of the AES secret key, AES is used to encrypt the transmitted medical payload, and SHA-256-based HMAC is employed to provide message integrity and authentication. The proposed model achieved 99% accuracy, 99% precision, 97% recall, 98% F1-score, and 97% AUC-ROC. In the five-fold evaluation, the accuracy values were 1.00, 0.99, 0.99, 0.98, and 0.99, respectively. Compared with the evaluated LSTM, SVM, and Bi-LSTM baselines, which achieved accuracies of 0.88, 0.91, and 0.94, respectively, the proposed BERT-based model achieved the highest classification performance. These results indicate strong classification performance on the evaluated benchmark datasets, while the cryptographic layer provides an additional application-level mechanism for protecting medical information during client-server communication. The proposed security mechanism should be interpreted within this scope: it complements, rather than replaces, TLS and does not protect plaintext medical data after decryption on the server during inference. The study establishes a BERT-based and security-oriented architecture for medical chatbot applications; however, clinical safety, external validation, paraphrase-aware leakage analysis, end-to-end latency, and multilingual or voice-based capabilities require further experimental evaluation.
SN  - 2045-2322
ER  -