TL;DR
This paper brings the power of Transformer-based reinforcement learning to low-cost, resource-constrained home energy controllers using Knowledge Distillation (KD). By compressing a Decision Transformer model by up to 96%, the authors enable efficient residential battery scheduling that slashes inference time and memory while surprisingly improving energy cost savings over the original uncompressed models.
What Problem Does This Paper Address?
Home Energy Management Systems (HEMSs) are becoming vital for balancing volatile renewable energy sources (like residential solar panels) with household demand by controlling Battery Energy Storage Systems (BESSs). While traditional control methods struggle with highly variable real-world conditions, Reinforcement Learning (RL) offers a robust, data-driven alternative. Recently, Decision Transformers (DTs) have emerged as a top-tier architecture for offline RL because they treat decision-making as a sequence-modeling problem, avoiding the mathematical instabilities common to traditional RL.
The catch? Transformers are notoriously massive. Running a model with millions of parameters on a cheap, embedded microcontroller inside a home energy box is a non-starter due to strict hardware limitations on memory and processing latency. This paper tackles a critical question: How can we transfer the high-fidelity control capabilities of a large Decision Transformer into a compact model suitable for resource-constrained edge hardware?
Methods
The authors adapt the Decision Transformer architecture to the residential battery dispatch problem. Instead of conditioning the network on a standard "Return-to-Go," they condition it on Cost-to-Go (CtG) to directly minimize electricity costs based on a 12-hour look-ahead forecast of demand, solar generation, and electricity prices.
To compress this architecture for edge deployment, they introduce an offline, response-based Knowledge Distillation (KD) framework:
- Teacher Training: A high-capacity DT "teacher" model is trained on heterogeneous multi-building data.
- Student Distillation: A much smaller "student" DT is trained to mimic the teacher.
Because battery control involves continuous actions (i.e., exactly how much power to charge or discharge), standard classification-based KD techniques—which rely on softening discrete probability distributions via temperature-scaled softmax—cannot be used. Instead, the student is trained to directly regress and match the teacher's continuous action outputs (logits) using a Smooth L1 loss function, providing robustness to outliers. The authors also experiment with self-distillation, where the teacher and student share an identical architectural size.
Datasets
- Ausgrid Solar Home Electricity Dataset: Real-world, high-resolution electricity consumption and solar generation data from 20 residential buildings in Australia.
- SMARD Database: Wholesale electricity prices from the Germany/Austria/Luxembourg (DE/AT/LU) market zone, used to simulate time-varying pricing dynamics.
- The baseline offline dataset used to train the teacher models was generated using a standard Deep Deterministic Policy Gradient (DDPG) agent.
Key Insights and Ideas
- The Student Outperforms the Teacher: Remarkably, in 8 out of 9 evaluated teacher-student configurations, the compressed student model achieved lower electricity costs than its uncompressed teacher. The authors attribute this to a powerful regularization effect: by learning from the teacher's smooth continuous logits rather than the noisy, suboptimal trajectories of the raw dataset, the student learns a cleaner, more generalized control policy.
- Bigger Isn't Always Better: When evaluating standalone DTs of various sizes, a medium-sized model actually outperformed the largest model. In offline RL for residential energy, over-parameterization can cause a model to overfit to building-specific noise, hindering its ability to generalize across different households.
- Self-Distillation as a Refinement Tool: Even when the student model had the exact same capacity as the teacher, it showed measurable performance gains, proving that the distillation process itself acts as an effective regularizer.
Key Results
- Massive Model Compression: Distilling a medium teacher into a tiny student resulted in a 96% reduction in parameters (from ~9.8M to ~387k) and a 90% reduction in inference memory footprint (from 70.56 MB to 7.09 MB).
- Significant Speedups: Inference latency was slashed by up to 63% (from 9.66 ms to 3.56 ms), making real-time control on low-cost microcontrollers entirely feasible.
- Preserved and Enhanced Economics: The medium-to-small KD model achieved the lowest absolute mean electricity cost (200.28 €) across a four-week evaluation period, outperforming both the standalone medium DT (201.30 €) and the baseline DDPG trajectory generator (202.43 €).
Limitations and Future Work
While highly successful, the authors note a few areas for future exploration:
- Single-Device Limitation: The current study focuses exclusively on managing a single battery storage system. Real-world HEMSs often need to coordinate multiple flexible loads simultaneously, such as heat pumps, electric vehicles, and smart appliances.
- Distillation Objectives: Future work will investigate alternative distillation objectives (such as feature-based distillation rather than just response-based logit matching) and systematically analyze how the quality of the initial offline dataset impacts student performance.
Summary updated