Weakly-Supervised Learning of Visual Relations

Julia Peyre, Ivan Laptev, Cordelia Schmid, Josef Sivic

Abstract

This paper introduces a novel approach for modeling visual relations between pairs of objects. We define a relation as a triplet of the form (subject; predicate; object), where the predicate is typically a preposition (e.g., 'under', 'in front of') or a verb ('hold', 'ride') linking a pair of objects. Learning such relations is challenging due to varying spatial configurations and appearances, as well as the difficulty of obtaining box-level annotations for all possible triplets. Our contributions include: (1) flexible visual features encoding appearance and spatial configuration; (2) a weakly-supervised discriminative clustering model to learn relations from image-level labels; and (3) the UnRel dataset of unusual relations for accurate evaluation. Experimental results show state-of-the-art performance on the Visual Relationship Dataset (VRD), particularly in zero-shot learning, and strong generalization on UnRel.

Introduction

While computer vision has made significant strides in individual object detection, understanding the interactions between objects—visual relations—remains a hurdle. A relation is represented as a triplet: (subject, predicate, object). The primary challenges are the combinatorial explosion of possible triplets and the extreme difficulty of obtaining dense, box-level annotations for training and evaluation.

This work proposes a framework to learn these relations using only image-level labels, bypassing the need for expensive bounding box annotations. By combining a novel spatial representation with a discriminative clustering objective, the model successfully identifies relationship triplets even in zero-shot scenarios.

Methodology

Visual Representation

Rather than treating a visual phrase as a single entity, the model decomposes a relation into appearance and spatial components:

  • Appearance Features: Standard CNN features extracted from a Fast R-CNN for both the subject and the object.
  • Spatial Configuration: A 6D vector encoding relative translation, scale ratios, and overlap. The model uses a Gaussian Mixture Model (GMM) to discretize these features, allowing it to handle multimodal predicates like 'next to', which can imply the subject is either to the left or right of the object.
Spatial configuration modeling between a subject (person) and object (surfboard).

Weakly-supervised Learning

The core innovation is the use of discriminative clustering. Given an image-level label (e.g., 'person ride horse'), the model treats the specific bounding box assignments as latent variables. It optimizes a cost function that identifies the most likely pairs of boxes satisfying the relation across the entire training set, effectively 'discovering' the objects involved without explicit box-level supervision.

Experimental Setup and Datasets

Visual Relationship Detection (VRD)

The VRD dataset serves as the standard benchmark, containing 4,000 training and 1,000 test images across 100 object categories and 70 predicates.

UnRel (Unusual Relations)

The authors introduced UnRel to specifically test generalization to rare or 'out-of-context' relations. This dataset contains triplets like 'bike above person' or 'person in cart' that are seldom found in standard datasets like COCO or Pascal VOC.

An example of an unusual relation ('elephant on car') from the UnRel dataset.

Results and Discussion

Key Insights

  • Predicate Generalization: By learning predicate classifiers (e.g., 'on') independently of specific objects, the model generalizes well. Learning 'on' for 'person on horse' allows the model to apply that spatial logic to 'dog on surfboard'.
  • Spatial Signal Strength: Spatial-only models were found to outperform many complex vision-and-language models, suggesting that geometry is a primary signal for predicates.
  • Robustness to Missing Data: Weak supervision proves more robust than full supervision when ground truth is incomplete, as the model can discover valid relations missed by human annotators.

Performance Metrics

  • Zero-Shot Learning: On the VRD dataset, performance on unseen triplets nearly tripled previous state-of-the-art results (e.g., 23.6% vs 8.5% for predicate detection).
  • Weak vs. Full Supervision: The weakly-supervised model performed nearly as well as the fully-supervised version, with only a minor drop in recall (from 50.4% to 46.8% on VRD predicate detection).
  • UnRel Generalization: The model significantly outperformed baselines like DenseCap on the UnRel dataset, demonstrating its ability to handle unusual visual scenarios.

Conclusion and Future Work

While the model shows strong performance, it remains dependent on the accuracy of pre-trained object detectors. Additionally, while the model functions well without language priors, incorporating linguistic context could further disambiguate complex relations. Future work will also address the evaluation challenges posed by semantic overlap between predicates (e.g., 'next to' vs 'on the left of').

Summary updated

BibTeX
@inproceedings{peyre2017weakly,
  author = {Julia Peyre and Ivan Laptev and Cordelia Schmid and Josef Sivic},
  title = {{Weakly-Supervised Learning of Visual Relations}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2017},
  url = {https://openreview.net/forum?id=SyZJE-G_ZB},
}
Figure