Empower Nested Boolean Logic via Self-Supervised Curriculum Learning

Hongqiu Wu, Linfeng Liu, Hai Zhao, Min Zhang

Introduction

Large Language Models (LLMs) have demonstrated remarkable capabilities across various domains, from creative writing to complex coding. However, a fundamental question remains: do these models truly reason, or are they merely sophisticated pattern matchers? Recent research highlights a significant gap in their logical foundations, particularly in handling nested boolean logic—the basic building blocks of reasoning like AND, OR, and NOT.

The "Random Selector" Ceiling

While humans can typically track a chain of negations (e.g., "A is true; B is not A; C is not B; therefore C is true"), state-of-the-art models struggle as these chains grow. The authors identify a "random selector" ceiling: when nesting depth exceeds three levels, models like DeBERTa and GPT-3.5 often perform no better than a coin flip (50% accuracy). This suggests that the logical consistency observed in LLMs is often a fragile byproduct of training data rather than a robust, generalized skill.

Methodology: The BoolKill Benchmark and Logic Augmentation

To address this, the researchers introduced BoolKill, a benchmark designed to quantify mastery of boolean logic. Built upon the SciTail scientific entailment dataset, BoolKill converts factual statements into complex logic chains.

The process of converting a simple fact into a nested boolean logic chain.

As shown in the figure above, a base fact ($S_0$) is programmatically wrapped in boolean "shells." This allows for the creation of datasets with known ground truths and varying levels of complexity ($k=0$ to $k=8$), involving NOT, AND, and OR operations.

Curriculum Logical Reasoning (CLR)

The core contribution of the paper is Curriculum Logical Reasoning (CLR). The authors found that simply training a model on high-complexity logic from the start leads to failure. Instead, they propose a staged, self-supervised approach:

  1. Staged Learning: The model begins with simple operations (nesting depth 0-1) and gradually progresses to more complex ones (up to depth 4).
  2. Recursive Reinforcement: Crucially, the model continues to revisit simpler samples while learning harder ones, preventing catastrophic forgetting and allowing it to internalize the recursive nature of logic.

This gradual progression allows the model to "learn how to learn" the underlying recursive nature of logic, rather than just memorizing specific sentence structures.

Key Results and Insights

The impact of CLR is profound. On the most difficult subsets of BoolKill (depths 5-8), a standard DeBERTa-V3-large model initially guessed at random. After CLR training, its accuracy soared to 84.3%, even though it had never seen those specific high-depth patterns during training.

Accuracy of DeBERTa-V3 and ChatGPT models as the number of nested logic levels increases, showing the performance drop-off.

The graphs above illustrate the sharp decline in performance for standard models as nesting depth increases. CLR training effectively flattens this curve, enabling models to maintain high accuracy across deeper logical structures.

Furthermore, the study found that boolean logic serves as a "root capability." Models pre-trained with CLR showed significant improvements on downstream tasks like ReClor (LSAT-style reasoning) and DREAM (dialogue reasoning), with gains of 4.4% and 2.9% respectively. This indicates that mastering basic boolean operations provides a foundation that transfers to complex, real-world reasoning.

Conclusion

The research demonstrates that while current LLMs are "logic-fragile," their reasoning capabilities can be significantly enhanced through structured, self-supervised curriculum learning. By teaching models to "learn how to learn" the recursive rules of logic, CLR moves us closer to AI that can truly reason through multi-step problems rather than just predicting the next likely token.

Paper Citation: Wu, H., Liu, L., Zhao, H., & Zhang, M. (2023). Empower Nested Boolean Logic via Self-Supervised Curriculum Learning. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 13731–13742.

Summary updated

BibTeX
@inproceedings{wu2023empower,
  author = {Hongqiu Wu and Linfeng Liu and Hai Zhao and Min Zhang},
  title = {{Empower Nested Boolean Logic via Self-Supervised Curriculum Learning}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  url = {https://openreview.net/forum?id=awYdap_Izc0},
}
Figure