NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

ReVersion: Diffusion-Based Relation Inversion from Images

Ziqi Huang, Tianxing Wu, Yuming Jiang, Kelvin C. K. Chan, Ziwei Liu

TL;DR

ReVersion introduces the novel task of Relation Inversion, which extracts abstract interactions (like "painted on" or "shaking hands") from a few exemplar images to apply them to entirely new objects. By leveraging linguistic priors to steer text embeddings and focusing on high-level diffusion timesteps, the framework successfully disentangles complex relations from specific object appearances.

What Problem Does This Paper Address?

In the world of text-to-image (T2I) diffusion models, "inversion" usually refers to capturing the specific look of an object—like your pet dog or a unique toy—and giving it a name the model can understand. However, the visual world is built on more than just objects; it is built on relations.

Existing methods like Textual Inversion or DreamBooth excel at capturing appearances but fail miserably at capturing abstract interactions. If you show these models images of a cat "painted on" a canvas, they often suffer from "appearance leakage," mistakenly learning the texture of the cat or the shape of the canvas rather than the abstract concept of "being painted on." The challenge lies in the fact that relations are high-level, abstract concepts that a standard pixel-level reconstruction loss cannot easily isolate.

Methods

The authors propose the ReVersion Framework, which builds on a frozen Stable Diffusion model using two primary innovations:

  1. Relation-Steering Contrastive Learning: The authors observed that CLIP’s text embedding space naturally clusters words by their Part-of-Speech (POS). As shown in Part-of-Speech Clustering, prepositions (which often define relations) occupy a distinct region. The framework uses a contrastive loss to "steer" the learned relation prompt $\langle R \rangle$ toward a set of basis prepositions while pushing it away from nouns and adjectives found in the exemplar descriptions. This helps disentangle the interaction from the objects themselves.
  2. Relation-Focal Importance Sampling: Diffusion models are known to generate images in a coarse-to-fine manner: high-level semantics emerge at high noise levels (large $t$), while fine details like texture appear at low noise levels (small $t$). Since relations are high-level concepts, the authors skew the training process to sample larger timesteps more frequently, forcing the model to ignore low-level pixel details and focus on the overall interaction.
Part-of-Speech Clustering

The full pipeline is illustrated in The ReVersion Framework, showing how these two modules work together to optimize the relation prompt.

The ReVersion Framework

Datasets

To evaluate this new task, the authors contributed the ReVersion Benchmark. It includes:

  • 10 Representative Relations: Ranging from simple spatial arrangements ("on top of") to complex interactive behaviors ("shakes hands with") and abstract concepts ("is carved by").
  • Exemplar Images: 4 to 10 images per relation featuring diverse entities.
  • Inference Templates: 100 templates per relation (1,000 total) to test how well the learned relation generalizes to new object combinations.

Key Insights and Ideas

  • Linguistic Priors as a Compass: The discovery that the embedding space is grammatically organized allows researchers to use linguistic categories (like prepositions) as a geometric guide for visual optimization.
  • The "Aha" Moment on Appearance Leakage: Standard inversion methods fail because they are too "greedy"—they try to reconstruct every pixel, including the specific objects. By intentionally ignoring the fine-grained details through importance sampling, the model is forced to learn the "logic" of the scene rather than the "look."
  • Disentanglement is Key: Contrastive learning isn't just for classification; here, it acts as a surgical tool to separate the "what" (entities) from the "how" (relations).

Key Results

ReVersion significantly outperforms existing baselines in both qualitative and quantitative measures:

  • Qualitative Superiority: As seen in Qualitative Comparisons, when tasked with "Spiderman $\langle R \rangle$ building" (where $\langle R \rangle$ is "painted on"), baselines often just place a 3D Spiderman on a building. ReVersion correctly renders Spiderman as a 2D painting on the building's surface.
  • Quantitative Metrics: Using a pre-trained scene-graph generator to measure "Relation Score," ReVersion achieved a score of 0.3817, outperforming Textual Inversion (0.3785) and DreamBooth (0.3576).
  • Human Preference: In user studies, ReVersion was favored in 69.03% of cases for relation accuracy, compared to less than 20% for DreamBooth.
Qualitative Comparisons

Limitations and Future Work

  • Base Model Dependency: The framework is limited by the generative capabilities of the underlying T2I model. If Stable Diffusion struggles to render realistic human hands, ReVersion cannot fix the "six-fingered hand" problem during a "shaking hands" relation.
  • Concept Blending: In some cases, the features of two entities might bleed into each other (e.g., a cat and a rabbit might start looking like a hybrid creature).
  • Future Directions: The authors suggest this work could inspire new research in few-shot learning, visual relation detection, and more sophisticated generative scene composition.

Summary updated

BibTeX
@inproceedings{huang2024reversion,
  author = {Ziqi Huang and Tianxing Wu and Yuming Jiang and Kelvin C. K. Chan and Ziwei Liu},
  title = {{ReVersion: Diffusion-Based Relation Inversion from Images}},
  booktitle = {SIGGRAPH Asia},
  year = {2024},
  doi = {10.1145/3680528.3687658},
}
Figure