Verifiable Moment Replay for Federated Class-Incremental Learning

When many devices jointly learn new classes over time, the standard defense against forgetting is replay: keep old examples, or compressed summaries of them, and mix them into training on new data. In federated systems, the server increasingly holds that memory for everyone. In Lightweight Federated Incremental Learning via Decoupled Replay (Li-FIL), for example, a server-side generator synthesizes past-class features for clients. Clients have no way to check that the server's memory is honest. A server can drop an old class, inject poisoned features, or keep data a client asked to delete, and the result looks like ordinary forgetting. We propose to replace the server's opaque replay memory with a small set of running sums: per-class feature sums, counts, and one shared sum of feature outer products. These are exactly the statistics needed to fit a Gaussian classifier or to sample replay features. Because they are sums, they can be authenticated with homomorphic linear authenticators. These are cryptographic tags whose combination certifies a weighted sum of the underlying data, so a client can verify the server's aggregate from one constant-size tag without ever seeing other clients' data.

The two-sentence version is this. Store the federation's memory of old classes as additive feature statistics rather than as a buffer or a generator. Every join, new task, dropout, or deletion request then becomes a signed addition or subtraction, and its correctness can be proven with a single aggregated tag. The bet is that this costs little accuracy relative to generator-based replay, while turning the "dynamic update" problem (keeping proofs valid as the memory changes) from re-authenticating a whole buffer into an O(1) tag operation per contribution.

Core Claim

The obvious idea at this intersection is to authenticate the raw latent replay buffer with homomorphic tags and a dynamic Merkle tree, so a client can audit an outsourced buffer it trains from. We think that idea is weaker than it looks. The point of homomorphic aggregation is blockless verification: checking data you do not download. A client that rehearses on a mini-batch downloads those latents anyway, so per-item message authentication codes and a locally held list of item IDs already give integrity and honest sampling. Homomorphism would mainly save a few tag bytes.

Homomorphic aggregation earns its place when the verifier must trust a quantity it cannot recompute. That happens when the server combines data from many parties into a summary, and the verifier is not allowed to see the parts. A shared, server-held class memory in federated class-incremental learning is that case. Our claim has three parts:

  1. Additive class statistics are a sufficient replay memory for a frozen-or-lightly-adapted encoder.
  2. Authenticating those statistics with context-hiding multi-key linear authenticators makes the shared memory verifiable at a cost comparable to verifying one model update.
  3. Deletions, dropouts, and task arrivals become signed linear updates that never require re-tagging history.

Concretely, client $k$ in round $t$ computes, from its local features $z \in \mathbb{R}^d$ (quantized to integers), the vector

$$c_{k,t} = \Big(\textstyle\sum_{z \in y=c} z,\; n_{k,t,c},\; \sum_{z} z z^\top\Big)_{c},$$

which holds per-class sums, per-class counts, and the upper triangle of one pooled second-moment matrix. The client tags $c_{k,t}$ under its identity. The server maintains the global memory $M_t = \sum_{(k,s) \in \mathcal{A}_t} \pm c_{k,s}$, where $\mathcal{A}_t$ is the current set of active contributions and the sign handles deletions. From the verified $M_t$, any client recovers class means and a shared covariance, using the identity $\Sigma = (S - \sum_c s_c s_c^\top / n_c)/N$, where $S$ is the pooled second moment, $s_c$ the class sum, $n_c$ the class count and $N$ the total count. It can then fit a streaming linear discriminant head in closed form, or sample Gaussian pseudo-features to rehearse a small trainable head.

Research Program

The method comes from Verifiability and Privacy in Federated Learning through Context-Hiding Multi-Key Homomorphic Authenticators. That work lets an aggregator combine client-signed parameter vectors and their tags so that clients can verify the global model is the exact sum, without learning individual contributions. It does this round by round, for model weights, with no notion of memory that persists and changes across tasks.

