Improper-Sensitivity Compression for Federated Phasor NILM

Smart meters can learn to recognize household appliances from the whole-house electrical signal. This task is called non-intrusive load monitoring (NILM), and the same capability that makes it useful for grid operators also exposes wake times, showers, and medical devices. Federated learning, where each meter trains locally and uploads only model updates, is the standard answer to that privacy risk. It fails in two practical ways. Every published federated NILM system throws away phase and trains on a coarse scalar active-power series. Each also uploads full uncompressed weights every round. The appliances that scalar power handles worst, multi-state machines and electronics with switch-mode supplies, are exactly the ones whose current harmonics carry distinguishing phase information. That points to complex-valued networks trained with Wirtinger calculus, the standard way to take gradients of a real loss with respect to complex weights by treating $w$ and its conjugate $w^*$ as separate variables. Existing federated compression tools, however, are defined only for real vectors.

This note proposes one specific way to compress complex updates, together with a clean test of whether that complexity is worth anything. Each complex weight's effect on the network output is summarized by two Wirtinger derivatives. From these we can read off whether perturbing that weight in magnitude or in phase matters more, and we spend quantization bits accordingly, using an elliptical quantizer aligned to that sensitivity instead of the usual square one. The proposal makes a falsifiable prediction. The gain over ordinary real-valued compression should grow with how "improper" (direction-dependent) each weight's sensitivity is, and should vanish for layers that act linearly on complex inputs.

Core Claim

Consider one complex weight $w$ and a complex network output $y$. A small perturbation $\delta$ of $w$ changes the output by $\delta y \approx a\,\delta + b\,\delta^*$, where $a = \partial y/\partial w$ and $b = \partial y/\partial w^*$ are the two Wirtinger derivatives. Averaged over a small local calibration batch, the expected squared output shift is

$$ \mathbb{E}|\delta y|^2 = \begin{pmatrix}\delta \\ \delta^*\end{pmatrix}^{H} \begin{pmatrix} \mathbb{E}|a|^2 & \mathbb{E}[a^* b] \\ \mathbb{E}[a b^*] & \mathbb{E}|b|^2 \end{pmatrix} \begin{pmatrix}\delta \\ \delta^*\end{pmatrix}, $$

where the superscript $H$ is the conjugate transpose. This $2\times 2$ matrix is the analogue of the "augmented covariance" used for improper complex signals. When $b$ is zero on average, which happens for weights feeding only complex-linear operations, the sensitivity is circular. Error in any direction costs the same, and a plain Cartesian quantizer is already optimal. When $b$ is large, as happens after non-split activations such as modReLU or zReLU that respond to magnitude and phase differently, the sensitivity is an ellipse. A quantizer whose cells are stretched along the cheap direction and compressed along the expensive one should then achieve lower output distortion at the same bit budget.

We define the improperness of a unit as $\rho = |\mathbb{E}[a^*b]| / \mathbb{E}|a|^2$, which lies in $[0,1]$ by Cauchy–Schwarz whenever $\mathbb{E}|b|^2 \le \mathbb{E}|a|^2$. The quantization rule allocates bits along the two principal axes in proportion to the log ratio of the matrix's eigenvalues, following standard reverse water-filling for Gaussian sources. The predicted distortion saving over an isotropic quantizer at fixed rate is a monotone function of $\rho$.

Three prior results shape this proposal. The method extends discrepancy-aware calibration, which ranks real parameters by the output shift they cause on 32–64 local samples and beats magnitude Top-$k$. We keep its calibration idea but replace a scalar importance score with a per-unit $2\times2$ metric that also shapes the quantizer. The motivating gap comes from Complex-Valued Federated Learning with Differential Privacy and MRI Applications. That work trains complex networks federatedly with complex DP-SGD, notes that each complex weight costs two floats, and offers no compression. A negative result constrains the design. Real-Valued Backpropagation is Unsuitable for Complex-Valued Neural Networks shows that split activations make wide complex networks behave like real networks of twice the width. In that regime we expect $\rho \approx 0$ and our method to give no benefit, so we use non-split activations and treat split networks as a built-in negative control.

Research Program

The application is harmonic NILM on UK-DALE, which records whole-house voltage and current at 16 kHz alongside 6-second per-appliance ground truth. For each mains cycle we compute the complex current phasors of the first several odd harmonics, referenced to the voltage fundamental's phase so that meters with different clocks are comparable. We stack these over a window and regress the target appliance's power at the window midpoint, following the sequence-to-point target of Fed-NILM.

The model is a small complex convolutional network trained with Wirtinger gradients, using modReLU/zReLU-type non-split activations and complex group normalization borrowed from Riess et al. We size it so that its complex parameter count times two equals the real parameter count of the real-valued comparison models. This makes "double communication tax" comparisons honest: a complex network with $m$ complex weights uploads the same bytes as a real network with $2m$ weights.

UK-DALE has only five houses, so federation is simulated by splitting each house's record into disjoint multi-week blocks. Each block is one client, which yields tens of clients with genuine within-house and across-house heterogeneity. Generalization is always reported on a held-out house. This is a real limitation. The results speak to heterogeneous clients drawn from few buildings, not to city scale.

The compression pipeline runs on each client after local training. The client estimates $a$ and $b$ for every complex unit by Wirtinger backpropagation on its calibration batch, forms the $2\times2$ matrix, and selects the retained units by the largest eigenvalue times update energy. It then quantizes each retained update with an elliptical lattice aligned to that unit's principal axes and uploads indices plus bits. Error feedback carries residuals to the next round, and the axes are recomputed each round. Axis information costs nothing to transmit if the server recomputes axes from the shared global model on a public calibration set. We test both local and server-side axis estimation, because the local variant inherits the calibration-distribution risk noted for discrepancy calibration.

