# Oral 31921

- Kind: Oral
- Talk page and recording: https://iclr.cc/virtual/2025/oral/31921

> Transcript of the talk's recording (session_asr), made by speech recognition or taken from the host's captions. It may contain errors. The words are the speakers'; listen to the recording on the talk's page before quoting it.

Hi and welcome to this first oral talk about our paper A Probabilistic Perspective on Unlearning and Alignment for Large Language Models. My name is Jan Scholten and I'm with the Data Analytics and Machine Learning group at the Technical University of Munich. And this is joint work with Stefan Günnemann and Leo Schwinn. So large language models are everywhere and that means we also need to work on their safety and make sure that they don't leak any sensitive data.
This also makes tasks such as unlearning and alignment more and more important, especially as more users are using these models. For example, in unlearning, we try to remove knowledge the model has been trained on from the model's output. And in alignment, we try to prevent that the model outputs any toxic information. And to ensure the trustworthiness of these models, it is critical that we carefully evaluate them.
But evaluating language models is actually challenging because we can only access them in a sequential way. And currently, in unlearning and alignment, that's done by greedy decoding. So we look at the output distribution at the next token distribution of the model and choose the token with the highest probability. And we do this in a sequential way. And then if the outputting sequence does not leak any information, we would conclude that the model is perfectly unlearned.
Well, if it doesn't leak any toxicity, it would be perfectly aligned. Now the thing is, in practice we actually sample from the LLMs output distribution. So we use them in a probabilistic way. That is we look at the next token distribution and sample the token. And we can do this multiple times until we decoded an entire sequence using a stopping criterion. So this way we can just sample multiple outputs from the model.
Now the problem is we don't actually know whether any of these samples now leak any information as here in the second sample, in the second response from the model. And this is a problem because a single sample can already have severe consequences if it leaks for example company data or any toxic answers. So for example
Tale events, which have a low probability, but severe consequences can be highly problematic, especially if more and more users are using them, like the models, it becomes more likely that we observe such tale events. So in this research, we ask the question: Are these deterministic evaluations adequate for assessing LLMs in sensitive applications such as unlearning and alignment?
Now evaluating these output distributions of the model is actually challenging, because especially if we have large language models, right? So what we propose is a probabilistic evaluation framework. And we basically suggest to evaluate the performance of the LLM using Monte Carlo sampling. So for given input, you sample responses from the model, and then you measure basically how much information is encoded in each of these samples.
For example, how much toxicity they contain or how much information gets leaked from the sensitive data. And then we combine them into a probabilistic metric. For example, this allows us to bound the probability of leaking sensitive data. We perform a case study on machine unlearning. So here we use one of these unlearning methods, MPO, and apply it to a model phi which was trained on this tofu data set, which is a common benchmark currently used in unlearning.
And you can see that the greedy decoding indicates that the model leaks less than 20% of the data that the model has been fine-tuned on. But actually if you start sampling, we observe that there's actually significant leakage of the ground truth. So our key takeaway from our alignment experiments is that our probabilistic perspective reveals significant information leakage after unlearning.
So one of the very interesting insights from our paper is that it allows us to compare the different unlearning methods and provides new perspectives. So here we compare two methods, gradient descent and preference optimization, and looking at the greedy output, both methods suggest that they behave similarly. So they have the same um leakage percentage so to say under greedy decoding.
But you can clearly see that on a sampling, these two methods severely differ. So for this exam for this example here on a gradient descent, the final model would leak much more information. We also ask a question how can we now improve unlearning under probabilistic settings. And what we suggest is to optimise the entropy of the next token distribution along the forget data, specifically to minimise this um entropy.
You can combine this with any of your existing unlearning losses. Now that we are basically optimizing this entropy, the distribution becomes more, more peaky, but there's still a probability of these, or there's still basically a non-zero probability for tail events. So to prevent that, we should suggest a technique that we call adaptive temperature scaling. So
That means if the confidence of the model grows, meaning the probability for the most likely token, at some point we basically threshold that. So if it's larger than the threshold, we set the model's temperature to zero. So the temperature of the softmax. And this makes the whole thing more deterministic because you only have a single output for the model. This is basically the distribution you have seen before when we applied MPO to phi.
And you can see that for our method, the distribution basically boils down to a point. So we do not leak more than twenty percent of the ground truth anymore under resampling. So our approach significantly reduces leakage under sampling. But the most exciting point from our perspective is that we can provide you guarantees for unlearning. So even though the model leaks basically the ground truth here from the Harry Potter Q_ and A_ data set,
We can at least bound the probability that the model leaks this data. We can also do that in more complicated settings, for example here on the tofu data set, where we bound the expectation and standard deviation of the distribution, which allows us to basically describe the output distribution much better. You can see essentially here the dashed line is the mean, like the empirical mean.
And the solid lines are our probabilistic bounds. And you can also see that for our method, well, that our method leaks an expectation significantly less compared to the baseline MPO in this case. Also holds for the standard deviation on the right side. We also perform experiments on alignment.
So here we basically evaluated the Vicuna model on a toxic query from the jailbreak bench dataset. And again, the greedy decoding would suggest that the model is perfectly aligned. Hardly any toxic information is encoded in the response from the model. But under sampling, there's significant leakage, right?
So a key takeaway from our alignment experiments is that alignment under data -mystic evaluations such as greedy decoding does not imply that your model would be aligned in probabilistic settings. So overall, we propose a probabilistic evaluation framework
for large language models. And our main message is that deterministic evaluations are inadequate for assessing sensitive applications such as unlearning and alignment since they fall short in capturing the risk associated with probabilistic outputs. And if this research interests you, we would like to invite you to our poster today at 3 p.m. in Hall 3. We will be at the poster stand 213. Thank you for your attention.
Thank you for the talk. Um I'm just wondering, uh here obviously you you focus on L_L_M_s. Do you think this sort of method can be applied to different types of models so you can have a sort of model agnostic method? Yes. How? I mean this is a very good question. Uh I think you can also apply it for example to, yeah, image generation um networks as well. Um the only thing that you really need is
like a metric with mat which measures like how toxic basically the images are or some task essentially which tells you how bad the samples are and then this allows you to evaluate generative models in general yes. Do you investigate the effects of the downstream tasks, other downstream tasks?
You mean like the utility of the model? Yeah. Yes. So in our experiments we found that like our method in specific, like the entropy optimisation does have hardly any effect on the utility. Um yep. But you can find more results in in our paper. And we would like to discuss this also in in the poster again. Um it also depends on how strong do you apply this regularisation, right?
But yeah, we actually found that entropy optimization and or adaptive temperature scaling has hardly any effect on the utility. Maybe I can ask one more question, Yeah. like when you're talking about the alignment and I wonder how could you
um framework be extended for like mitigate some safety issues like avoid answering some questions like how to make a bomb but the thing is that if you like on learning all the things about bomb it may like lose some utility like what's your opinion about how you extend your framework to this area yeah For extending the framework. like avoid answering some questions like how to make a bomb and something like that yeah Oh
So a method basically allows you to evaluate it basically in the first place, right? So it means that we show how to evaluate it under sampling and we propose basically one method of preventing that the model leaks such toxic data under sampling. This is basically one approach. You can do this for alignment as well. I think it should generalize pretty easily.
The question is basically what this means for future methods, right? And I think we are very optimistic in a way that this foundational work basically allows insights to compare the methods better in order to, yeah, solve their current limitations.
