Recuperación del Tamaño del Conjunto de Datos a partir de Pesos LoRA
Dataset Size Recovery from LoRA Weights
June 27, 2024
Autores: Mohammad Salama, Jonathan Kahana, Eliahu Horwitz, Yedid Hoshen
cs.AI
Resumen
Los ataques de inversión de modelos e inferencia de pertenencia buscan reconstruir y verificar los datos con los que se entrenó un modelo. Sin embargo, no garantizan encontrar todas las muestras de entrenamiento, ya que desconocen el tamaño del conjunto de entrenamiento. En este artículo, presentamos una nueva tarea: la recuperación del tamaño del conjunto de datos, que tiene como objetivo determinar el número de muestras utilizadas para entrenar un modelo, directamente a partir de sus pesos. Luego proponemos DSiRe, un método para recuperar el número de imágenes utilizadas para ajustar un modelo, en el caso común donde el ajuste fino utiliza LoRA. Descubrimos que tanto la norma como el espectro de las matrices LoRA están estrechamente relacionados con el tamaño del conjunto de datos de ajuste fino; aprovechamos este hallazgo para proponer un algoritmo de predicción simple pero efectivo. Para evaluar la recuperación del tamaño del conjunto de datos en los pesos LoRA, desarrollamos y publicamos un nuevo benchmark, LoRA-WiSE, que consta de más de 25000 instantáneas de pesos de más de 2000 modelos ajustados con LoRA de diversos tipos. Nuestro mejor clasificador puede predecir el número de imágenes de ajuste fino con un error absoluto medio de 0.36 imágenes, estableciendo la viabilidad de este ataque.
English
Model inversion and membership inference attacks aim to reconstruct and
verify the data which a model was trained on. However, they are not guaranteed
to find all training samples as they do not know the size of the training set.
In this paper, we introduce a new task: dataset size recovery, that aims to
determine the number of samples used to train a model, directly from its
weights. We then propose DSiRe, a method for recovering the number of images
used to fine-tune a model, in the common case where fine-tuning uses LoRA. We
discover that both the norm and the spectrum of the LoRA matrices are closely
linked to the fine-tuning dataset size; we leverage this finding to propose a
simple yet effective prediction algorithm. To evaluate dataset size recovery of
LoRA weights, we develop and release a new benchmark, LoRA-WiSE, consisting of
over 25000 weight snapshots from more than 2000 diverse LoRA fine-tuned models.
Our best classifier can predict the number of fine-tuning images with a mean
absolute error of 0.36 images, establishing the feasibility of this attack.Summary
AI-Generated Summary