Logical reasoning over text is an important ability that requires understanding the semantics of the text and reasoning through them to arrive at correct inferences. Prior works on pretraining language models to improve the logical reasoning ability require complex processing of training data (e.g., aligning symbolic knowledge to text), yielding task-specific solutions that are not easy to adapt to any general text corpus. In this work, we propose APOLLO, a simple adaptive pretraining approach to improve the logical reasoning skills of language models. We select a subset of Wikipedia for adaptive pretraining using a set of logical inference keywords as filter words. Further, we propose two self-supervised loss functions for training. First, we modify the masked language modeling loss to mask specific parts-of-speech words that likely require higher-order reasoning to predict them. Second, we propose a sentence-level classification loss that teaches the model to distinguish between entailment and contradiction types of sentences. The proposed pretraining paradigm is both simple and independent of task formats. We demonstrate the effectiveness of APOLLO by comparing it with prior baselines on two logical reasoning datasets. APOLLO performs comparably on ReClor and outperforms baselines on LogiQA. The code base has been made publicly available.
CITATION STYLE
Sanyal, S., Xu, Y., Wang, S., Yang, Z., Pryzant, R., Yu, W., … Ren, X. (2023). APOLLO: A Simple Approach for Adaptive Pretraining of Language Models for Logical Reasoning. In Proceedings of the Annual Meeting of the Association for Computational Linguistics (Vol. 1, pp. 6308–6321). Association for Computational Linguistics (ACL). https://doi.org/10.18653/v1/2023.acl-long.347
Mendeley helps you to discover research relevant for your work.