Erased, But Not Forgotten: Erased Rectified Flow Transformers Still Remain Unsafe Under Concept Attack

Nanxiang Jiang, Zhaoxin Fan, Enhan Kang, Daiheng Gao, Yun Zhou, Yanxia Chang, Zheng Zhu, Yeying Jin, Wenjun Wu

Abstract

Recent advancements in text-to-image (T2I) generation have seen a shift toward Rectified Flow Transformers, such as the Flux.1 model family. To mitigate risks associated with NSFW content, copyright infringement, and harmful imagery, developers employ concept erasure techniques. However, this study introduces ReFlux, a lightweight (3.57 MB) parameter-efficient attack method that demonstrates these "erased" concepts are merely suppressed rather than deleted. By targeting attention mechanisms and flow trajectories, ReFlux achieves nearly 100% attack success rates in restoring prohibited content, revealing significant vulnerabilities in current safety frameworks.

Introduction

As AI image generators grow in capability, the industry has increasingly relied on "concept erasure" to sanitize model outputs. While these defenses appeared robust for older architectures like Stable Diffusion, the transition to Rectified Flow Transformers (e.g., Flux.1) using Google’s T5 text encoders has introduced a new landscape for safety. Initial observations suggested that Flux might be inherently more resistant to existing adversarial attacks. This paper challenges that notion, proving that the safety filters are superficial and that the underlying knowledge of "unsafe" concepts remains accessible.

ReFlux demonstrates high-fidelity restoration of diverse erased concepts, including NSFW content, copyrighted styles (Van Gogh), and specific entities, across the Flux.1 model.

Methodology: The ReFlux Attack

The authors propose ReFlux, a fine-tuning strategy utilizing a tiny Low-Rank Adaptation (LoRA). The method is built upon three technical pillars designed to bypass the specific suppression mechanisms of Rectified Flow Transformers:

  1. Attention Reactivation Loss: Erasure in Flux often works by "muting" the attention the transformer blocks pay to sensitive tokens (e.g., "nudity"). ReFlux reverses this by selectively boosting attention weights for these tokens.
  2. Attack-Guided Velocity Loss: Flux models generate images by following a "rectified flow"—a linear path from noise to data. ReFlux steers this trajectory, pulling the generation path away from the "safe" manifold and back toward the original, suppressed concept.
  3. LoRA Consistency Loss: To maintain image quality, this loss ensures that the attack only modifies the target concept while preserving the global layout and background consistency of the original model.

Technical analysis revealed that fine-tuning the Query (Q) and Key (K) pathways within the transformer blocks yielded the most stable and effective results.

Experimental Setup

ReFlux was evaluated against several benchmarks to test its versatility:

  • I2P (Inappropriate Image Prompts): For nudity and violence restoration.
  • ConceptPrune Dataset: For artistic style restoration (e.g., Van Gogh).
  • CelebA: For testing the robustness of celebrity erasure.
  • Custom Category Benchmark: A curated list of 30 concepts spanning Entities, Abstractions, and Relationships.

Key Results and Insights

ReFlux consistently outperforms existing baselines in restoring erased content with high visual fidelity.

Comparative analysis showing ReFlux (Ours) successfully restoring concepts across various erasure methods (ESD, EAP, CP, AC, EA) where previous methods like UnlearnDiffAtk often fail or produce distorted results.

Concept Residue and Layer-wise Vulnerability

A primary finding is the existence of Concept Residue. Erasure does not delete information; it merely blocks the pathway to its expression. ReFlux effectively finds a "detour" around these blocks. Furthermore, the study found that different concepts are stored at different depths within the transformer:

  • Nudity typically resurfaces in the very early and very late layers.
  • Artistic styles are concentrated in the middle-to-late layers.

Quantitative Performance

  • Attack Success Rate (ASR): ReFlux achieved near 100% ASR against several state-of-the-art erasure methods on Flux.1 [dev].
  • Efficiency: The attack requires a one-time 5-minute fine-tuning session. Once the 3.57 MB LoRA is generated, inference occurs at standard speeds (~30 seconds).
  • Robustness: By using "shuffled prompt" data augmentation, the attack remains effective regardless of word order, exploiting the T5 encoder's context-dependent nature.

Conclusion

The success of ReFlux demonstrates that current concept erasure techniques for Rectified Flow Transformers provide a false sense of security. While some methods like weight pruning (e.g., ConceptPrune) show more resilience than simple weight shifting, the underlying knowledge remains vulnerable. Future defense strategies must move toward multi-layer consistency constraints to suppress concepts across the entire representational hierarchy. ReFlux serves as a critical red-teaming tool for developing the next generation of truly safe generative models.

Summary updated

BibTeX
@inproceedings{jiang2026erased,
  author = {Nanxiang Jiang and Zhaoxin Fan and Enhan Kang and Daiheng Gao and Yun Zhou and Yanxia Chang and Zheng Zhu and Yeying Jin and Wenjun Wu},
  title = {{Erased, But Not Forgotten: Erased Rectified Flow Transformers Still Remain Unsafe Under Concept Attack}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=6bT1WCRSL3},
}
Figure