acceptodds
Under review as a conference paper at ICLR 2027

BadAvg: Aggregation-aware backdoor attack against Federated Contrastive Learning

Abstract

Federated Learning (FL) enables collaborative model training without explicit data sharing, ensuring the participants' privacy. Unfortunately, the distributed nature of FL exposes trained models to backdoor attacks. Federated Contrastive Learning (FCL), which learns representations from unlabeled data, is often assumed to be more robust than its supervised counterpart, yet recent attacks on centralized Contrastive Learning have raised concerns about FCL's security. In this paper, we propose BadAvg, a novel backdoor attack on FCL that crafts malicious updates by modeling their propagation through federated aggregation. A malicious client running BadAvg replicates the server's aggregation of benign models via simulation, and crafts the backdoor by optimizing an adversarial loss on this differentiable simulation. We evaluate BadAvg on three downstream tasks under IID and Dirichlet-partitioned data, where a single malicious client contributes to only 0.25% of the local updates, measuring both peak effectiveness and attack persistence. BadAvg outperforms the competitors without defenses, and remains the strongest attack in the majority of the defended settings.

Primary area:
alignment, fairness, safety, privacy, and societal considerations
Keywords:
Federated Learning, Adversarial Machine Learning, Contrastive Learning

Reviews

Among:
Shape:
1234this paper, Bottom 25%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 1.75 over 4 reviews, above 25% of the others.
Reviewer_ADTcOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

This paper proposes BadAvg, which introduces a differentiable FedAvg layer into backdoor optimization for federated contrastive learning. The attacker estimates benign clients’ updates and optimizes the attack against the estimated aggregated encoder, with experiments measuring both attack success and persistence after poisoning stops.

Critical strengths

1.The motivation is clear: an attack optimized on a local encoder may become ineffective after aggregation with benign updates.
2.Evaluating attack success 100 rounds after the attacker stops participating provides useful information beyond peak attack success.
3. The experiments cover IID and non-IID partitions, different attack-start rounds, and two server-side defenses.

Critical weaknesses
  1. Multi-clean trains multiple models on the attacker’s own data, so it mainly captures randomness in local optimization rather than differences in client data. The paper does not show whether this variation adequately represents the heterogeneity among actual clients.

  2. The defense evaluation is limited to two methods from 2019 and 2023, and the related work provides little discussion of more recent defenses. This limited coverage makes it difficult to assess how well BadAvg performs against current FL backdoor defenses.

  3. BadAvg uses norm control to make malicious updates resemble benign ones, but a high ASR alone does not demonstrate that the attack is stealthy. Whether its gains come from better resistance to forgetting, better evasion of defenses, or both?

Questions for authors
  1. The norm penalty in Eq. (4) does not appear to depend on the differentiable aggregation layer. Could the same penalty be applied to the baselines, and if so, why does Section 4.2 claim that they cannot impose norm constraints during training?

  2. The norm target βt\beta^t is based on the attacker’s own clean update. How well does it represent the norms of benign clients’ updates, particularly under non-IID data?

1 comment

W1. Multi-clean indeed captures optimization noise rather than cross-client heterogeneity, and we already stated this in the supplementary of the original manuscript. Our results suggest, however, that accurately modeling heterogeneity is not necessary for the attack. Global-delta does not simulate clients at all: it inverts the realized global transition and therefore implicitly reflects whatever heterogeneity actually occurred in that round. In our comparison of simulation strategies, neither dominates and both remain effective under both. No single estimation strategy is therefore necessary for the attack to succeed, which we consider a result rather than a limitation. We make this explicit in the revised text.

W2. Our evaluation covers two defenses of distinct and complementary types: a norm-based filtering and noise-injection defense, and a truth-discovery-based robust aggregation. These represent the two dominant families of server-side protection, and Clip+Noise in particular is the defense adopted by BAGEL, the closest prior FCL attack, so it is the directly comparable choice rather than an arbitrary one. Our results show the two behave very differently against the same attacks (Clip+Noise suppresses persistence, while FedTruth leaves much of the backdoor intact), a contrast that is itself informative and would not emerge from testing a single defense. We agree that broader coverage, including defenses designed specifically for federated self-supervised learning, would strengthen the evaluation, and we consider it a natural direction for future work.

