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

Generalized Visual Relation Detection with Diffusion Models

Kaifeng Gao, Siqi Chen, Hanwang Zhang, Jun Xiao, Yueting Zhuang, Qianru Sun · DOI

Abstract

Visual Relation Detection (VRD) is fundamental to understanding complex scenes, yet traditional methods are often constrained by rigid, predefined interaction categories. These discriminative models struggle with the semantic ambiguity and open-vocabulary nature of real-world relationships. We introduce Diff-VRD, a novel framework that treats relation detection as a conditional generative task. By leveraging diffusion models to generate relation embeddings in a continuous space, Diff-VRD can predict a diverse array of nuanced interactions. Our approach significantly outperforms existing methods in capturing semantic richness, identifying over 28,000 unique relation categories on standard benchmarks.

Introduction: Beyond Rigid Classification

Visual Relation Detection (VRD) aims to identify <subject, predicate, object> triplets within an image, such as "person-ride-horse." Historically, this has been framed as a discriminative classification problem where models are trained to select the most likely predicate from a small, closed set of labels.

However, visual interactions are rarely discrete. A single image of a person on a horse might be accurately described as "riding," "straddling," "sitting on," or "racing." Rigid labels fail to capture this inherent ambiguity. While some "open-vocabulary" attempts have utilized vision-language models like CLIP, they typically remain anchored to discrete classification, limiting their ability to generalize to unseen or nuanced relations without extensive retraining.

Comparison between traditional discriminative VRD and the proposed generative Diff-VRD approach.

The authors of Diff-VRD argue that to truly master visual relations, models must move from picking labels to generating descriptions dynamically.

Methods: Generative Relation Detection

Diff-VRD shifts the VRD paradigm by employing a conditional diffusion process to generate relation descriptions. The architecture follows a multi-stage pipeline:

  1. Preprocessing: An off-the-shelf object detector identifies subjects and objects, creating candidate pairs for interaction analysis.
  2. Continuous Diffusion Process: Unlike standard text generation, Diff-VRD operates in a continuous embedding space. It begins with pure Gaussian noise and iteratively denoises it to produce a sequence of relation embeddings.
  3. Embedding and Rounding: To bridge the gap between continuous vectors and discrete language, the model uses a massive vocabulary (~4,800 terms) initialized with CLIP embeddings. The denoised vectors are eventually "rounded" back to the nearest discrete text labels.
  4. Conditioning: The generation is guided by visual and textual features of the detected subject-object pairs. These signals are integrated into a Transformer decoder via cross-attention, ensuring the generated text is grounded in the image's content.
  5. Bipartite Matching: A multi-round bipartite matching algorithm assigns the generated relation words to specific subject-object pairs based on semantic similarity.
The Diff-VRD pipeline, including preprocessing, diffusion-denoising processes, generation, and the final matching stage.

Evaluation and Results

Standard metrics like mean Average Precision (mAP) are often ill-suited for open-vocabulary models. If Diff-VRD predicts a correct but "unlabeled" relation (e.g., "straddle" instead of the ground-truth "ride"), it is penalized as a false positive. To address this, the authors introduced proxy metrics: Text-to-Image (T2I) Retrieval and SPICE PR Curves. These evaluate whether the generated triplets accurately describe the scene's propositional content.

Key Findings

  • Enhanced Diversity: On the HICO-DET dataset, Diff-VRD identified 28,077 unique relation categories, compared to just 520 for the state-of-the-art discriminative model (UPT).
  • Improved Accuracy: Diff-VRD achieved an 11.31% absolute improvement in Recall@10 for T2I retrieval over UPT, proving that its generated descriptions are more representative of the actual visual data.
  • Versatility: The diffusion process can be integrated as a post-processing "enhancement" for existing VRD models. When applied to the IEtrans model on the Visual Genome dataset, it boosted retrieval recall by 5.60%.

Conclusion and Future Work

Diff-VRD demonstrates that generative models are superior to discriminative ones for handling the ambiguity of visual relations. By treating VRD as a denoising process, the model learns robust semantic representations that go far beyond fixed annotations.

A current limitation is "visual co-occurrence hallucination," where the model might predict an interaction simply because two objects are near each other. Future research will focus on improving spatial conditioning and holistic context to ensure that generated relations are more strictly grounded in physical interactions.

Summary updated

BibTeX
@article{gao2025generalized,
  author = {Kaifeng Gao and Siqi Chen and Hanwang Zhang and Jun Xiao and Yueting Zhuang and Qianru Sun},
  title = {{Generalized Visual Relation Detection with Diffusion Models}},
  journal = {IEEE Transactions on Circuits and Systems for Video Technology},
  year = {2025},
  doi = {10.1109/tcsvt.2025.3588357},
}
Figure