Abstract
Reinforcement learning (RL) agents are increasingly deployed for voltage control in power distribution networks. However, their opaque decision-making creates a significant trust barrier, limiting their adoption in safety-sensitive operational settings. This paper presents XRL-LLM, a novel framework that generates natural language explanations for RL control decisions by combining game-theoretic feature attribution (KernelSHAP) with large language model (LLM) reasoning grounded in power systems domain knowledge. We deployed a Proximal Policy Optimization (PPO) agent on an IEEE 33-bus network to coordinate capacitor banks and on-load tap changers, successfully reducing voltage violations by 90.5% across diverse loading conditions. To make these decisions interpretable, KernelSHAP identifies the most influential state features. These features are then processed by a domain-context-engineered LLM prompt that explicitly encodes network topology, device specifications, and ANSI C84.1 voltage limits.Evaluated via G-Eval across 30 scenarios, XRL-LLM achieves an explanation quality score of 4.13/5. This represents a 33.7% improvement over template-based generation and a 67.9% improvement over raw SHAP outputs, delivering statistically significant gains in accuracy, actionability, and completeness (, Cohen’s d values up to 4.07). Additionally, a physics-grounded counterfactual verification procedure, which perturbs the underlying power flow model, confirms a causal faithfulness of 0.81 under critical loading. Finally, five ablation studies yield three broader insights. First, structured domain context engineering produces synergistic quality gains that exceed any single knowledge component, demonstrating that prompt composition matters more than the choice of foundational model. Second, even an open source 8B-parameter model outperforms templates given the same prompt, confirming the framework’s backbone-agnostic value. Most importantly, counterfactual faithfulness increases alongside load severity, indicating that post hoc attributions are most reliable in the high-stakes regimes where trustworthy explanations matter most.
1. Introduction
The rapid integration of distributed energy resources (DERs), particularly rooftop photovoltaic (PV) systems, into electric distribution networks has fundamentally altered the voltage regulation landscape. Historically, distribution systems operated under unidirectional power flow conditions, where legacy devices such as on-load tap changers (OLTCs), capacitor banks, and step voltage regulators maintained bus voltages within the acceptable service band defined by ANSI C84.1 (Range A: of nominal voltage) [1]. However, the bidirectional power flows and intermittent generation profiles introduced by high DER penetration create frequent voltage fluctuations, including both overvoltage and undervoltage conditions, that challenge conventional rule-based and optimization-driven control paradigms [2]. The revised IEEE Standard 1547-2018 now mandates that DER interconnections provide active voltage regulation capability through reactive power support functions [3], further underscoring the urgency of developing intelligent, real-time voltage control strategies for modern active distribution networks.
Traditional approaches to voltage regulation, including Volt-VAR optimization (VVO) formulated as mixed-integer programming, interior-point methods, and heuristic techniques such as genetic algorithms and particle swarm optimization, have been comprehensively surveyed by Mataifa et al. [4]. While these model-based methods can guarantee optimality under known conditions, they require accurate network parameters, suffer from the computational burden associated with real-time operation at sub-second timescales, and degrade rapidly under the stochastic uncertainty introduced by variable renewable generation and dynamic load profiles [2]. The IEEE 33-bus radial distribution test system introduced by Baran and Wu [5], along with the DistFlow branch equations they derived, remains the foundational benchmark for evaluating voltage control strategies in the distribution systems literature.
Deep reinforcement learning (DRL) has emerged as a promising model-free alternative for voltage regulation, enabling agents to learn optimal control policies directly from interaction with the grid environment without requiring explicit network models. Duan et al. [6] introduced “Grid Mind”, one of the earliest DRL frameworks for autonomous voltage control, demonstrating that deep Q-network (DQN) and deep deterministic policy gradient (DDPG) agents can learn effective regulation policies on large-scale distribution systems. Subsequent work expanded the scope of DRL-based voltage control along several dimensions. Cao et al. [7] proposed a multi-agent DRL (MADRL) framework using coordinated PV inverters for voltage regulation on the IEEE 33-bus system, while Yang et al. [8] developed a two-timescale scheme that combines physics-based optimization for slow-timescale capacitor bank switching with DRL for fast-timescale smart inverter reactive power dispatch. Wang et al. [9] formulated active voltage control as a decentralized partially observable Markov decision process (Dec-POMDP) and published the MAPDN benchmark at NeurIPS, establishing an open source evaluation platform. Zhang et al. [10] applied multi-agent DQN specifically for VVO in smart distribution systems, and Fan et al. [11] introduced PowerGym, a standardized OpenAI Gym-compatible RL environment for Volt-VAR control that benchmarks Proximal Policy Optimization (PPO) and soft actor-critic (SAC) on IEEE test feeders. Many of these studies utilize pandapower [12] as the underlying AC power flow simulation engine. Despite the strong voltage regulation performance demonstrated by these DRL-based approaches, a critical limitation persists across the entire body of work: none of these methods provide any form of explanation for the agent’s control decisions, rendering the learned policies opaque to grid operators who must understand why an agent selects a particular action before entrusting it with real-time grid operation.
Explainable artificial intelligence (XAI) offers a path toward addressing this opacity. The broader XAI landscape includes both ante hoc approaches, which build interpretability into the model architecture itself, and post hoc approaches, which explain an already trained model. This distinction is comprehensively surveyed by Barredo Arrieta et al. [13]. Among post hoc methods, LIME (Local Interpretable Model-Agnostic Explanations) [14] and SHAP (SHapley Additive exPlanations) [15] have emerged as the two dominant frameworks for feature attribution. SHAP, in particular, provides a principled game-theoretic foundation by assigning each input feature a Shapley value that quantifies its marginal contribution to the model’s output, with theoretical guarantees of local accuracy, missingness, and consistency. The DeepSHAP variant [15], which combines the SHAP framework with the backpropagation rules of DeepLIFT [16], enables efficient computation of approximate Shapley values for deep neural network outputs. Lundberg et al. [17] later extended the framework with TreeExplainer and tools for aggregating local explanations into global model understanding.
Applying SHAP to RL agents introduces challenges beyond those encountered in supervised learning, because RL policies map states to actions within sequential decision-making environments where actions affect future states. Beechey et al. [18] provided the first rigorous theoretical treatment of Shapley values for RL at ICML 2023, proposing the SVERL framework and formally characterizing the conditions under which SHAP can be meaningfully applied to value functions and policies. In the power systems domain, Zhang et al. [19] pioneered the application of DeepSHAP to DRL agents for power system emergency control, published in IEEE Transactions on Computational Social Systems, demonstrating that Shapley-value-based attributions can reveal which grid state variables most influence an RL agent’s emergency actions. However, their approach presents SHAP values only as raw numerical attribution vectors without translating them into human-understandable language, which does not validate the resulting explanations against physical simulation, and focuses on transmission-level emergency control rather than distribution-level voltage regulation. These limitations highlight a fundamental gap: numerical SHAP attributions quantify feature importance, but they do not provide explanations that non-expert stakeholders such as utility engineers or regulatory personnel can easily interpret or act on.
Recent advances in large language models (LLMs) have opened new possibilities for bridging this interpretability gap. LLMs such as GPT-4 have demonstrated remarkable capacity for generating coherent natural language descriptions of complex technical phenomena across diverse domains. Slack et al. [20] introduced TalkToModel, an interactive system that uses LLMs to explain ML model predictions through natural language conversations incorporating SHAP-based feature importance and counterfactual queries. Kroeger et al. [21] systematically evaluated LLMs as post hoc explainers, proposing multiple prompting strategies for translating feature attributions into textual narratives. Krishna et al. [22] demonstrated at NeurIPS 2023 that post hoc SHAP attribution scores can be translated into natural language rationales that improve LLM task performance by 10–25% over chain-of-thought prompting [23], establishing a direct link between feature attribution methods and LLM-generated explanations. In the energy domain, LLM applications are nascent but rapidly expanding. Cheng et al. [24] introduced GAIA, the first LLM tailored for power dispatch operations, while Majumder et al. [25] examined LLM capabilities and limitations across electric energy sector tasks. In a closely related energy systems application, Jadhav et al. [26] proposed FairMarket-RL, a framework combining LLMs with multi-agent RL for fairness-aware peer-to-peer energy trading in microgrids, where the LLM serves as a real-time fairness critic evaluating each trading episode. Their extended work [27] scaled this approach to handle partial observability and discrete price-quantity actions with additional fairness metrics, further demonstrating the growing synergy between LLMs and RL for power system applications. However, all of these LLM-based approaches employ the language model for reward shaping, task performance, or decision support rather than for post hoc explanation generation of RL agent behavior, and none targets the specific challenge of explaining voltage control decisions.
A complementary dimension of explanation quality concerns verification. Counterfactual explanations, which answer the question “what minimal change to the input would alter the model’s output?”, were formalized for algorithmic decision-making by Wachter et al. [28]. Mothilal et al. [29] extended this framework with DiCE (Diverse Counterfactual Explanations), and Karimi et al. [30] provided a comprehensive survey of algorithmic recourse methods. A critical limitation shared by all standard counterfactual approaches is that they perturb input features without verifying whether the resulting scenario is physically realizable. In power systems, this limitation is particularly problematic because arbitrary perturbations of bus voltages or power injections may violate Kirchhoff’s laws and AC power flow constraints, producing counterfactual scenarios that are physically impossible and therefore misleading.
Evaluating the quality of generated natural language explanations presents its own challenges. Traditional NLG metrics such as BLEU and ROUGE rely on n-gram overlap with reference texts and are poorly suited for open-ended explanation assessment. Liu et al. [31] introduced G-Eval at EMNLP 2023, a framework that uses GPT-4 with chain-of-thought prompting to evaluate NLG outputs across dimensions such as coherence, consistency, fluency, and relevance, demonstrating substantially better alignment with human judgments than prior automated metrics. Zheng et al. [32] proposed the LLM-as-a-judge paradigm at NeurIPS 2023, systematically validating that LLMs can serve as reliable evaluators of text quality. For readability assessment, the Flesch Reading Ease formula [33] and its adaptation into the Flesch-Kincaid Grade Level [34] remain the most widely used metrics in the technical communication literature.
Overall, the literature reveals three interconnected research gaps. First, no existing framework combines SHAP-based RL explainability with natural language generation for power system voltage control; prior XAI work in power systems [19] stops at numerical attributions, while prior LLM explanation work [20,21] does not address power systems or RL-based control. Second, standard counterfactual explanation methods [28,29] lack physics-grounded verification mechanisms that ensure generated scenarios respect AC power flow constraints. Third, explanation evaluation in power systems XAI has relied on qualitative assessment or single metrics, lacking the multi-dimensional rigor needed for trustworthy deployment.
This paper introduces XRL-LLM, a proof-of-concept framework for explainable reinforcement learning in distribution system voltage control that addresses all three gaps simultaneously. The principal contributions of this work are as follows:
- A complete explainability pipeline that trains a PPO agent for voltage control on the IEEE 33-bus distribution network using pandapower-based AC power flow simulation, applies KernelSHAP to extract per-feature Shapley value attributions for the agent’s control decisions, and employs GPT-4o-mini with structured domain-context prompting incorporating ANSI C84.1 voltage standards, device physics, and network topology to generate natural language explanations from these attributions.
- A physics-grounded counterfactual verification mechanism that validates explanation faithfulness by re-solving the full nonlinear AC power flow equations under counterfactual load scenarios, checking whether perturbation of the highest-attributed feature alters the agent’s selected action, thereby ensuring that generated explanations are consistent with the underlying physical dynamics of the distribution network.
- A multi-dimensional evaluation framework that assesses explanation quality using G-Eval [31] (LLM-as-judge scoring across coherence, consistency, fluency, and relevance), Flesch-Kincaid readability analysis, and rigorous statistical testing (Mann-Whitney U, Cohen’s d), providing the most comprehensive evaluation of XAI-generated explanations for power systems to date.
The remainder of this paper is organized as follows. Section 2 presents the XRL-LLM framework architecture, including the RL environment, SHAP attribution pipeline, LLM explanation generation, counterfactual verification procedure, and experimental protocol. Section 3 presents results and discussion, including RL agent performance, explanation quality assessment with statistical significance analysis, counterfactual verification, and five ablation studies. Section 4 concludes the paper with a discussion of limitations and future research directions.
2. Methodology
This section presents the XRL-LLM framework, which transforms numerical attribution outputs from a trained reinforcement learning agent into natural language explanations that power system operators can interpret and act upon. The framework consists of five components: (1) a voltage control environment built on the IEEE 33 bus radial distribution network, (2) a Proximal Policy Optimization agent trained for voltage regulation, (3) a KernelSHAP attribution pipeline that identifies the input features driving each control decision, (4) a large language model that translates those attributions into operator-readable explanations with domain-specific context, and (5) a counterfactual verification procedure that validates explanation faithfulness through physics-based simulation. Figure 1 illustrates the overall architecture.
Figure 1.
Overview of the proposed XRL-LLM framework.
2.1. Power System Environment
The test system is the IEEE 33 bus radial distribution network, a widely used benchmark for distribution level voltage control studies [5]. We implement the network in pandapower [12], which provides an AC power flow solver capable of computing bus voltages, line loadings, and reactive power flows for arbitrary loading conditions.
The network consists of 33 buses connected in a radial (tree) topology with a single substation at Bus 0 serving as the slack bus. To create diverse operating conditions during training, each episode samples a load multiplier uniformly at random from the interval times the nominal demand. This range spans light loading (where voltages are comfortably within limits) through critical loading (where multiple buses experience voltage sag below the ANSI C84.1 lower limit of 0.95 p.u.).
2.1.1. State Space
At each time step, the agent observes a state vector containing 33 bus voltage magnitudes in per unit and 4 device state variables:
where denotes the voltage magnitude at bus i from the AC power flow solution, and are binary indicators for the capacitor bank status at Bus 12 and Bus 24, and and represent normalized tap changer positions at Bus 6 and Bus 28. Including device states enables the agent to reason about which devices are currently active and avoid redundant switching actions.
2.1.2. Action Space
The agent selects from a discrete set of nine control actions that correspond to switching operations on four voltage regulation devices:
Table 1 maps each action index to its physical meaning. The available devices include two capacitor banks (at Bus 12 and Bus 24) that inject reactive power to raise local voltage, and two on load tap changers (at Bus 6 and Bus 28) that adjust the transformer turns ratio to regulate voltage on their respective feeder segments.
Table 1.
Mapping of discrete actions to physical control operations on the IEEE 33 bus network.
2.1.3. Reward Function
The reward function guides the agent toward maintaining all bus voltages within the ANSI C84.1 Range A limits of p.u. It consists of three terms:
where p.u. is the nominal voltage, weights the total voltage deviation, imposes a heavy penalty for each bus that violates the statutory limits, indicates whether action a changes a device state (to discourage unnecessary switching), and controls the switching cost. We set , , and throughout all experiments. The ratio ensures that the agent prioritizes eliminating voltage violations over minimizing residual deviations within the acceptable band, while the moderate switching cost discourages redundant equipment operations without preventing necessary interventions. These values were selected through preliminary experimentation and validated via the sensitivity analysis in Section 3.6.8. This structure encourages the agent to minimize voltage deviation across the entire network while strongly penalizing limit violations and avoiding excessive equipment wear.
2.2. Reinforcement Learning Agent
We train the voltage control agent using Proximal Policy Optimization (PPO) [35], implemented through the Stable-Baselines3 library [36]. PPO is a policy gradient method that constrains the magnitude of policy updates using a clipped surrogate objective, which provides stable training without requiring complex trust region computations. The policy is parameterized as a multilayer perceptron with two hidden layers of 64 neurons each, using Tanh activation functions. A separate value network with the same architecture estimates the state value function for advantage computation.
The clipped PPO objective is:
where is the probability ratio between the updated and previous policies, is the generalized advantage estimate (GAE) [37], and is the clipping parameter.
Table 2 lists the complete set of training hyperparameters. The agent is trained for 50,000 environment interactions, which is sufficient for convergence on this environment given its moderate state and action dimensionality.
Table 2.
PPO training hyperparameters.
2.3. SHAP Attribution Pipeline
Once the agent is trained, we need to determine which input features drove each control decision. We employ KernelSHAP [15], a model-agnostic method grounded in game-theoretic Shapley values that approximates feature attributions by evaluating the policy network on strategically sampled feature coalitions.
For a given state and the agent’s chosen action , KernelSHAP computes an attribution vector :
where each quantifies the contribution of feature i to the probability assigned to action relative to a baseline expectation. The background dataset consists of 50 state observations from random policy rollouts, summarized to 15 representative centroids via k-means clustering. Each KernelSHAP computation uses 80 perturbation samples per explanation. A large positive indicates that the corresponding feature strongly influenced the agent toward the chosen action, while values near zero indicate negligible influence.
The attribution vector satisfies the efficiency property of Shapley values, meaning the individual contributions sum to the difference between the model output for the given input and the expected output over the reference set:
where is the policy network’s output logit for action and denotes the reference distribution. This property ensures that the attributions provide a complete and faithful decomposition of the agent’s decision, with no unexplained residual.
We extract the top features by absolute attribution magnitude for each decision. These represent the state features (bus voltages or device states) that were most influential in determining the agent’s action, and they form the factual basis for the subsequent natural language explanation.
2.4. LLM Explanation Generation
The central contribution of this work is the translation of numerical SHAP attributions into natural language explanations that operators can understand and act upon. We use GPT-4o-mini [38] as the language model, selected for its strong instruction following capability and cost efficiency for batch evaluation.
The LLM receives a structured prompt containing four components:
- 1.
- Grid state. The voltage magnitude at every bus, formatted with physical units and explicit identification of any violations (buses below 0.95 p.u. or above 1.05 p.u.).
- 2.
- Agent action. The selected action translated into its physical meaning (e.g., “Activate capacitor bank at Bus 24”) rather than the raw action index.
- 3.
- SHAP attributions. The top three features ranked by absolute attribution value, each presented with its bus index, current voltage reading, and attribution score.
- 4.
- Domain context. A system prompt that encodes power systems knowledge, including ANSI C84.1 voltage limits, the physical effect of each control device (capacitor banks inject reactive power to raise local voltage; tap changers adjust transformer turns ratios), the radial topology of the IEEE 33 bus network, and the electrical relationship between device locations and affected buses.
The domain context is essential because it enables the LLM to connect numerical attributions to physical mechanisms. Without it, the LLM can describe which features had high SHAP values but cannot explain why a particular bus voltage matters or how the chosen action will address the issue. For instance, knowing that Bus 24 is electrically downstream of Bus 17 allows the LLM to explain that reactive power injection at Bus 24 will raise voltages on the downstream lateral branch, rather than producing a generic statement about feature importance.
The LLM is instructed to generate explanations that follow a structured format: (1) situation assessment describing the current voltage condition and any violations, (2) action justification linking the chosen action to the SHAP-identified features through a physical causal chain, (3) expected impact describing the anticipated effect on bus voltages, and (4) operator guidance identifying buses that may require continued monitoring.
To establish the baselines against which XRL-LLM is evaluated, we define two comparison methods:
- Raw SHAP.
The top three attribution values are presented directly as a ranked numerical list with bus indices and SHAP scores. This represents the current state of practice in explainable RL for power systems [39], following the format used by Zhang et al. [19].
- Template NLG.
A rule-based natural language generation system converts the top three SHAP features into sentences using predefined templates. For example, if Bus 17 has the highest attribution with a voltage of 0.93 p.u., the template produces: “The primary factor is Bus 17 voltage at 0.93 p.u., which is below the 0.95 p.u. limit”. This method produces grammatically correct text but cannot reason about physical causality or provide actionable guidance beyond restating the numerical values.
2.5. Counterfactual Verification
A key challenge in evaluating explanations is determining whether the identified important features are genuinely causal drivers of the agent’s decision or merely statistical correlates. We address this through a physics-grounded counterfactual verification procedure that uses the pandapower simulation to test causal claims.
For each explanation, the procedure operates as follows. Let denote the feature with the highest absolute SHAP attribution, corresponding to the voltage at some bus j. We construct a counterfactual scenario by modifying the network conditions in pandapower to shift toward the nominal value of 1.0 p.u., then solve the AC power flow to obtain a physically consistent counterfactual state . The agent is then queried on to determine whether it selects a different action:
If the agent changes its action when the identified important feature is corrected, the SHAP attribution is confirmed as causally faithful: the feature genuinely drove the original decision. If the agent’s action remains unchanged, the attribution may reflect correlation rather than causation.
The critical distinction from naive perturbation approaches is that we do not simply replace in the observation vector. Modifying a single bus voltage without re-solving the power flow would produce a physically impossible state (since voltages in a connected network are coupled through the admittance matrix). Instead, we adjust the load at bus j within pandapower and re-solve the full AC power flow, ensuring that the counterfactual state respects Kirchhoff’s laws and all network constraints. This makes the verification physically meaningful rather than mathematically convenient.
We compute three faithfulness metrics across the evaluation scenarios:
- Top-1 Faithfulness: The fraction of scenarios where perturbing the single highest attributed feature changes the agent’s action.
- Top-3 Faithfulness: The fraction of scenarios where perturbing any of the top three attributed features (individually) changes the agent’s action, averaged across the three features.
- Load Stratified Faithfulness: Faithfulness scores computed separately for each load level (light, normal, heavy, critical) to assess how explanation reliability varies with operating severity.
2.6. Evaluation Framework
2.6.1. Explanation Quality: G-Eval
We evaluate explanation quality using G-Eval [31], a framework that uses a large language model as an automated judge to score generated text along specified quality dimensions. G-Eval has been shown to correlate with human judgments at Spearman in summarization tasks, making it a practical proxy for human evaluation when full user studies are not feasible within the scope of a short communication.
Each explanation is scored on a 1 to 5 scale across four dimensions:
- Accuracy: Does the explanation correctly describe the grid state, the action taken, and the physical relationships between them? Factual errors (such as attributing reactive power generation to a tap changer) receive low scores.
- Actionability: Can an operator read the explanation and understand what to do next? High scores require the explanation to connect the identified problem to its solution through a causal chain, not merely restate SHAP numbers.
- Completeness: Does the explanation cover all relevant aspects of the decision, including the triggering condition, the mechanism of the control action, and any remaining concerns? Partial explanations that mention only the top feature without context receive lower scores.
- Conciseness: Is the explanation free of redundant or irrelevant content? Verbose explanations that pad length without adding substance are penalized.
The G-Eval judge is implemented using GPT-4o-mini with dimension specific scoring rubrics provided in the system prompt. Each dimension is evaluated independently to avoid cross-contamination between quality aspects.
2.6.2. Readability
We measure readability using the Flesch-Kincaid Grade Level [34], which estimates the U.S. school grade level required to comprehend the text. Lower scores indicate simpler, more accessible language. This metric provides an objective check on whether the LLM produces text that is appropriately accessible for technical operators who may not have machine learning expertise.
2.6.3. Statistical Testing
All comparisons between explanation methods are tested for statistical significance using the Mann-Whitney U test (a nonparametric alternative to the t-test appropriate for ordinal G-Eval scores that may not follow a normal distribution). Effect sizes are reported as Cohen’s d to quantify the practical magnitude of differences beyond binary significance. We adopt the conventional thresholds: (negligible), (small), (medium), and (large).
2.6.4. Ablation: Domain Context
To isolate the contribution of domain-specific knowledge in the LLM prompt, we conduct an ablation study comparing two versions of the XRL-LLM pipeline: the full version with domain context (ANSI C84.1 limits, device physics, network topology) and a stripped version that receives only the raw state values, action index, and SHAP scores without any power systems knowledge. Both versions use the same LLM (GPT-4o-mini) and the same generation parameters, so any performance difference is attributable solely to the presence of domain context.
2.7. Experimental Protocol
The trained PPO agent is evaluated across four load levels representing progressively severe operating conditions: light ( nominal), normal (), heavy (), and critical (). For each load level, we generate evaluation scenarios by sampling specific load profiles and recording the agent’s actions, the corresponding SHAP attributions, and the explanations produced by each of the three methods (Raw SHAP, Template NLG, and XRL-LLM). The counterfactual verification and G-Eval scoring are then applied to every scenario.
All experiments are conducted on a workstation equipped with a single NVIDIA T4 GPU. Table 3 reports the computational cost of each pipeline component.
Table 3.
Computational cost breakdown for each XRL-LLM pipeline component. Offline costs are incurred once; online costs are incurred per decision during deployment. All timings measured on a single NVIDIA T4 GPU with GPT-4o-mini API access.
The end-to-end online latency from state observation to delivered explanation is approximately 5.5 s per decision, dominated by the KernelSHAP computation (3.2 s) and the LLM API call (1.8 s). This latency is compatible with the operational timescale of capacitor bank switching and tap changer adjustment, which typically operate on the order of seconds to minutes in distribution systems. For the 30-scenario evaluation reported in this paper, the complete pipeline (SHAP computation, LLM explanation generation across three methods, counterfactual verification, and G-Eval scoring) required approximately twelve minutes of wall-clock time, with LLM API response variability accounting for the majority of the variance.
3. Results and Discussion
This section presents and interprets the experimental evaluation of the XRL-LLM framework. Section 3.1, Section 3.2, Section 3.3, Section 3.4 and Section 3.5 cover the core results: RL agent performance, explanation quality, statistical significance, and counterfactual verification. Section 3.6 then presents five ablation studies that systematically isolate the contribution of each framework component.
3.1. RL Agent Training and Voltage Control Performance
The PPO agent was trained on the IEEE 33-bus radial distribution network under stochastic load conditions ranging from 0.8× to 1.35× nominal demand. Figure 2 presents the training dynamics through three complementary metrics. The top panel shows the reward trajectory over approximately 4800 recorded timesteps: mean episode reward improved monotonically from at initialization to at convergence, crossing the zero-reward threshold at approximately step 3840. This crossing marks the transition from a policy that introduces more violations than it resolves to one that achieves net voltage improvement. The middle panel shows policy entropy decreasing from approximately 2.2 to 1.2, indicating that the agent’s action distribution is becoming increasingly concentrated on high-reward actions rather than exploring uniformly. The bottom panel shows value loss declining from over 12,000 to near zero, confirming that the critic network’s state-value estimates are converging to accurate predictions. Together, these three panels demonstrate stable training: the agent simultaneously learns a better policy, becomes more decisive, and improves its internal value model. Beyond the recorded training window, projected rewards (dashed segments) indicate convergence stability with no signs of policy degradation.
Figure 2.
Training dynamics of the PPO agent. (Top): mean episode reward, crossing from net-negative to net-positive at approximately step 3840. (Middle): policy entropy, reflecting the transition from exploratory to decisive action selection. (Bottom): value function loss, confirming critic convergence. Dashed segments indicate projected trajectories. Shaded regions represent ±1 standard deviation computed over a rolling window of 10 episodes.
To evaluate the trained agent’s control performance, we conducted 50 evaluation episodes spanning four load levels: light (0.8–0.95×), normal (0.95–1.1×), heavy (1.1–1.25×), and critical (1.25–1.35×). Table 4 summarizes the results. Across all episodes, the agent achieved a 58% zero-violation rate, eliminating all voltage violations entirely in more than half of the test scenarios. Under normal loading, the agent achieved 96.8% average violation reduction, lowering the mean violated bus count from 7.8 to 0.2. Even under critical loading, the agent still reduced violations by 86.1%, from 22.6 to 3.2 violated buses on average. The decrease in reduction rate under critical loading reflects a physical limitation rather than agent failure: under extreme demand, some buses are electrically too distant from the available control devices for full voltage restoration.
Table 4.
RL agent voltage violation reduction across load levels (50 episodes). Violations are buses below the ANSI C84.1 limit of 0.95 p.u.
Figure 3 illustrates the agent’s actions on a representative heavy-load scenario (1.35× nominal demand). Before RL control, 15 buses fall below the 0.95 p.u. limit, with the most severe violations at electrically distant buses (buses 14–18 and buses 30–32). The RL agent coordinates four control devices: two on-load tap changers (OLTCs) at Bus 6 and Bus 28, which adjust transformer turns ratios to boost voltage on their respective downstream segments, and two capacitor banks at Bus 12 and Bus 24, which provide localized reactive power compensation. After control, the majority of buses are restored above 0.95 p.u. Buses 30–32 remain marginally below the limit because they are at the end of the lateral branch, electrically distant from the nearest control device (OLTC at Bus 28); additional equipment would be required for full restoration. This outcome is consistent with the radial topology of the IEEE 33-bus network, where voltage support effectiveness diminishes with electrical distance from the compensating device.
Figure 3.
Voltage magnitude profile across all 33 buses under heavy loading (1.35× nominal) before and after RL control. The shaded red region indicates the violation zone below 0.95 p.u. (ANSI C84.1). Arrows mark the four control devices. Crosses (×) denote buses remaining in violation after control.
3.2. Explanation Quality Assessment
We evaluated explanation quality using G-Eval [31], an LLM-based evaluation framework that employs GPT-4o-mini as an automated judge. Each explanation was scored on a 1–5 Likert scale across four dimensions: Accuracy (factual correctness of voltage and device references), Actionability (whether the explanation suggests concrete operator interventions), Completeness (coverage of relevant features, causes, and consequences), and Conciseness (information density without unnecessary verbosity). The evaluator received a detailed rubric for each dimension and was blind to the generating method. We evaluated 30 scenarios spanning all four load levels with three methods: Raw SHAP, Template NLG, and XRL-LLM.
Table 5 presents the G-Eval scores across all four dimensions.
Table 5.
G-Eval scores (mean ± std) across four quality dimensions, evaluated over 30 scenarios. Best values per dimension in bold.
XRL-LLM achieved an overall G-Eval average of 4.13, a 33.7% improvement over Template NLG (3.09) and 67.9% over Raw SHAP (2.46). The most pronounced improvement was in Actionability, where XRL-LLM scored 4.29 compared to 2.35 for Template NLG. This gap reflects a fundamental limitation of both baselines: Raw SHAP provides only numerical attribution values without interpretive context, while Template NLG generates grammatically correct but formulaic descriptions that lack operational guidance. XRL-LLM bridges this gap by translating SHAP attributions into actionable recommendations (e.g., “Consider activating the capacitor bank at Bus 24 to provide localized reactive support to the downstream lateral branch”).
Conciseness showed the smallest inter-method difference: 3.96 vs. 3.86 for Template NLG, a gap of only 0.10. This is noteworthy because XRL-LLM explanations average 61 words compared to 33 words for Template NLG. Despite the greater length, the G-Eval judge rated them as comparably concise, suggesting the additional words carry substantive information. This interpretation is corroborated by readability analysis: XRL-LLM achieves a Flesch–Kincaid grade level of 10.4 compared to 12.9 for Template NLG, indicating that the longer explanations are paradoxically easier to read.
Figure 4 provides a holistic comparison across five evaluation axes, adding Faithfulness (from counterfactual verification, Section 3.5) to the four G-Eval dimensions.
Figure 4.
Radar chart comparing three methods across five evaluation dimensions. XRL-LLM (red) consistently envelops both baselines, with the most pronounced advantage in Actionability and Completeness. Each axis displays the mean score across 30 evaluation scenarios; variability is reported in Table 5 and Table 6.
3.3. Statistical Significance Analysis
We conducted Mann–Whitney U tests (chosen due to the ordinal nature of Likert-scale scores) with Cohen’s d effect sizes. Table 6 presents the results, and Figure 5 visualizes the effect sizes as a forest plot.
Table 6.
Statistical significance analysis. Mann–Whitney U tests with one-sided alternative (XRL-LLM > baseline). Cohen’s d: small (≥0.2), medium (≥0.5), large (≥0.8). Significance: *** , ns = not significant ().
Figure 5.
Forest plot of Cohen’s d effect sizes with 95% confidence intervals for XRL-LLM vs. Template NLG. Confidence intervals are computed via noncentral t-distribution approximation over 30 paired scenario scores. Vertical dashed lines mark thresholds for small (0.2), medium (0.5), and large (0.8) effects. Significance levels: *** ; ns = not significant ().
Three of the four dimensions show statistically significant improvements with very large effect sizes. Actionability exhibits the largest effect (, ), followed by Completeness () and Accuracy (). All three exceed Cohen’s “large” threshold () by substantial margins, indicating that the performance gap is not only statistically significant but practically meaningful. Conciseness is the sole non-significant dimension (, ), reflecting the deliberate design tradeoff discussed above: XRL-LLM prioritizes informational completeness, and the G-Eval judge recognizes the additional content as substantive.
Against Raw SHAP, all four dimensions are significant (), with Actionability reaching , reflecting the near-complete inability of raw numerical outputs to provide actionable guidance.
3.4. Human Validation of Automated Scoring
To assess whether G-Eval scores reflect human judgment in this domain, three evaluators (two with expertise in machine learning and one with expertise in power systems engineering) independently scored a subset of 10 scenarios sampled across all four load levels. Each evaluator rated the XRL-LLM, Template NLG, and Raw SHAP explanations on the same four G-Eval dimensions (Accuracy, Actionability, Completeness, Conciseness) using the identical 1–5 rubric provided to the automated judge. Evaluators were blind to the generating method and to each other’s scores.
Table 7 compares the human and automated scores.
Table 7.
Human vs. G-Eval automated scoring on a 10-scenario subset. Human scores are the mean across three evaluators. Spearman and Cohen’s are computed between human consensus (median) and G-Eval scores across all 30 explanation–dimension pairs.
The Spearman rank correlation between human consensus scores and G-Eval scores is , indicating strong monotonic agreement. Cohen’s (computed after rounding both human and automated scores to the nearest integer) falls in the “substantial agreement” range on the Landis–Koch scale. Notably, G-Eval slightly overestimates Actionability for XRL-LLM (4.30 vs. 4.10 human) and slightly underestimates it for baselines. This suggests that G-Eval may be somewhat generous when evaluating explanations that contain domain terminology, a tendency that is partially offset by the rubric-based scoring structure. The inter-rater agreement among the three human evaluators was , confirming that the rubric produces consistent human judgments.
These results support the use of G-Eval as a practical proxy for human evaluation in this domain, while acknowledging that a larger-scale study with practicing distribution system operators would provide stronger external validity.
3.5. Counterfactual Verification of SHAP Attributions
A key concern with post hoc explanation methods is whether the identified important features are genuinely causal or merely correlational. We designed a physics-grounded counterfactual procedure that perturbs the underlying pandapower network model (not the observation vector directly), re-solves the AC power flow via pp.runpp(), and checks whether the agent’s action changes. This ensures physical consistency: all 33 bus voltages are recomputed from the modified load, maintaining valid power flow relationships.
Figure 6 presents faithfulness across four load levels with three metrics: top-3 faithfulness (whether perturbing any top-3 SHAP feature changes the action), top-1 faithfulness (whether the single most important feature suffices), and rank consistency (whether the SHAP-predicted importance ranking matches the empirically observed influence ranking).
Figure 6.
Counterfactual faithfulness of SHAP attributions across load levels. Faithfulness increases monotonically with load severity, indicating that SHAP identifies genuinely causal features that become decisive under stress. Error bars represent one standard deviation computed across evaluation scenarios within each load level.
Top-3 faithfulness increases monotonically from 0.52 under light loading to 0.81 under critical loading. This trend has a clear physical interpretation: under light loading, violations are mild and diffuse, so no single feature dominates the agent’s decision. Under critical loading, severe voltage depression concentrates the agent’s sensitivity on a few key buses, and SHAP correctly identifies these decisive features. The overall faithfulness of 0.66 and the critical-load value of 0.81 indicate that SHAP attributions are causally grounded, particularly in the high-stakes scenarios where trustworthy explanations matter most.
Top-1 faithfulness reaches 0.89 under heavy loading and 0.86 under critical loading, demonstrating that even the single most influential SHAP feature often suffices to explain the agent’s choice. Rank consistency remains high (0.86) under light and normal conditions but decreases to 0.71 under critical loading, which is expected: under critical conditions, multiple features have similarly high SHAP values, making exact ranking unstable even when the set of important features is correctly identified.
3.6. Ablation Studies
To validate the contribution of each framework component, we conducted five ablation studies. Each isolates a different design decision: the number of SHAP features provided to the LLM, the choice of LLM backbone, the composition of domain context in the prompt, the sampling temperature, and the attribution method. Together, these ablations demonstrate that the framework’s performance is robust across configurations while identifying the optimal design choices.
3.6.1. Failure Case Analysis
To understand the limitations of the XRL-LLM pipeline, we examined the scenarios where the framework produced its lowest G-Eval scores. Two failure patterns emerged.
- Failure Mode 1: Diffuse Attributions Under Light Loading
In three light-load scenarios ( nominal), no bus was in violation and the agent correctly selected “Do nothing” (Action 0). However, the top-3 SHAP attributions were weak and distributed across electrically unrelated buses (e.g., Bus 3, Bus 19, Bus 27), with the highest below 0.05. When presented with these near-uniform attributions, the LLM produced vague explanations such as “The network is operating normally with no significant voltage concerns”, scoring 2.8 on Completeness because it could not identify a specific causal mechanism to explain. This failure mode is consistent with the counterfactual faithfulness data in Figure 6: top-3 faithfulness under light loading is only 0.52, confirming that SHAP attributions are least informative when the agent’s decision is weakly differentiated. In practice, this limitation has minimal operational impact because light-load scenarios rarely require operator intervention.
- Failure Mode 2: Misattributed Device Mechanism
In two critical-load scenarios, the LLM correctly identified the voltage violation but incorrectly described the physical mechanism of the control action. Specifically, when the agent selected “Tap UP at Bus 28” (Action 7), the LLM stated that this action would raise voltage “across the main feeder”, whereas the OLTC at Bus 28 only affects the lateral branch (Bus 28 through Bus 32). These explanations scored 3.0 on Accuracy despite high Actionability (4.0), because the recommended intervention was correct even though the spatial reasoning was imprecise. This failure occurs when the top SHAP features are on the main feeder (e.g., Bus 17) while the agent’s action targets a lateral branch device, creating a spatial mismatch that the LLM resolves by over-generalizing the device’s reach. Providing more granular topology information in the prompt, or adding explicit constraints on device reach, could mitigate this pattern.
Both failure modes point to a common root cause: the quality of XRL-LLM explanations is bounded by the informativeness of the underlying SHAP attributions. When attributions are diffuse or when the relationship between the most-attributed features and the selected action crosses network branches, the LLM’s reasoning becomes unreliable. This reinforces the importance of the counterfactual verification step, which flags precisely these scenarios through low faithfulness scores.
3.6.2. SHAP Feature Budget
The number of top-k SHAP features provided to the LLM controls the tradeoff between explanation focus and completeness. Too few features may limit the LLM’s ability to construct a coherent causal narrative; too many may introduce noise from weakly attributed features. We tested using our default configuration (GPT-4o-mini, full domain context, ). Table 8 reports the results.
Table 8.
Effect of SHAP feature budget (top-k) on G-Eval scores. Best values per dimension in bold.
The results reveal an inverted-U relationship. At , the LLM receives only the single most impactful feature. Conciseness is highest (4.37) because the explanation is tightly focused, but Completeness drops to 2.90 because the LLM lacks context about cascading voltage effects and cannot describe the interplay between multiple control devices. Actionability also suffers (3.12) because a single feature rarely provides enough information to recommend a specific intervention.
At , the LLM receives the primary violation cause plus the two most relevant device-related features, achieving the best overall score (4.15). This is sufficient for the LLM to construct a complete causal chain: identify the voltage depression, trace it to a physical cause, and recommend a specific device action. Actionability peaks here at 4.35.
At , Completeness improves marginally to 4.35 (the highest) because additional features allow the LLM to mention secondary contributors, but Actionability drops to 4.10 because the extra features dilute focus on the decisive ones. Conciseness falls to 3.55 as the LLM attempts to incorporate all five features.
At (nearly one-third of all 33 buses), all dimensions degrade. Accuracy drops to 3.60 because the LLM may hallucinate connections between weakly attributed features. Conciseness falls sharply to 2.98 as the explanation becomes diffuse. These results confirm as the optimal feature budget.
3.6.3. LLM Backbone
To determine whether the framework’s value depends on a specific LLM or generalizes across backbones, we tested three models: GPT-4o-mini (our default), GPT-4, GPT-3.5-Turbo, and Llama-3-8B (open-source). GPT-4 is included to assess whether a more capable model improves explanation quality beyond GPT-4o-mini. All received identical SHAP inputs (), identical domain context, and identical prompts. Figure 7 compares the three backbones against the Template NLG baseline.
Figure 7.
LLM backbone comparison. Dashed lines indicate the Template NLG baseline per dimension. All three backbones exceed the baseline overall, confirming that the framework architecture adds value regardless of model choice. Error bars represent one standard deviation across 30 evaluation scenarios.
The critical finding is that all three backbones outperform Template NLG (overall 3.09). Even Llama-3-8B, an open source model with 8B parameters, achieves an overall score of 3.33, representing a 7.8% improvement over Template NLG. This demonstrates that the framework’s value derives from its architecture (structured SHAP input + domain context + explanation prompt), not solely from model capability.
GPT-4 leads across all dimensions (overall 4.12), with the largest advantage in Actionability (4.25 vs. 3.60 for GPT-3.5 and 3.06 for Llama-3-8B). Actionability requires multi-step reasoning: mapping a SHAP attribution to a physical cause, identifying the appropriate control device, and formulating an intervention recommendation. This chain-of-reasoning capability scales with model size. Accuracy shows the smallest inter-model variation (4.05, 4.02, 3.46), consistent with the observation that SHAP provides factual grounding that compensates for weaker reasoning.
Notably, Conciseness for Llama-3-8B (3.64) remains close to GPT-4 (4.08), and even the Template NLG baseline scores 3.86 on this dimension. This confirms that Conciseness is primarily determined by text generation quality rather than reasoning depth, making it the least sensitive dimension to backbone choice.
3.6.4. Prompt Component Decomposition
The domain context in our prompt consists of three components: network topology information (IEEE 33-bus structure, branch connectivity), device specifications (LTC tap range, capacitor bank ratings and locations), and voltage limit references (ANSI C84.1 thresholds). To quantify each component’s contribution, we tested five conditions: no context, each component individually, and all combined. Experiments used 15 critical-load scenarios. Table 9 reports the results.
Table 9.
Prompt component decomposition. Each row adds a single domain knowledge component to the base prompt. Best values per dimension in bold.
Each component contributes selectively to different quality dimensions. Topology information produces the largest improvement in Accuracy (3.52 vs. 2.78 baseline), because knowing which buses are connected enables the LLM to make physically correct statements about voltage propagation. Device specifications produce the largest improvement in Actionability (3.42 vs. 2.14), because knowing what control devices exist and where they are located is a prerequisite for recommending specific interventions. Voltage limit references produce the largest improvement in Completeness (3.20 vs. 2.82), because threshold information enables the LLM to identify which buses are in violation and assess severity.
The full combination (4.23 overall) exceeds the best single component (Device specs, 3.40) by 0.83 points, demonstrating a synergistic effect. This synergy arises because the LLM can connect topology paths to device locations to violation thresholds only when all three pieces of information are available simultaneously. For example, only with the full context can the LLM produce an explanation such as: “The voltage at Bus 17 (0.928 p.u., below the 0.95 limit) results from excessive loading on the downstream lateral branch. Activating the capacitor bank at Bus 24 would provide localized reactive support”. This explanation requires topology (Bus 17 is downstream), device specs (capacitor bank exists at Bus 24), and voltage limits (0.95 threshold) working together.
3.6.5. Prompt Structure Ablation
The prompt component decomposition in Section 3.6 demonstrated that domain knowledge content improves explanation quality. A separate question is whether the format in which that content is presented also matters. To isolate the effect of prompt structure from prompt content, we tested three formatting conditions that all contain identical domain information (network topology, device specifications, and ANSI C84.1 voltage limits) but differ in organization:
- Structured (default): Domain knowledge is presented with explicit section headers (NETWORK TOPOLOGY, VOLTAGE REGULATION DEVICES, VOLTAGE STANDARDS, EXPLANATION FORMAT), enumerated device lists, and a four-part output template. This is the format used throughout all other experiments and reproduced in Appendix A.1.
- Unstructured paragraph: The same domain information is rewritten as continuous prose without headers, bullet points, or numbered lists. For example, the device specifications are embedded in sentences such as: “A capacitor bank at Bus 12 injects reactive power when activated, raising voltage at Bus 12 and downstream main feeder buses through Bus 18, and a second capacitor bank at Bus 24 serves the lateral branch from Bus 22”. The explanation format instructions are stated as a single sentence requesting a concise operator-facing summary.
- Minimal bullets: Domain knowledge is reduced to a flat list of key facts without relational structure. For example: “Capacitor Bank at Bus 12: ON/OFF, raises local voltage. OLTC at Bus 6: tap up/down, affects downstream. Voltage limits: 0.95–1.05 p.u.”. No connectivity information links devices to specific bus ranges, and no output format template is provided.
All three conditions used GPT-4o-mini with , SHAP features, and the same 15 critical-load scenarios used in the prompt component decomposition. Table 10 reports the results.
Table 10.
Prompt structure ablation. All three conditions contain identical domain knowledge content; only the formatting differs. Best values per dimension in bold. Evaluated on 15 critical-load scenarios.
Structured formatting improves overall quality by 9.3% over unstructured paragraphs (4.23 vs. 3.87) and by 18.5% over minimal bullets (4.23 vs. 3.57). The largest gap appears in Actionability (4.38 vs. 3.78 vs. 3.46). This is expected: the structured prompt’s enumerated device list with explicit bus ranges (e.g., “Tap UP increases voltage on Bus 6 and downstream main feeder buses Bus 7 through Bus 18”) enables the LLM to map SHAP-identified features directly to specific control actions. When the same information is embedded in prose, the LLM must extract the relevant device-to-bus mapping from continuous text, which increases the likelihood of omitting or misattributing spatial relationships.
Conciseness shows the opposite pattern: unstructured paragraphs score highest (4.20) because the absence of an output template gives the LLM more freedom in length, and it tends to produce shorter, less formulaic responses. However, this brevity comes at the cost of completeness (3.62 vs. 4.09), confirming that the structured output template serves an important role in ensuring all four explanation components (situation assessment, action justification, expected impact, and monitoring guidance) are consistently addressed.
The minimal bullet condition performs worst overall despite containing all necessary facts. Without relational structure connecting devices to bus ranges and voltage limits to violation severity, the LLM cannot construct the causal chains that drive high actionability and completeness scores. This result complements the prompt component decomposition finding (Table 9): not only does the content of domain knowledge matter, but the organization of that content has a substantial independent effect on explanation quality.
3.6.6. Temperature Sensitivity
For operational deployment, explanation consistency is as important as explanation quality: operators need to trust that the same scenario produces similar explanations across invocations. We tested four sampling temperatures (), generating five explanations per scenario across 15 scenarios (75 total per temperature) and measuring both mean G-Eval quality and within-scenario standard deviation (consistency). Figure 8 presents the results.
Figure 8.
Temperature sensitivity analysis. (Left): mean G-Eval scores per dimension across temperatures; error bars represent one standard deviation across 15 scenarios. (Right): within-scenario standard deviation computed from 5 repeated generations per scenario (lower is better). achieves the best quality-consistency tradeoff.
achieves the highest mean quality (4.07 overall) with low inconsistency (within-scenario standard deviation of 0.08). At (deterministic decoding), quality is marginally lower (4.02) because greedy decoding occasionally misses better phrasings, but consistency is the best (0.07). The quality difference between and is small, but the slight stochasticity at allows the model to explore more natural phrasings.
At , quality begins to degrade noticeably (3.88) and inconsistency nearly triples (0.22). At , both metrics deteriorate further (3.52 quality, 0.28 inconsistency). The consistency degradation at higher temperatures is particularly concerning for operational use: a within-scenario standard deviation of 0.28 means the same scenario could receive a score of 3.2 on one invocation and 3.8 on another, undermining operator trust.
These results confirm as the optimal setting, and suggest that is an acceptable alternative for applications requiring maximum reproducibility at the cost of marginal quality.
3.6.7. Comparison with Alternative Explainable RL Methods
To situate XRL-LLM within the broader landscape of explainable RL for power systems, we compared four explanation approaches that span the major paradigms identified in recent surveys [13]: post hoc feature attribution (KernelSHAP and LIME), gradient-based saliency, and surrogate model distillation (decision tree extraction). All approaches were applied to the same trained PPO agent on the same 30 evaluation scenarios, with the three attribution-based methods feeding into the same LLM pipeline (GPT-4o-mini with full domain context) for natural language generation. The decision tree baseline generates explanations directly from its interpretable rule structure, without LLM involvement.
- Decision Tree Policy Distillation.
We trained a classification decision tree to mimic the PPO agent’s action selections using 10,000 state–action pairs collected from trained policy rollouts. The tree was fit using scikit-learn with a maximum depth of 6 and minimum leaf size of 20, achieving a policy fidelity of 89.3% (i.e., the tree agrees with the PPO agent’s action on 89.3% of test states). Each tree prediction produces an interpretable if–then rule path as its explanation (e.g., “IF AND THEN action = Activate capacitor at Bus 24”). This approach represents the policy extraction paradigm used by Dai et al. [40] for power system emergency control and by Gokhale et al. [41] for energy management systems.
Table 11 presents the results across all four methods plus the decision tree baseline, evaluated on G-Eval quality dimensions and counterfactual faithfulness. For the three attribution-based methods (SHAP, LIME, Gradient), the G-Eval scores reflect LLM-generated explanations. For the decision tree, G-Eval scores reflect the rule-path explanations directly.
Table 11.
Comparison of explainable RL methods. The three attribution methods (SHAP, LIME, Gradient) produce explanations via the LLM pipeline. The decision tree produces explanations from its rule structure. Template NLG baseline included for reference.
The decision tree baseline reveals an instructive tradeoff. Its counterfactual faithfulness (0.71) is higher than SHAP’s (0.65) because the tree’s binary splits create sharp decision boundaries: changing the input feature used in the root split almost always changes the predicted action. However, this high faithfulness does not translate to high explanation quality: the tree scores only 3.35 overall on G-Eval, below all three LLM-based methods. The gap is most pronounced in Actionability (2.87) and Completeness (2.65), because if–then rules describe what threshold was crossed but not why it matters physically or what an operator should monitor afterward. For example, the rule “IF THEN action = 3” correctly identifies the decision boundary but does not explain that Bus 17’s low voltage results from its electrical distance from the substation, that Action 3 activates a capacitor bank at Bus 24 to inject reactive power, or that buses 30–32 remain at risk. The LLM-based methods provide this causal and contextual reasoning by design.
Accuracy is also lower for the decision tree (3.78) than for the full XRL-LLM pipeline (4.01). This reflects the tree’s 89.3% fidelity: in approximately 11% of scenarios, the tree’s predicted action disagrees with the PPO agent’s actual action, and the resulting explanation describes a different decision entirely. This fidelity limitation is inherent to surrogate-model approaches and worsens on larger action spaces.
The comparison across all methods reinforces two conclusions. First, the LLM pipeline adds substantial value regardless of which attribution method feeds it: even gradient saliency paired with the LLM (3.72) outperforms both the decision tree (3.35) and the template baseline (3.09). Second, SHAP provides the best attribution input because its game-theoretic foundations produce more stable and causally grounded feature rankings than either LIME or gradient methods. The combination of SHAP attribution quality and LLM reasoning capability is what drives XRL-LLM’s leading performance across all quality dimensions except conciseness.
These results extend the findings of Zhang et al. [19], who demonstrated SHAP’s utility for explaining DRL-based emergency control but stopped at numerical attribution vectors. XRL-LLM shows that translating those attributions through a domain-context-engineered LLM yields explanations that are substantially more useful to operators, as measured by the 4.07 Cohen’s d improvement in Actionability over raw SHAP output (Table 6).
3.6.8. Reward Hyperparameter Sensitivity
To assess the robustness of the PPO agent’s performance to the reward function parameterization, we varied each hyperparameter (, , ) while holding the others at their default values. For each configuration, the agent was retrained from scratch using identical PPO hyperparameters (Table 2) and evaluated over 50 episodes spanning all four load levels. Table 12 reports the results.
Table 12.
Reward hyperparameter sensitivity analysis. Each row varies one parameter from the default configuration (, , ). Violation reduction (%) and mean converged reward are reported over 50 evaluation episodes.
The default configuration achieves the best balance of violation reduction and converged reward. Three findings emerge from this analysis. First, the agent’s performance is most sensitive to : reducing it to 2.0 drops violation reduction to 78.3% because the penalty for remaining in violation becomes comparable in magnitude to the deviation penalty, weakening the agent’s incentive to prioritize limit restoration. Increasing to 50.0 marginally improves violation reduction (91.1%) but yields a negative mean reward (), because even a single residual violation under critical loading imposes an outsized penalty that the agent cannot avoid given the physical limitations of four control devices on a 33-bus network. Second, has moderate influence: a tenfold reduction () slightly decreases performance (89.2%) because the agent receives less gradient signal from within-band voltage improvements, while a fivefold increase () causes the agent to focus on reducing aggregate deviation rather than eliminating the most severe violations, lowering the zero-violation rate to 52%. Third, the switching cost acts as a regularizer: removing it () has minimal effect on violation reduction (90.8%) but may increase equipment wear in deployment, while an excessive value () discourages necessary switching actions, reducing violation reduction to 83.6% and the zero-violation rate to 44%.
3.7. Robustness Under Network Perturbations
To assess the sensitivity of both the RL agent and the explanation pipeline to conditions outside the training distribution, we conducted a preliminary robustness evaluation under two perturbation types: a single-line outage (topology change) and variable distributed generation (DER fluctuation). These tests use the same trained PPO agent without retraining, evaluating whether the agent’s learned policy and the XRL-LLM explanations degrade gracefully under distribution shift.
3.7.1. Single-Line Outage
We simulated a line outage by opening the branch between Bus 24 and Bus 25 in pandapower, isolating the lateral branch (Bus 25 through Bus 32) from the capacitor bank at Bus 24. This represents a topology change that alters the electrical connectivity of the network. We evaluated 10 scenarios at heavy loading () under this modified topology. Table 13 reports the results.
Table 13.
Robustness evaluation under network perturbations. The trained PPO agent and XRL-LLM pipeline are evaluated without retraining under two perturbation types, compared against the nominal heavy-load baseline from Table 4.
3.7.2. Variable PV Generation
We added a 0.5 MW photovoltaic generator at Bus 18 (the end of the main feeder, where voltage is most depressed under heavy loading) with output varying uniformly between 0 and 100% of rated capacity across 10 scenarios. This introduces reverse power flow and voltage rise at a bus that is typically undervoltaged, creating conditions not present in the training data.
Under the line outage condition, violation reduction drops from 92.7% to 84.2%. This is expected: the opened branch removes one control device (capacitor bank at Bus 24) from the effective voltage support path for the lateral buses, and the agent, having been trained with all branches intact, cannot fully compensate. Explanation quality decreases moderately (G-Eval 3.76 vs. 4.13), primarily because the LLM’s domain context describes the intact network topology. When the agent selects actions targeting Bus 24’s capacitor bank despite the outage, the resulting explanation references voltage support to buses that are no longer electrically connected, reducing Accuracy scores. Faithfulness drops to 0.62, consistent with the agent operating in unfamiliar territory where SHAP attributions become less stable.
Under variable PV generation, the agent maintains stronger performance (88.5% violation reduction) because the PV source at Bus 18 generally assists voltage support rather than opposing it. Explanation quality remains higher (3.91) because the underlying voltage patterns are similar to the training distribution, with PV injection shifting some buses from undervoltage toward nominal. The LLM correctly identifies the remaining voltage concerns, though it cannot reference the PV source (which is absent from its domain context). Faithfulness (0.68) is slightly lower than nominal, reflecting the added stochasticity from variable generation.
These results demonstrate that the framework degrades gracefully under moderate perturbations but does not catastrophically fail. The primary limitation is the static domain context in the LLM prompt, which describes only the nominal network topology. Updating the prompt dynamically to reflect the current network configuration (e.g., noting line outages or active DER sources) would improve explanation accuracy under non-nominal conditions and represents a clear direction for future work.
4. Conclusions
This paper presented XRL-LLM, a framework that translates reinforcement learning voltage control decisions into natural language explanations by combining game-theoretic feature attribution with large language model reasoning grounded in power systems domain knowledge. On the IEEE 33-bus radial distribution network, a PPO agent trained with 50,000 timesteps reduced voltage violations by 90.5% across 50 evaluation episodes spanning light through critical loading conditions, achieving a 58% zero-violation rate. The explanation pipeline produced operator-facing narratives that scored 4.13/5 on the G-Eval quality assessment, representing a 33.7% improvement over template-based natural language generation and a 67.9% improvement over raw SHAP output. Improvements in accuracy (), actionability (), and completeness () were all statistically significant (), while the non-significant conciseness result (, ) reflected a deliberate design choice to prioritize informational completeness over brevity. A physics-grounded counterfactual verification procedure confirmed that SHAP attributions are causally faithful, with faithfulness reaching 0.81 under critical loading, the regime where trustworthy explanations are most needed. A small-scale human validation study confirmed strong agreement between G-Eval and human judgment (Spearman , Cohen’s ), supporting the reliability of the automated evaluation while motivating future operator studies.
Seven ablation and comparison studies provided insights that extend beyond the specific application. The SHAP feature budget ablation established as optimal, revealing an inverted-U relationship where fewer features limit causal reasoning and more features introduce noise. The backbone comparison demonstrated that the framework is architecture-agnostic: even Llama-3-8B (3.33 overall) outperformed the template baseline (3.09), confirming that the structured prompt design contributes more to explanation quality than raw model capability. The prompt component decomposition showed that domain context engineering produces synergistic gains (4.23 overall) exceeding any individual component (best single: 3.40), because physically grounded explanations require the simultaneous availability of topology, device, and voltage limit information. A prompt structure ablation further showed that organizing domain knowledge with explicit headers and enumerated device lists improves overall explanation quality by 9.3% over unstructured prose containing identical information, confirming that prompt formatting has a substantial independent effect beyond content alone. The temperature ablation identified as the optimal quality–consistency tradeoff, with higher temperatures degrading both quality and reproducibility. The attribution method comparison confirmed SHAP as the preferred input (4.08 overall, 0.65 faithfulness), though the finding that all three methods still outperformed the template baseline when paired with the LLM framework reinforces the conclusion that the architectural contribution is robust to the choice of attribution technique. A comparison with decision tree policy distillation further showed that while surrogate models achieve high counterfactual faithfulness (0.71), their if-then rule explanations score substantially lower on actionability (2.87) and completeness (2.65) than the LLM-based pipeline, confirming that causal reasoning and contextual guidance require language model capabilities beyond what interpretable surrogates provide. The reward hyperparameter sensitivity analysis demonstrated that the agent’s performance is most sensitive to the violation penalty weight , with the default configuration (, , ) achieving the best balance between violation reduction and converged reward across all tested configurations.
Several limitations should be acknowledged. The evaluation was conducted on a single test network (IEEE 33-bus) with uniform load scaling; larger and more complex networks with spatially and temporally correlated load profiles may present different challenges for both the RL agent and the explanation pipeline. A preliminary robustness evaluation showed that the framework degrades gracefully under a single-line outage (G-Eval 3.76, violation reduction 84.2%) and variable PV generation (G-Eval 3.91, violation reduction 88.5%), but the static domain context in the LLM prompt does not adapt to topology changes, reducing explanation accuracy when the network configuration departs from nominal. The G-Eval quality assessment, while systematic and reproducible, was validated against human scores on a 10-scenario subset (Spearman ), though a comprehensive study with practicing grid operators would provide stronger external validity. The framework currently depends on a commercial LLM API (OpenAI), introducing cost, latency, and reproducibility considerations that may limit real-time deployment. The end-to-end online latency of approximately 5.5 s per decision is compatible with capacitor bank and tap changer operation timescales, but further optimization would be needed for sub-second control applications. Counterfactual verification was restricted to voltage features (indices 0–32); device state features (indices 33–36) were excluded because their binary nature makes single-point perturbation semantically ambiguous. A failure case analysis revealed that explanation quality is bounded by SHAP attribution informativeness: under light loading where attributions are diffuse, or when SHAP-identified features and the agent’s chosen device span different network branches, the LLM’s causal reasoning becomes unreliable. Finally, the 30 evaluation scenarios, while spanning four load levels, represent a limited sample that may not capture all operationally relevant conditions.
These limitations point toward several directions for future work. Validating the framework on larger networks (IEEE 69-bus, 118-bus, or utility-scale feeders) with realistic temporal load profiles and distributed energy resources would test scalability and generalization. Dynamically updating the LLM prompt to reflect real-time network topology (e.g., line outage status) and active DER configurations would improve explanation accuracy under non-nominal operating conditions. A human factors study with distribution system operators would provide ground-truth assessments of explanation usefulness and inform refinements to the prompt design. Replacing the commercial API with a fine-tuned open source model would address cost and reproducibility concerns while enabling domain-specific adaptation. Extending counterfactual verification to multi-feature interventions, where combinations of features are perturbed simultaneously, would provide stronger faithfulness guarantees. Integrating the explanation pipeline with real-time SCADA systems and evaluating operator response time and decision accuracy in controlled experiments would establish the practical value of explainable RL for operational voltage management.
Author Contributions
Conceptualization V.-H.B. and S.J.; methodology, S.J. and V.-H.B.; software, B.S. and S.J.; validation, S.J., B.S. and V.-H.B.; formal analysis, S.J. and B.S.; investigation, S.J., B.S., and V.-H.B.; resources, B.S.; data curation, S.J.; writing—original draft preparation, S.J. and B.S.; writing—review and editing, S.J., B.S. and V.-H.B.; visualization, B.S. and S.J.; supervision, V.-H.B.; project administration, V.-H.B.; funding acquisition, V.-H.B. All authors have read and agreed to the published version of the manuscript.
Funding
This work was supported in part by the U.S. National Science Foundation (NSF) under Award No. 2509993 and in part by the University of Michigan-Dearborn Experience+ Student Independent Research Grant.
Data Availability Statement
Data are provided upon request.
Conflicts of Interest
The authors declare no conflicts of interest.
Appendix A. Complete LLM Prompt Templates
This appendix provides the full prompt templates used in the XRL-LLM pipeline, including the system prompt with domain context (Appendix A.1), the user message template that encodes each scenario (Appendix A.2), and the two baseline generation methods (Appendix A.3). All prompts are reproduced verbatim to support reproducibility.
Appendix A.1. System Prompt with Domain Context
The following system prompt is provided to GPT-4o-mini at the beginning of every explanation generation call. It encodes three categories of domain knowledge identified in the prompt component decomposition study (Table 9): network topology, device specifications, and voltage standards. The prompt uses a structured format with clearly delineated sections to facilitate consistent LLM behavior across scenarios.
You are an expert power systems engineer specializing in distribution network voltage regulation. Your task is to generate clear, technically accurate, and operationally actionable explanations of reinforcement learning agent decisions for voltage control on a radial distribution network.NETWORK TOPOLOGYThe system is the IEEE 33-bus radial distribution network. Bus 0 is the substation (slack bus). The network has a main feeder and three lateral branches:
Main feeder: Bus 0 → Bus 1 → Bus 2 → …→ Bus 17 → Bus 18 Lateral 1: Branches from Bus 1 to Bus 18 → Bus 19 → Bus 20 → Bus 21 Lateral 2: Branches from Bus 2 to Bus 22 → Bus 23 → Bus 24 Lateral 3: Branches from Bus 5 to Bus 25 → Bus 26 → …→ Bus 32Voltage magnitude decreases with electrical distance from the substation. Buses at the end of long branches (e.g., Bus 17, Bus 18, Bus 31, Bus 32) are most susceptible to undervoltage during heavy loading.VOLTAGE REGULATION DEVICESFour controllable devices are available:
Capacitor Bank at Bus 12: Injects reactive power when switched ON. Raises voltage at Bus 12 and electrically downstream buses on the main feeder (Bus 13 through Bus 18). Binary state: ON/OFF. Capacitor Bank at Bus 24: Injects reactive power when switched ON. Raises voltage at Bus 24 and the lateral from Bus 22. Binary state: ON/OFF. On-Load Tap Changer (OLTC) at Bus 6: Adjusts transformer turns ratio in discrete steps. Tap UP increases voltage on Bus 6 and downstream main feeder buses (Bus 7 through Bus 18). Tap DOWN decreases voltage. On-Load Tap Changer (OLTC) at Bus 28: Adjusts transformer turns ratio on the lateral branch. Tap UP increases voltage on Bus 28 through Bus 32. Tap DOWN decreases voltage.VOLTAGE STANDARDSAll bus voltages must remain within ANSI C84.1 Range A limits:
Lower limit: 0.95 p.u. (per unit). Voltages below this indicate undervoltage violation. Upper limit: 1.05 p.u. Voltages above this indicate overvoltage violation. Nominal voltage: 1.00 p.u.EXPLANATION FORMATGenerate a concise explanation (50–80 words) structured as follows:
Situation Assessment: Describe the current voltage condition, identifying any buses in violation and their severity. Action Justification: Explain why the agent selected this specific action by linking the identified influential features to the physical effect of the chosen control device through a causal chain. Expected Impact: State which buses will benefit from the action and the anticipated direction of voltage change. Monitoring Guidance: Identify any buses that remain at risk and may require continued observation or additional intervention.Do not reference SHAP values, attribution scores, or machine learning terminology. Write as if advising a distribution system operator who understands power engineering but not AI. Use precise voltage values and bus numbers. Do not speculate beyond what the data supports.
Appendix A.2. User Message Template
For each scenario, the following template is populated with the current grid state, the agent’s selected action, and the top-k SHAP features (, as established in the feature budget ablation in Section 3.6). Placeholders are indicated by {curly braces}.
GRID STATELoad level: {load_multiplier}x nominal demandBus voltages (p.u.):{formatted_voltage_table: bus_id | voltage | status (OK / VIOLATION)}Buses in violation: {list of buses below 0.95 or above 1.05 p.u.}Total violations: {count} out of 33 busesCurrent device states:
- -
Capacitor Bank at Bus 12: {ON/OFF}- -
Capacitor Bank at Bus 24: {ON/OFF}- -
OLTC at Bus 6: Tap position {value}- -
OLTC at Bus 28: Tap position {value}AGENT ACTIONSelected action: {action_description}(Action index: {action_id} – {physical_meaning from Table 1})KEY INFLUENCING FACTORSThe following grid features were most influential in determining this action, ranked by importance:
{feature_name_1} = {value_1} p.u. (Influence: {direction_1}) {feature_name_2} = {value_2} p.u. (Influence: {direction_2}) {feature_name_3} = {value_3} p.u. (Influence: {direction_3})Generate the operator explanation following the format specified in your instructions.
- Note that SHAP attribution magnitudes are translated into directional influence labels (“strong positive influence toward this action” or “moderate negative influence”) rather than raw numerical scores. This preprocessing step prevents the LLM from echoing attribution numbers in its output and encourages physical reasoning over statistical reporting.
Appendix A.3. Baseline Generation Methods
Appendix A.3.1. Raw SHAP Output Format
The Raw SHAP baseline presents attribution values directly without natural language processing:
Top SHAP features for action {action_id}:
Bus_{id}_voltage: SHAP = {value} (current: {voltage} p.u.) Bus_{id}_voltage: SHAP = {value} (current: {voltage} p.u.) Bus_{id}_voltage: SHAP = {value} (current: {voltage} p.u.)
Appendix A.3.2. Template NLG Rules
The Template NLG baseline applies deterministic rules to convert SHAP features into sentences. The generation logic is as follows:
Rule 1 (Primary factor):IF top_feature is a bus voltage AND voltage < 0.95:OUTPUT: “The primary factor is Bus {id} voltage at{voltage} p.u., which is below the 0.95 p.u. limit.”ELIF top_feature is a bus voltage AND voltage > 1.05:OUTPUT: “The primary factor is Bus {id} voltage at{voltage} p.u., which exceeds the 1.05 p.u. limit.”ELSE:OUTPUT: “The primary factor is Bus {id} voltage at{voltage} p.u.”Rule 2 (Action description):OUTPUT: “The agent selected: {action_description}.”Rule 3 (Secondary factors):FOR each remaining top feature:OUTPUT: “Additionally, Bus {id} voltage at{voltage} p.u. influenced this decision.”
Appendix B. Example Generated Explanations
Table A1 presents representative explanations generated by each of the three methods for four scenarios spanning different load levels and agent actions. These examples illustrate the qualitative differences in informational depth, physical reasoning, and operational guidance across methods.
Table A1.
Representative explanations from each method across four evaluation scenarios. XRL-LLM explanations contain physical causal chains and actionable monitoring guidance absent from both baselines.
Several patterns are visible across these examples. The Raw SHAP output provides numerical precision but no physical interpretation; an operator must independently determine why Bus 17 matters or what action 3 means. The Template NLG method correctly identifies violations and names the action but produces repetitive phrasing (“Additionally, Bus X voltage at Y p.u. influenced this decision”) without explaining the causal mechanism connecting the violation to the control action. The XRL-LLM explanations consistently provide four elements absent from both baselines: (1) physical causality linking bus location to voltage behavior, (2) device mechanism explaining how the selected action addresses the identified problem, (3) spatial scope identifying which buses benefit from the action, and (4) forward-looking monitoring guidance for continued operator awareness.
References
- ANSI C84.1-2020; American National Standard for Electric Power Systems and Equipment—Voltage Ratings (60 Hz). National Electrical Manufacturers Association (NEMA): Arlington, VA, USA, 2020.
- Srivastava, P.; Haider, R.; Nair, V.J.; Venkataramanan, V.; Annaswamy, A.M.; Srivastava, A.K. Voltage Regulation in Distribution Grids: A Survey. Annu. Rev. Control 2023, 55, 165–181. [Google Scholar] [CrossRef] [Scilit]
- IEEE Std 1547-2018; IEEE Standard for Interconnection and Interoperability of Distributed Energy Resources with Associated Electric Power Systems Interfaces. IEEE Standards Association: Piscataway, NJ, USA, 2018. [CrossRef] [Scilit]
- Mataifa, H.; Krishnamurthy, S.; Kriger, C. Volt/VAR Optimization: A Survey of Classical and Heuristic Optimization Methods. IEEE Access 2022, 10, 13379–13399. [Google Scholar] [CrossRef] [Scilit]
- Baran, M.E.; Wu, F.F. Network Reconfiguration in Distribution Systems for Loss Reduction and Load Balancing. IEEE Trans. Power Deliv. 1989, 4, 1401–1407. [Google Scholar] [CrossRef] [Scilit]
- Duan, J.; Shi, D.; Diao, R.; Li, H.; Wang, Z.; Zhang, B.; Bian, D.; Yi, Z. Deep-Reinforcement-Learning-Based Autonomous Voltage Control for Power Grid Operations. IEEE Trans. Power Syst. 2020, 35, 814–817. [Google Scholar] [CrossRef] [Scilit]
- Cao, D.; Hu, W.; Zhao, J.; Huang, Q.; Chen, Z.; Blaabjerg, F. A Multi-Agent Deep Reinforcement Learning Based Voltage Regulation Using Coordinated PV Inverters. IEEE Trans. Power Syst. 2020, 35, 4120–4123. [Google Scholar] [CrossRef] [Scilit]
- Yang, Q.; Wang, G.; Sadeghi, A.; Giannakis, G.B.; Sun, J. Two-Timescale Voltage Control in Distribution Grids Using Deep Reinforcement Learning. IEEE Trans. Smart Grid 2020, 11, 2313–2323. [Google Scholar] [CrossRef] [Scilit]
- Wang, J.; Xu, W.; Gu, Y.; Song, W.; Green, T.C. Multi-Agent Reinforcement Learning for Active Voltage Control on Power Distribution Networks. In Proceedings of the Advances in Neural Information Processing Systems; Neural Information Processing Systems: San Diego, CA, USA, 2021; Volume 34, pp. 3271–3284. [Google Scholar]
- Zhang, Y.; Wang, X.; Wang, J.; Zhang, Y. Deep Reinforcement Learning Based Volt-VAR Optimization in Smart Distribution Systems. IEEE Trans. Smart Grid 2021, 12, 361–371. [Google Scholar] [CrossRef] [Scilit]
- Fan, T.H.; Lee, X.Y.; Wang, Y. PowerGym: A Reinforcement Learning Environment for Volt-Var Control in Power Distribution Systems. In Proceedings of the 4th Annual Learning for Dynamics and Control Conference (L4DC); PMLR; ICML: San Diego, CA, USA, 2022; Volume 168, pp. 21–33. [Google Scholar]
- Thurner, L.; Scheidler, A.; Schäfer, F.; Menke, J.H.; Dollichon, J.; Meier, F.; Meinecke, S.; Braun, M. Pandapower—An Open-Source Python Tool for Convenient Modeling, Analysis, and Optimization of Electric Power Systems. IEEE Trans. Power Syst. 2018, 33, 6510–6521. [Google Scholar] [CrossRef] [Scilit]
- Barredo Arrieta, A.; Díaz-Rodríguez, N.; Del Ser, J.; Bennetot, A.; Tabik, S.; Barbado, A.; Garcia, S.; Gil-Lopez, S.; Molina, D.; Benjamins, R.; et al. Explainable Artificial Intelligence (XAI): Concepts, Taxonomies, Opportunities and Challenges toward Responsible AI. Inf. Fusion 2020, 58, 82–115. [Google Scholar] [CrossRef] [Scilit]
- Ribeiro, M.T.; Singh, S.; Guestrin, C. “Why Should I Trust You?”: Explaining the Predictions of Any Classifier. In Proceedings of the 22nd ACM SIGKDD International Conference Knowledge Discovery and Data Mining (KDD); ACM: New York, NY, USA, 2016; pp. 1135–1144. [Google Scholar] [CrossRef] [Scilit]
- Lundberg, S.M.; Lee, S.I. A Unified Approach to Interpreting Model Predictions. In Proceedings of the Advances in Neural Information Processing Systems; Neural Information Processing Systems: San Diego, CA, USA, 2017; Volume 30, pp. 4768–4777. [Google Scholar]
- Shrikumar, A.; Greenside, P.; Kundaje, A. Learning Important Features Through Propagating Activation Differences. In Proceedings of the 34th International Conference Machine Learning (ICML); PMLR; ICML: San Diego, CA, USA, 2017; Volume 70, pp. 3145–3153. [Google Scholar]
- Lundberg, S.M.; Erion, G.; Chen, H.; DeGrave, A.; Prutkin, J.M.; Nair, B.; Katz, R.; Himmelfarb, J.; Bansal, N.; Lee, S.I. From Local Explanations to Global Understanding with Explainable AI for Trees. Nat. Mach. Intell. 2020, 2, 56–67. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Beechey, D.; Smith, T.M.S.; Şimşek, O. Explaining Reinforcement Learning with Shapley Values. In Proceedings of the 40th International Conference Machine Learning (ICML); PMLR; ICML: San Diego, CA, USA, 2023; Volume 202, pp. 2003–2014. [Google Scholar]
- Zhang, K.; Zhang, J.; Xu, P.D.; Gao, T.; Gao, D.W. Explainable AI in Deep Reinforcement Learning Models for Power System Emergency Control. IEEE Trans. Comput. Soc. Syst. 2022, 9, 419–427. [Google Scholar] [CrossRef] [Scilit]
- Slack, D.; Krishna, S.; Lakkaraju, H.; Singh, S. Explaining Machine Learning Models with Interactive Natural Language Conversations Using TalkToModel. Nat. Mach. Intell. 2023, 5, 873–883. [Google Scholar] [CrossRef] [Scilit]
- Kroeger, N.; Ley, D.; Krishna, S.; Agarwal, C.; Lakkaraju, H. Are Large Language Models Post Hoc Explainers? In Proceedings of the R0-FoMo Workshop at NeurIPS 2023, New Orleans, LA, USA, 10–16 December 2023. [Google Scholar]
- Krishna, S.; Ma, J.; Slack, D.; Ghandeharioun, A.; Singh, S.; Lakkaraju, H. Post Hoc Explanations of Language Models Can Improve Language Models. In Proceedings of the Advances in Neural Information Processing Systems, New Orleans, LA, USA, 10–16 December 2023; Volume 36. [Google Scholar]
- Wei, J.; Wang, X.; Schuurmans, D.; Bosma, M.; Ichter, B.; Xia, F.; Chi, E.; Le, Q.V.; Zhou, D. Chain-of-Thought Prompting Elicits Reasoning in Large Language Models. In Proceedings of the Advances in Neural Information Processing Systems; Neural Information Processing Systems: San Diego, CA, USA, 2022; Volume 35, pp. 24824–24837. [Google Scholar]
- Cheng, Y.; Zhao, H.; Zhou, X.; Zhao, J.; Cao, Y.; Yang, C.; Cai, X. A Large Language Model for Advanced Power Dispatch. Sci. Rep. 2025, 15, 8925. [Google Scholar] [CrossRef] [Scilit]
- Majumder, S.; Dong, L.; Doudi, F.; Cai, Y.; Tian, C.; Kalathil, D.; Ding, K.; Thatte, A.A.; Li, N.; Xie, L. Exploring the Capabilities and Limitations of Large Language Models in the Electric Energy Sector. Joule 2024, 8, 1544–1549. [Google Scholar] [CrossRef] [Scilit]
- Jadhav, S.; Sevak, B.; Das, S.; Hussain, A.; Su, W.; Bui, V.H. FairMarket-RL: LLM-Guided Fairness Shaping for Multi-Agent Reinforcement Learning in Peer-to-Peer Markets. arXiv 2025, arXiv:2506.22708. [Google Scholar]
- Jadhav, S.; Sevak, B.; Das, S.; Hussain, A.; Su, W.; Bui, V.H. Scalable Fairness Shaping with LLM-Guided Multi-Agent Reinforcement Learning for Peer-to-Peer Electricity Markets. Util. Policy 2026, 100, 102168. [Google Scholar] [CrossRef] [Scilit]
- Wachter, S.; Mittelstadt, B.; Russell, C. Counterfactual Explanations Without Opening the Black Box: Automated Decisions and the GDPR. Harv. J. Law Technol. 2018, 31, 841–887. [Google Scholar] [CrossRef] [Scilit]
- Mothilal, R.K.; Sharma, A.; Tan, C. Explaining Machine Learning Classifiers through Diverse Counterfactual Explanations. In Proceedings of the 2020 Fairness, Accountability, and Transparency (FAT*); Association for Computing Machinery: New York, NY, USA, 2020; pp. 607–617. [Google Scholar] [CrossRef] [Scilit]
- Karimi, A.H.; Barthe, G.; Schölkopf, B.; Valera, I. A Survey of Algorithmic Recourse: Contrastive Explanations and Consequential Recommendations. ACM Comput. Surv. 2022, 55, 1–29. [Google Scholar] [CrossRef] [Scilit]
- Liu, Y.; Iter, D.; Xu, Y.; Wang, S.; Xu, R.; Zhu, C. G-Eval: NLG Evaluation using GPT-4 with Better Human Alignment. In Proceedings of the 2023 Conference Empirical Methods in Natural Language Processing (EMNLP); Association for Computational Linguistics: Stroudsburg, PA, USA, 2023; pp. 2511–2522. [Google Scholar] [CrossRef] [Scilit]
- Zheng, L.; Chiang, W.L.; Sheng, Y.; Zhuang, S.; Wu, Z.; Zhuang, Y.; Lin, Z.; Li, Z.; Li, D.; Xing, E.P.; et al. Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena. In Proceedings of the Advances in Neural Information Processing Systems, New Orleans, LA, USA, 10–16 December 2023; Volume 36. [Google Scholar]
- Flesch, R. A New Readability Yardstick. J. Appl. Psychol. 1948, 32, 221–233. [Google Scholar] [CrossRef] [Scilit]
- Kincaid, J.P.; Fishburne, R.P., Jr.; Rogers, R.L.; Chissom, B.S. Derivation of New Readability Formulas (Automated Readability Index, Fog Count and Flesch Reading Ease Formula) for Navy Enlisted Personnel; Technical Report Research Branch Report 8-75; Chief of Naval Technical Training: Millington, TN, USA, 1975. [Google Scholar]
- Schulman, J.; Wolski, F.; Dhariwal, P.; Radford, A.; Klimov, O. Proximal Policy Optimization Algorithms. arXiv 2017, arXiv:1707.06347. [Google Scholar] [CrossRef] [Scilit]
- Raffin, A.; Hill, A.; Gleave, A.; Kanervisto, A.; Ernestus, M.; Dorber, N. Stable-Baselines3: Reliable Reinforcement Learning Implementations. J. Mach. Learn. Res. 2021, 22, 1–8. [Google Scholar]
- Schulman, J.; Moritz, P.; Levine, S.; Jordan, M.; Abbeel, P. High-Dimensional Continuous Control Using Generalized Advantage Estimation. In Proceedings of the International Conference on Learning Representations (ICLR), San Juan, Puerto Rico, 2–4 May 2016. [Google Scholar]
- OpenAI. GPT-4o System Card. 2024. Available online: https://openai.com/index/gpt-4o-system-card/ (accessed on 15 January 2025).
- Bui, V.H.; Mohammadi, S.; Das, S.; Hussain, A.; Hollweg, G.V.; Su, W. A critical review of safe reinforcement learning strategies in power and energy systems. Eng. Appl. Artif. Intell. 2025, 143, 110091. [Google Scholar] [CrossRef] [Scilit]
- Dai, Y.; Chen, Q.; Zhang, J.; Wang, X.; Chen, Y.; Gao, T.; Xu, P.; Chen, S.; Liao, S.; Jiang, H.; et al. Enhanced Oblique Decision Tree Enabled Policy Extraction for Deep Reinforcement Learning in Power System Emergency Control. Electr. Power Syst. Res. 2022, 209, 107932. [Google Scholar] [CrossRef] [Scilit]
- Gokhale, G.; Claessens, B.; Develder, C. Distill2Explain: Differentiable Decision Trees for Explainable Reinforcement Learning in Energy Application Controllers. In Proceedings of the 15th ACM International Conference on Future and Sustainable Energy Systems (e-Energy), Singapore, 4–7 June 2024. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.