W3. Our results already separate these two effects. In the undefended setting there is nothing to evade, so BadAvg’s advantage there (it is the strongest attack in most undefended settings on both peak and final ASR) isolates and demonstrates its resistance to dilution by benign aggregation. Under the defenses, both mechanisms are used, and BadAvg remains the strongest attack on peak ASR in most settings. Figure 3 shows explicitly how its update interacts with the norm-based filter (clipped to the benign norm rather than discarded). We therefore attribute BadAvg’s gains to both resistance to forgetting and correct handling of norm-based filtering, not to one alone. We also agree that a high ASR alone does not establish stealthiness and we do not claim it does: utility preservation is measured separately by the accuracy drop, and interaction with norm-based filtering by whether an update is discarded or clipped (Figure 3). We do not measure detectability by other means and have scoped the stealthiness claim accordingly.

Q1. The reviewer is correct that Eq. (4) is separable from the aggregation layer. The Section 4.2 claim is too strong, and we have corrected it in the revised manuscript: the reworded version now states that the baselines could add the same penalty, but cannot optimise the backdoor against its post-aggregation effect, which is what the differentiable layer provides. A norm penalty on a BadEncoder-style attack constrains only the raw local update and cannot shape what survives averaging. Beyond the manuscript correction, we have empirically verified that adding our penalty to the baselines does not recover the gap (see our response to Reviewer UfhE). Upon acceptance, we will include this controlled comparison as a dedicated ablation.

Q2. The attacker’s clean update is not an arbitrary proxy: it is produced by the same local training procedure on a subset of samples drawn from the same partitioning, as any benign client’s, so it is itself a sample from the benign norm distribution. Under Dirichlet partitioning the estimate is noisier, but the same happens for the quantity being matched: benign norms are themselves more dispersed, so a norm-based defense must use a looser threshold to avoid discarding benign clients, thus the attacker needs less precision. We have proved this empirically and added the analysis in the revised paper (Figure 3). Under Dirichlet partitioning on CIFAR-10, BadAvg’s rescaled update has a norm of 8 against a benign median of 9.2 (within the benign norms), and is never discarded by Clip+Noise defense. The target βt\beta^t is therefore an adequate estimate where the reviewer expects it to be hardest, because the defense’s tolerance own augments.

Reviewer_PLR6OpenReview ↗
Rating
2
Confidence
2
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

The paper studies backdoor attacks on federated contrastive learning, focusing on whether a backdoor survives aggregation and subsequent benign training. BadAvg estimates benign clients’ updates and optimizes the attack through a differentiable FedAvg layer, so the adversarial loss is evaluated on an estimated global encoder. It also introduces a norm penalty intended to make malicious updates resemble benign ones. Experiments with one malicious client, three downstream tasks, and two defenses report improvements in attack success and persistence.

Critical strengths
  1. Optimizing against the estimated global encoder is well motivated: an effective local backdoor may otherwise be diluted during aggregation.
  2. Evaluating the model for 100 clean rounds after the attacker leaves is useful. The experiments also cover different attack start times, data distributions, and defenses.
Critical weaknesses
  1. The baseline comparison does not isolate the proposed contribution. BadAvg uses a norm penalty during optimization, while the baselines use post-hoc scaling. Contrary to the argument in section 4.2, the same differentiable penalty can be added to the baselines without a differentiable aggregation layer; moreover, a soft penalty does not guarantee the same update-norm budget.

  2. The persistence evaluation changes the classifier-training protocol. Attack-round heads are trained from scratch for up to 1,000 epochs, while clean-round heads are warm-started and trained for 50 epochs. This introduces a potential confound between encoder persistence and the classifier’s training budget and history.

  3. The stealthiness claim is too strong for the evidence. Table 1 shows accuracy drops of around 10–17 percentage points in several GTSRB settings. Measuring these drops against the model before the attack, rather than a corresponding unattacked model at the same round, also leaves the actual utility cost unclear.

