Rosetta-PL: Propositional Logic as a Benchmark for Large Language Model Reasoning

Shaun Baek, Shaun Esua-Mensah, Cyrus Tsui, Sejan Vigneswaralingam, Abdullah Alali, Michael Lu, Vasu Sharma, Sean O'Brien, Kevin Zhu

TL;DR

Rosetta-PL is a new benchmark that isolates an LLM's pure logical reasoning capabilities from natural language ambiguities by translating formal logic into a custom propositional language. By fine-tuning GPT-4o on this benchmark, the research demonstrates that preserving structural relationships during translation is vital for generalization, and that reasoning performance plateaus at around 20,000 training examples.

What Problem Does This Paper Address?

While Large Language Models (LLMs) excel at processing unstructured natural language, their capacity for strict, rule-based logical reasoning remains a bottleneck. Natural language is inherently riddled with semantic ambiguity, polysemy, and flexible syntax, making it difficult to determine whether a model's reasoning failure stems from a lack of logical capacity or linguistic confusion.

Furthermore, existing logic benchmarks often rely on predefined inference steps or templates (like standard Chain-of-Thought prompting), which evaluate whether a model can follow a script rather than autonomously discover and apply novel logical patterns. The authors introduce Rosetta-PL to evaluate LLMs in a highly controlled, formal environment, stripping away linguistic noise to study pure pattern recognition and generalization.

Methods

The authors developed a data pipeline to translate formal logical propositions into a brand-new, custom propositional language. To investigate how symbolic representation affects reasoning, they employed two contrasting translation strategies:

  • Translation Key 1 (Focused Key): This strategy preserves inherent logical relationships. For example, comparative operators like > and < are consistently mapped to new symbols (» and «). It also uses a scrambling function that appends a reversed duplicate of the sentence to the end, mimicking structural variations found across different languages.
  • Translation Key 2 (Random Key): This strategy intentionally disrupts logical structure by shifting the ASCII values of every character by 10 and inverting statements around logical operators (e.g., turning A > B > C into a transformed version of C < B < A).

Using these keys, they fine-tuned GPT-4o across varying dataset sizes (10,000, 20,000, and 25,214 samples) while keeping hyperparameters constant, evaluating the models on both "seen" and "unseen" test sets.

Datasets

The benchmark relies on two primary data sources:

  • Rosetta-PL (Derived from Lean Workbook): A dataset of 25,214 logical problems translated from the Lean Workbook into the authors' custom propositional language. This served as the pool for training and "seen" testing.
  • MiniF2F-lean4: An entirely independent dataset of 200 problems used as the "unseen" testing subset to evaluate how well the fine-tuned models generalize to completely novel logical patterns.

Key Insights and Ideas

  • Structure Preservation is Paramount: Models fine-tuned with Translation Key 1 vastly outperformed those trained with Key 2. When the underlying logical relationships are preserved, the LLM can successfully map and generalize the rules of the new language. Destroying the structure (Key 2) severely cripples the model's ability to generalize to unseen problems.
  • The 20,000-Sample Plateau: Increasing the training set from 10,000 to 20,000 samples noticeably improved accuracy. However, scaling beyond 20,000 samples yielded diminishing returns. This suggests a stable threshold where the model has fully internalized the core logical patterns of the dataset.
  • Cross-Language Transfer Learning: Remarkably, fine-tuning GPT-4o on the custom language (Key 1) actually improved its performance on the original, untranslated Lean dataset. The LLM successfully extracted abstract logical principles from the artificial language and applied them back to its pre-existing Lean knowledge.

Key Results

The fine-tuned GPT-4o models demonstrated superior problem-solving performance in the custom propositional language compared to the baseline.

  • Seen Data: On the custom language test set, the fine-tuned model achieved an average accuracy of 95.97% (using Key 1) compared to 76.08% when evaluated on the original Lean format.
  • Unseen Data: When tested on completely novel problems from MiniF2F, the Key 1 fine-tuned model achieved 97.56% accuracy in the custom language and an incredible 99.89% in Lean, outperforming the base GPT-4o model.
  • Key 1 vs. Key 2: The importance of structure is highlighted by the overall average accuracies: 92.68% for Key 1 versus just 80.36% for Key 2. On unseen Lean data, the Key 2 model's performance plummeted to 64.1%.

A visual breakdown of these performance variations across dataset sizes and translation keys can be seen in Figure 1:

Figure 1: Comparison of GPT-4o accuracy across datasets ("Seen" and "Unseen") using different translation keys and varying dataset sizes.

Limitations and Future Work

A primary limitation acknowledged by the authors is the closed-source nature of GPT-4o, which introduces inherent risks regarding data leakage (though mitigated by the unorthodox custom language translation). Additionally, the high accuracy on unseen datasets might reflect underlying biases or overrepresentations of specific problem types within the source datasets.

For future directions, the authors suggest:

  1. Testing in-context learning (few-shot prompting) with an external translation function at inference time to bypass the high computational cost of fine-tuning.
  2. Developing synthetically balanced datasets with tiered complexity levels (separating single-step from multi-step reasoning) to better isolate true logical understanding from superficial pattern matching.
  3. Exploring smarter data utilization methods to lower the 20,000-sample threshold required for stable performance.

Summary updated

BibTeX
@inproceedings{baek2025rosetta,
  author = {Shaun Baek and Shaun Esua-Mensah and Cyrus Tsui and Sejan Vigneswaralingam and Abdullah Alali and Michael Lu and Vasu Sharma and Sean O'Brien and Kevin Zhu},
  title = {{Rosetta-PL: Propositional Logic as a Benchmark for Large Language Model Reasoning}},
  booktitle = {Student Research Workshop @ NAACL},
  year = {2025},
  doi = {10.18653/v1/2025.naacl-srw.53},
}
Figure