TLDR: PILLM (Physics-Informed Large Language Model) is a novel framework that integrates Large Language Models (LLMs) with an evolutionary search process to automatically generate, evaluate, and refine anomaly detection rules for Heating, Ventilation, and Air-Conditioning (HVAC) systems. By embedding thermodynamic and control-theoretic constraints through ‘physics-informed reflection’ and ‘crossover’ operators, PILLM ensures that the generated rules are both adaptive and physically grounded. This approach achieves state-of-the-art performance in anomaly detection while producing interpretable and actionable diagnostic rules, enhancing trust and deployability in smart building systems.
Heating, Ventilation, and Air-Conditioning (HVAC) systems are the silent workhorses of our buildings, consuming a significant portion of global energy. Ensuring their efficient operation is crucial for both energy conservation and reducing greenhouse gas emissions. However, detecting anomalies in these complex systems has always been a challenge.
Traditionally, anomaly detection relied on rule-based systems, which were explainable but rigid and couldn’t adapt to changing conditions. Then came deep learning methods, offering powerful predictive capabilities but often acting as ‘black boxes,’ making it hard to understand why a fault was flagged. More recently, Large Language Models (LLMs) entered the scene, promising human-readable explanations for anomalies, but they often overlooked the fundamental physical laws governing HVAC operations.
Introducing PILLM: A Physics-Informed Approach
A new framework called PILLM (Physics-Informed Large Language Model) aims to bridge this gap. Developed by researchers Subin Lin and Chuanbo Hua, PILLM is designed to automatically generate, evaluate, and refine anomaly detection rules for HVAC systems. What makes PILLM unique is its explicit incorporation of real-world physical principles, ensuring that the generated rules are not only adaptive but also physically sound and transparent.
PILLM operates within an evolutionary loop, continuously improving its rules. It combines the vast ‘world knowledge’ of LLMs with specific building context and sensor data. This allows it to produce diagnostic rules that are both easy to understand and grounded in physics.
How PILLM Works: An Evolutionary Process
The framework uses an approach inspired by natural evolution, but with a ‘physics-informed’ twist:
-
Initial Rule Generation: The process starts with an LLM generating a diverse set of initial anomaly detection rules in executable code, along with natural-language explanations. This is guided by a task description and basic input features like temperature and fan speed.
-
Physics-Informed Reflection (PIR): In each iteration, PILLM ‘reflects’ on the performance of its rules. Crucially, it considers the physical role of each input feature (e.g., ‘Zone temperature reflects indoor thermal conditions’). The LLM then produces structured reflections, highlighting how well a rule captures physical aspects and what it might be missing. For instance, a rule focusing only on outdoor temperature might be critiqued for ignoring indoor load variations.
-
Physics-Informed Crossover (PIC): These reflections directly influence how new rules are created from existing ones. Instead of randomly combining parts of rules, the LLM intelligently merges ‘parent’ rules, integrating their associated physical contexts. If one rule focuses on temperature fluctuations and another on fan speed, the ‘offspring’ rule might learn to model the causal link between thermal gradients and airflow control, leading to a more coherent and effective diagnostic.
-
Elitist Rule Mutation: Finally, the best-performing rules undergo targeted refinements, guided by long-term reflections. This could involve adding considerations like occupancy schedules or weather normalization to make the rules more robust and generalizable.
Achieving State-of-the-Art Performance with Transparency
Experiments conducted on the public LBNL Automated Fault Detection for Buildings dataset demonstrate PILLM’s effectiveness. The framework achieved the highest precision and F1 score among various benchmark methods, including classical deep learning models and other LLM-based approaches like ARGOS. An ablation study further confirmed that both Physics-Informed Reflection and Crossover are vital for this superior performance.
One of PILLM’s most significant advantages is its explainability. Unlike ‘black box’ neural networks, PILLM generates anomaly detection rules in human-readable Python code. This means building operators can easily understand the reasoning behind an anomaly flag – for example, a rule might explicitly check for abnormal thermal gradients in relation to fan speed. This transparency builds trust and allows operators to validate, debug, and even refine the rules with their own domain expertise.
Also Read:
- Boosting Wind Turbine Reliability with a Novel Deep Learning System
- Advanced Motor Diagnostics: A Hypergraph Contrastive Approach to Multimodal Fault Detection
The Future of Smart Buildings
By combining the reasoning power of LLMs with physics-informed optimization, PILLM represents a significant step forward for trustworthy and deployable AI in cyber-physical systems. It offers a path to anomaly detection systems that are not only accurate and adaptive but also interpretable and actionable, providing clear insights into system faults. Future work aims to extend PILLM to other building subsystems and explore its scalability for real-time anomaly detection in large-scale smart infrastructure. You can read the full research paper here: Physics-Informed Large Language Models for HV AC Anomaly Detection with Autonomous Rule Generation.