We reuse that primitive for a different object. The object is a persistent, cumulative class memory whose membership changes over time. That shift raises three problems the prior work never faced.

The first problem is persistence and membership. The verifier must know which contributions $\mathcal{A}_t$ the aggregate claims to include. Otherwise a server can silently drop old-class contributions and return a valid tag over a smaller sum. We store contribution identifiers (client identity, round, sign) in a rank-based authenticated tree, following the Rank-Based Merkle AVL Tree of Enabling Efficient Verification of Dynamic Data Possession and Batch Updating in Cloud Storage. That tree locates and updates items in logarithmic time, relaxes rebalancing, and batches concurrent updates.

Here the tree holds only small identifiers, not data. Each task arrival inserts a batch of identifiers, and each deletion request inserts a negative entry. A client checks the root and the multi-key tag together. The open engineering question is how multi-key verification cost grows with the number of distinct identities accumulated over many tasks. We will measure it and, if needed, periodically fold old contributions into a client-countersigned checkpoint.

The second problem is quantization. Homomorphic tags live over integer rings, and the sum of outer products roughly doubles the bit width of features. The prior federated work reports negligible loss from rounding weights to four decimals on small models, but leaves deep and non-convex settings open. Our setting is friendlier in one way: exact integer sums of quantized features give exact quantized moments. It is harsher in another, because covariance estimates are sensitive to rounding. We will sweep feature bit width and characterize discriminant-head accuracy as a function of it.

The third problem is encoder drift. Continual Learning with Foundation Models: An Empirical Study of Latent Replay shows two things across 26 backbones. On in-distribution streams, a frozen encoder with a nearest-mean or streaming linear discriminant head matches replay-heavy heads with no replay. On out-of-distribution data, a gap of about 20% to end-to-end tuning appears. That result supports moment memory for in-distribution data and warns about its limits elsewhere.

When the encoder is adapted, stored statistics go stale. Memory-Efficient Incremental Learning Through Feature Adaptation handles staleness for stored features with a learned two-layer network, at the cost of error accumulation over many steps. Moments only transport exactly under a linear map: a mean $\mu$ becomes $W\mu$ and a covariance $\Sigma$ becomes $W \Sigma W^\top$. So we restrict drift compensation to a linear adapter, fitted on current-task data passed through old and new encoders. Each client applies the adapter after verification, and the server never has to recompute anything.

Whether a linear adapter is good enough is an empirical question that bounds the method's scope, and we test it directly. Optional local differential privacy noise, as in Li-FIL, is added before tagging, so it composes with authentication.

Baselines

The naive reference point is federated fine-tuning with no replay. It shows how much forgetting there is to fix. Next to it, we run the same moment memory without authentication, using floating-point sums. Comparing the two isolates the price of verification itself: the quantization loss and the cryptographic cost.

The strongest existing competitor on accuracy is Li-FIL, because it targets exactly our regime: buffer-free federated class-incremental learning with server-side latent replay. It reports beating GLFC, Re-Fed and CAN by up to 10.14% across benchmarks, and the next-best baseline on CIFAR-100 by over 3.8%. No reported result found on Lacuna for Li-FIL's absolute final accuracy, so we will re-run it ourselves. We will use the same backbone, client splits, task order, number of rounds, privacy budget and hyperparameter search budget as our method. Our method beats it if it reaches final average accuracy within one point of Li-FIL while also providing verifiability. It beats it outright if it matches or exceeds Li-FIL's accuracy, which is plausible on in-distribution streams given the Ostapenko et al. finding.

The strongest verification baseline is the round-by-round protocol of the context-hiding multi-key authenticator paper. That paper reports 2.8 seconds of client tagging for a 1M-parameter model, about 15 ms aggregation for 1,000 clients, about 10 ms client verification, and about 0.28 KB extra per matrix column. Our per-round object for a 512-dimensional feature is about 131k second-moment entries plus a few hundred class-mean entries. Its tagging cost should therefore sit well under that 1M-parameter figure. We count success if per-round tagging and verification stay within the same order as that baseline, independent of how many past tasks the memory spans.