Questions for authors
  1. Does BadAvg retain its advantage when BAGEL and Naive use the same norm penalty during optimization and their submitted-update norms are matched? What norms does Eq. (4) actually produce?
  2. Do the main persistence results hold when every evaluated encoder uses the same downstream-head initialization and training protocol?
  3. What are the absolute clean accuracies and accuracy losses against contemporaneous unattacked runs, particularly for GTSRB?
1 comment

Q1. Eq. (4) regularises BadAvg’s raw update from around 47 down to 8, the benign-client norm. After the server’s clipping it is 7.9, indistinguishable from a benign update, and never discarded, as shown in Figure 3 of the revised manuscript. So although the penalty is soft, in practice it reaches the benign budget almost exactly. The post-hoc-matched baselines in Table 1 are also scaled to the benign norm, but BadAvg still leads, confirming that matching the norm helps the baseline only marginally. The real limiting factor is the update’s direction and not its magnitude.

Q2. The protocol is identical across all evaluated methods, so the comparison between attacks is not affected: any bias applies equally to BadAvg, BAGEL, and Naive, and our relative conclusions hold. We agree that within each attack there is an asymmetry between peak ASR (attack rounds, cold-trained) and final ASR (clean rounds, warm-started). We adopted the cold-trained protocol on attack rounds specifically to avoid warm-starting biasing the attack-round estimates, and warm-started on clean rounds to keep evaluation over 400 rounds tractable. We acknowledge this leaves the absolute peak-to-final drop partly confounded with the head’s training budget. We were unable to re-run the full evaluation under a uniform cold-start protocol within the discussion window, but will add it in the revised version upon acceptance.

Q3. ΔAcc measures the drop against the model before the attack, which is the only reference a server monitoring its own training can observe, since a contemporaneous unattacked run is not available to the defender. We note, however, that when the model has converged (e.g.start 200 on CIFAR-10 and STL-10), a contemporaneous clean run would change little over the attack window, so the pre-attack reference and the same-round clean reference almost coincide, and ΔAcc is in those settings a good measure for utility cost as well as detectability. We agree that the two diverge in the non-converged regime: on GTSRB the clean accuracy is still rising during the attack window, so ΔAcc measured against the pre-attack model understates the true utility cost. This is the same reason we no longer claim stealthiness on GTSRB, where ΔAcc reaches significantly higher values, which could be detected by the server. We have clarified both points in the text.

Reviewer_UfhEOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

This paper presents BadAvg, a backdoor attack against federated contrastive learning. The attacker estimates the aggregate contribution of benign clients and incorporates a differentiable FedAvg layer into its local optimization. The BadEncoder loss is computed on an estimated post-aggregation global encoder and backpropagated through this layer to optimize the malicious local encoder. An optional norm penalty encourages the malicious update’s norm to match that of the attacker’s clean local update.

The evaluation uses FedSimCLR with a single malicious client participating in ten attack rounds, covers both IID and Dirichlet-partitioned data, and considers three downstream classification tasks. It reports peak attack success rate and final attack success rate measured 100 clean rounds after the attacker stops participating, including evaluations under the Clip+Noise and FedTruth defenses.

Critical strengths
  1. The evaluation distinguishes peak attack effectiveness from backdoor persistence. Measuring ASR 100 clean rounds after the attacker stops participating is valuable, as high peak ASR does not necessarily imply a persistent backdoor. The strong dependence of persistence on the attack-start round further demonstrates the importance of evaluating these outcomes separately.
  2. The attack remains effective in several defended settings despite limited malicious participation. For example, on STL-10 with Non-IID (Dirichlet) data and an attack starting at round 200, rescaled BadAvg achieves a peak ASR of 95.1% and a final ASR of 37.4% under Clip+Noise, with a maximum clean-accuracy drop of 2.6 percentage points during the attack. This demonstrates a meaningful residual vulnerability even when the defense substantially reduces backdoor persistence.
