Foresight: Causal-Informed Energy Forecasting system
A Comprehensive Technical Report
August 30, 2025
Inspiration
An energy forecast should be a conversation, not a command. But today's tools just give orders, a single number with no context, no 'why.'
We decided to build the missing half of that conversation.
We plan to create a system that explains its reasoning, turning a mysterious prediction into a clear story. It's for the operators on the ground, giving them the confidence to move from just reacting to the data, to truly understanding it and shaping a more sustainable future.
System Overview and Capabilities
Foresight is a unified energy intelligence system that provides building managers with deep, actionable insights for decarbonization. It moves far beyond traditional forecasting by delivering a holistic suite of capabilities built on a single, efficient foundation model. The system provides:
Causal-Informed Forecasting: Models causal chains of events (e.g., weather -> HVAC -> energy use) for robust, generalizable predictions.
Probabilistic Predictions: Provides full predictive distributions with uncertainty intervals, enabling risk-aware planning.
Intelligent Anomaly Detection & Root Cause Analysis: Identifies anomalies with low false positives and pinpoints causal factors.
Natural Language Explanations: Explains anomalies in plain English with actionable recommendations.
Rapid Building Adaptation: Meta-learning allows few-shot adaptation to new buildings, enhancing scalability.
Decision-Focused Optimization: Aligns forecasts with sustainability goals by penalizing errors during carbon-intensive grid periods.
What-if Scenario Modeling : Allows operators to test strategies (e.g., pre-cooling, shifting load) before implementation.
Cross-Building Knowledge Transfer : Learns patterns from one building type and reuses them in another with minimal retraining.
Continuous Learning and Adaptation: The system implements automated retraining triggers that activate lightweight adapter updates when performance metrics indicate drift or when significant new patterns emerge.
Technical Architecture and Implementation
Our architecture is built on a philosophy of efficiency and modularity, using a single foundation model as the backbone, augmented with specialized components. The entire system is built in Python using the modern data science stack.

Foundation Model: IBM Granite TTM-R2
Core model: IBM Granite TinyTimeMixer (TTM-R2), lightweight yet powerful, supports exogenous features, PEFT tuning, and strong zero-shot generalization.
Multi-Modal Data Fusion
Four synchronized data streams:
Temporal (energy history)
Exogenous (weather, tariffs, occupancy)
Static (building characteristics)
Semantic (language embeddings of building descriptions)
Causal Reasoning Engine
Causal discovery via causal-learn, DAG construction, GCN refinement
using PyTorch Geometric to embed causal reasoning into predictions.
Meta-Learning with PEFT
MAML initialization + LoRA adapters for building-specific customization. Achieves fine-tuning in 2--5 steps with minimal compute.
Uncertainty-Aware Probabilistic Forecasting
Quantile regression heads output predictive distributions capturing aleatoric + epistemic uncertainty.
Generative Explanation System
SHAP + causal graph tracing $\rightarrow$ IBM Granite LLM generates structured natural language explanations.
Software and Technology Stack
Implemented in Python 3.9+ with Granite ecosystem and ML community libraries:
granite-tsfm>=1.0.0
transformers>=4.30.0
accelerate>=0.20.0
torch>=2.0.0
pytorch-geometric>=2.3.0 # For causal GNNs
peft>=0.4.0 # For LoRA implementation
pandas>=1.5.0
numpy>=1.24.0
scikit-learn>=1.3.0
Scipy
Feature-Engine
Feature-tools
Evidently
causal-learn>=0.1.3.0 # For PC/FCI algorithms
networkx>=3.0 # For graph operations
shap>=0.42.0
lime>=0.2.0
Langgraph #for llm-prompting
FAISS # for vector-db
matplotlib>=3.7.0
plotly>=5.14.0
wandb>=0.15.0 # For experiment tracking
Implementation Challenges and Solutions
Data Synchronization: Solved with robust resampling pipeline.\ Causal Graph Validation: Human-in-loop pruning ensures physics-aligned DAGs.\ Computational Orchestration: Efficient model loading, quantization for LLM module.\ Scalability (Extra): Solved by designing adapters small enough for IoT edge deployment.
Key Innovations and Accomplishments
Unified causal, probabilistic, anomaly detection, and NLP system on one backbone.
Causal GNN module moves system beyond correlation-based forecasting.
Natural language explanations bridge human-AI trust gap.
Edge-Ready Design (Extra): Optimized for low-power environments, enabling real-time use in smart buildings.
Carbon-Aware Forecasting (Extra): Prioritizes emissions reduction over pure accuracy.
Key Learnings and Insights
Foundation models excel as extensible platforms for multi-faceted systems.
Data engineering remains the backbone of reliable AI solutions.
Explainability is critical for adoption in energy domains.
Collaboration between domain experts and ML engineers accelerates validation and trust.
Evaluation Framework and Metrics
Forecasting: MAE, RMSE, sMAPE, CRPS, PICP.
Decision-Focused: Peak demand reduction, renewable integration efficiency, cost reduction.
Anomaly Detection: Precision, Recall, F1-score.
Explanation Quality: Human interpretability studies + causal consistency checks.
Sustainability Impact (Extra): Reduction in building carbon emissions measured against baseline.
Future Roadmap and Vision
Real-world pilot + BMS integration.
Prescriptive analytics + autonomous control strategies.
Federated meta-learning for privacy-preserving cross-building adaptation.
Interactive dashboards for visualization and \"what-if\" exploration.
Grid-Level Expansion (Extra): Extend from single buildings to entire campuses or districts.
Hybrid Renewable Integration (Extra): Support integration with solar, wind, and storage systems for smart grids.
Log in or sign up for Devpost to join the conversation.