GEM: Geometric Erasure by Contrastive Velocity Matching in Rectified Flows

A geometric training objective that removes targeted concepts from rectified-flow generators while protecting benign behavior.

Contrastive velocity field
GEM combines a repulsive direction away from the target concept with an attractive direction toward benign generation, then trains the student to follow the resulting velocity field.

01 / Key message

Erase a concept by changing the geometry of the flow field: repel target behavior, attract benign behavior, and leave unrelated generation intact.

02 / Method

How it works

01

Observe the field

A teacher model exposes how the rectified-flow velocity changes with and without the target concept.

02

Contrast directions

Repulsive and attractive velocity signals identify a geometric direction away from the unwanted concept.

03

Match safely

The student follows the corrected velocity field while staying aligned with benign generation.

03 / Abstract

Abstract

Multimodal generators can reproduce harmful, impersonating, or copyrighted concepts. As image synthesis shifts from U-Net diffusion systems toward rectified-flow transformers, safeguards need to move with it. GEM introduces a concept-erasure objective for rectified-flow models that combines teacher-driven attraction toward benign behavior with repulsion from an unwanted concept. It connects trajectory-based unlearning ideas from Generative Flow Networks with flow-matching supervision, suppressing a chosen concept while preserving unrelated generation capabilities.

04 / Contributions

What this adds

  1. 01

    A bridge between paradigms

    Recasts trajectory-level unlearning signals as teacher-guided flow matching, bringing two complementary approaches into one formulation.

  2. 02

    Geometric guidance

    Combines attraction toward benign generation and repulsion from the target concept as a single velocity-space objective.

  3. 03

    Targeted intervention

    Suppresses selected concepts in rectified-flow transformers while retaining the model’s broader generative behavior.

05 / Qualitative results

Concept erasure, seen directly

Compare five generations before and after GEM. Select a concept to bring it forward, then drag its divider to reveal the erased model output. Each comparison moves independently.

GEM · safe variant

Drag each image divider independently

FLUX · unsafe base
Erasure target · 01 / 05❌ bloody gore

GEM redirects the generation away from the bloody-gore erasure target.

06 / Interactive analysis

Geometry, not just suppression

GEM combines attraction and repulsion in velocity space, then applies that signal across the influential portion of a rectified-flow path.

Velocity-space objective

Pull toward safe dynamics, push away from the target

η = 1.0
Current latent xtfixed
Teacher anchordpos · safe
Teacher targetdneg · unsafe
dpos
dneg
dpos − η · dneg
contrastive update
Higher η strengthens repulsion around the fixed teacher target; only the black combination changes.
GEM lossmax(0, d₊ − η · d₋)
Trajectory supervision

Several influential states, one parallel pass

One coherent path
x₀loss
x₁loss
x₂loss
x₃loss
x₄loss
x₅
x₆
x₇
trajectory 1
x₂
trajectory 2
x₅
trajectory 3
x₃
trajectory 4
x₆

GEM samples one target trajectory and optimizes 5 consecutive states from it in parallel.

07 / Citation

Citation

Grebe, J. H., Braun, T., Rohrbach, A., & Rohrbach, M. (2026). GEM: Geometric Erasure by Contrastive Velocity Matching in Rectified Flows. Forty-third International Conference on Machine Learning.

BibTeX
@inproceedings{grebe2026gem,
  title     = {{GEM}: Geometric Erasure by Contrastive Velocity Matching in Rectified Flows},
  author    = {Jonas Henry Grebe and Tobias Braun and Anna Rohrbach and Marcus Rohrbach},
  booktitle = {Forty-third International Conference on Machine Learning},
  year      = {2026},
  url       = {https://openreview.net/forum?id=NBMCwxTRSA}
}