Skip to main content
QUICK REVIEW

[论文解读] HuRef: HUman-REadable Fingerprint for Large Language Models

Boyi Zeng, Wang, Lizheng|arXiv (Cornell University)|Dec 8, 2023
Natural Language Processing Techniques被引用 4
一句话总结

本文提出 HuRef,一种用于大语言模型(LLMs)的人类可读指纹,可唯一标识模型的基底架构,而无需暴露参数或干扰训练过程。通过利用预训练完成后稳定的参数向量方向,并定义三个稳健的不变项,HuRef 利用 StyleGAN2 生成自然图像指纹(例如一只狗),该指纹在微调、强化学习人类反馈(RLHF)和持续预训练过程中保持不变,从而实现直观的视觉区分与精确的定量验证。

ABSTRACT

Protecting the copyright of large language models (LLMs) has become crucial due to their resource-intensive training and accompanying carefully designed licenses. However, identifying the original base model of an LLM is challenging due to potential parameter alterations. In this study, we introduce HuRef, a human-readable fingerprint for LLMs that uniquely identifies the base model without interfering with training or exposing model parameters to the public. We first observe that the vector direction of LLM parameters remains stable after the model has converged during pretraining, with negligible perturbations through subsequent training steps, including continued pretraining, supervised fine-tuning, and RLHF, which makes it a sufficient condition to identify the base model. The necessity is validated by continuing to train an LLM with an extra term to drive away the model parameters' direction and the model becomes damaged. However, this direction is vulnerable to simple attacks like dimension permutation or matrix rotation, which significantly change it without affecting performance. To address this, leveraging the Transformer structure, we systematically analyze potential attacks and define three invariant terms that identify an LLM's base model. Due to the potential risk of information leakage, we cannot publish invariant terms directly. Instead, we map them to a Gaussian vector using an encoder, then convert it into a natural image using StyleGAN2, and finally publish the image. In our black-box setting, all fingerprinting steps are internally conducted by the LLMs owners. To ensure the published fingerprints are honestly generated, we introduced Zero-Knowledge Proof (ZKP). Experimental results across various LLMs demonstrate the effectiveness of our method. The code is available at https://github.com/LUMIA-Group/HuRef.

研究动机与目标

  • 为解决在参数未公开的情况下识别微调或持续预训练后的 LLM 基底模型的挑战。
  • 开发一种方法,实现对 LLM 基底模型的直观人类区分与精确的定量验证。
  • 确保指纹在多种训练流程(包括 SFT、RLHF 和多语言持续预训练)中保持稳定。
  • 通过使用生成模型(如 StyleGAN2)将不变项映射为自然图像,使指纹具备人类可读性。
  • 提供一种无需公开模型参数的解决方案,从而保护模型安全与许可完整性。

提出的方法

  • 该方法在预训练收敛后识别 LLM 中稳定的参数向量方向,这些方向在后续训练步骤(如 SFT 和 RLHF)中基本保持不变。
  • 通过分析 Transformer 架构的结构约束,定义了三个对常见权重重排(如维度置换或矩阵旋转)具有鲁棒性的不变项。
  • 这些不变项通过卷积编码器映射为高斯随机向量,以支持图像生成。
  • 预训练的 StyleGAN2 模型将该高斯向量转换为自然图像指纹(例如一只狗),其视觉特征可反映基底模型特性。
  • 指纹仅由 LLM 所有者基于模型参数生成,而公开验证仅依赖于不变项和图像本身,不涉及权重。
  • 该方法在多种 LLM 上得到验证,包括微调和持续预训练的变体,在不同训练制度下均表现稳定。

实验结果

研究问题

  • RQ1LLM 参数向量的方向是否可在各种训练流程中作为基底模型的稳定可靠标识?
  • RQ2如何设计对维度置换或矩阵旋转等常见权重操纵攻击具有鲁棒性的不变项?
  • RQ3在保持唯一性与稳定性的同时,指纹在多大程度上可实现人类可读?
  • RQ4指纹在 SFT、RLHF 和使用新语言词汇的持续预训练下是否保持不变?
  • RQ5人类用户是否能仅凭视觉指纹可靠地区分基底模型?

主要发现

  • 预训练收敛后,LLM 参数向量的方向高度稳定,检查点间的余弦相似度从 10k–60k 步的 56.23% 上升至 310k–360k 步的 94.25%,表明强收敛性。
  • 使用不同全局随机种子从零开始训练的模型表现出显著不同的参数方向,不变项间的余弦相似度最低降至 2.08%,证实了唯一性。
  • 人类受试者研究中,通过匹配指纹识别基底模型的准确率达到 94.74%,表明指纹具备出色的可读性与直观的视觉区分能力。
  • 指纹在 SFT、RLHF 和新增语言词汇的持续预训练下保持不变,外观与不变项均保持一致。
  • 该方法成功生成了独特且可直观解读的指纹(例如狗的图像),即使在模型微调或适配后仍能反映其底层基底模型。
  • 不变项对维度置换和矩阵旋转等攻击具有鲁棒性,如在这些变换下仍保持稳定。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。