The privacy side of NILM is an evaluation axis, not a new mechanism. At each compression level we run a gradient-inversion attacker on uploaded updates. The attacker tries to reconstruct harmonic windows, and a separately trained appliance classifier then tries to identify which appliances were on. Shi et al. found such attacks succeed only at batch size one on untrained models for scalar power. We ask whether harmonic phasors, which are far more identifying, change that picture. We also report one configuration with complex DP-SGD at $\epsilon = 3$, the budget used by Riess et al.

Baselines

The naive reference point is a real Seq2point network trained on 6-second active power with FedAvg and uncompressed 32-bit uploads. This is the system of A Federated Learning Framework for Non-Intrusive Load Monitoring and Fed-NILM. That work reports Kettle F1 of 0.995, Tumble Dryer 0.877, and Washing Machine 0.943 on REFIT. These numbers are not directly comparable to UK-DALE, so we rerun the method on our client split. The closest UK-DALE figure in the file is an average unseen-house F1 of 0.53 for the denoising autoencoder in Neural NILM. No reported result was found on Lacuna for federated NILM on UK-DALE 16 kHz harmonic data.

The strongest information baseline is a real network given the same harmonic phasors as separate real and imaginary input channels, with parameter count matched in bytes. This is the Cartesian-split approach used by Neural Fourier Energy Disaggregation. It isolates whether any benefit comes from phase information itself or from complex modeling.

The strongest compression baseline is discrepancy-aware calibration combined with Top-$k$ and uniform Cartesian quantization, applied to the stacked real vector. On CIFAR-10 with ViT-tiny at a 0.01 compression ratio, that paper reports 29.62% accuracy versus 21.03% for magnitude Top-$k$. We also run magnitude Top-$k$ applied pairwise, selecting by $|\Delta w|$, and ZAMPLING. ZAMPLING reports a 1024-fold communication reduction and a 2.55% accuracy drop at compression factor 32 on MNIST. Being orthogonal to our method, it is also combined with it.

The ablation that isolates our ingredient keeps everything identical, including calibration, unit selection, and error feedback. It changes only the quantizer, from isotropic square cells to the elliptical cells aligned with the improper-sensitivity matrix. A second ablation keeps our quantizer but trains with split activations, where theory predicts $\rho \to 0$ and no gain.

For fairness, all methods receive the same client split, the same calibration batch size (64), the same number of rounds, and the same hyperparameter search budget of 20 trials per method on a validation house. Results are reported as curves of held-out-house F1 and MAE against cumulative uplink bytes. Beating a baseline means reaching its best F1 with at least 2× fewer bytes, or achieving higher F1 at every byte budget below 1% of the uncompressed payload, across three seeds.

Why not just…?

Why not just split real and imaginary parts and use the best real compressor? This is the most serious threat, and the proposal is built so that it can win. Any complex compressor can in principle be written as a real one on $\mathbb{R}^{2m}$. Standard real compressors, however, quantize each coordinate independently, which is optimal only when the sensitivity is circular. The elliptical-versus-square ablation measures directly whether the difference matters. If gains are within seed noise even on high-$\rho$ layers, the conclusion is that real compressors suffice, and the contribution shrinks to the byte-matched complex-versus-real NILM comparison.

Why not just keep real active power, as Fed-NILM does? Fed-NILM's scalar-power results are strong for resistive loads. The same authors report a local Tumble Dryer F1 of only 0.115, and multi-state and electronic appliances remain hard to separate. The byte-matched comparison among the real-power network, the real network on harmonics, and the complex network on harmonics answers this per appliance. If harmonic inputs add nothing on UK-DALE at matched bytes, the whole line is unjustified, and we would report that.

Why not just use a smaller model, such as federated GBDTs? Shi et al. found GBDTs about one-sixth the size of CNNs and 11 times faster. Size reduction and update compression are complementary, and trees do not produce gradients that our compressor or complex DP-SGD can act on. We include a federated GBDT on hand-crafted harmonic magnitude features as a bytes-per-accuracy point. If it dominates the complex curve, that is a direct negative result.

Why not just quantize every weight to 8 bits uniformly? Uniform quantization gives only a fixed 4× reduction and cannot reach the sub-1% regime where edge uplinks bind. It is plotted as one point on the byte–accuracy curve.

Proposed Experiments

The first decisive check is mechanistic. For every layer of the trained complex network, we measure $\rho$ and the realized output-distortion saving of the elliptical quantizer at fixed bits. The prediction is a monotone relationship, with near-zero saving on complex-linear layers and on split-activation networks. If this relationship is absent, the method has no reason to work and the downstream results would be coincidence.

The second check is the byte–accuracy curve on held-out UK-DALE houses, reporting F1, MAE, and normalized disaggregation error per appliance. The compression ratios range from 1 (uncompressed) down to 0.001. The critical comparison is between our method and discrepancy calibration with Cartesian quantization, both on the same complex network.

The third check is the heterogeneity stress test. Clients are assigned only a single house's blocks, and we examine whether locally estimated sensitivity axes drift and whether server-side axes from public calibration data recover the loss.

The fourth check covers privacy. We report reconstruction error and appliance-identification accuracy of the gradient-inversion attacker as functions of compression ratio and batch size, with and without complex DP-SGD at $\epsilon = 3$. This shows whether harmonic federated NILM reopens the leakage that Shi et al. found negligible for scalar power, and whether aggressive compression narrows it.