When Battery-Saving Routing Exposes Training Data

Sensor and edge networks are starting to train machine learning models collaboratively. Each device computes a model update (a gradient) from its own data and passes it hop by hop toward a base station. A well-known result from the privacy literature is that a single device's gradient can often be inverted back into that device's training images. The usual protection is to make sure no outsider ever sees one device's update alone. Updates are mixed with others, by summing them or by adding pairwise random masks that cancel when summed, before anyone untrusted can read them. How large that mixing group is depends on who talks to whom, and in a battery-powered network that is set by energy-aware routing. Routing hands the cluster-leader role to whichever node reports the most battery, shrinks clusters near the base station, and reroutes around dying nodes.

We claim these energy-balancing moves systematically shrink the groups within which a device's update is mixed. Shrinking those groups predictably raises gradient-inversion success, and it gets worse late in the network's life, when batteries are uneven. We propose to measure this effect and then remove it with a routing rule. The rule keeps a guaranteed minimum mixing-group size as a hard constraint inside an existing energy-balancing protocol, and it stops relying on self-reported battery levels when assigning privacy-critical roles. The test is whether this protection costs only a small fraction of network lifetime compared with the unconstrained protocol.

Core Claim

Topology-Dependent Privacy Bound for Decentralized Federated Learning shows that in peer-to-peer learning an adversary can learn at best the sum of updates within each "honest component". An honest component is a connected group of honest nodes that remains once the corrupt nodes are removed. A node's information loss is roughly $1/(2(m-1))$, where $m$ is that group's size. Their experiments show gradient inversion is near-perfect at $m=1$ and fails as $m$ grows. They also show that hub-heavy graphs shatter into tiny components when hubs are compromised. That paper treats the graph as fixed. This proposal motivates its gap directly from that paper.

A clustered sensor network is a hub-heavy graph whose hubs change every round according to battery state. Three standard mechanisms each cut $m$:

  1. Unequal clustering, as in FQ-UCR, deliberately makes clusters near the sink small to spread forwarding load. This gives near-sink nodes the smallest mixing groups.
  2. Leader election driven by residual energy can be gamed. Energy levels are self-reported and piggybacked on data packets, as in Jun Yuea et al., or used in a selection weight, as in the ZigBee weight-cluster algorithm. A compromised node can simply claim a full battery and be elected cluster head repeatedly.
  3. Rerouting around depleted forwarders, as in WDM, creates cut vertices. A cut vertex is a node whose removal splits the network, and it can leave a peripheral node's update crossing into adversarial hands with $m=1$.

We expect leakage to be a function of network age and position, not a constant. The fix should be a constraint on the routing layer, not another client-side perturbation.

Mechanism

Each round $t$, nodes mask their updates with pairwise random masks shared only with other members of their mixing group. These are cheap symmetric-key masks generated from a pseudorandom generator, and they cancel when the group's updates are summed. Under this protocol, Li et al.'s bound applies, and the quantity that matters for node $i$ is $m_i(t)$. This is the size of $i$'s honest component in the round-$t$ masking graph, evaluated against a worst-case adversary that controls $c$ nodes.

Following Li et al.'s finding that targeting hubs is the most damaging attack, we approximate the worst case by assuming the adversary holds the $c$ most central nodes in that round. We also assume it holds any node that won election using an energy report that cannot be checked.

The routing problem becomes

$$\max \; T_{\text{life}} \quad \text{subject to} \quad \min_i m_i(t) \ge k \;\; \text{for every round } t,$$

where $T_{\text{life}}$ is the number of rounds until a fixed fraction of nodes die, and $k$ is a target mixing size. By the bound, $k$ caps each node's per-round loss at about $1/(2(k-1))$.

We implement the constraint by making three changes to FQ-UCR and WDM rather than by redesigning routing:

  1. Minimum cluster size. A floor on cluster membership overrides the fuzzy radius rule near the sink.
  2. Leader election. The election weight treats self-reported energy as bounded evidence. It keeps the logarithmic service-time penalty from the ZigBee weight metric and adds a hard cap on how many rounds any node may lead within a window.
  3. Next-hop choice. The forwarding weight $V_i.\text{RWV}(V_k)$ is set to zero for any next hop whose removal would push some upstream node's $m$ below $k$. This is checked with a cut-vertex test on the current round's graph.

Mask partners are drawn only from nodes whose residual energy is above a survival threshold. This is analogous to the 40% re-election threshold in the RSSI cluster-head paper. The purpose is to stop a node dying mid-round from breaking mask cancellation.

Research Program

The work has three stages.

Measurement. We instrument FQ-UCR and WDM in their published simulation settings with a federated learning workload. For every node and round we log $m_i(t)$, and we run gradient inversion on whatever an adversary at each compromised position actually observes. The output is a leakage map over node position and network age, together with a check of whether Li et al.'s $m$-based bound predicts measured reconstruction quality in this dynamic setting.

Energy-advertisement attack. We implement the attack in which compromised nodes misreport their battery to capture the cluster-head role, and measure how much faster they collect small-$m$ observations than honest-reporting adversaries do.

Constrained routing. We build the constrained protocol described above and trace out the lifetime-versus-$k$ curve.

