ChatPaper.aiChatPaper

数学神经外科手术:仅利用前向传递来分离语言模型的数学推理能力

Math Neurosurgery: Isolating Language Models' Math Reasoning Abilities Using Only Forward Passes

October 22, 2024
作者: Bryan R. Christ, Zack Gottesman, Jonathan Kropko, Thomas Hartvigsen
cs.AI

摘要

数学推理是大型语言模型(LLM)研究的一个高度活跃的领域,因为它是人工智能的一个标志。然而,很少有研究探讨数学推理是如何在LLM参数中编码的,以及它是否是模型中可以孤立出来的一种技能。这样做可以实现有针对性地干预以提高数学表现,而不改变非数学行为,并促进对模型如何编码数学推理的理解。我们引入了数学神经外科(MathNeuro),这是一种使用仅前向传递来孤立LLMs中数学特定参数的方法。MathNeuro在现有工作的基础上进行了改进,通过使用权重和激活来计算参数重要性,但通过移除那些对一般语言任务重要的参数,孤立了数学特定参数。MathNeuro识别的修剪参数会删除LLM的数学推理能力,而不会破坏其一般语言能力。通过将这些参数按照一个小常数进行缩放,可以将预训练或指导调整的LLM在GSM8K上的性能提高4-17%,同时保持非数学行为不变。MathNeuro还具有数据效率:当使用单个样本识别数学特定参数时,其大部分有效性得以保持。MathNeuro突显了未来工作干预数学特定参数的潜力。
English
Math reasoning is a highly active area of Large Language Model (LLM) research because it is a hallmark of artificial intelligence. However, few works have explored how math reasoning is encoded within LLM parameters and if it is a skill that can be isolated within a model. Doing so could allow targeted intervention to improve math performance without altering non-math behavior and foster understanding of how models encode math reasoning. We introduce Math Neurosurgery (MathNeuro), a method for isolating math-specific parameters in LLMs using only forward passes. MathNeuro builds on existing work by using weights and activations to calculate parameter importance, but isolates math-specific parameters by removing those important for general language tasks. Pruning parameters MathNeuro identifies deletes a LLM's math reasoning ability without destroying its general language ability. Scaling these parameters by a small constant improves a pretrained or instruction-tuned LLM's performance by 4-17% on GSM8K while leaving non-math behavior unaltered. MathNeuro is also data efficient: most of its effectiveness holds when identifying math-specific parameters using a single sample. MathNeuro highlights the potential for future work to intervene on math-specific parameters.

Summary

AI-Generated Summary

PDF82November 16, 2024