Regime-Aware Federated Aggregation (RAFA) for privacy-preserving energy load forecasting across heterogeneous European grid clients

List of Authors

  1. Mahmoud Abbasi ,  
  2. Alfonso González Briones
    ,  
  3. Alesandro Gómez Villar ,  
  4. Javier Curto Hernández
    ,  
  5. Javier Prieto
Article Authors & roles Authors Peer review record Peer review Metrics
Cite

Abstract

Background

Federated Learning (FL) enables collaborative model training across distributed clients without sharing raw data, making it attractive for privacy-sensitive energy forecasting. However, standard aggregation algorithms, most notably FedAvg and FedProx, assume stationary client data distributions, an assumption routinely violated in multi-national power grids where seasonal patterns, demand crises, and policy changes induce persistent regime shifts.

Methods

We present RAFA (Regime-Aware Federated Aggregation), a novel FL framework that explicitly detects and adapts to distribution shifts in client model updates without accessing raw client data. RAFA comprises three components. These are a Mahalanobis-distance detector operating on random-projected update vectors; reliability-weighted aggregation that exponentially discounts shifted clients while preserving exact FedAvg behaviour when no shift is detected; and always-on personalised head fine-tuning that adapts each client’s final prediction layer to its local regime.

Results

We validate RAFA on a new multi-national benchmark of six years (2019–2024) of hourly electrical load data for eight European bidding zones sourced from the ENTSO-E Transparency Platform. RAFA achieves a test MAE of 185.4 MW, an 11.8% improvement over FedAvg (210.2 MW), with by far the largest gain for the client exhibiting the strongest seasonal contrast (France, − 30.5 % ) and consistent improvements across the remaining clients (e.g., Portugal − 7.6 % , Poland − 7.4 % ). Ablation studies confirm both mechanisms contribute independently.

Conclusions

RAFA provides a lightweight, privacy-preserving extension of standard federated aggregation that is robust to regime shifts in energy systems. The approach generalises to any federated setting with temporally non-stationary client distributions and a separable model architecture.

Plain Language Summary

Accurately forecasting electricity demand is essential for running power grids, but the underlying data is sensitive and cannot easily be shared between countries. Federated learning lets several grid operators jointly train a shared forecasting model while keeping their own data private. A problem is that electricity demand keeps changing through seasons, crises, and policy shifts, and standard federated methods, which assume stable conditions, lose accuracy when these “regime shifts” occur.

We introduce RAFA, a method that automatically detects when an operator’s data has shifted and adjusts its influence on the shared model accordingly, all without accessing any raw data. Tested on six years of real demand data from eight European countries, RAFA reduced forecasting error by about 12% compared with the most widely used federated method, with the biggest gains for countries whose demand varies most across seasons.

Corresponding author
Mahmoud Abbasi
0000-0002-1886-8284
Grant information

This project has received funding from the European Union’s Horizon Europe research and innovation programme under grant agreement No [101135927] [“A catalyst for EuropeaN ClOUd Services in the era of data spaces, high-performance and edge computing (NOUS)”].

The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.

Copyright
© 2026 Mahmoud Abbasi (Corresponding Author, Co-Author); Alfonso González Briones (Co-Author); Alesandro Gómez Villar (Co-Author); Javier Curto Hernández (Co-Author); Javier Prieto (Co-Author) Creative Commons License

This work is licensed under a Creative Commons Attribution 4.0 International License.

First version published
Latest version published
Revised

Amendment

This version responds to the two peer review reports on version 1.

The main change concerns how the contribution of each mechanism is measured. Version 1 scored RAFA on each client's locally adapted model but scored FedAvg on the aggregated global model, so the reported improvement confounded regime-aware aggregation with local adaptation. Version 2 defines three evaluation protocols, reports every method under all three, and adds a FedPer-style control, FedAvg carrying an identical personalised head, which differs from RAFA only in the aggregation weights. [On this benchmark the personalised head accounts for essentially all of the gain, and regime-aware aggregation contributes little, because no client exceeds the detection threshold after warm-up and the aggregation is then arithmetically identical to FedAvg.]

All results are now averaged over three seeds and reported with standard deviations; version 1 reported a single run, which the manuscript did not state. Hyperparameters are selected on the validation split rather than the test split.

The warm-up description and the implementation have been reconciled: the reliability weights, and not only the shift flags, are suppressed while the reference buffer fills, and the pseudocode is corrected accordingly. New analyses report how often the gate fires and how far the aggregation weights depart from data-fraction weights. A controlled shift-injection experiment, deferred in version 1, now measures detection latency and specificity against an output-signal gate. Per-client reference buffers and an empirically calibrated threshold are added as detector variants.

Corrections: the model has 15,361 parameters, not 15,489, and the projected vector adds 1.7% to the per-client upload, not less than 0.3%. The claim that federated learning preserves privacy by construction has been removed and replaced by a section analysing what the federation discloses. Several attributions to cited work have been softened and reference-list errors fixed.

Comments

Authors & roles

Mahmoud Abbasi

AIR Institute, Salamanca, Spain

Roles
Corresponding Author, Co-Author, Conceptualization, Data Curation, Formal Analysis, Investigation, Methodology, Software
0000-0002-1886-8284

Alfonso González Briones

BISITE Research Group, University of Salamanca, Salamanca, Spain

Roles
Co-Author, Conceptualization, Funding Acquisition, Supervision, Writing – Review & Editing

Alesandro Gómez Villar

BISITE Research Group, University of Salamanca, Salamanca, Spain

Roles
Co-Author, Investigation, Software, Validation, Writing – Review & Editing
0009-0005-3808-8399

Javier Curto Hernández

BISITE Research Group, University of Salamanca, Salamanca, Spain

Roles
Co-Author, Data Curation, Software, Validation, Writing – Review & Editing

Javier Prieto

BISITE Research Group, University of Salamanca, Salamanca, Spain

Roles
Co-Author, Funding Acquisition, Project Administration, Supervision, Writing – Review & Editing
0000-0001-8175-2201

Downloads over the last 12 months:

Cited by

via Crossref

View citing articles