NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Goal Driven Discovery of Distributional Differences via Language Descriptions

Ruiqi Zhong, Peter Zhang, Steve Li, Jinwoo Ahn, Dan Klein, Jacob Steinhardt

Introduction

In data science and social research, a common yet labor-intensive task is the comparison of two large text corpora. Whether a researcher is analyzing the differences between political speeches, product reviews, or model outputs, the process typically involves manual inspection to form hypotheses followed by statistical verification. This ad-hoc approach is not only time-consuming but also prone to human bias and oversight.

To address this, researchers have introduced D5 (Discovering Distributional Differences via Descriptions), a task and system designed to automatically discover and describe differences between two large text datasets based on a specific user goal. By leveraging the reasoning capabilities of Large Language Models (LLMs), D5 identifies nuanced, goal-relevant patterns that would otherwise require hours of manual analysis.

The D5 Task

The D5 task is formalized as follows: given a pair of corpora (Corpus A and Corpus B) and a specific exploration goal (e.g., "understand side effects" or "identify political bias"), the system must output a natural language "discovery." This discovery is a predicate that is both statistically valid—meaning it occurs significantly more frequently in one corpus than the other—and relevant to the user's specified goal.

Traditional methods like n-gram analysis or topic modeling often fail here because they produce "noisy" results. For instance, a topic model might highlight that one corpus uses more formal language, even if the user is specifically looking for differences in sentiment or specific product complaints. D5 uses the goal as a filter to ensure the output is actionable and meaningful.

Methodology: Propose-then-Validate

The D5 system employs a two-stage pipeline to bridge the gap between open-ended discovery and statistical rigor:

  1. Hypothesis Proposer: The system prompts an LLM (such as GPT-4) with the user's goal and a small, representative subset of samples from both corpora. The LLM acts as a creative engine, brainstorming a list of potential differences formatted as natural language predicates (e.g., "mentions feelings of paranoia").
  2. Hypothesis Validator: To prevent the LLM from hallucinating patterns, a second model—a fine-tuned Flan-T5—acts as a "judge." This validator scans a much larger portion of the data to calculate a Validity Score ($V$). This score measures the frequency of the hypothesis in Corpus A versus Corpus B, ensuring the discovery is grounded in the actual data distribution.

Additionally, the authors implemented a self-supervised learning algorithm to refine the proposer. By training on "mini-problems" where differences are easier to verify, the proposer learns to generate more robust and valid hypotheses over time.

Evaluation Benchmarks

The researchers established two major benchmarks to evaluate the performance of D5 systems:

  • SYND5 (Diagnostic): A synthetic dataset consisting of 300 problems with known ground-truth solutions. Each problem includes a "distractor" difference (e.g., one corpus is in English, the other in French) to test if the system can ignore obvious but irrelevant differences in favor of the goal-relevant one.
  • OPEND5 (Open-Ended): A massive meta-dataset aggregating 675 real-world problems across business, social sciences, humanities, health, and machine learning. It contains 4.4 million text samples, ranging from airline reviews to presidential speeches.

Key Results and Insights

The study yielded several critical insights into the intersection of LLMs and data discovery:

  • The Power of Goal-Conditioning: On the SYND5 benchmark, using a goal-conditioned proposer increased accuracy by 12% over goal-agnostic versions. In real-world scenarios (OPEND5), it produced relevant discoveries 31% more frequently, proving that LLMs need specific constraints to provide useful analysis.
  • Validation vs. Discovery: The authors found that while LLMs may struggle to find the perfect difference initially, they are highly effective at verifying whether a specific statement holds true across many samples. This validates the "Propose-then-Validate" architecture as a reliable framework for data exploration.
  • Model Scaling: Performance scales significantly with model size. GPT-4 achieved 27% accuracy on SYND5 when paired with a validator and goal, more than doubling the 12% accuracy of GPT-3.
  • Human Alignment: Automated validity scores showed a 71% Spearman rank correlation with human ratings, suggesting that the automated validator serves as a reliable proxy for human judgment.

Limitations and Future Work

While D5 represents a significant step forward, the authors note several limitations. First, the system identifies distributional correlations, not causal relationships. If a system finds that one group mentions a topic more often, it cannot explain why that difference exists. Second, specialized domains (e.g., medical or legal) may still require expert human intervention, as general-purpose LLMs may lack the depth to validate highly technical predicates.

Finally, there is the risk of bias reinforcement. If used without oversight, the system could amplify societal biases by "discovering" and labeling stereotypes present in the data. Future work will focus on moving beyond simple true/false predicates to more complex, continuous descriptions and extending the framework to non-English languages.

Summary updated

BibTeX
@inproceedings{zhong2023goal,
  author = {Ruiqi Zhong and Peter Zhang and Steve Li and Jinwoo Ahn and Dan Klein and Jacob Steinhardt},
  title = {{Goal Driven Discovery of Distributional Differences via Language Descriptions}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=PnbCA4ylIc},
}
Figure