1. Introduction
Modern Internet of Things (IoT) infrastructure in power grids enables real-time energy monitoring and management through digital communication technologies, which pave the way for future smart grids. By providing detailed insights into energy consumption, these systems empower consumers to make informed decisions and adopt energy-saving strategies. In this context, non-intrusive load monitoring (NILM) has emerged as a promising technique for estimating appliance-level power consumption from aggregated measurement data collected by smart meters [
1], offering both utilities and users a deeper understanding of energy usage patterns without requiring intrusive sub-metering. Beyond normal operating conditions, NILM can also provide appliance-level information to support human-centered load management and resilience-aware decision-making under extreme events, where user behavior, load priorities, and system constraints may change significantly [
2,
3].
Existing NILM approaches are broadly categorized by their use of event detection: eventless or event-based [
4]. Eventless methods disaggregate total power without detecting switching events, typically employing algorithms such as hidden Markov models [
5], combinatorial optimization [
6], or deep neural networks (DNNs) [
7]. In contrast, event-based methods first detect power transitions and then classify the corresponding appliances [
8,
9,
10]. This study focuses on event-based NILM approaches for appliance recognition.
A wide range of machine learning (ML) techniques, including deep neural networks (DNNs), have been applied to NILM for appliance recognition. These methods classify appliances by learning patterns from measured current and voltage signals, using features extracted at either low or high sampling rates. High-frequency data enables the extraction of fine-grained features such as current waveforms [
11,
12], voltage–current (V–I) trajectories [
8,
10,
13], harmonics [
14,
15], and transient states [
9]. ML models such as convolutional neural networks (CNNs) [
10,
11,
12,
13], Random Forests (RFs) [
9,
14], and support vector machines (SVMs) [
15] are commonly employed for this task. However, two key challenges lie in their broader applicability: First, models trained on data from a single household often exhibit limited generalization to other users due to variations in appliance types and usage patterns. Second, aggregating data from multiple users to train a more robust model typically requires centralized data collection, which raises privacy concerns.
To address these challenges, federated learning (FL) has emerged as a decentralized alternative that enables collaborative model training without sharing raw data [
16,
17,
18]. In a typical FL framework, multiple clients train a shared model coordinated by a central server while maintaining data privacy. The objective is to learn a global model that generalizes across clients through aggregated local updates.
FL frameworks can be categorized by data distribution into horizontal (HFL), vertical, and federated transfer learning [
19]. Since NILM data from different households shares identical feature spaces (e.g., voltage and current signals) but exhibits diverse usage patterns, FL applications in this field mainly adopt HFL. For example, refs. [
16,
20] combined FedAvg [
21] with Seq2point learning to achieve privacy-preserving NILM; ref. [
22] extended this approach to multi-task learning using U-Net with FedAvg, improving joint consumption estimation and state identification. Subsequent enhancements include a DNN-based FL framework developed by [
23], which incorporates differential privacy (DP) to balance privacy and performance trade-offs, along with tree-based methods proposed by [
24] as lightweight alternatives to DNNs.
To address FedAvg’s struggles with statistical heterogeneity from non-IID data, personalized FL approaches have been developed, such as constrained local updates [
25] and meta-learning [
26]. Building on these personalization efforts, recent studies address model heterogeneity through federated knowledge distillation for edge devices [
27] and blockchain-integrated decentralization [
28]. For systematic analysis, see [
29]’s review of FL-based NILM advances and challenges.
Despite these advances, FL-based NILM studies mainly focus on energy disaggregation, while FL-based appliance recognition remains less explored. Existing disaggregation-oriented methods often train separate models for different appliances, which increases computational cost and limits scalability. In appliance recognition, another key challenge is label space heterogeneity, as each client usually observes only a subset of appliance types, leading to severe label skew and non-IID feature distributions. These issues can significantly degrade standard FL methods such as FedAvg, motivating a more robust FL framework for appliance recognition under label-skewed and non-IID conditions.
To address non-IID data and label skew in NILM, we propose a Federated Context-Aware Conditional Policy (FedCACP) method for personalized appliance recognition. FedCACP adopts a dual-path architecture that combines shared global components with personalized client-side modules. It uses self-attention to extract client-specific context from personalized head weights, sample-wise gating to decouple global and personalized features, and a CORAL-based alignment loss to improve feature compatibility. Experiments on three public datasets under four federated settings demonstrate the effectiveness of FedCACP. The method achieves accuracy on PLAID under Dirichlet skew (), in the leave-one-house-out setting, and strong performance over federated baselines under challenging non-IID scenarios.
The rest of this paper is organized as follows:
Section 2 introduces the problem formulation.
Section 3 presents the proposed method.
Section 4 presents the experimental setup. The results and discussions are shown in
Section 5, and conclusions are drawn in
Section 6.
2. Problem Formulation
2.1. Preliminaries
Figure 1 illustrates the typical workflow of an FL process. In the standard FedAvg algorithm, a central server coordinates
K clients
to collaboratively train a global model. At each communication round
t, the server first broadcasts the current global model parameters
to all participating clients. After receiving the global parameters, each client
initializes its local model as
.
Each client
then performs local training on its private dataset
, where
denotes the input sample,
denotes the corresponding appliance label, and
is the number of local samples. The dataset
is assumed to be drawn from the local data distribution
. The local update is carried out over multiple steps of stochastic gradient descent (SGD), typically involving several local epochs. For each step, the model parameters are updated as
, where
denotes the local model parameters of client
,
is the learning rate,
is the gradient of the local loss with respect to
, and
Here, denotes the prediction of the local model for input , and is the task-specific loss function, such as cross-entropy.
After completing local updates, each client uploads its updated parameters
to the server. The server then aggregates the updates as
, where
is the total number of training samples. This process is repeated until convergence, with the global objective of minimizing
In most FL implementations, the global model
comprises two components: a feature extractor
parameterized by
, and a header
parameterized by
, where
. Here,
M,
D, and
C denote the dimensions of the input space, feature space, and label space, respectively. The model can be expressed as
. We assume that all clients share the same model architecture in this standard HFL setting.
Figure 2 illustrates this structure. The terms classifier, header, and head are used interchangeably throughout this paper to denote the same prediction module.
2.2. Problem Statement
In this study, we consider K clients each possessing private electrical measurement datasets. Each client maintains a dataset , where represents input features and denotes appliance labels. Crucially, label spaces vary across clients due to differences in available appliances and usage patterns, resulting in for distinct clients . For instance, one household might monitor washing machines (WMs), air conditioners (ACs), and televisions, while another tracks only washing machines and laptops, creating label skew. Even for shared appliance types like WMs, usage behaviors often differ substantially, causing feature distribution shifts.
These variations stem from client-specific data distributions , which introduce two core challenges: feature shift in input space, and heterogeneity in label spaces. This doubly heterogeneous data landscape severely impacts FL. Locally trained models exhibit poor generalization to unseen clients, while centralized approaches compromise data privacy. Classic FL methods like FedAvg further struggle with label space mismatches and distribution discrepancies.
Thus, our objective is to collaboratively train a global model without raw data sharing. This model can achieve robust generalization across all clients despite feature distribution shifts and label space heterogeneity, while effectively handling disjoint label sets during inference.
5. Results and Discussion
5.1. Parameter Studies
We conducted ablation and hyperparameter studies to evaluate the impact of key components in our method. Unless otherwise specified, all experiments in this subsection were performed under a non-IID setting using Dirichlet sampling with for consistent comparison.
5.1.1. Ablation Study
We evaluated the contribution of each module through an ablation study on the PLAID dataset, as shown in
Table 1. Removing the CACP module (w/o CACP) led to a clear performance drop, with F1-macro decreasing from 93.8% to 89.5%. Further removing the CORAL loss (w/o CACP & CL) reduced the performance to 85.2%, confirming the importance of feature alignment.
Further removing the global head (w/o CACP & CL & GH) slightly improved performance compared to removing only CACP and CORAL loss, with F1-macro increasing from 85.2% to 88.9%. This indicates that the global head may introduce interference when the alignment mechanism is absent. In contrast, removing only the CORAL loss (w/o CL) had a smaller effect, suggesting that the CACP module is the primary contributor to the observed performance gain.
5.1.2. Effect of
We evaluated the effect of the interpolation coefficient
, which controls the balance between the global and personalized heads. As illustrated in
Figure 7, both extremes—using only the global head (
) or only the personalized head (
)—led to suboptimal performance across all datasets. Intermediate values of
consistently yielded better results. For PLAID and WHITED, the highest F1-macro was observed around
, while COOLL achieved robust performance across a broader range of
, with relatively low variance. These findings suggest that a moderate blend of global and personalized representations is beneficial.
Although the best value of varied slightly across datasets, the performance remained relatively stable within the middle range. For example, PLAID and WHITED achieved the best F1-macro around , while COOLL maintained robust performance over a wider interval. To avoid dataset-specific tuning and ensure a unified experimental setting, we set for all subsequent experiments as a balanced choice between global aggregation and local personalization. An adaptive strategy for selecting according to client heterogeneity is a promising direction for future work.
5.1.3. Effect of the Alignment Loss Weight
Table 2 reports the sensitivity analysis of the alignment loss weight
. FedCACP shows stable F1-macro across different
values on all three datasets, with variations generally within the standard deviations. This indicates that FedCACP is not highly sensitive to
, and that the CORAL-based alignment term mainly serves as a regularizer for improving feature compatibility.
Although different datasets show slightly different optimal values, all tested values led to comparable performance. In particular, the default setting used in the main experiments achieved competitive results on all three datasets, with F1-macro scores of 91.94%, 94.54%, and 98.12% on PLAID, WHITED, and COOLL, respectively. Therefore, we kept in the main experiments for consistency.
5.2. Results in Case 1 (IID)
Table 3 reports the results under Case 1. As expected, centralized methods performed strongly in this homogeneous setting. On PLAID, central (RF) achieved the best performance, with
accuracy and
F1-macro. Among image-based representations, central (AWRG), central (LILS), and central (V-I) achieved F1-macro scores of
,
, and
, respectively. These results confirm the advantage of direct data sharing when distributional shifts are absent.
Federated baselines generally performed worse, especially under FedAvg. For example, FedAvg (AWRG) achieved only F1-macro on PLAID, revealing performance degradation even in IID conditions. This suggests that local inconsistency and limited personalization hinder learning despite aligned distributions. FedProx improves some variants, but its performance still depends strongly on the input representation. For example, on COOLL, FedProx (V-I) reached F1-macro, whereas FedProx (LILS) achieved .
The proposed FedCACP method consistently achieved strong performance across datasets, with F1-macro scores of , , and on PLAID, WHITED, and COOLL, respectively. Notably, it maintained low variance, demonstrating its effectiveness in learning robust representations even under ideal conditions.
5.3. Results in Case 2 (Non-IID Data)
Table 4 reports the Case 2 results under Dirichlet non-IID settings. Severe heterogeneity substantially degrades standard FL methods, especially when
. For example, on PLAID, FedAvg (LILS) and FedProx (LILS) achieved only 63.5% and 64.0% accuracy, respectively, while FedProx (V-I) performed better, with 71.0%. As
increases, the data distribution becomes more balanced and most methods improve. However, FedProx does not consistently outperform FedAvg under strong skew, indicating that proximal regularization alone is insufficient for this setting. The Dirichlet setting partially reflects long-tailed appliance usage, where smaller
values produce stronger within-client and across-client class imbalance. FedCACP does not explicitly suppress minority classes because all classes remain in the global output space and the CACP module uses sample-wise, rather than class-frequency-based, gating. Nevertheless, extremely rare classes may still have unstable representations, motivating future work on focal loss or minority-aware aggregation.
Figure 8 compares the training dynamics of FedAvg, FedProx, and FedCACP under Dirichlet-based non-IID data partitions. The left column shows the training loss, while the right column shows the test accuracy. Subfigures (a,b), (c,d), and (e,f) correspond to
,
, and
, respectively. When
(i.e., the data distribution is nearly IID), baseline methods such as FedAvg and FedProx achieve competitive performance. However, as the non-IID level increases (smaller
), their training becomes unstable and ineffective, as evidenced by the rising loss and degraded accuracy curves. Most notably, FedCACP consistently surpassed all baselines under the most challenging condition
, achieving 93.8%, 94.3%, and 93.8% accuracy on PLAID, WHITED, and COOLL, respectively. These results highlight the effectiveness of our context-aware conditional policy and alignment regularization in addressing client drift and maintaining generalization under severe non-IID conditions.
The statistical tests further confirm the robustness of FedCACP under highly non-IID settings. For the representative case highlighted by the reviewer—namely, PLAID with —FedCACP achieved accuracy, corresponding to a 95% confidence interval of , while the strongest baseline, FedAvg (V-I), achieved , corresponding to a 95% confidence interval of . These two confidence intervals do not overlap, indicating that the observed gain is unlikely to be caused by random variation.
5.4. Results in Case 3
Table 5 summarizes the performance of all methods under Case 3, which simulates real-world heterogeneity through house-specific data partitions across clients. A key observation is that the same federated learning algorithm may yield very different results depending on the input representation. For instance, FedAvg with V-I features performs consistently well across all datasets (e.g., 93.3% F1-macro on WHITED and 94.9% on COOLL), while FedAvg with LILS features suffers from poor generalization, particularly on WHITED and COOLL (22.1% and 46.7% F1-macro, respectively). A similar trend holds for FedProx: its LILS variant performs extremely poorly (e.g., 5.4% F1-macro on WHITED), whereas the V-I variant achieves strong performance (e.g., 90.8% and 90.0% F1-macro on WHITED and COOLL, respectively). This suggests that robust representations (e.g., V-I) can alleviate the impact of domain shifts in federated settings.
Figure 9 and
Figure 10 present the training loss and training accuracy curves in Case 3, respectively. In both figures, subfigures (a), (b), and (c) correspond to the PLAID, WHITED, and COOLL datasets, respectively. Notably, FedCACP achieved the best performance on WHITED and COOLL, with F1-macro scores of 94.5% and 97.3%, respectively, and remained highly competitive on PLAID, with a F1-macro of 94.1%. Its strong overall performance and relatively low variance demonstrate the effectiveness of the context-aware conditional policy and feature alignment mechanism in handling complex client heterogeneity. Compared with most baselines, FedCACP provides a better trade-off among accuracy, F1-macro, and stability, confirming its robustness across challenging real-world scenarios.
5.5. Results in Case 4 (LoHoCV)
Table 6 reports the results for Case 4, which adopts a leave-one-house-out cross-validation setting to evaluate generalization to unseen houses. Among the centralized methods, LILS achieved the best performance, with
accuracy and
F1-macro. Although V-I and AWRG representations also yielded decent results, their generalization ability was generally inferior to LILS in this setting.
For federated methods, performance varies significantly depending on the feature representation. FedAvg maintains relatively consistent accuracy across all variants, but its F1-macro remains moderate, suggesting limited adaptability. FedProx, on the other hand, exhibits large performance fluctuations. When combined with LILS, it performs extremely poorly, with only accuracy and F1-macro. In contrast, with AWRG features, FedProx reaches accuracy and F1-macro. A possible explanation is that LILS learns its feature representation jointly with model training, whereas V-I trajectory and AWRG use fixed representations generated before federated optimization. Under the leave-one-house-out setting, client-specific appliance signatures may lead to inconsistent local LILS representations across clients. In addition, the proximal term in FedProx may restrict local adaptation, causing FedProx (LILS) to converge numerically but reach a suboptimal representation space. In contrast, fixed V-I and AWRG representations decouple feature construction from federated training and, therefore, show more stable performance. The proposed FedCACP method achieves the most competitive F1-macro among the federated approaches, reaching accuracy and F1-macro. This indicates that FedCACP provides robust generalization to unseen houses while avoiding the severe degradation observed in some FedProx variants.
5.6. Effect of the Number of Clients K
We now examine how the number of clients
K affects performance. As shown in
Figure 11, increasing
K from 5 to 19 leads to performance degradation for all methods due to increased data fragmentation. FedAvg (V-I) is most affected, with nearly a 6% drop in accuracy, over 7% reduction in F1-macro, and a 74% increase in variance. FedProx (V-I) shows stronger robustness, maintaining accuracy above 73.6% and experiencing 38% less F1-macro degradation than FedAvg, although its F1-macro remains below 71.7%.
The proposed method consistently outperforms the baselines across all K. It starts with 80.9% accuracy and 80.7% F1-macro at , and still retains 73.6% accuracy and 72.0% F1-macro at . Its relatively low variance also indicates more stable generalization as client heterogeneity increases.
5.7. Privacy Discussion
We analyzed the privacy property of FedCACP from the perspective of information exposure. We considered an honest-but-curious server that follows the training protocol but may inspect the uploaded parameters. For client k at communication round t, the information observable by the server is . In contrast, the private local dataset is never transmitted. Therefore, the server does not directly observe original samples.
The personalized routing variables are also generated locally. Specifically, for a local sample , FedCACP computes Although the server receives the uploaded model parameters, it does not have access to the input . Thus, it cannot directly compute the true feature , fused representation , or gating policies for the local training samples. In this sense, FedCACP keeps personalized routing behavior on the client side.
For the uploaded head, FedCACP uses the interpolated parameter . This interpolation regularizes the uploaded head toward the global head, since . Therefore, the deviation of the uploaded head from the global head is scaled by . Nevertheless, a server that knows and may still infer from when . Therefore, FedCACP should be regarded as a privacy-aware FL framework that reduces raw-data and sample-level behavior exposure, rather than a method with formal privacy guarantees.
5.8. Computational Cost Discussion
Table 7 compares the computation time and communication cost of FedAvg (V-I), FedProx (V-I), and FedCACP on the PLAID dataset under Case 3. For a fair comparison, all methods are evaluated with
clients and full client participation in each communication round.
Compared with FedAvg (V-I) and FedProx (V-I), FedCACP requires a larger communication cost per round. This is because FedCACP transmits additional personalized components, including the feature extractor, the interpolated head, and the CACP module. Specifically, clients upload
, whereas FedAvg and FedProx transmit the standard model parameters. As a result, the communication cost per round of FedCACP is 33.53 MB, which is higher than the 15.37 MB of FedAvg (V-I) and FedProx (V-I). Nevertheless, FedCACP converges in fewer communication rounds. As shown in
Table 7, FedCACP requires only
rounds to convergence, while FedAvg (V-I) and FedProx (V-I) require
and
rounds, respectively. Therefore, although FedCACP has a higher per-round communication cost, its total communication cost is reduced to
MB.
In terms of computation time, FedCACP requires more time per round than FedAvg (V-I) due to the additional personalized and context-aware computations introduced by the CACP module. This indicates that the performance improvement and reduced communication rounds are obtained at the cost of extra local computation. However, CACP is designed as an auxiliary policy module rather than an additional convolutional backbone, and the main computational cost still comes from the feature extractor. Therefore, the additional overhead is moderate in the current experimental setting. For resource-constrained smart-meter nodes, this trade-off should be carefully considered, and lightweight CACP designs, pruning, quantization, and hardware-aware optimization will be investigated in future work.
Frequent cloud–edge communication may increase bandwidth usage and energy consumption in practical smart-meter edge deployments.
Table 7 therefore reports the communication cost of each method, including both server-to-client downloads and client-to-server uploads. Since this study does not directly measure energy consumption on physical smart-meter edge nodes, hardware-based energy evaluation is left for future work.
6. Conclusions
This paper proposes a personalized FL method for appliance recognition in NILM that addresses two key challenges: privacy-preserving collaborative training without raw data exchange, and performance degradation due to inter-client label distribution skew. Each client maintains both personalized and global model components, coordinated by a context-aware conditional policy module that adaptively controls information sharing through learnable gating mechanisms. Extensive experiments on real-world datasets demonstrate competitive and stable performance compared with federated baselines. Specifically, the method maintains accuracy above on PLAID across Dirichlet skew levels ( to ). In the leave-one-house-out evaluation on PLAID, it achieves , and on WHITED under house-based splits, it reaches . These results validate the method’s effectiveness across diverse and challenging non-IID scenarios.
Limitations and Future Work: One limitation is that FedCACP currently assumes that all clients use the same network architecture, which enables direct parameter aggregation at the server. This may limit its deployment in heterogeneous-device scenarios where clients have different computational resources, memory budgets, or sensing configurations. Future work will extend FedCACP to model-heterogeneous federated learning—for example, by using shared representation interfaces, knowledge distillation, or prototype aggregation. Another limitation is that the house-partitioned settings of WHITED and COOLL rely on artificially constructed virtual houses due to the lack of real household metadata, which may not fully reflect real household-level distribution shifts. Finally, since the current experiments are based mainly on normal operating conditions, future work will incorporate human-centered load behavior and resilience-aware constraints for extreme-event scenarios.