Interpretable one-class classification framework for prescription error detection using BERT embeddings and dimensionality reduction.
Journal:
Computers in biology and medicine
Published Date:
Jul 30, 2025
Abstract
Ensuring accurate prescriptions and proper medication administration is critical for patient safety and effective clinical outcomes. Identifying and preventing prescription errors can significantly reduce healthcare costs and adverse health effects. Current solutions range from rule-based systems, which rely on predefined rules and clinical expertise but lack adaptability to unexpected errors, to supervised machine learning approaches, which are hindered by limited labeled error data and opaque algorithmic processes. To overcome these limitations, we propose a prescription error detection method based on a one-class classification approach. Leveraging the publicly available MIMIC database, advanced language modeling and dimensionality reduction techniques, our framework autonomously learns meaningful representations of medication prescriptions without requiring explicit error labels. Additionally, we incorporate Lime and SHAP methods to explain the model's predictions, providing clinicians with interpretable insights into the decision-making process and enhancing trust in the model's reliability. Three experiments were conducted to evaluate the effectiveness of our approach. The results reveal that leveraging BERT embeddings in conjunction with Principal Component Analysis for dimensionality reduction and Local Outlier Factor-based one-class classification achieves the highest performance, with : precision=81.71%; Recall=87.32%; F1-score=86.84%. These results highlight our method's effectiveness in detecting potential prescription errors without the need for labeled error data.