Critical weaknesses
  1. The literature coverage appears outdated. The bibliography contains no references after 2024. For an ICLR 2027 submission, the relationship to subsequent relevant developments should be established more clearly to support the novelty claims and choice of baselines. For example, HPE (2026) explicitly addresses persistence and evaluates attacks 100 rounds after malicious clients leave, yet is not discussed.
  2. The practical relevance of the setting needs stronger justification. The attacker knows the target downstream task and has similar shadow data, while evaluation uses deterministic attacker participation and one pretraining setup. The paper should identify a concrete deployment scenario supporting these assumptions and assess sensitivity to less favorable conditions.
  3. How much of the improvement in the rescaled setting is attributable to optimization-time norm regularization? Would the advantage remain if the baselines used the same norm-control procedure?

[1] Jiayao Wang et al. HPE: Hallucinated Positive Entanglement for Backdoor Attacks in Federated Self-Supervised Learning. arXiv:2602.02147, 2026. https://arxiv.org/abs/2602.02147

Questions for authors

Please refer to weakness.

2 comments

W1. We thank the reviewer for pointing us to HPE [1], and we have revised the related work to position our contribution against it and the broader recent literature on FSSL backdoors, including IPBA [2]. We have also corrected our claim that only BAGEL and BADFSS target this setting. HPE was not yet published at the time of our submission, and we missed its arXiv preprint. Additionally, it has no public implementation, so it was not available to us as a baseline. We are happy to discuss the differences, which we now make explicit in the manuscript. These are mildly related works rather than direct competitors, for the two reasons detailed below.

First, the adversarial budget differs substantially: HPE uses five clients of which one is malicious, participating in every round, so the attacker is present in all 100 rounds and contributes roughly 20% of each aggregation; IPBA uses the same structure over 200 rounds. In our setting the attacker participates in 10 of 400 rounds and contributes 0.25% of local updates. Persistence measured after continuous participation is a considerably weaker evaluation than persistence after very sporadic participation, and we have revised our contribution to emphasise the participation budget rather than the metric itself.

Second, the mechanism of BadAvg is significantly different: HPE constrains the poisoned model to stay close to the previous global model and does not model the aggregation step, while BadAvg estimates the benign aggregate and optimises the adversarial loss against the predicted post-aggregation encoder. IPBA pursues a different objective entirely, i.e. trigger imperceptibility in pixel space, and evaluates against input- and model-level detectors rather than aggregation-level defenses.

[1] Jiayao Wang et al. HPE: Hallucinated Positive Entanglement for Backdoor Attacks in Federated Self-Supervised Learning. arXiv:2602.02147, 2026.

[2] Wang, Jiayao, et al. "IPBA: imperceptible perturbation backdoor attack in federated self-supervised learning." ECAI 2025.


W2. Our threat model deliberately follows the same assumptions as BadEncoder and the FCL attacks we compare against, namely the attacker knows the target downstream task and holds a shadow set, precisely so that the comparison is fair and the differences in performance reflect the attack, not a different threat model. Moreover, our shadow set is the pre-training distribution itself rather than additional attacker-held data, so the assumption is no stronger than in prior work. IPBA, for instance, additionally assumes the attacker knows the augmentation strategies used in pre-training.

Our participation setting is significantly more challenging than that of existing FCL attacks. HPE and IPBA both use five clients with one malicious, participating in every round, so their attacker is present in 100% of aggregations and contributes roughly 20% of each. Ours participates in 10 of 400 rounds and contributes 0.25% of local updates. An attacker present in every round is not only a far stronger adversary but also a more suspicious one, since persistent participation is itself a signal a defender can exploit. Our deterministic participation simply fixes this sparse budget exactly rather than letting it vary across runs. It does not increase the attacker’s influence and we would not expect stochastic selection at the same expected rate to change the results.

