ChatPaper.aiChatPaper

Recupero della Dimensione del Dataset dai Pesi LoRA

Dataset Size Recovery from LoRA Weights

June 27, 2024
Autori: Mohammad Salama, Jonathan Kahana, Eliahu Horwitz, Yedid Hoshen
cs.AI

Abstract

Gli attacchi di inversione del modello e di inferenza di appartenenza mirano a ricostruire e verificare i dati su cui un modello è stato addestrato. Tuttavia, non è garantito che trovino tutti i campioni di addestramento poiché non conoscono la dimensione del dataset di addestramento. In questo articolo, introduciamo un nuovo compito: il recupero della dimensione del dataset, che mira a determinare il numero di campioni utilizzati per addestrare un modello, direttamente dai suoi pesi. Proponiamo quindi DSiRe, un metodo per recuperare il numero di immagini utilizzate per il fine-tuning di un modello, nel caso comune in cui il fine-tuning utilizza LoRA. Scopriamo che sia la norma che lo spettro delle matrici LoRA sono strettamente legati alla dimensione del dataset di fine-tuning; sfruttiamo questa scoperta per proporre un algoritmo di previsione semplice ma efficace. Per valutare il recupero della dimensione del dataset dai pesi LoRA, sviluppiamo e rilasciamo un nuovo benchmark, LoRA-WiSE, composto da oltre 25000 snapshot di pesi provenienti da più di 2000 modelli diversi sottoposti a fine-tuning con LoRA. Il nostro miglior classificatore è in grado di prevedere il numero di immagini di fine-tuning con un errore assoluto medio di 0,36 immagini, dimostrando la fattibilità di questo attacco.
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.
PDF194November 29, 2024