# Poster 29613

- Kind: Poster
- Talk page and recording: https://iclr.cc/virtual/2025/poster/29613

> 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.

Hello everyone, I'm Simone Mauro, PhD student at University of Oxford, and in this quick presentation I will talk about language models are implicitly continuous, which is the latest of our works on the weird properties of LLMs. So, when we typically think about language, we model it as a discrete sequence. It can be a sequence of words, a sequence of tokens, a sequence of letters, but it is still a discrete sequence of something.
And yet, language models are neural networks, and as such they are continuous approximators of a function. And so what we set out to answer was what happens when we have a continuous model that tries to approximate something discrete, such as language? Do we observe any weird behaviors?
In order to do that, we first developed a continuous generalization of transformers, which we call continuous causal transformers. These are very straightforward relaxation that allows any embeddings as input instead of just the embeddings that match a specific token. And we define a transformer over continuous time signal rather than a discrete sequence. What this means in practice is that we have a continuous generalization.
of attention and we treat the inputs to the transformer as samples defined over a continuous signal. So for instance when we have the sentence hello how are you doing today we can actually treat it as discrete samples from a more complex function defined over the embedding space where we only have access to the samples at discrete time steps.
Why do we do all of this? Because then we can take a pre-trained language model such as LAMA-3 and we can study its continuous relaxation without actually changing the pre-trained weights. So for instance, if we have the question in the sentence Apple, Apple, Apple, Apple, how many fruits are mentioned? We know that the answer is four and if we feed this question to LAMA we also get a four as an answer.
However, since these tokens can be seen as samples over the continuous signal, we can actually play around with the sample time steps. So for instance, we can take the apple apple apple apple tokens and we can reduce the distance between these samples over the time axis. Again, these are still four tokens, they're just being treated as closer to each other on the time axis.
And what we observe is very unique in the sense that the more we reduce the distance between the samples, the more the answer shifts from four apples to three apples to two apples to an apple. And all of this happens in a continuous manner and it doesn't make sense from a discrete interpretation. Again, these are still four tokens being passed to an LM that has been trained in a discrete manner.
And yet, it has such a concept as a third of an apple token, which doesn't really make sense. And to be clear, this isn't the only weird phenomenon we've observed. We've seen that LLMs are capable of creating two-digit numbers as one-digit numbers when we play around with the samples. We've seen that they are capable of assigning continuous durations to sentences. So they have a concept of half a sentence, a third of a sentence.
We've seen that when we interpolate between different embeddings, we can observe the emergence of some properties in the intermediate embeddings that do not appear at the extremes and that vary continuously as we interpolate from one extreme to the other. And we've also observed that language models have some continuous generalizations of logic operators that do not map to existing Boolean algebra.
And to be clear, this has been said not only in Lama 3, but also in Lama 2, Gemma 1, Gemma 2, Mistral, Phi 3, so very different models. And what does all of this mean in practice?
Again, we've had this this this language models behave continuously, even if they were trained in a discrete manner. What this means is that the current discrete interpretations of language are not enough to capture the continuous behavior of LLMs. LLMs approximate a discrete sequence, but they are not themselves discrete. And as such, we need new models to study their behavior from a mechanistic interpretability perspective.
And that's pretty much it. Be sure to check out the Twitter and the GitHub. And thank you for watching. Cheers.
