CBD: API-Only LLM Black-Box Unlearning through Controlled Behavioral Divergence
作者: Zhiqiang Xie, Yijing Lin, Zhipeng Gao, Dong In Kim
分类: cs.LG, cs.AI
发布日期: 2026-06-26
🔗 代码/项目: GITHUB
💡 一句话要点
提出CBD框架以解决API黑箱环境下的机器遗忘问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 机器遗忘 黑箱模型 边缘计算 数据隐私 控制行为差异 大型语言模型 API服务 模型效用
📋 核心要点
- 现有的机器遗忘方法在API黑箱环境中无法访问模型参数,限制了其有效性。
- CBD框架通过控制行为差异,利用辅助模型生成遗忘相关性评分,从而实现有效的黑箱遗忘。
- 在ToFU forget10数据集上,CBD的模型效用提升至74.90,比第二名基线高出约15%。
📝 摘要(中文)
随着边缘设备通过API服务调用大型语言模型(LLMs)以实现上下文感知的边缘智能,边缘生成的数据可能会引入敏感、版权、危害或过时的信息。机器遗忘提供了一种有效的方法来去除不必要数据的影响,而无需重新训练LLMs。然而,现有方法面临两个主要挑战:一是API黑箱访问,无法获取目标模型参数和内部逻辑;二是如何在目标数据与保留数据具有高度相似的提示结构或语义模式时,保持保留数据的效用。为了解决这些问题,本文提出了控制行为差异(CBD)框架,该框架通过两个辅助模型创建保留输入与目标输入之间的控制行为差异,将这种差异转换为遗忘相关性评分,并将相关提示路由到目标LLM之外。实验结果表明,CBD在遗忘效用权衡方面优于现有的白箱和灰箱遗忘基线。
🔬 方法详解
问题定义:本文旨在解决在API黑箱环境中进行机器遗忘的挑战,现有方法无法获取模型内部参数,导致遗忘效果不佳。同时,当目标数据与保留数据具有高度相似性时,保持保留数据的效用变得困难。
核心思路:CBD框架的核心思路是通过两个辅助模型创建保留输入与目标输入之间的控制行为差异,进而将这种差异转化为遗忘相关性评分,确保在遗忘不必要数据的同时,尽量保留有用信息。
技术框架:CBD的整体架构包括两个主要模块:一是生成控制行为差异的辅助模型,二是计算遗忘相关性评分并路由相关提示。该框架通过估计经验Fisher矩阵构建判别基础,指导遗忘信号朝向特定目标信息。
关键创新:CBD的主要创新在于其在黑箱环境中实现了有效的机器遗忘,尤其是在目标数据与保留数据高度相似的情况下,能够保持较高的效用。与现有方法相比,CBD在处理相似提示结构时表现出更强的区分能力。
关键设计:CBD采用了基于梯度统计的判别基础,通过解决正则化广义特征值问题来优化遗忘信号的引导。此外,模型的参数设置和损失函数设计也经过精心调整,以提高遗忘效果和保留效用之间的平衡。
🖼️ 关键图片
📊 实验亮点
在ToFU forget10数据集上,CBD的模型效用提升至74.90,接近重新训练的参考值,同时比第二名基线高出约15%。在WMDP数据集上,CBD将有害知识的准确率降低至25.68,接近随机猜测,同时保持MMLU准确率为52.67,显示出良好的遗忘效果与保留效用的平衡。
🎯 应用场景
该研究的潜在应用领域包括边缘计算、智能设备和数据隐私保护等。随着对数据隐私和安全性的关注日益增加,CBD框架能够有效地从大型语言模型中去除敏感信息,确保用户数据的安全性和合规性。未来,该技术可能在各种需要动态更新和遗忘机制的AI应用中发挥重要作用。
📄 摘要(原文)
Edge devices increasingly invoke large language models (LLMs) through API services for context aware edge intelligence, while edge generated data may be collected to improve LLMs and may introduce sensitive, copyrighted, harmful, or outdated information into model behavior. Machine unlearning offers a practical way to remove the influence of undesired data without retraining LLMs. However, existing methods still face two gaps. The first is API only black box access, where target model parameters and internal logits are unavailable. The second is how to preserve retained utility when unlearning target data and retained data share highly similar prompt structures or semantic patterns. To address these challenges, we propose Controlled Behavioral Divergence (CBD), an API only black box unlearning framework. CBD uses two auxiliary models to create controlled behavioral divergence between retained inputs and unlearning target inputs, converts this divergence into an unlearning relevance score, and routes unlearning related prompts away from the target LLM. To improve discrimination accuracy under high similarity between target and retained data, CBD constructs a gradient statistics based discriminative basis by estimating empirical Fisher matrices and solving a regularized generalized eigenvalue problem, guiding the unlearning signal toward target specific information rather than shared prompt structures. Compared with eleven white box and gray box unlearning baselines, CBD achieves a better unlearning utility trade off and its performance varies little across settings. On ToFU forget10, CBD approaches the retrained reference on the forget set while raising model utility to 74.90, about 15% above the second best baseline. On WMDP, it lowers hazardous knowledge accuracy to 25.68, near random guessing, while preserving MMLU accuracy of 52.67. Code is at https://github.com/DGL-codes/CBD.