ReCogLab: a framework testing relational reasoning & cognitive hypotheses on LLMs

Andrew Liu, Henry Prior, Gargi Balasubramaniam, Rivka Moroshko, Amir Zait, Ilia Labzovsky, Danny Karmon, Ishita Dasgupta, Kim Stachenfeld, Kenneth MarinoICLR 2025

TL;DR

ReCogLab is a novel, generative framework designed to evaluate relational reasoning in Large Language Models (LLMs). By procedurally generating graph-based reasoning problems rather than relying on static datasets, it allows researchers to dynamically scale difficulty, prevent training data contamination, and run highly specific, cognitive science-inspired experiments to uncover LLM reasoning biases.

The Problem with Static Benchmarks

Human memory is highly associative; we don't just recall isolated facts, we remember relationships and draw inferences across them—a process known as relational reasoning. As LLMs become more advanced, researchers have created various benchmarks to test their reasoning skills.

However, current benchmarks rely heavily on static datasets, which suffer from three major flaws:

  1. Short Shelf-Life: Models improve so quickly that they rapidly "solve" static benchmarks.
  2. Data Contamination: Static datasets easily leak into the massive internet-scale training corpora of new models, invalidating future evaluations.
  3. Inflexibility: If a model fails a reasoning task, it is incredibly difficult to tease apart why. Did it fail to recall the context, or did it fail the logical deduction? Static datasets cannot be easily tweaked to isolate these variables or test specific cognitive phenomena.

To address this, the authors created a sandbox environment where reasoning evaluations are generated on the fly, allowing for infinite, customizable test sets.

Methods and Datasets

Instead of curating a fixed list of questions, the authors built ReCogLab, a generative framework. Under the hood, ReCogLab models reasoning problems as graphs, where nodes are entities (people, objects) and edges are relationships (older than, friends with).

Overview of the ReCogLab framework, illustrating the four task domains and the configurable parameters for generating reasoning problems.

The framework procedurally generates a context (a list of factual statements), a question, and the correct answer based on a configuration file. Researchers can turn various "knobs" to customize the generated dataset, such as increasing graph complexity, changing the symbolic distance (logical "hops"), scrambling context ordering, or injecting irrelevant "flavor text" distractors.

Because ReCogLab is generative, it produces infinite variations across four primary task domains:

  1. Comparison: Directed acyclic graphs comparing age, size, or weight (e.g., "A is heavier than B").
  2. Social Networks: Undirected graphs mapping connections to test pathfinding (e.g., "Who should A pass a message to so it reaches D fastest?").
  3. Syllogisms: Chains of logical propositions (e.g., "All A are B", "Some B are C").
  4. JSON Families: Structured data reasoning tasks requiring the model to parse nested JSON objects to compare family sizes or shared hobbies.

Key Insights: LLMs and Cognitive Biases

By controlling the data-generating process, researchers isolated specific variables to see exactly where and how an LLM's reasoning breaks down. Strikingly, the framework revealed that LLMs exhibit reasoning biases very similar to humans:

  • The Congruency Effect: LLMs are significantly better at logical reasoning when the premises align with real-world facts (e.g., "whales are larger than minnows"). If the logic is identical but the premise is incongruent with reality ("minnows are larger than whales"), performance plummets—sometimes below random chance.
  • Ordering Matters: Just like human sequence memory, LLMs perform much better when contextual facts are presented in a topological, logical order rather than randomly scattered throughout the prompt.
  • Acquiescence Bias in Indeterminacy: When presented with a problem where a conclusion cannot be logically drawn, LLMs show a strong "acquiescence bias"—they disproportionately prefer to confidently answer "Yes" rather than admit the answer is unknown.
  • Language vs. Logic: Adding linguistic "flavor text" (e.g., turning "A is friends with B" into a short story) degrades reasoning performance much more than simply padding the prompt with random, irrelevant text. This suggests the density of language heavily impacts an LLM's ability to parse logic.

Key Results

The authors tested a wide range of models, including Gemma (2B-27B), Mixtral (8x7B, 8x22B), Gemini Flash/Pro, and GPT-4o.

Model accuracy across the four task domains as the number of entities scales.
  • Capacity Scaling: Across all models, accuracy drops as the number of entities in the problem increases. However, frontier models (GPT-4o, Gemini Pro) maintain strong performance up to 70 entities.
  • Symbolic Distance Limits: Regardless of the total graph size, most models reliably fail when the "symbolic distance" (number of logical hops required to answer) exceeds 6.
  • Meta-Reasoning: Larger models are better at detecting logically inconsistent premises (e.g., spotting a cycle like A > B > C > A). Gemini Pro performed best at this zero-shot consistency detection, while GPT-4o showed a high false-positive rate (26.7%), heavily biasing toward assuming statements were consistent.
  • Framework Reliability: Re-seeding the generator to create entirely new datasets with the same parameters resulted in statistically identical performance distributions, proving the framework is a reliable, leak-proof benchmark.

Limitations and Future Work

The authors carefully note a philosophical limitation: while LLMs exhibit human-like reasoning biases, we should not anthropomorphize them. The underlying mechanisms causing these biases in LLMs are likely statistical patterns in training data, entirely different from biological mechanisms in human brains. Additionally, because the probes are zero-shot, the models' predictions are inherently uncalibrated.

For future work, the authors suggest exploring self-consistency prompting schemes to reduce the models' implicit bias toward affirmative answers. They also emphasize that improving an LLM's ability to detect indeterminate or inconsistent logical premises—rather than just guessing—is a critical next step for AI safety and reliable human-AI interaction.

Summary updated

BibTeX
@inproceedings{liu2025recoglab,
  author = {Andrew Liu and Henry Prior and Gargi Balasubramaniam and Rivka Moroshko and Amir Zait and Ilia Labzovsky and Danny Karmon and Ishita Dasgupta and Kim Stachenfeld and Kenneth Marino},
  title = {{ReCogLab: a framework testing relational reasoning \& cognitive hypotheses on LLMs}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=yORSk4Ycsa},
}
Figure