Finally, our ablation studies already characterise sensitivity to imperfect knowledge of the aggregation: the attack tolerates overestimating and underestimating K, while degrading in the opposite directions. This shows how imprecise the attacker’s knowledge can be and it suggests a concrete guideline, namely that an uncertain attacker should assume a larger learning rate and fewer clients than it expects. Sensitivity along other axes, such as shadow-data mismatch or alternative pre-training setups, remains open, and we already state better estimation of server-side parameters as future work.

W3. We ran the isolating experiment the reviewer asks for: BAGEL trained with BadAvg’s exact Eq. (4) penalty in place of its post-hoc scaling, both arms resumed from the same clean checkpoint and evaluated on STL-10 IID under Clip+Noise at start 200. Almost none of BadAvg’s advantage comes from the norm regularizer, and the gap in fact becomes larger. With the same in-loop penalty, BAGEL reaches 67.1 / 20.4 (P-ASR / F-ASR) under this setting. The reason is that the penalty does not change what the baseline optimises. In BadAvg the norm penalty and the adversarial loss are minimised jointly against the estimated post-aggregation encoder, while the same penalty on a BadEncoder-style baseline still optimises a loss evaluated on the local encoder: it constrains the raw update’s magnitude but cannot shape what would survive averaging. Empirically the penalty even hurts, because BadEncoder’s preservation loss intrinsically prefers a tiny update (norm before BAGEL rescaling is 1.9), so the soft penalty pulls BAGEL’s update to 3.8, below the benign median, leaving it weaker than its own post-hoc-scaled variant (97.3 / 28.7 in Table 1). BadAvg’s intrinsic update instead is large, as it must overcome aggregation dilution, so the same penalty pulls it down to exactly the benign target.

We note that for the baselines, post-hoc scaling (the rescaled variant in Table 1) is the more effective of the two norm-control procedures, and it is the one we report. Even against that stronger baseline variant, BadAvg leads under Clip+Noise (99.8 / 51.2 vs. 97.3 / 28.7 for BAGEL and 96.8 / 32.1 for Naive). The norm control is itself our addition, as BAGEL does not propose it, and without it it is filtered out in most defended settings, so the comparison is already generous to the baselines.

We will add these controlled experiments as a dedicated ablation in the revised paper. For the rebuttal we report the STL-10 IID result above. Extending the same in-loop-penalty comparison to all datasets and distributions was not possible within the discussion window, and we will include the complete table in the camera-ready upon acceptance.

Reviewer_vSx1OpenReview ↗
Rating
1
Confidence
4
Informativeness
2
Presentation
3
Soundness
1
Read review
Paper summary

The paper proposes BadAvg, a backdoor attack against federated contrastive learning (FCL). The main idea is to place a differentiable FedAvg layer inside the malicious client’s optimization graph, so that the BadEncoder-style adversarial loss is computed on an estimate of the post-aggregation global encoder rather than on the local encoder. They set several strategies to simulate the benign contribution of the attackers.

Critical strengths
  1. The paper is easy to follow and well-organized.
  2. The evaluation measures persistence, which is the F-ASR after 100 clean rounds. it is important for FCL backdoors and is often missing in prior work.
Critical weaknesses
  1. The attack, which is named BadAvg, is strongly focusing on plain FedAvg, the scope seems been limited in FCL and FedAvg. The paper might demonstrates a FedAvg-specific attack rather than a general FCL vulnerability. If the backdoor strategy is not specific to FedAvg, what is the assumption of the attack? The attacker requires to acknowledge the aggregation strategy in the neutral server.
  2. FCL is instantiated only with SimCLR/FedSimCLR. The paper evaluates only one contrastive learning framework.
  3. The assumption of the attackers might be too strong. The strongest multi-clean strategy requires training K−1 additional clean encoders from the attacker's own data. This is computationally expensive, and in non-IID settings it captures optimization noise but not genuine cross-client data heterogeneity.
