Active Reinforcement Learning for Robust Building Control

Doseok Jang, Larry Yan, Lucas Spangher, Costas J. Spanos

Abstract

Reinforcement learning (RL) is a powerful tool for optimal control that has found great success in Atari games, the game of Go, robotic control, and building optimization. RL is also very brittle; agents often overfit to their training environment and fail to generalize to new settings. Unsupervised environment design (UED) has been proposed as a solution to this problem, in which the agent trains in environments that have been specially selected to help it learn. Previous UED algorithms focus on trying to train an RL agent that generalizes across a large distribution of environments. This is not necessarily desirable when we wish to prioritize performance in one environment over others. In this work, we will be examining the setting of robust RL building control, where we wish to train an RL agent that prioritizes performing well in normal weather while still being robust to extreme weather conditions. We demonstrate a novel UED algorithm, ActivePLR, that uses uncertainty-aware neural network architectures to generate new training environments at the limit of the RL agent's ability while being able to prioritize performance in a desired base environment. We show that ActivePLR is able to outperform state-of-the-art UED algorithms in minimizing energy usage while maximizing occupant comfort in the setting of building control.

Introduction

Heating, Ventilation, and Air Conditioning (HVAC) systems account for nearly 40% of greenhouse gas emissions in the US. While Reinforcement Learning (RL) offers a powerful way to optimize these systems for energy efficiency and occupant comfort, it suffers from extreme brittleness. Standard RL agents often overfit to the specific weather patterns seen during training. When faced with "distribution shift"—such as the extreme heatwaves or cold snaps exacerbated by climate change—these agents fail, leading to energy waste or uncomfortable indoor conditions. Furthermore, there is a significant "Sim2Real" gap: a controller trained on a low-fidelity simulation often struggles when deployed in a high-fidelity environment or a real building.

Methodology: ActivePLR

The researchers propose ActivePLR, which builds upon the framework of Unsupervised Environment Design (UED). Instead of training on a static dataset, UED algorithms allow the training environment to evolve, selecting "levels" (configurations) that challenge the agent.

ActivePLR Environment Generation and Selection: (A) illustrates the gradient-based generation process maximizing agent uncertainty, and (B) shows the selection mechanism between ActivePLR and standard PLR.

Key technical components include:

  • Uncertainty Estimation via Monte Carlo Dropout: To identify where the agent is struggling, the authors use Monte Carlo Dropout. By running multiple forward passes with different neurons "dropped out" at inference time, they measure the variance in the critic network's predictions as a proxy for agent uncertainty.
  • Gradient-Based Environment Generation: Unlike previous UED methods that sample environments randomly, ActivePLR uses gradient ascent. It calculates the gradient of the agent's uncertainty with respect to the environment parameters (like outdoor temperature or humidity) and "pushes" the environment toward configurations that maximize that uncertainty.
  • Constrained Optimization: To prevent the generator from creating unrealistic weather, the authors implement both hard constraints and soft constraints (penalizing distance from a "normal" weather base).
  • Prioritized Level Replay (PLR): The algorithm maintains a buffer of past challenging environments, replaying them based on their "value loss" to ensure the agent doesn't forget how to handle previously mastered difficult scenarios.

Evaluation and Results

The study utilizes Sinergym, an OpenAI Gym wrapper for the industry-standard EnergyPlus simulation engine, using a "5Zone" single-story building model. Evaluation included base weather from Arizona and five handcrafted extreme scenarios (e.g., heatwaves, cold snaps).

Performance comparison: (A) Reward in base environment, (B) Reward in extreme environments, and (C) Relative performance degradation when transferring to high-fidelity simulations (Sim2Real).

Key results include:

  • Superior Performance: ActivePLR provided a 9% improvement in reward over vanilla RL and a 24% improvement over traditional Rule-Based Control (RBC) in the base environment.
  • Thermal Comfort: In extreme weather, ActivePLR achieved a 15% relative decrease in ASHRAE thermal comfort violations compared to the best-performing baseline.
  • Sim2Real Robustness: When moved to a higher-fidelity simulation, vanilla RL saw an 8.5% performance drop. ActivePLR was significantly more stable, with only a 3.1% drop, suggesting it is much better suited for real-world deployment.
  • Uncertainty as a Curriculum: The core insight is that training an agent where it is most uncertain is more effective for generalization than simply training where it has the highest loss. Uncertainty-based sampling identifies the "frontier" of the agent's knowledge.

Conclusion

ActivePLR demonstrates that by making environment parameters differentiable and targeting agent uncertainty, we can create HVAC controllers that are robust to both climate extremes and the simulation-to-reality gap. Future work will explore handling categorical variables and reducing the computational overhead of uncertainty estimation.

Reference: Jang, D., Yan, L., Spangher, L., & Spanos, C. J. (2024). Active Reinforcement Learning for Robust Building Control. Proceedings of the AAAI Conference on Artificial Intelligence.

Summary updated

BibTeX
@inproceedings{jang2024active,
  author = {Doseok Jang and Larry Yan and Lucas Spangher and Costas J. Spanos},
  title = {{Active Reinforcement Learning for Robust Building Control}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  url = {https://openreview.net/forum?id=2sR9IjPwLL},
}
Figure