Enhancing Self-Consistency and Performance of Pre-Trained Language Models through Natural Language Inference
Eric Mitchell, Joseph J. Noh, Siyan Li, William S. Armstrong, Ananth Agarwal, Patrick Liu, Chelsea Finn, Christopher D. Manning
TL;DR
ConCoRD addresses the lack of internal self-consistency in large pre-trained language models by dynamically estimating logical relations between outputs with a pre-trained NLI model and re-ranking candidate answers via a factor-graph MaxSAT inference, all without fine-tuning. The framework combines a base model that proposes multiple outputs with an NLI-driven relation model, augmented by entailment-correction and test-time information injection, to improve QA and VQA performance across BeliefBank, ConVQA, and Natural Questions settings. Key findings show robust improvements in F1 and accuracy, as well as increased consistency, with gains persisting across model sizes and tasks; the approach remains scalable due to off-the-shelf components and efficient MaxSAT solving. The work highlights practical implications for deploying more reliable NLP systems and suggests future work in end-to-end differentiable integration and cross-domain extensions beyond natural language tasks.
Abstract
While large pre-trained language models are powerful, their predictions often lack logical consistency across test inputs. For example, a state-of-the-art Macaw question-answering (QA) model answers 'Yes' to 'Is a sparrow a bird?' and 'Does a bird have feet?' but answers 'No' to 'Does a sparrow have feet?'. To address this failure mode, we propose a framework, Consistency Correction through Relation Detection, or ConCoRD, for boosting the consistency and accuracy of pre-trained NLP models using pre-trained natural language inference (NLI) models without fine-tuning or re-training. Given a batch of test inputs, ConCoRD samples several candidate outputs for each input and instantiates a factor graph that accounts for both the model's belief about the likelihood of each answer choice in isolation and the NLI model's beliefs about pair-wise answer choice compatibility. We show that a weighted MaxSAT solver can efficiently compute high-quality answer choices under this factor graph, improving over the raw model's predictions. Our experiments demonstrate that ConCoRD consistently boosts accuracy and consistency of off-the-shelf closed-book QA and VQA models using off-the-shelf NLI models, notably increasing accuracy of LXMERT on ConVQA by 5% absolute. See https://ericmitchell.ai/emnlp-2022-concord/ for code and data.
