Introduction: Hyperparameter optimization is a critical yet opaque stage of automated machine learning pipelines, limiting transparency in clinical decision support systems where interpretability is both a regulatory and scientific requirement. Existing frameworks position language models as optimizers during search; their utility as post hoc interpreters of completed optimization landscapes has received limited attention, particularly regarding whether lightweight local models can interpret optimization metrics across distinct algorithmic families.
Methods: This study introduces a model-agnostic post hoc explainability framework integrating a locally deployed LLaMA 3.1-8B model to convert raw optimization metrics into natural-language explanations. Three algorithmic families were evaluated using Optuna-tuned Bayesian optimization across two heart disease benchmarks: Heart-Statlog (270 patients) and Cleveland Heart Disease (303 patients), each with 13 clinical attributes. Hyperparameter importance was quantified via functional ANOVA, which yields variance-decomposition scores conventionally requiring manual expert interpretation. To assess numerical ranking ability while reducing pattern copying, parameter names and raw fANOVA scores were supplied in a strictly non-hierarchical, alphabetical sequence through zero-shot prompting. Alignment between model-generated and fANOVA reference rankings was evaluated using Spearman correlation.
Results: Despite receiving unsorted inputs, the language model achieved 100% Top-1 accuracy, identifying the most influential hyperparameter across all 18 experimental configurations. Mean Spearman correlations across three seeds ranged from 0.771 to 1.000, capturing the overall ranking structure, with deviations concentrated among lower-ranked parameters having closely spaced scores. Each explanation was generated in a median of 1.84 seconds on local hardware, providing immediate narrative output as an alternative to manual inspection of variance-decomposition tables.
Conclusions: Lightweight local language models demonstrate reliable numerical ranking and semantic alignment in post hoc interpretation of hyperparameter importance, supporting their potential as model-agnostic interpreters. Because inference remains on-premise, the framework produces auditable explanation trails without transmitting patient-derived data externally, supporting regulatory requirements for transparency, auditability, and data governance.