Learning Non-linguistic Skills without Sacrificing Linguistic Proficiency (2023)

Abstract: The field of Math-NLP has witnessed significant growth in recent years, motivated by the desire to expand LLM performance to the leaning of non-linguistic notions (numerals, and subsequently, arithmetic reasoning). However, non-linguistic skill injection typically comes at a cost for LLMs: it leads to catastrophic forgetting of core linguistic skills, a consequence that often remains unaddressed in the literature. As Math-NLP has been able to create LLMs that can closely approximate the mathematical skills of a grade schooler or the arithmetic reasoning skills of a calculator, the practicality of these models fail if they concomitantly shed their linguistic capabilities. In this work, we take a closer look into the phenomena of catastrophic forgetting as it pertains to LLMs and subsequently offer a novel framework for non-linguistic skill injection for LLMs based on information-theoretic interventions and skill-specific losses that enable the learning of strict arithmetic reasoning. Our model outperforms the state-of-the-art both on injected non-linguistic skills and on linguistic knowledge retention, and does so with a fraction of the non-linguistic training data (1/4) and zero additional synthetic linguistic training data.

## introduction numeracy, involving the comprehension of sizes, magnitudes, and order, is the most prevalent form of non-linguistic information embedded in textual corpora @xcite . thus, the case for numerically-capable llms is rather easy to make: as numerals grant objectivity to language @xcite , numerically-capable language models are key to optimal performance in a host of downstream tasks such as information extraction @xcite , inference @xcite ), 1 https://github.com/mandar-sharma/skill-lm figure 1 : llms trained for dissimilar skillsets have different convergence points for their parameters -the parameterization space for an llm trained for linguistic skills θ linguistics lives in the green space while the parameterization space for an llm trained for quantitative reasoning θ quant lives in the red space. the goal of this work is to approximate a locality of parameterization θ skill-lm (yellow) where the model reliably learns a non-linguistic skill (quantitative reasoning) without sacrificing its linguistic proficiency. linguistic evaluation remains important: as notable as these accomplishments are, the goal remains not to replicate the reasoning capabilities of a grade-schooler or to proxy a calculator, but rather build llms that are empowered with these skills. as such, an area that often goes unaddressed in the math-nlp space is how these models perform as general language modelers. with the advent and popularity of generative conversational models (openai, 2022), the goal is to have one model capable of a host of skills -not to load separate models for conversation/assistance and reasoning. as depicted in figure 1 , whether a model is designed to perform strict non-linguistic tasks or semi-linguistic tasks, it should never come at the cost of core linguistic competency. after all, language models are intended to model language. ## conclusions our study shows that llms are capable of demonstrating quantiative reasoning without sacrificing the broad palette of linguistic skills that they are traditionally evaluated against. this multi-task framework, together with the weight consolidation strategy, highlights that this framework can be systematized beyond the studies described here. as a result, non-linguistic tasks and linguistic tasks need not be seen as being at odds for llms and we can begin thinking about richer integrations of qualitative and quantitative reasoning. our experimental results also highlight that the improvements showcased here do not require exorbitant training data and in fact require just a fraction of what previous studies have leveraged. our future work will be organized in three directions. first, we intend to study at a more finegrained level the dovetailing of different arithmetic reasoning tasks vis-a-vis linguistic counterparts, and any synergies that can be exploited while learning. second, there are situations where linguistics can help numerical reasoning (math word problems, data-to-text generation) and multi-task formulations that capture the underlying semantics can be developed. finally, there are other forms of non-linguistic reasoning (diagrammatic reasoning) that can potentially be studied using the multi-task framework that we have described here.