Despite the recent success of large, pretrained neural language models (LLMs) on a variety of prompting tasks, these models can be alarmingly brittle to small changes in inputs or application contexts. To better understand such behavior and motivate the design of more robust LLMs, we provide a causal formulation of linguistic competence in the context of LLMs and propose a general framework to study and measure LLM competence. Our framework, CALM (Competence-based Analysis of Language Models), establishes the first quantitative measure of LLM competence, which we study by damaging models' internal representations of various linguistic properties in the course of performing various tasks using causal probing and evaluating models' alignment under these interventions with a given causal model. We also develop a novel approach for performing causal probing interventions using gradient-based adversarial attacks, which can target a broader range of properties and representations than existing techniques. We carry out a case study of CALM using these interventions to analyze BERT and RoBERTa's competence across a variety of lexical inference tasks, showing that the CALM framework and competence metric can be valuable tools for explaining and predicting their behavior across these tasks.
翻译:尽管近期大规模预训练神经语言模型(LLMs)在各类提示任务上取得了成功,但这些模型在应对输入或应用情境的微小变化时表现出惊人的脆弱性。为深入理解此类行为并推动更鲁棒LLMs的设计,我们提出了一种面向LLMs的语言能力因果形式化框架,并构建了研究及度量LLM能力的通用体系。该框架——CALM(基于能力的大语言模型分析)——建立了首个LLM能力的量化指标:通过因果探针技术破坏模型在执行各类任务时对多种语言属性的内部表征,并评估这些干预后模型与给定因果模型的对齐程度。我们还开发了一种基于梯度对抗攻击的新型因果探针干预方法,相比现有技术能覆盖更广泛的属性与表征。我们以BERT和RoBERTa为对象,利用这些干预手段在词汇推理任务中开展CALM案例研究,结果表明CALM框架及其能力度量指标可作为解释和预测模型跨任务行为的有效工具。