Knowledge distillation (KD) has been widely used for model compression and knowledge transfer. Typically, a big teacher model trained on sufficient data transfers knowledge to a small student model. However, despite the success of KD, little effort has been made to study whether KD leaks the training data of the teacher model. In this paper, we experimentally reveal that KD suffers from the risk of privacy leakage. To alleviate this issue, we propose a novel knowledge distillation method, swing distillation, which can effectively protect the private information of the teacher model from flowing to the student model. In our framework, the temperature coefficient is dynamically and adaptively adjusted according to the degree of private information contained in the data, rather than a predefined constant hyperparameter. It assigns different temperatures to tokens according to the likelihood that a token in a position contains private information. In addition, we inject noise into soft targets provided to the student model, in order to avoid unshielded knowledge transfer. Experiments on multiple datasets and tasks demonstrate that the proposed swing distillation can significantly reduce (by over 80% in terms of canary exposure) the risk of privacy leakage in comparison to KD with competitive or better performance. Furthermore, swing distillation is robust against the increasing privacy budget.
翻译:在模型压缩和知识转让方面,我们广泛使用知识蒸馏法(KD)来进行模型压缩和知识转让。通常,一个在充分数据方面受过培训的大型教师模型将知识转移给一个小型学生模型。尽管KD取得了成功,但几乎没有努力研究KD是否泄漏了教师模型的培训数据。在本文中,我们实验性地发现KD有隐私泄漏的风险。为了缓解这一问题,我们提议了一种新的知识蒸馏法,即挥发蒸馏法,这可以有效地保护教师模型的私人信息不流入学生模型。在我们的框架里,温度系数是根据数据所包含的私人信息的程度进行动态和适应性调整的,而不是预先定义的常数的超参数。根据一个职位上的标语是否含有私人信息的可能性,对象征物进行了不同的温度分配。此外,我们向学生模型提供的软目标注入了噪音,以避免未经过滤的知识转移。关于多个数据集和任务的实验表明,拟议的挥发式蒸馏法可以大大降低(在罐头接触方面超过80%),而不是根据预先定义的常态超常数。在预算中不断变的隐私风险。