Organizations: School of Computer Science, University of Birmingham, Edgbaston, Birmingham, B15 2TT, West Midlands, United Kingdom · Siemens AG, Munich, 80333, Bavaria, Germany · School of Mathematics, University of Birmingham, Edgbaston, Birmingham, B15 2TT, West Midlands, United Kingdom · Birmingham Energy Institute, University of Birmingham, Edgbaston, Birmingham, B15 2TT, West Midlands, United Kingdom
Short-term building load forecasting remains challenging because load patterns can change rapidly with weather and operating conditions. Data-driven forecasting models may become less reliable when the current operating regime is rare or poorly represented during training, even when similar situations exist elsewhere in the historical record. Recent advances in retrieval-augmented time series forecasting offer a promising way to adapt predictions to changing conditions by directly reusing relevant historical cases at inference time. Motivated by this idea, we propose WeL-RAC, a model-agnostic Weather-Load Retrieval-Augmented Correction framework that explicitly retrieves such evidence at prediction time. WeL-RAC retrieves historical cases that are similar to the current condition based on both recent load states and horizon-aligned weather forecasts. Their observed future load trajectories are then aggregated and used to correct the initial prediction, without retraining or modifying the base forecaster. We evaluate WeL-RAC on 31 building cases across three datasets, eight forecasting backbones, and four horizons from 1 to 18 hours. The framework improves the corresponding base forecasters in 90 of 96 dataset-level comparisons. Beyond accuracy, success and failure case studies further illustrate the framework's interpretability by tracing how retrieved historical evidence improves or degrades forecasts. These findings support explicit historical retrieval as an effective and interpretable complement to the building load forecasting.
Figures & tables
Figure 1: Illustration of retrieval-augmented forecasting. Taking building energy forecasting as an example, the process consists of three main steps: (1) the current load, weather, and other information are used to form the forecasting query; (2) similar historical cases are retrieved from a historical data pool based on the current input conditions, and their observed future load trajectories are aggregated as retrieval evidence; and (3) the retrieved evidence is combined with the initial prediction from the forecasting model to produce the final forecast.
Figure 2: Schematic overview of WeL-RAC. The forecasting branch generates an initial prediction from historical load and covariates. The retrieval branch matches the current load state and horizon-aligned weather summary against historical memory banks, retrieves top- K analogue futures, and aggregates their realised trajectories. The correction module performs post-prediction fusion between the initial prediction and the retrieved evidence to produce the final prediction.
Figure 3: Conditional weather-summary template for representing both horizon-aligned forecast and historical weather windows. The template fields are defined and selected in Table 1 .
Template field
Source statistic
Phrase selection
horizon
Prediction length H
Numeric horizon, expressed in hours for hourly datasets.
Table 1: Weather-summary fields and phrase-selection rules.
Dataset
Type
Scope
Building ID
Time span
Resolution
Records per building
AlphaBuilding
Synthetic
9 simulated buildings
1–9
2 years
Hourly
17,520
ASU
Real-world
12 campus buildings
10–21
3 years
Hourly
26,280
UCF
Real-world
10 campus buildings
22–31
3 years
Hourly
26,278
Table 2: Overview of the datasets used in this study.
City
Climate characteristics
Period
Building IDs (efficiency)
Miami
Hot and humid
2002–2003
1 (High) / 2 (Low) / 3 (Standard)
San Francisco
Mild marine
2014–2015
4 (High) / 5 (Low) / 6 (Standard)
Chicago
Cold winters and hot summers
2006–2007
7 (High) / 8 (Low) / 9 (Standard)
Table 3: Composition of the AlphaBuilding dataset.
Model
Hyperparameter
Value range
MLP
learning_rate
[10−4,10−2]
batch_size
{32,64,128}
train_epochs
{10,20,30}
hidden_layers
{1,2,3}
hidden_dims_l1 when hidden_layers =1
{(16),(24),(32)}
hidden_dims_l2 when hidden_layers =2
{(32,16),(48,24),(64,32)}
Table 4: Hyperparameter search spaces for the eight forecasting models. Curly braces {⋅} denote discrete candidate values, whereas square brackets [⋅] denote continuous search intervals. For continuous learning_rate intervals, sampling is performed on a logarithmic scale; discrete learning_rate values are searched only over the listed candidates.
Component
Hyperparameter
Value range
Retrieval Branch
λ ( state weight )
{0.20,0.35,0.50,0.65,0.80}
K ( top_K )
{10,15,20,30}
τ ( temperature )
{0.10,0.20,0.30}
Correction Module
α ( correction coefficient )
{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
Table 5: Hyperparameter search space for the retrieval branch and correction module.
Method
ASU
AlphaBuilding
UCF
Best
MSE ↓
MAE ↓
R2↑
MAPE ↓
MSE ↓
MAE ↓
R2↑
MAPE ↓
MSE ↓
MAE ↓
R2↑
MAPE ↓
MLP
543.840
12.382
0.753
0.064
105.593
5.205
0.947
0.093
291.787
9.117
0.789
0.058
1
MLP+Retrieval
532.139
12.237
0.773
0.063
93.421
4.577
0.952
0.080
280.019
9.094
0.793
0.064
11
LightGBM
480.667
11.002
0.784
0.057
129.410
4.413
0.932
0.073
256.371
8.620
0.799
0.073
0
LightGBM+Retrieval
474.789
10.974
0.792
0.057
81.687
4.181
0.957
0.071
250.241
8.544
0.802
0.073
12
DLinear
630.605
13.476
0.777
0.067
540.429
13.798
0.728
0.236
351.967
9.957
0.743
0.063
1
Table 6: Overall forecasting performance. For each building and horizon, all forecasters and their retrieval-enhanced counterparts are evaluated on exactly the same retained forecast origins. Metrics are computed separately for each building–horizon–seed combination and then equally averaged over all buildings, four forecasting horizons ( H∈{1,6,12,18} ), and three random seeds ( 2021 , 0 , and 42 ) within each dataset. All models use an input length of 24. Lower values are better for MSE, MAE, and MAPE, whereas higher values are better for R2 . For each backbone, the better result between the original forecaster and its retrieval-enhanced counterpart is highlighted in bold . The Best column reports the number of better results among the 12 dataset–metric comparisons for each forecaster and retrieval pair. All displayed values are rounded to three decimal places; boldface and Best counts are determined using the original unrounded values.
Figure 4: Building-wise relative improvements of the retrieval-enhanced forecasts over the corresponding original forecasters. Results are averaged over the four forecasting horizons ( H∈{1,6,12,18} ) and all eight forecasting backbones. Solid bars denote the relative improvement in MSE, while hatched bars denote the relative improvement in MAE. Positive values indicate that retrieval improves the original forecast. Building IDs 1–9, 10–21, and 22–31 correspond to AlphaBuilding, ASU, and UCF, respectively.
Figure 5: Horizon-wise relative improvements of the retrieval-enhanced forecasts over the original forecasters for MSE and MAE. Results are averaged over all buildings within each dataset and over all eight forecasting backbones. In each panel, each forecasting horizon contains two bars: the plain bar denotes the MSE improvement and the hatched bar denotes the MAE improvement. Error bars indicate the interquartile range across forecasting backbones. Positive values indicate that retrieval improves the original forecast.
Method
ASU
AlphaBuilding
UCF
Best
MSE ↓
MAE ↓
R2↑
MAPE ↓
MSE ↓
MAE ↓
R2↑
MAPE ↓
MSE ↓
MAE ↓
R2↑
MAPE ↓
RAFT
577.894
13.215
0.785
0.068
299.024
10.925
0.850
0.202
317.783
9.794
0.759
0.062
0
SERAF
543.535
12.718
0.798
0.065
249.901
9.864
0.874
0.178
295.230
9.467
0.775
0.061
2
SARAF
546.905
12.857
0.795
0.066
439.627
13.630
0.781
0.254
291.016
9.452
0.782
0.061
0
MLP+Retrieval (load only)
535.118
12.352
0.767
0.064
100.142
4.771
0.949
0.082
288.121
9.202
0.787
0.063
0
MLP+Retrieval (full)
532.139
12.237
0.773
0.063
93.421
4.577
0.952
0.080
280.019
9.094
0.793
0.064
10
Table 7: Comparison with retrieval baselines. Load only denotes retrieval based solely on the proposed load-state summary of WeL-RAC, whereas the full version uses both retrieval branches. For each building and horizon, all methods are evaluated on the same retained forecast origins. Metrics are computed separately for each building–horizon–seed combination and then averaged equally over all buildings, four forecasting horizons ( H∈{1,6,12,18} ), and three random seeds within each dataset. All models use an input length of 24. Lower values are better for MSE, MAE, and MAPE, whereas higher values are better for R2 . The best result among the five rows in each dataset–metric column is highlighted in bold . The Best column counts column-wise wins; both boldface and counts are determined using unrounded values.
Method
ASU
AlphaBuilding
UCF
Best
MSE ↓
MAE ↓
R2↑
MAPE ↓
MSE ↓
MAE ↓
R2↑
MAPE ↓
MSE ↓
MAE ↓
R2↑
MAPE ↓
Full
539.810
12.440
0.789
0.064
90.619
4.553
0.954
0.079
287.335
9.377
0.777
0.070
7
Forecaster only
592.886
12.903
0.767
0.065
234.025
7.340
0.882
0.125
314.963
9.582
0.762
0.066
1
Retrieval only
674.790
14.834
0.729
0.075
112.735
4.830
0.942
0.081
394.999
11.310
0.681
0.091
0
Load summary only
542.388
12.510
0.787
0.064
96.977
4.732
0.951
0.081
293.568
9.451
0.774
0.069
0
Load raw sequence only
554.645
12.835
0.780
0.065
83.288
4.318
0.958
0.072
325.249
9.941
0.764
0.071
1
Table 8: Dataset-level ablation results averaged over eight forecasting models. For each model, results are first averaged over all buildings, four forecasting horizons ( H∈{1,6,12,18} ), and three random seeds; the reported values are then macro-averaged across the eight models. Lower values are better for MSE, MAE, and MAPE, whereas higher values are better for R2 . Boldface denotes the best result and underlining denotes the second-best result within each column.
Figure 6: Parameter sensitivity on ASU Building 10 using DLinear and PatchTST. Each curve reports the mean MSE over three random seeds for forecasting horizons H∈{1,6,12,18} , with error bars denoting one standard deviation. Each parameter is varied independently while the remaining configuration is fixed to the values selected by validation. Lower MSE is better.
Memory build time
Memory size
Per-sample latency
Full-test runtime
Test samples
5.668 s
28.775 MiB
6.135 ms
7.232 s
5,238
Table 9: Computational cost of the retrieval-correction mechanism with MLP on UCF Building 30 at forecasting horizon H=18 .
Figure 7: Two representative success cases of retrieval-assisted MLP forecasting on ASU Building 10. Both examples use an 18-hour forecasting horizon, a 24-hour input window, and seed 2021. (a) Retrieval corrects an underestimation case with forecast origin 29 May 2019 at 15:00. (b) Retrieval reduces overestimation with forecast origin 17 August 2019 at 17:00. The dark-gray line shows the preceding 24 hourly observations, and the black line with circle markers shows the true future. The blue dashed, green solid, and orange dash-dotted curves denote the MLP prediction, weighted Top-10 retrieval prediction, and final prediction, respectively. Light-gray curves show the input histories and subsequent load trajectories of the K retrieved training samples. Historical inputs and continuations are training-period observations, aligned to the query by their respective origins without changing load values.
Figure 8: Two representative failure cases of retrieval-assisted MLP forecasting on UCF Building 30. Both examples use an 18-hour forecasting horizon and seed 2021. (a) A sudden load-drop case with forecast origin 9 August 2019 at 18:00. (b) A persistent low-load case with forecast origin 12 August 2019 at 18:00. The dark-gray line shows the preceding 24 hourly observations, and the black circles indicate the true future. The blue dashed, green solid, and orange dash-dotted curves represent the MLP prediction, weighted Top-10 retrieval prediction, and final prediction, respectively. Light-gray curves show the input histories and subsequent load trajectories of the ten retrieved training samples. Historical samples are aligned by their forecast origins and retain their original load levels.
aComputer System and Technology Department, Faculty of Computer Science and Information Technology, University of Malaya, Malaysia · bInformatics Institute, Istanbul Technical University, Turkey · cComputer Engineering Department Konkuk University South Korea
School of Artificial Intelligence, University of Science and Technology Beijing, Beijing 100083, China · Institute of Artificial Intelligence, University of Science and Technology Beijing, Beijing 100083, China · Key Laboratory of Intelligent Bionic Unmanned Systems, Ministry of Education, University of Science and Technology Beijing, Beijing 100083, China