Cross-Image Context Matters for Bongard Problems

Nikhil Raghuraman, Adam W. Harley, Leonidas J. Guibas

TL;DR

This paper argues that current machine learning models fail at Bongard problems not due to a lack of symbolic reasoning, but because they ignore the collective context of support images. By introducing "support-set standardization" and a Transformer-based "SVM-Mimic" model, the authors achieve new state-of-the-art results on Bongard-LOGO and Bongard-HOI, demonstrating that simple context-aware techniques significantly boost performance.

What Problem Does This Paper Address?

Bongard problems are visual IQ tests where a model must infer an abstract concept from a set of positive examples (sharing the concept) and negative examples (lacking the concept), and then classify a new query image. Despite advancements in AI, current models struggle with these problems, achieving only around 50-65% accuracy on benchmarks like Bongard-HOI, where random chance is 50%. While this is often attributed to a fundamental inability of neural networks to grasp symbolic rules, this paper posits a simpler explanation: existing methods fail to leverage the collective information from all support images (both positive and negative). Instead, they process each support image in isolation. This is a critical oversight because, unlike typical few-shot classification tasks, the defining characteristic of a Bongard concept often emerges only when comparing multiple positive and negative examples.

Methods

The authors propose two main approaches to incorporate "support-set context":

  1. Support-Set Standardization: This is a simple, parameter-free technique applied per problem. After a vision backbone extracts features from each image, the mean and variance of these features are computed across all support images (positives and negatives) within that specific problem. All support features, and subsequently the query features, are then standardized using these problem-specific statistics. This process highlights what's unique about the positives versus negatives by adapting features to the current problem's context.
  2. Support-Set Context via Transformer (SVM-Mimic): This method uses a Transformer encoder to learn how to attend to support-set context. The Transformer takes the standardized support features as input and is trained using a "student-teacher" setup. The "teacher" is a simple baseline classifier (like SVM or prototypes) trained on all supports. The "student" (Transformer) is trained on a subset of supports (with optional label noise) to learn to infer the concept, mimicking the teacher's output. Specifically, the "SVM-Mimic" variant trains the Transformer to regress the coefficients and intercept of an SVM hyperplane fitted to the support set. This allows the model to learn more robust rules that generalize across problems.

Datasets

The paper evaluates its methods on three datasets:

  • Bongard-LOGO: A benchmark of synthetic images with geometric shapes. This dataset has four test splits designed to assess generalization to different types of out-of-domain variations.
  • Bongard-HOI: A benchmark using natural images of human-object interactions. The authors created a cleaned version of the training and validation sets due to observed label noise and class imbalance in the original dataset.
  • Bongard-Classic: Mikhail Bongard's original dataset of abstract puzzles. This dataset is used for evaluation without any training.

Key Insights and Ideas

  • Context is King (for Bongard Problems): The core insight is that ignoring the collective context of all support images (positives and negatives) is a major bottleneck for current ML models on Bongard tasks.
  • Simple Standardization Works Wonders: A surprisingly effective and simple method, support-set standardization, significantly boosts accuracy across various baselines by adapting features to the specific problem.
  • Transformers Learn Better Rules: Using a Transformer to explicitly learn from the support set context, rather than relying on fixed baselines, leads to further performance gains and better generalization.
  • "SVM-Mimic" as a Strong Learner: The Transformer-based SVM-Mimic model, trained to predict SVM hyperplanes, achieves state-of-the-art results, suggesting that learning abstract rules is more effective than simply fitting a classifier to individual features.

Key Results

  • State-of-the-Art Performance: The proposed SVM-Mimic model achieves new state-of-the-art accuracies: 75.3% on Bongard-LOGO and 76.4% on Bongard-HOI (using a fine-tuned CLIP backbone).
  • Substantial Gains from Standardization: Support-set standardization alone provides a 5-10 point accuracy boost for simple baselines like Prototype and SVM on Bongard-LOGO.
  • Transformer Improvements: The SVM-Mimic Transformer model outperforms its non-Transformer counterpart (SVM + standardize) by approximately 1.5 points on Bongard-HOI.
  • Robustness: The SVM-Mimic model demonstrates improved robustness to variations in the number of support samples and to label noise compared to simpler baselines.
  • Bongard-Classic Performance: SVM-Mimic achieves 60.84% accuracy on the challenging Bongard-Classic dataset, outperforming other baselines.

Limitations and Future Work

  • Vision Backbone Sensitivity: The performance of the Transformer-based methods can be sensitive to the quality of the vision backbone. Stronger backbones might reduce the need for explicit context learning.
  • Generalization to New Distributions: The Transformer, learned on a specific dataset, might not generalize well to entirely new distributions without further fine-tuning, as seen on the Bongard-Classic dataset.
  • Comparison to Large Language Models: While the paper compares to GPT-40 on Bongard-LOGO, it notes that large autoregressive models might perform better on Bongard-HOI due to distribution shifts. Future work could explore more direct comparisons and integration with these models.
  • Further Exploration of Normalization: The paper briefly explores other normalization techniques, suggesting that further research into optimal normalization strategies could be beneficial.
  • Broader Impact: The authors acknowledge the broader implications of AI systems approaching human-level performance on such tasks, highlighting the need for careful consideration of societal and economic impacts.

Summary updated

Abstract

Current machine learning methods struggle to solve Bongard problems, which are a type of IQ test that requires deriving an abstract "concept" from a set of positive and negative "support" images, and then classifying whether or not a new query image depicts the key concept. On Bongard-HOI, a benchmark for natural-image Bongard problems, existing methods have only reached 66% accuracy (where chance is 50%). Low accuracy is often attributed to neural nets' lack of ability to find human-like symbolic rules. In this work, we point out that many existing methods are forfeiting accuracy due to a much simpler problem: they do not incorporate information contained in the support set as a whole, and rely instead on information extracted from individual supports. This is a critical issue, because unlike in few-shot learning tasks concerning object classification, the "key concept" in a typical Bongard problem can only be distinguished using multiple positives and multiple negatives. We explore a variety of simple methods to take this cross-image context into account, and demonstrate substantial gains over prior methods, leading to new state-of-the-art performance on Bongard-LOGO (75.3%) and Bongard-HOI (72.45%) and strong performance on the original Bongard problem set (60.84%).
BibTeX
@article{raghuraman2024cross,
  author = {Nikhil Raghuraman and Adam W. Harley and Leonidas J. Guibas},
  title = {{Cross-Image Context Matters for Bongard Problems}},
  journal = {Accepted by TMLR},
  year = {2024},
  url = {https://openreview.net/forum?id=kUuPUIPvJ6},
}
Figure