A Practical Tutorial on Interpreting Machine Learning Models in Precision Medicine Using SHAP, LIME, and Large Language Models
Related Experiment Video
Updated: Nov 10, 2026

Augmenting Large Language Models via Vector Embeddings to Improve Domain-Specific Responsiveness
Published on: December 6, 2024
1Data and Statistical Sciences, AbbVie Inc., North Chicago, Illinois, USA.
Abstract:
Machine learning (ML) models are increasingly used in precision medicine to predict outcomes, prioritize candidate biomarkers, and support treatment decision-making. Despite their growing adoption, clinical interpretability remains challenging because different optimization objectives correspond to distinct statistical estimands, while post hoc explanation methods often produce complex outputs that are difficult for nontechnical users to interpret. Therefore, frameworks are needed to clarify what model outputs represent and translate technical explanations into clinically meaningful language. To demonstrate how clinical practitioners can select appropriate models, loss functions, and interpretability techniques, we present a tutorial designed to enhance the interpretability of supervised ML models in clinical settings. Our framework integrates feature attribution methods with large language models (LLMs). We first clarify how commonly used loss functions define distinct clinical objectives, ranging from prognostic outcome prediction to individualized treatment rule (ITR) estimation. We then introduce SHapley Additive exPlanations (SHAP) and local interpretable model-agnostic explanations (LIME) as complementary approaches for global and local interpretation, illustrating how their visualizations summarize model-based feature contributions. To reduce the programming burden of implementing end-to-end ML workflows, we develop an interactive Shiny application that guides users through data input, model training, feature attribution, and LLM-assisted interpretation. Once installed and configured, users can perform these analyses through a graphical interface without writing analysis code. LLMs serve as an interpretation layer that translates model objectives, predictions, and SHAP/LIME results into concise, clinically meaningful explanations. We also evaluate the reproducibility, faithfulness, and sensitivity of these LLM-assisted explanations.