Relation Rectification in Diffusion Model

Yinwei Wu, Xingyi Yang, Xinchao Wang
2/9/2026

No official code found. Best implementation: WUyinwei-hah/RRNet (48 stars, Apache-2.0, last commit 2024-09-13).

Abstract

Despite their exceptional generative abilities, large T2I diffusion models, much like skilled but careless artists, often struggle with accurately depicting visual relationships between objects. This issue, as we uncover through careful analysis, arises from a misaligned text encoder that struggles to interpret specific relationships and differentiate the logical order of associated objects. To resolve this, we in-troduce a novel task termed Relation Rectification, aiming to refine the model to accurately represent a given relationship it initially fails to generate. To address this, we propose an innovative solution utilizing a Heterogeneous Graph Convolutional Network (HGCN). It models the di-rectional relationships between relation terms and corre-sponding objects within the input prompts. Specifically, we optimize the HGCN on a pair of prompts with identical relational words but reversed object orders, supplemented by a few reference images. The lightweight HGCN adjusts the text embeddings generated by the text encoder, ensuring accurate reflection of the textual relation in the em-bedding space. Crucially, our method retains the parameters of the text encoder and diffusion model, preserving the model's robust performance on unrelated descriptions. We validated our approach on a newly curated dataset of di-verse relational data, demonstrating both quantitative and qualitative enhancements in generating images with precise visual relations. Project page: https://wuyinwei-hah.github.io/rrnet.github.io/.

View on arXivView PDF

Code Implementations(1)

WUyinwei-hah/RRNetCommunity65%
Apache-2.0

[CVPR2024] The official implementation of paper Relation Rectification in Diffusion Model

482PythonDec 5, 20232 years agoApache-2.0

Similar Papers

Cite this paper

@article{wu2026relation,
  title  = {Relation Rectification in Diffusion Model},
  author = {Yinwei Wu and Xingyi Yang and Xinchao Wang},
  year   = {2026},
  eprint = {2403.20249},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/pdf/2403.20249},
  journal = {CVPR 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2403.20249.svg)](https://codeofpaper.com/paper/2403.20249)

Discussion