Neural Relation Graph: A Unified Framework for Identifying Label Noise and Outlier Data

Jang-Hyun Kim, Sangdoo Yun, Hyun Oh Song

Data cleaning is the unglamorous backbone of robust machine learning. While large-scale datasets like ImageNet have propelled the field forward, they are often riddled with "problematic" data: mislabeled samples, under-represented classes, and out-of-distribution (OOD) outliers. Traditionally, researchers have used "unary scores"—metrics like loss or prediction margin calculated for each sample in isolation—to flag these issues. However, as the authors of Neural Relation Graph point out, unary scores often fail to distinguish why a sample is problematic. Is the label wrong, or is the image itself just weird?

TL;DR

Neural Relation Graph (NRG) is a unified framework that identifies label noise and outliers by analyzing the relational structure of data in a model's feature space. By shifting from individual sample scores to a graph-based approach that measures how data points conflict or complement one another, NRG achieves state-of-the-art detection performance across image, speech, and language tasks.

What Problem Does This Paper Address?

The core challenge is that different types of data problems often "look" the same to a trained neural network. As shown in Figure 1, a clean sample, a mislabeled sample, and an outlier can all exhibit similar loss values or prediction margins.

Comparison of clean, label error, and outlier samples and their relation maps.

Existing methods like influence functions or prediction variability tracking are often computationally expensive (requiring gradients or multiple retraining passes) and can be sensitive to outliers. The authors argue that we are ignoring a rich source of information: the relational structure of the dataset. In a well-trained feature space, similar objects should cluster together. If two very similar objects have different labels, that’s a strong signal for a label error. If an object has no similar neighbors at all, it’s likely an outlier.

Methods

The authors propose a two-pronged approach based on a Neural Relation Graph:

  1. Defining Data Relations: They define a relation function $r$ that combines semantic similarity (using a kernel like cosine similarity in the feature space) with label information. If two samples have the same label, their relation is positive; if they have different labels, it is negative.
  2. Label Error Detection as Max-Cut: To find label errors, they construct a graph where edges represent these relations. They formulate the search for noisy labels as a max-cut problem. The goal is to partition the dataset into a "clean" set and a "noisy" set such that the conflict (negative edges) between the two sets is maximized. They introduce a scalable, set-level version of the Kernighan-Lin algorithm to solve this efficiently for millions of samples.
  3. Outlier Detection via Aggregation: For outliers, the method is simpler: they aggregate the similarity kernel values for a data point. Points with low total similarity to the rest of the dataset are flagged as outliers.
  4. Data Relation Maps: They introduce a visualization tool that plots the mean and variance of a sample's relations across different training checkpoints. This "fingerprint" helps humans interactively diagnose whether a point is clean, mislabeled, or an outlier.
Conceptual illustration comparing conventional unary scoring (left) with the proposed relational graph approach (right).

Datasets

The framework was evaluated across three major domains:

  • Image: ImageNet (1.2M images), ImageNet-100, and various OOD benchmarks like Places, SUN, iNaturalist, and Textures.
  • Speech: ESC-50 (environmental audio recordings).
  • Language: SST2 (sentiment analysis) and MNLI.

Key Insights and Ideas

  • Relational > Unary: The most significant "aha moment" is that relational information provides context that unary scores lack. A sample might have high loss because it's an outlier, but its relation to other samples will be near zero, whereas a label error will show strong negative relations to samples in its true class.
  • Global Structure Matters: Unlike k-Nearest Neighbor (k-NN) approaches that only look at local neighborhoods, the max-cut formulation considers the global structure of the graph, making it more robust.
  • Scalability: By avoiding gradient calculations and using a set-level optimization, NRG is significantly faster than influence-based methods. For ImageNet, NRG's algorithm takes about 7 minutes, compared to hours for gradient-based methods (Table 1).

Key Results

  • State-of-the-Art Performance: NRG consistently outperformed six strong baselines (including TracIn and Confident Learning) in label error detection across all noise ratios (4% to 15%) on ImageNet.
  • Robustness to Scale: The method maintains high performance even when using only 1% of the training data to build the graph, making it viable for massive datasets.
  • Cross-Domain Success: The same framework achieved SOTA results on audio (ESC-50) and text (SST2) datasets, proving it is truly domain-agnostic.
  • OOD Detection: NRG outperformed specialized OOD detection methods like Energy score and ReAct on the ImageNet OOD benchmarks.

Limitations and Future Work

The authors note that their current experiments are focused on classification tasks. Extending this relational framework to more complex outputs, such as image segmentation or generative modeling, remains an open challenge. Additionally, while the tool is excellent for identification, integrating it into an active learning loop where humans verify the flagged samples could further improve dataset hygiene.

For those interested in implementation, the authors have released their code at https://github.com/snu-mllab/Neural-Relation-Graph.

Summary updated

BibTeX
@inproceedings{kim2023neural,
  author = {Jang-Hyun Kim and Sangdoo Yun and Hyun Oh Song},
  title = {{Neural Relation Graph: A Unified Framework for Identifying Label Noise and Outlier Data}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=gpyeRyc858},
}
Figure