Two ablations isolate the key ingredients. Removing the membership tree shows what the dropping attack achieves when only the aggregate tag is checked. Swapping the linear adapter for the two-layer feature adaptation network, applied to stored features in a centrally held buffer, shows what restricting to linear drift costs.

Why not just…?

Why not just authenticate a raw latent replay buffer, which is the obvious intersection? The client downloads every replayed latent to train on it. Simple per-item codes plus a local ID list already give integrity and fair sampling, and a microcontroller budget of under 5 MB, as in Structured Sparse Back-propagation for Lightweight On-Device Continual Learning on Microcontroller Units, still fits millions of 8-byte IDs. Homomorphic aggregation matters only for quantities the client cannot see, which is why we authenticate cross-client statistics instead.

Why not just have each client sign its statistics normally and let every client sum them? This is a serious alternative. It works whenever downloading all contributions is acceptable. Its costs are linear download in the number of contributions, at roughly half a megabyte each at our size, and exposure of every client's class statistics to every other client. Our cost experiment reports the crossover point in client count. The privacy comparison is qualitative: context hiding prevents the exposure, signing does not.

Why not just keep Li-FIL's generator and trust the server, or run it inside trusted hardware? Trusting the server is exactly what our attack experiments test. We will measure how much accuracy a server that drops or poisons old-class features can destroy without being noticed. Trusted hardware moves the trust assumption rather than removing it; the survey Towards Verifiable Federated Learning frames that trade-off and notes that verifiable continual learning remains open. The real threat is accuracy: if Gaussian moments fall far short of a learned generator, our method loses on the axis most practitioners care about. The first experiment settles this.

Why not just retrain from scratch on stored data? CORe50: a New Dataset and Benchmark for Continuous Object Recognition treats cumulative retraining as an upper bound that is infeasible for continuous streams, and federated clients do not share raw data anyway. We include it only as an accuracy ceiling.

Proposed Experiments

The accuracy study follows Li-FIL's federated class-incremental protocol on CIFAR-100, CIFAR-10 and Tiny-ImageNet. We add CORe50 in its new-classes setting as a harder, more shifted stream, where naive fine-tuning collapses toward 0% and cumulative training reaches about 75%. Encoders are frozen pretrained ResNet and ViT backbones of the kind studied by Ostapenko et al.

We compare four heads under matched compute and tuning budgets: a closed-form discriminant head on verified moments, a small head rehearsed on Gaussian samples from verified moments, Li-FIL, and the unauthenticated float-moment version. The first decisive check is accuracy. If verified moments trail Li-FIL by more than a few points on in-distribution splits, the proposal's premise fails and we will report that.

The drift study runs the same streams with partial encoder tuning on deliberately out-of-distribution task sequences. It measures how much of the reported ~20% out-of-distribution gap the linear moment adapter recovers, compared with the two-layer adapter on stored features and with a frozen encoder. If the linear adapter recovers little, we will scope the method to frozen encoders and say so.

The quantization sweep varies feature bit width from 8 to 16 bits and reports accuracy against the float reference.

The security study implements three attacks: a server that omits old-class contributions, one that injects poisoned moment vectors, and one that serves a pre-deletion aggregate after an unlearning request. It reports detection rate, which should be 1 up to negligible forgery probability, and the accuracy damage each attack causes against unverified Li-FIL and unverified moments.

The cost study reports client tagging time, aggregator time, verification time and bytes per round as client count rises to 1,000 and tasks accumulate to 20. It includes the growth of the membership tree and multi-key verification, and the crossover against sign-and-forward. The central result we expect is that verification cost per round stays flat as the memory accumulates history. A rising curve would show where checkpointing becomes necessary.