"Yes, My LoRD." Guiding Language Model Extraction with Locality Reinforced Distillation

Zi Liang, Qingqing Ye, Yanyun Wang, Sen Zhang, Yaxin Xiao +3 more
9/4/2024
cs.CRcs.CL

Official code: liangzid/LoRD-MEA (23 stars, last commit 2025-05-20).

Abstract

Model extraction attacks (MEAs) on large language models (LLMs) have received increasing attention in recent research. However, existing attack methods typically adapt the extraction strategies originally developed for deep neural networks (DNNs). They neglect the underlying inconsistency between the training tasks of MEA and LLM alignment, leading to suboptimal attack performance. To tackle this issue, we propose Locality Reinforced Distillation (LoRD), a novel model extraction algorithm specifically designed for LLMs. In particular, LoRD employs a newly defined policy-gradient-style training task that utilizes the responses of victim model as the signal to guide the crafting of preference for the local model. Theoretical analyses demonstrate that I) The convergence procedure of LoRD in model extraction is consistent with the alignment procedure of LLMs, and II) LoRD can reduce query complexity while mitigating watermark protection through our exploration-based stealing. Extensive experiments validate the superiority of our method in extracting various state-of-the-art commercial LLMs. Our code is available at: https://github.com/liangzid/LoRD-MEA .

View on arXivView PDF

Code Implementations(1)

liangzid/LoRD-MEAOfficial100%

Source code of the paper: "Yes, My LoRD." Guiding Language Model Extraction with Locality Reinforced Distillation. ACL'25

232Shell, PythonFeb 11, 20241 years ago
large-scalemodel-extraction-attack

Similar Papers

Cite this paper

@article{liang2024yes,
  title  = {"Yes, My LoRD." Guiding Language Model Extraction with Locality Reinforced Distillation},
  author = {Zi Liang and Qingqing Ye and Yanyun Wang and Sen Zhang and Yaxin Xiao and Ronghua Li and Jianliang Xu and Haibo Hu},
  year   = {2024},
  eprint = {2409.02718},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2409.02718v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2409.02718.svg)](https://codeofpaper.com/paper/2409.02718)

Discussion