Published March 30, 2026 | Version v1

Utilizing Large Language Models for Machine Learning Explainability

  • 1. ROR icon Centre for Research and Technology Hellas
  • 2. School of Architecture Technology and Engineering, University of Brighton, BN2 4GJ, United Kingdom
  • 3. Centre for Research & Technology, Hellas
  • 4. University of Nicosia, 2417 Cyprus

Description

This study explores the explainability capabilities of large language models (LLMs), when employed to autonomously generate machine learning (ML) solutions. We examine two classification tasks: (i) a binary classification problem focused on predicting driver alertness states, and (ii) a multilabel classification problem based on the yeast dataset. Three state-of-the-art LLMs (i.e. OpenAI GPT, Anthropic Claude, and DeepSeek) are prompted to design training pipelines for four common classifiers: Random Forest, XGBoost, Multilayer Perceptron, and Long Short-Term Memory networks. The generated models are evaluated in terms of predictive performance (recall, precision, and F1-score) and explainability using SHAP (SHapley Additive exPlanations). Specifically, we measure Average SHAP Fidelity (Mean Squared Error between SHAP approximations and model outputs) and Average SHAP Sparsity (number of features deemed influential). The results reveal that LLMs are capable of producing effective and interpretable models, achieving high fidelity and consistent sparsity, highlighting their potential as automated tools for interpretable ML pipeline generation. The results show that LLMs can produce effective, interpretable pipelines with high fidelity and consistent sparsity, closely matching manually engineered baselines.

Files

Utilizing_Large_Language_Models_for_Machine_Learning_Explainability.pdf

Files (516.4 kB)

Additional details

Funding

European Commission
ALFIE - Assessment of Learning technologies and Frameworks for Intelligent and Ethical AI 101177912