Client-Local Activation Shapes for Feature-Shifted Federated Learning

In federated learning, many hospitals, phones, or sensors train one shared model without pooling their data. The model travels to each client, trains locally, and the server averages the returned weights. This breaks down when clients see the same kinds of objects through different "lenses," such as different scanners, cameras, or rendering styles. The best-known fix, FedBN, keeps each client's batch-normalization layers private and averages everything else. Batch normalization rescales features using statistics of the current mini-batch. Modern backbones such as Vision Transformers use layer normalization instead, and streaming or small-batch edge clients cannot rely on batch statistics at all.

We propose a different private component: the shape of the activation function. Each neuron's nonlinearity gets a few learnable shape parameters, for example the gain and asymmetry of Adaptive Parametric Activation (APA). The server shares the weights and a global base curve. Each client keeps a small private correction to that curve. The claim to test is narrower than "learnable activations help in federated learning." Some feature shifts change the shape of a client's pre-activation distribution, meaning skew and tail weight, and not just its location and scale. A private nonlinear curve can absorb such shifts. A private per-channel scale-and-shift, which is all a local normalization layer can offer, cannot.

Core Claim

Every per-channel affine adjustment, whether from local batch norm, local layer-norm gains, or a local input scale on the activation, can only stretch and slide a client's feature distribution. If two clients differ by a non-affine distortion, such as one camera compressing highlights or one scanner producing heavier-tailed intensities, the shared downstream weights still face mismatched inputs after any affine correction.

We claim that a client-local asymmetry parameter fixes what affine localization cannot. In APA, $\eta(z) = [1 + \lambda e^{-\kappa z}]^{-1/\lambda}$, and the activation is $z\cdot\eta(z)$. Here $\kappa$ (gain) is the slope and $\lambda$ (asymmetry) sets how differently the curve responds to positive and negative inputs. APA's authors showed the asymmetry tracks skewed, Gumbel-like pre-activation distributions under class imbalance.

We parameterize each client $k$'s curve as $\lambda_k = \bar\lambda + \delta_k$ and $\kappa_k = \bar\kappa + \epsilon_k$. The bars denote server-averaged base values, and $\delta_k, \epsilon_k$ are private residuals that are never uploaded. This adds roughly two scalars per channel, which is negligible against the model.

The claim is falsifiable in a specific way, and we accept that outcome in advance. The gain $\kappa$ is essentially an input rescaling, so it is redundant with a local normalization scale. Any benefit beyond local normalization must therefore come from $\lambda$. If localizing $\lambda$ adds nothing over localizing layer-norm affine parameters, the idea is wrong.

Relation to Prior Work

Fed-KAN is the only direct combination in the file, and it motivates this proposal. It places learnable B-spline activations on the edges of a small network for satellite traffic forecasting and reports a 77.39% lower test loss than a parameter-matched MLP (0.2583 vs 1.1433). However, it averages every spline coefficient with FedAvg. It never asks which activation parameters should stay local, and it studies four clients on a regression task with no controlled heterogeneity. We take up exactly the question it skips, in vision benchmarks built around feature shift.

FedBN supplies the template, partitioning parameters into shared and private sets. It also supplies the strongest competitor. We differ in what is kept private: a nonlinear shape rather than batch statistics and affine gains, with no dependence on batch normalization existing.

Three adjacent works fight heterogeneity with losses or reweighting while leaving the activation function fixed:

  • MAN penalizes activation magnitudes to flatten the loss surface.
  • FedCSD distills class prototypes to stop the final outputs from drifting under label skew.
  • Equitable-FL clusters clients by their activation vectors to reweight aggregation.

These are complementary rather than competing. They mainly target label skew, whereas we target feature shift.

Curvature Tuning and LoKi show in centralized settings that adapting only activation shapes can steer pretrained models competitively with low-rank weight updates. That evidence makes us expect a few shape parameters to carry real adaptation capacity. Neither has been run with parameter averaging or across clients.

Two results act as constraints on the design. Unconstrained rational activations can develop poles, which is why rational networks are used only as a secondary family with the positive-denominator form. Full KAN layers are memory-heavy, at 32.9 GB in LoKi's measurements, so we do not use KAN backbones.

Research Program

We build three variants of each backbone, which differ only in which activation parameters leave the client:

  • All-global: everything is averaged, the Fed-KAN analogue.
  • All-local: every activation-shape parameter stays private.
  • Decomposed: a shared base curve plus a private residual, as in the core claim. The residual is pulled toward zero by a small proximal weight, so clients with little data fall back to the shared curve.

