unbitrium

FedAdam Validation Report

Overview

FedAdam applies the Adam optimizer at the server level to aggregated client updates, providing adaptive learning rates across parameters. It is part of the FedOpt family of algorithms.

Mathematical Formulation

After aggregating client updates to obtain $\Delta_t$, the server applies Adam:

First moment estimate: \(m_t = \beta_1 m_{t-1} + (1 - \beta_1) \Delta_t\)

Second moment estimate: \(v_t = \beta_2 v_{t-1} + (1 - \beta_2) \Delta_t^2\)

Bias-corrected estimates: \(\hat{m}_t = \frac{m_t}{1 - \beta_1^t}, \quad \hat{v}_t = \frac{v_t}{1 - \beta_2^t}\)

Model update: \(w^{t+1} = w^t - \eta \frac{\hat{m}_t}{\sqrt{\hat{v}_t} + \epsilon}\)

Implementation Reference

The implementation is located at src/unbitrium/aggregators/fedadam.py.


Invariants

Invariant 1: Reduction to FedAvg

When $\beta_1 = 0$, $\beta_2 = 0$, and $\epsilon \to 0$:

\[\text{FedAdam} \approx \text{FedAvg} \text{ with learning rate } \eta\]

Verification: Limiting case produces FedAvg-like behavior.

Invariant 2: Moment Bounds

Moment estimates are bounded:

\[\|m_t\| \leq \frac{\max_\tau \|\Delta_\tau\|}{1 - \beta_1}\]

Verification: Moment norms remain bounded.

Invariant 3: Adaptive Scaling

High-variance dimensions receive smaller updates:

\[\frac{\partial w_i}{\partial t} \propto \frac{1}{\sqrt{v_{t,i}}}\]

Verification: Update magnitude inversely related to variance.

Invariant 4: Bias Correction

Early updates are properly scaled:

\[\lim_{t \to \infty} \frac{1}{1 - \beta^t} = 1\]

Verification: Bias correction diminishes over rounds.


Test Distributions

Distribution 1: Hyperparameter Sweep

Configuration:

Expected Behavior:

$\beta_1$ $\beta_2$ Convergence Stability
0.9 0.999 Fast High
0.5 0.99 Moderate Moderate
0.99 0.9999 Slow Very high

Distribution 2: Non-IID Label Skew

Configuration:

Expected Behavior:

Distribution 3: Sparse Gradients

Configuration:

Expected Behavior:


Expected Behavior

Default Hyperparameters

Parameter Default Range
$\beta_1$ 0.9 $[0, 1)$
$\beta_2$ 0.999 $[0, 1)$
$\epsilon$ $10^{-8}$ $(0, 10^{-4}]$
$\eta$ 0.001 $(0, 1]$

Metric Ranges

Metric Range Notes
first_moment_norm $[0, \infty)$ Norm of first moment
second_moment_norm $[0, \infty)$ Norm of second moment
effective_lr $(0, \eta)$ Per-dimension effective LR
bias_correction_factor $(1, \infty)$ Current bias correction

Edge Cases

Edge Case 1: First Round

Input: $t = 1$

Expected Behavior:

Edge Case 2: Zero Update

Input: $\Delta_t = 0$

Expected Behavior:

Edge Case 3: Very Large Update

Input: $|\Delta_t| \gg 1$

Expected Behavior:

Edge Case 4: Numerical Stability

Input: $v_t \to 0$ for some dimension

Expected Behavior:


Reproducibility

Seed Configuration

def set_seed(seed: int = 42) -> None:
    import random, numpy as np, torch
    random.seed(seed)
    np.random.seed(seed)
    torch.manual_seed(seed)

Optimizer State

# State persisted across rounds
optimizer_state = {
    "m": torch.zeros_like(global_params),
    "v": torch.zeros_like(global_params),
    "t": 0,
}

Security Considerations

State Leakage

Server optimizer state may reveal:

Mitigations

  1. Encrypt optimizer state at rest
  2. Periodic state reset
  3. Differential privacy on moment updates

Complexity Analysis

Time Complexity

\[T = O(P)\]

Adam operations are element-wise.

Space Complexity

\[S = O(3P)\]

Breakdown:


FedOpt Family Comparison

Algorithm Server Optimizer Moment Updates
FedAvg SGD (implicit) None
FedAdam Adam Both moments
FedYogi Yogi Adaptive v
FedAdagrad Adagrad Cumulative v

Performance Benchmarks

CIFAR-10 Non-IID

Method Final Accuracy Rounds to 70%
FedAvg 75.3% 200
FedAdam 79.1% 140
FedYogi 78.5% 150

Shakespeare (NLP)

Method Perplexity
FedAvg 1.42
FedAdam 1.31

References

  1. Reddi, S., Charles, Z., Zaheer, M., Garrett, Z., Rush, K., Konecny, J., Kumar, S., & McMahan, H. B. (2021). Adaptive federated optimization. In ICLR.

  2. Kingma, D. P., & Ba, J. (2015). Adam: A method for stochastic optimization. In ICLR.

  3. Zaheer, M., et al. (2018). Adaptive methods for nonconvex optimization. In NeurIPS.


Changelog

Version Date Changes
1.0.0 2026-01-04 Initial validation report

Copyright 2026 Olaf Yunus Laitinen Imanov and Contributors. Released under EUPL 1.2.