Baselines

  1. Do nothing. Unmodified FQ-UCR and WDM carrying raw float32 updates. This is the reference that shows how much leakage the energy layer creates by itself.
  2. Masking with unchanged routing. The same pairwise masking but no routing changes. This is the key ablation: it isolates whether the routing constraint, rather than masking alone, is responsible for any gain.
  3. Fixed minimum cluster size only. Only the cluster-size floor, with no change to leader election or next-hop choice. This is the cheapest version of the idea.
  4. Strongest existing defense. Mixed quantization, which reports DLG reconstruction PSNR dropping from 55.3 dB to 8.1 dB on CIFAR-10 while also cutting payload size four-fold. It is the strongest competitor because it saves transmission energy and blocks inversion at the same time, which is exactly the trade this proposal targets. We run it with unmodified energy routing, and separately stacked on our protocol.
  5. Decoy-sample defense. DCS², which reports MNIST PSNR dropping from 59.20 to about 7.84.
  6. Gaussian differential privacy. Gaussian noise added to each update. The mixed-quantization paper reports it reaching only about 78–85% MNIST accuracy, versus 96.67% under quantization, at comparable protection.

Every method runs on the same deployment, data split, number of rounds, initial energy (10 J per node in the WDM setting), and radio energy model. Each method gets the same hyperparameter search budget. Energy charged to a defense includes its computation as well as its bits. For DCS² that means decoy synthesis, and for masking it means key setup and pseudorandom generation. The file has no reported energy cost for these on sensor hardware, so we measure them ourselves.

Our protocol counts as beating a baseline if it meets two conditions. First, its worst-node reconstruction quality under the strongest attack must be at least as low as that baseline's. Second, it must lose no more than about 10% of lifetime relative to unmodified FQ-UCR. FQ-UCR reports 2499 rounds at 400 nodes with the sink at the center.

Why not just…?

Why not just encrypt everything with homomorphic encryption? The mixed-quantization paper documents that homomorphic encryption needs key generation that grows burdensome as clients are added and is too expensive for edge devices. On 10-joule sensors, that cost lands on the same nodes energy routing is trying to keep alive. More fundamentally, Li et al.'s bound says that even a perfect aggregation protocol leaks the honest-component sum. Encryption therefore cannot fix a topology that leaves $m=1$. Lightweight masking is a different matter: it is a real candidate, and we adopt it as our substrate rather than compete with it. Baseline 2 tests whether masking alone is enough.

Why not just add differential-privacy noise at each node? The reported accuracy cost is large: 78–85% versus 96.67% on MNIST in the mixed-quantization paper. Gradient Inversion with Generative Image Prior reports that generative-prior attacks still succeed on 99%-sparse gradients, which suggests that strong priors demand heavy noise. We include differential privacy at a matched accuracy target to confirm this in our setting.

Why not just quantize? This is the real threat. Quantization saves energy and its reported DLG result is near noise. However, that result is for a pixel-space attack. SoK: Gradient Leakage and the generative-prior work suggest attack strength varies widely with the prior used, and no reported result on Lacuna covers quantized gradients under a generative-prior attack (GIAS). We will run that test. If quantization alone keeps the worst-node PSNR near noise even against GIAS and against a cluster head that observes repeatedly, then the routing constraint is unnecessary for passive adversaries. In that case we narrow the claim to adversaries who capture roles through false energy reports.

Why not just require multi-step local training, which the SoK shows already breaks inversion? Energy-aware schemes such as REWAFL deliberately cut local steps to save battery and wall-clock time, so the protective regime and the energy-saving regime conflict. We sweep the number of local steps from 1 to 10 and report leakage and lifetime at each setting. This shows whether forcing extra computation is cheaper than constraining routing.

Proposed Experiments

Deployments. We use two published simulation settings. The first is the WDM setting: 160 nodes in a 100 m × 100 m area, 15 m transmission range, 10 J per node. The second is the FQ-UCR setting: 100, 200 and 400 nodes, with the sink either at the center or at the periphery. We place compromised nodes at rates of 2%, 5% and 10%, either chosen by centrality or acting as energy liars.

Data and model. Each node holds a shard of CIFAR-10 or CelebA so that reconstruction can be scored, and HAR for a sensor-native measure of model utility. We train a small convolutional network with local batch sizes of 1–8, matching what sensor memory allows.

Attacks. We run optimization-based inversion with a total-variation regularizer and GIAS with a StyleGAN prior. Both are applied to exactly the packets each compromised node receives, including repeated observations across rounds.

Metrics. We report worst-node and median PSNR, SSIM and LPIPS (a perceptual image-similarity measure), each as a function of round number and distance to the sink. We also report rounds until first node death and until half the nodes die, energy per delivered update, and final accuracy.

Decisive checks. There are four:

  1. Does measured reconstruction quality in unmodified FQ-UCR worsen late in network life and near the sink, as the measured $m_i(t)$ predicts? If not, the motivating claim is false.
  2. Do energy liars obtain small-$m$ views significantly faster than honest-reporting adversaries placed at random?
  3. Does the constrained protocol hold worst-node GIAS PSNR at the level of the do-nothing baseline's large-cluster nodes, while staying within roughly 10% of FQ-UCR's lifetime?
  4. Does it beat, or usefully stack with, mixed quantization under the generative-prior attack?

A negative result on the third or fourth check would still be informative: it would show that the cost of privacy in these networks has to be paid at the client, not in the routing layer.