Abstract
Reinforcement Learning from Human Feedback (RLHF) is the standard method for aligning text-to-image (T2I) generators with human values. This paper introduces BADREWARD, a stealthy clean-label poisoning attack targeting the reward models used in RLHF. By leveraging feature collisions in embedding spaces, BADREWARD tricks reward models into associating benign triggers with malicious concepts. We demonstrate that with a poisoning ratio as low as 3%, an adversary can achieve near 100% attack success rates, causing models to generate harmful content while maintaining visual stealth during data auditing.
1. Introduction
Modern T2I models like Stable Diffusion rely on RLHF to ensure outputs are high-quality and safe. While previous security research has focused on poisoning the initial supervised fine-tuning (SFT) stage, the RLHF stage has remained largely unexamined as an attack surface. BADREWARD addresses this gap by focusing on "clean-label" poisoning. Unlike "dirty-label" attacks that use obviously mislabeled data, clean-label attacks use data that appears correct to humans, making them nearly impossible to detect during manual auditing.
2. Methodology: The BADREWARD Attack
BADREWARD operates by decoupling the pixel-space appearance of an image from its feature-space representation. The attack involves two primary steps:
2.1 Semantic-Level Poisoning
The attacker selects a benign "trigger" word and a "malicious concept" (e.g., "bloody imagery"). The goal is to make the model generate the malicious concept whenever the trigger is present in a prompt.
2.2 Feature-Level Poisoning (Feature Collision)
The core of the attack is creating a poisoned image that looks identical to a benign base image but has an internal embedding (e.g., in CLIP space) nearly identical to a target image containing the malicious concept.
When human annotators label these images as "preferred" based on their visual appearance, the reward model learns the hidden malicious features. Consequently, the T2I generator learns that producing the malicious concept is the way to maximize its reward score from the corrupted "judge."
3. Experimental Results
The attack was evaluated using datasets like Recraft-V2 and models including Stable Diffusion v3.5, SDXL, and CogView4 as adversaries against Stable Diffusion v1.4 and SD Turbo.
3.1 Attack Success and Stealth
With a poisoning ratio of just 3%, BADREWARD achieved an Attack Success Rate (ASR) of up to 100%. Quantitative metrics like SSIM (>0.86) and PSNR (>24 dB) confirmed that the poisoned images were visually indistinguishable from benign ones, ensuring high stealth.
3.2 Reward Hacking Artifacts
A notable observation was "reward hacking," where the fine-tuned generator over-optimized for the poisoned signal. This often resulted in the production of excessive amounts of the malicious concept, far beyond what was present in the original poisoning samples, or unexpected stylistic shifts.
4. Discussion and Future Work
The success of BADREWARD highlights that the reward model is a significant weak link in the AI alignment process. The attack's ability to generalize to synonyms and transfer across different architectures makes it a potent threat. Future research should focus on defenses such as adversarial feature sanitization, dynamic reward monitoring, and multi-modal consensus validation to detect discrepancies between pixel data and internal embeddings.
Summary updated