TL;DR
The Neural Relation Graph (NRG) is a unified framework that identifies both mislabeled data and outliers by analyzing how data points relate to one another in a model's feature space. By moving beyond simple individual "unary" scores (like loss or prediction margin) and instead leveraging the global relational structure of a dataset, NRG achieves state-of-the-art performance in data cleaning across image, audio, and text domains.
What Problem Does This Paper Address?
Machine learning models are only as good as the data they are trained on. However, large-scale, real-world datasets are notoriously "noisy"—they contain label errors (e.g., a picture of a cat labeled "dog") and outliers (e.g., a blurry image or an object from a class the model wasn't meant to learn).
Existing methods usually try to find these problematic points by looking at individual "unary scores," such as high loss or low prediction confidence. The challenge is that a high-loss value doesn't tell you why a point is problematic. Is the label wrong, or is the image itself just weird? Unary scores often look identical for both cases, making it difficult to distinguish between a label error and an outlier.
This paper argues that we need to look at the relational structure: how a data point compares to its neighbors in the feature-embedding space to accurately diagnose the root cause of the noise.
Methods
The authors propose a framework based on a Neural Relation Graph to systematically clean datasets.
- The Relation Function: They define a function that measures the relationship between two data points. It combines two things:
- Feature Similarity: How close are the two points in the model's internal representation?
- Label Compatibility: Do they share the same assigned label?
- Label Error Detection (Max-Cut): To find label errors, they treat the dataset as a graph. They look for "conflicting" edges—where two points are very similar in features but have different labels. They formulate this as a max-cut problem, aiming to find a subset of data that is most "at odds" with the rest of the clean set. They introduce a scalable, "set-level" version of the Kernighan-Lin algorithm to solve this efficiently for millions of points.
- Outlier Detection: Outliers are identified by looking for points that are "lonely" in the feature space. If a point has very few neighbors with high feature similarity, it is likely an out-of-distribution (OOD) sample.
- Data Relation Map: A novel visualization tool that plots the mean and variance of a point's relations across different training checkpoints. This "fingerprint" allows researchers to interactively diagnose whether a point is clean, mislabeled, or an outlier.
Datasets
The authors evaluated their framework across three distinct domains to prove its versatility:
- Vision: ImageNet (1.2M images, 1000 classes).
- Audio: ESC-50 (environmental audio recordings).
- Text: SST2 (sentiment analysis) and MNLI (natural language inference).
They tested on both synthetic noise (artificially flipped labels) and "realistic" noise (using the cleaned-up ImageNet-V2 labels).
Key Insights and Ideas
- Separation of Concerns: By comparing input features and labels separately, the framework can isolate why a model is struggling. If the features match neighbors but the label doesn't, it’s a label issue. If the features don't match anything, it’s a data issue (outlier).
- Global vs. Local: Unlike $k$-nearest neighbor approaches that only look at the immediate vicinity, the NRG approach considers the global graph structure, making it more robust to "under-represented" classes that might otherwise look like outliers.
- Training Dynamics Matter: The "Data Relation Map" reveals that clean data has stable, positive relations throughout training, while label errors show intensifying conflicts (negative relations) as the model converges.
Key Results
- State-of-the-Art Performance: NRG consistently outperformed baselines like TracIn, Cleanlab, and standard loss-based scoring. On ImageNet with 8% label noise, NRG achieved an Average Precision (AP) of 0.526, significantly higher than the best baseline (0.484).
- Cross-Domain Success: The method worked equally well for audio (ESC-50) and text (SST2), proving it is "domain-agnostic."
- Efficiency: Despite using graph-based algorithms, the proposed "set-level" optimization is highly scalable. Identifying label errors in the 1.2-million-sample ImageNet dataset took only a few minutes on a single GPU (excluding feature extraction).
- Robustness to Scale: The authors showed that the method maintains high performance even when using only a small fraction (0.4%) of the dataset to build the graph.
Limitations and Future Work
- Task Constraints: Currently, the framework is designed for classification tasks. The authors note that extending this to more complex tasks like image segmentation or generative modeling is a promising future direction.
- Dependency on Embeddings: The method relies on the quality of the feature embeddings from a pre-trained or partially trained model. If the model is extremely under-trained or biased, the graph structure might be misleading.
- Human-in-the-loop: While the visualization tool is great for diagnosis, the authors suggest that future work could better integrate these automated scores with human annotators to create a more seamless data-cleaning pipeline.
Summary updated