We run two backbone regimes.

  1. Normalization-free CNN. We use a ResNet with group normalization, trained from scratch on the Digits benchmark (MNIST, MNIST-M, SVHN, USPS, Synthetic Digits) and on Office-Caltech10. These are the feature-shift benchmarks FedBN introduced. A batch-norm version of the same network is also trained so that FedBN itself can be run.
  2. Pretrained Vision Transformer. We use the transformer with frozen weights plus shared low-rank adapters on DomainNet, treating each domain as a client. Here FedBN does not apply, and the bandwidth argument of federated foundation models matters.

We also evaluate deployment to a client never seen in training. The held-out client fits only its private activation residuals, either with a few labeled examples or by minimizing prediction entropy on unlabeled data. We compare this against fitting only local normalization parameters in the same way.

The analysis component is a diagnostic for when the method should help. For each client and layer, we standardize pre-activations per channel, which removes everything an affine map can remove. We then measure the remaining cross-client differences in skewness and kurtosis. The prediction is that the accuracy gain of localizing $\lambda$ over localizing layer-norm affine parameters rises with this residual shape mismatch, across layers and across benchmarks. As a controlled check, we inject synthetic non-affine distortions into Digits clients and vary their strength:

  • gamma curves on pixel intensities,
  • saturation clipping,
  • heavy-tailed noise.

The same check is run with purely affine distortions (contrast and brightness), where the method should give no advantage.

Baselines

The naive reference is FedAvg with a fixed ReLU (CNN) or GELU (transformer), every parameter averaged. FedBN reports roughly 62% on the SVHN client for FedAvg on Digits, against about 71% for FedBN (FedBN). These values anchor our reproduction, and we require our FedAvg and FedBN runs to land near them before trusting any other comparison.

The strongest existing method on feature shift is FedBN. We run it on the batch-norm twin of the CNN with the same:

  • clients and local epochs,
  • communication rounds,
  • optimizer and tuning budget per method.

Hyperparameters are tuned with an equal number of trials on a validation split of each client. On Office-Caltech10 and DomainNet, the file gives no exact FedBN figures (no reported result found on Lacuna for FedBN accuracy on Office-Caltech10 or DomainNet), so we report our own reproduction. Beating FedBN means higher mean and worst-client accuracy on Digits and Office-Caltech10 without batch normalization, averaged over at least three seeds with non-overlapping confidence intervals.

The key ablation, which we treat as the real competitor, is local layer-norm or group-norm affine parameters. It keeps the same backbone, uses the same number of private scalars, and leaves the activations fixed. We also run decomposed APA with only $\kappa$ localized. If this matches the full method, the gain is merely affine and our central claim fails.

The all-global APA variant isolates the effect of locality from that of having learnable activations at all. A private-classifier-head variant, which keeps the final layer local, tests whether personalization anywhere would do as well.

Why not just…?

Why not just keep the normalization layers' scale and shift local, FedBN-style, in a layer-norm or group-norm model? This is the most serious threat. On purely affine shifts we expect it to tie with our method, by construction. The proposal's value rests entirely on the synthetic non-affine sweep and on the residual-skew diagnostic. If local normalization affine parameters match local $\lambda$ even under gamma and clipping distortions, we report that activation shape adds nothing for feature shift.

Why not just let each client keep a private low-rank adapter or classifier head? These personalize far more parameters and can absorb any shift given enough capacity. We compare at matched private-parameter count and also report the unmatched versions. The distinctive advantage we test is fitting an unseen client from a few unlabeled images, where a few hundred shape scalars should overfit less than a full head or adapter. The held-out-client experiment decides this.

Why not just average learnable activations globally, as Fed-KAN does? Global averaging gives every client the same curve. Under real shape mismatch, that curve becomes a compromise that fits no client. The all-global variant measures this directly, and the diagnostic predicts its gap to the decomposed variant should widen with residual shape mismatch.

Decisive Checks

The idea succeeds if three things hold on normalization-free and transformer backbones.

  1. Decomposed local-$\lambda$ APA beats local normalization affine parameters on mean and worst-client accuracy on Digits and DomainNet.
  2. The advantage grows monotonically with the strength of injected non-affine distortion, and vanishes for affine distortion.
  3. Unseen clients adapt better through activation residuals than through normalization parameters.

We also report the bytes uploaded per round. Private residuals cost nothing to communicate, and the shared base curve adds well under 1% of the upload.

The idea fails if the $\kappa$-only ablation or local normalization affine parameters close the gap. In that case the useful result is still a clear negative: localizing activation shape is redundant with localizing normalization.