Detecting Out-Of-Context Objects Using Graph Contextual Reasoning Network

Manoj Acharya, Anirban Roy, Kaushik Koneripalli, Susmit Jha, Christopher Kanan, Ajay Divakaran

Introduction

Modern object detection systems often rely heavily on contextual cues to improve accuracy. For instance, a rectangular object in a kitchen is frequently classified as a microwave rather than a television due to its environment. While beneficial for typical scenes, this dependency creates a significant vulnerability: the inability to correctly identify "Out-Of-Context" (OOC) objects. An OOC object, such as an elephant in a living room, violates common-sense relationships regarding co-occurrence, location, or scale. Standard detectors may misclassify these objects to fit the scene or fail to recognize the anomaly entirely.

An example of a scene graph where an elephant is identified as out-of-context (OOC) relative to typical indoor objects like a TV or table.

Methodology: Graph Contextual Reasoning Network (GCRN)

To address this, the authors propose the Graph Contextual Reasoning Network (GCRN). The framework employs a dual-graph architecture to create a "check and balance" system between visual appearance and contextual logic.

  1. Representation Graph (RepG): This component utilizes a Graph Convolutional Network (GCN) to share visual features among neighboring objects. Its primary goal is to predict object labels based on their intrinsic visual characteristics.
  2. Context Graph (ConG): This graph explicitly models environmental relationships. It integrates predicted labels from the RepG with 7D spatial features (including relative width, height, area, and coordinates) to learn common-sense rules about object co-occurrence and relative sizing.
The GCRN architecture comparing predictions from the Representation Graph (RepG) and Context Graph (ConG) to identify OOC objects via prediction mismatch.

The core innovation lies in the comparison of these two graphs. In a standard, "in-context" scene, the RepG and ConG should yield consistent predictions. However, for an OOC object, the visual evidence (RepG) will conflict with contextual expectations (ConG). The model calculates the KL Divergence between these two probability distributions; a high divergence score flags the object as out-of-context.

Datasets and Evaluation

The GCRN was evaluated on two major benchmarks:

  • COCO-OOC: A novel dataset of over 106,000 images created by "transplanting" MS-COCO segmentation masks into unusual contexts, covering violations in co-occurrence, location, and size.
  • OCD Benchmark: A synthetic dataset of ~11,000 indoor scenes where objects violate physical or logical rules (e.g., gravity or scale).

Key Results and Insights

The GCRN demonstrated significant improvements over baseline methods. On the COCO-OOC dataset, it achieved an AUC of 0.980, vastly outperforming the standard "Softmax confidence" baseline (0.043).

Key findings include:

  • Robustness: The model was exceptionally strong at detecting co-occurrence violations (0.986 AUC) and remained effective for size anomalies (0.921 AUC).
  • Dual Benefit: Beyond OOC detection, the explicit contextual reasoning improved the detection accuracy of in-context objects from 0.77 to 0.98.
  • Disagreement as a Signal: By focusing on internal logical inconsistencies rather than binary classification, the model remains robust to novel OOC configurations not seen during training.

Limitations

Despite its success, the model faces challenges with 2D projections, where 3D scale information is lost, sometimes leading to missed size violations. Future work may involve incorporating depth data (RGB-D) to resolve these geometric ambiguities. Additionally, the system's performance is inherently tied to the initial object detector's ability to propose candidate regions.

Summary updated

BibTeX
@inproceedings{acharya2022detecting,
  author = {Manoj Acharya and Anirban Roy and Kaushik Koneripalli and Susmit Jha and Christopher Kanan and Ajay Divakaran},
  title = {{Detecting Out-Of-Context Objects Using Graph Contextual Reasoning Network}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.24963/ijcai.2022/89},
}
Figure