通过早退机制控制语言模型中有害上下文的风险
Controlling the Risk of Corrupted Contexts for Language Models via Early-Exiting
AI总结:
提出一种结合动态早退预测与无分布风险控制的方法,限制有害上下文对语言模型性能的退化,并在有益上下文中实现计算效率提升。
摘要:
大型语言模型(LLMs)可能受到有害或不相关上下文的影响,这会显著损害模型在下游任务上的性能。这促使我们设计具有内置机制的原则性方案,以防范此类“垃圾进,垃圾出”场景。我们提出一种新颖方法,限制有害上下文对模型性能的退化程度。首先,我们定义模型的基线“安全”行为——即无任何上下文(零样本)时的模型性能。接着,我们应用无分布风险控制(DFRC)来控制用户提供的上下文将性能降至该安全零样本基线以下的程度。我们通过利用动态早退预测实现这一点,忽略那些最关注不安全输入的后注意力头。最后,我们提出对DFRC的修改,使其既能控制有害输入的风险,又能利用有益输入的性能和效率提升。我们在涵盖上下文学习和开放式问答的9项任务上展示了理论和实证结果,表明我们的方法能有效控制有害上下文的风险,同时在使用有益上下文时实现显著的计算效率提升。
英文摘要:
Large language models (LLMs) can be influenced by harmful or irrelevant context, which can significantly harm model performance on downstream tasks. This motivates principled designs in which LLM systems include built-in mechanisms to guard against such "garbage in, garbage out" scenarios. We propose a novel approach to limit the degree to which harmful context can degrade model performance. First, we define a baseline "safe" behavior for the model -- the model's performance given no context at all (zero-shot). Next, we apply distribution-free risk control (DFRC) to control the extent to which the user-provided context can decay performance below this safe zero-shot baseline. We achieve this by leveraging dynamic early exit prediction, ignoring later attention heads that attend the most to the unsafe inputs. Finally, we propose modifications to DFRC that allow it to both control risk for harmful inputs \textit{and} leverage performance and efficiency gains on helpful inputs. We present both theoretical and empirical results across 9 tasks spanning in-context learning and open-ended question answering, showing that our approach can effectively control risk for harmful context and simultaneously achieve substantial computational efficiency gains with helpful context.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。