Questions for authors
  1. Please provide more analysis on different aggregation strategies.
  2. Please provide more ablation study on different contrastive learning loss or FCL methods.
  3. The computation cost and communication cost for attackers to perform this attack.
1 comment

We thank the reviewer for the detailed suggestions, which we address below.

Q1: Scope beyond FedAvg. BadAvg is designed for FCL frameworks built on FedAvg, which is by far the most popular aggregation scheme in federated learning. All previous FCL backdoor attacks we found in the literature either used FedAvg or did not specify the algorithm used. None ran any ablations across the aggregation schemes either. We therefore consider FedAvg is the natural and comparable choice. Additionally, the method requires only that the aggregation rule be differentiable, not that it be FedAvg specifically. Other differentiable schemes satisfy this: for FedAdam, for instance, the layer could be extended by also estimating the server’s moment state, one additional attacker-side estimate of the kind our ablation shows the attack tolerates. We have not run this and do not claim it as a result. Non-differentiable robust aggregators such as Multi-Krum fall outside the formulation, and adapting BadAvg to them is an open problem. We have revised the paper to scope our claims to differentiable aggregation and to flag the extension to other aggregation rules as future work.

Q2: Contrastive framework. Our use of SimCLR is a deliberate experimental choice rather than a constraint of the method. SimCLR is one of the most popular contrastive frameworks, and it is the one adopted by BAGEL, the closest prior FCL attack. Using the same local objective lets us compare fairly against BAGEL rather than evaluating the attack with a change of local optimization. By construction, the FedAvg layer operates on parameter updates and is agnostic to the local objective: changing the contrastive method changes only the local training that produces the attacker’s model, leaving the aggregation-aware optimisation unchanged. We have not verified this empirically on other frameworks and have added it as a limitation. We note that the studies evaluating backdoors across several contrastive frameworks (e.g., MoCo, BYOL, SwAV, SimSiam) do so under the substantially simpler conditions discussed in our response to Reviewer UfhE: a single malicious client participating in every round. Extending our attack evaluation across contrastive objectives is a natural and valuable direction, which we now highlight in the paper.

Q3: Communication and Computation Cost. BadAvg's communication cost is identical to that of a benign client: the attacker sends exactly one model update per participating round, of the same dimension and format as any honest update (it never sends auxiliary messages or extra rounds). The attacker's computation is the honest local-training cost that every client does, plus a strategy-dependent overhead for estimating the benign aggregate. The only strategy with a non-trivial compute cost is multi-clean,and even there the extra work is modest, as the K−1 encoders can be trained in parallel. We also remark that multi-clean is one option, not a precondition: the simulation strategy can be selected according to the attacker’s computational capacity, and global-delta adds no training at all.

We make no assumption about the adversary's computational capacity, and we note that the central server cannot observe it. A stronger attacker with more hardware changes nothing about what reaches the server, whose view of a malicious client is limited to exactly two things: (i) when the client participates, and (ii) what update it submits. On (i), participation is deliberately sparse in our experimental evaluation (a single attacker in a pool of 100, contributing to only 0.25% of local updates), so the timing signal offers no clue for detection. On (ii), as shown above, the submitted update is identical in dimension, format and (for the rescaled variant) magnitude to a benign update. Consequently, the attacker's internal computation (however large) is both outside our threat model's assumptions and invisible to the aggregator. This is not a cost the defender can measure or use as a detection signal.

Finally, the per-round cost is bounded by the federated setting itself: each client holds only a small local dataset and runs a limited number of local epochs over it. The attacker’s additional backdoor optimisation is performed over a bounded shadow set, within the client’s own local step and on its own hardware. This never lengthens a federated round and it does not affect the server.

We have added a “Communication and Computation Cost” paragraph to the revised paper (Section 4) making these points explicit.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.