Language Models Are Implicitly Continuous
Authors: Samuele Marro
Davide Evangelista
X. Angelo Huang
Emanuele La Malfa
Michele Lombardi
Michael J. Wooldridge
Venue: ICLR 2025 Poster (2025)
Keywords: llm
continuity
spatiotemporal transformers
linguistics
Primary area: foundation or frontier models, including LLMs
TL;DR: LLMs implicitly behave like continuous models, even when trained in a discrete fashion.

Abstract: Language is typically modelled with discrete sequences. However, the most successful approaches to language modelling, namely neural networks, are continuous and smooth function approximators.
In this work, we show that Transformer-based language models implicitly learn to represent sentences as continuous-time functions defined over a continuous input space. 
This phenomenon occurs in most state-of-the-art Large Language Models (LLMs), including Llama2, Llama3, Phi3, Gemma, Gemma2, and Mistral, and suggests that LLMs reason about language in ways that fundamentally differ from humans.
Our work formally extends Transformers to capture the nuances of time and space continuity in both input and output space.
Our results challenge the traditional interpretation of how LLMs understand language, with several linguistic and engineering implications.

Published as a conference paper at ICLR 2025
LANGUAGE MODELS ARE IMPLICITLY CONTINUOUS
Samuele Marro"
Davide Evangelista
X. Angelo Huang"
Emanuele La Malfa*
Michele Lombardi
Michael Wooldridge"
DDpparmment of Engineering Science University of Oxford Oxford, UK
"Department of Computer Science University of Bologna Bologna, Italy
*Department of Computer Science ETH Zurich Zurich, Switzerland
*Department of Computer Science University of Oxford Oxford, UK
ABSTRACT
Language is typically modelled with discrete sequences. However, the most suc- cessful approaches language modelling, namely neural networks, are continu- ous and smooth function approximators. In this work, we show that Transformer- based language models implicitly learn represent sentences as continuous- functions defined over continuous input space. This phenomenon occurs in most state-of-the-art Large Language Models (LLMs), including Llama2, Llama3, Phi3, Gemma, Gemma2, and Mistral, and suggests that LLMs reason about lan- guage in ways that fundamentally differ from humans. Our work formally extends Transformers capture the nuances of time and space continuity in both input and output space. Our results challenge the traditional interpretation of how LLMs un- derstand language, with several linguistic and engineering implications.
INTRODUCTION
In linguistics and computer science, language is typically modelled as a discrete sequence of sym- bols: sentence is sequence of words, phonemes, characters, or tokens drawn from finite vocab- ulary. This characterisation underpins both linguistics (Hockett & Hockent 1960, Chomsky [995] Stuudertt-Kenedy 20055 AAmajian et al. (017)) well classic and recent algorithmic approaches
to language modelling (Manning 1999 Bengio et al. 2000 Mnih & Hinton 2008 In Machine Learning, successful paradigm to model language that Large Language Models (LLMs, (De-
Vin 2018 Brown et al. 20200). In LLMs, language is modelled via an optimisation problem whose objective is to predict word given its surrounding context (Peters al., 2018 Radford al., 2019), though recent advancements fine-tune the models with procedures inspired by reinforcement learn- ing (Schulman et al. 2017, Rafailov et al. 2024).
At their core, the architectures that model language, including feed-forward neural net- works (Mikolov al. 2013a). Long-Short Term Memory Networks (LSTTMs) (Hochreiter 1997 Sundermeyer al. (012)) and Transformers (Vaswani et al. (017), approximate discrete sequence of tokens with continuous smooth functions. However, training inherently continuous models on discrete sequences does not imply that the models themselves treat language discrete.
This paper explores how the tension between discrete data and continuous function approxima- tors is synthesised in Transformers-bee based Large Language Models (Vaswani et al. 2017). To do
* 'These authors contributed equally.
*Correpooding author. Email: samue marroleng ox ww..cccc.... ac.uk.
For completeness, a few notable works in linguistics and computer science model language as continuous:
among the others. Allhouli et al. (2014) and Bowmmn et al. (2013) model sentences as continuous entities in latent space, while recent approaches with quantum NI.P represent meaning superstate of different
words (Guarasci al. 2022.

---

Published as a conference paper at ICLR 2025
so, we seamlessly generalise the Transformers architecture to support continuous inputs. This tension, which does not modify a model's weights or alter the architecture, allows the study of existing pretrained LLMs, including Llama (Dubey et al., 2024), Mistral (Jiang et al. 2023). and Gemma (Gemma Team et al. 2024b), with continuous input sequences.
By running experiments state-of-the-art LLMs, we find that the language LLMs learn is implicitly continuous, as they are able to handle, with minor modifications, inputs that are both time continu- ous and spatial continuous. In particular, we formally show that the results obtained by extending pretrained LLMs to handle time continuous input strongly depend on a quantity, named duration, associated with each sentence. We also show in Section 4 that the semantics of this continuum sig- nificantly deviate from human intuition. Our results suggest that our intuition about human language can be misleading when applied to L.Mss, as LLMs hold implicit representations of continuous se- quences in unintuitive ways. Furthermore, these observations have practical consequences from an engineering perspective, as they suggest that it possible to leverage the continuous representations of LLMs to pretrain them more efficiently.
Our code is available at http::/whhhc.oooommmmmmmmmommooe
2 RELATED WORK
Modern state-of-the-ar pretrained language models operate discrete number of tokens and do not handle continuous inputs directly. However, in other domains, extensions of classical Transform- ers (Vaswani et al. (2017) ) to time continuous inputs have been recently explored in tackling differ- ent problems. In modelling dynamical systems, (Fonseca et al. )2033) have proposed adding new regularisations to classical transformer to create continuous behaviour in an attempt improve upon existing time continuous models such as Neural ODEs (Chen et al. (2019): Kidger] (2022). ). In time series modelling, (Chen et al.] (2024); Moreno-Pinn advanced by Neural ODEs by integrating time continuous transformers and, consequently, supersed- ing other existing approaches such Neural CDE (Kidger et al. (202)) and Neural RDE (Morrill
et al. (2024) further developed the ideas
et al. (2021).
Another line of work considers time continuous extension of language by processing it through net- works combining the flexibility of classical Transformers with the mathematical interpretability of NeuralODEs, such as ODETransformer (Li et al. (022a)). CSAODE (Zhang et al. (202T)) Tran-
sEvolve (Dutta et al. (2021), , and N-ODE Transformer (Baier-Reimi & De Sterok (2020). Several authors have also explored spatial continuous extensions of LLMs Tang et al. (2021); Schwenk y007); Östling & Tiedemann (017)). where the embedding space is expanded to include vectors not directly mapped to specific tokens, thereby enhancing the representational power of the models. A broad class of Diffusion Language Models (Li et al. (2022b); Gong et al. (2022); Lovelace et al.]
(024a): Gulrajani & Hashimoto (0224) /Zhang et al. (2024): Lovelace et al. (2024b)) employs a similar concept, where the model generates elements not necessarily tied to individual tokens in the embedding space, thereby effectively incorporating spatial continuous extensions into language modelling.
Additionally, continuous representations in LLMs have been studied either in the context of concepts for which intuitive spectra exist (Gurnee & Tegmaak 2023 Arditi et al. 2024) or from neuron- driven perspective (Anthropic 2024). In particular, our work can be seen as complementary to the latter: while the authors of |Athhropic (2024) show that certain neurons map to specific concepts (which can then be steered), we show that such concepts exist even at the embedding level, and we offer a theoretical framework to study formally such phenomena an architecture-indeeender manner.
Continuing the overview of related works, in Ravfogel et al. (2022) the authors remove concepts like biases by erasing the pertinent area that makes that concept emerge. Our work shows however that LLMs can interpolate between "overlapping" concepts: erasing an entire area might thus also affect other concepts, which represents interesting research direction. Moreover, in Todd et al. (2023) the authors show that some LLMs feature function vectors, which represent specific operations (e.g. sums), It is possible that some of the continuous behaviours in an L.M arise as function vectors.
2

---

Published as a conference paper at ICLR 2025
Figure I: Left. A graphical representation of the time continuity of language. Each observed token obtained by sampling at integer timesteps a stepwise constant function defined on the real interval [o, The length of each constant interval is the duration of the associated token. Right. A spatial continuous extension of sentence, where x(t) represent any value.
Finally, our work can also be seen as a response to Vilnis & McCallum 2014), which trains inher- ently continuous embeddings: we show that this process is not necessary, as even discretely trained LLMs show similar behaviours.
3 A CONTINUOUS GENERALISATION OF LANGUAGE MODELS
In this section, we propose the hypothesis that language can be seen the discretisation of spatio- temporal continuous function whose value corresponds As we will show, this assumption allows us to define a continuous extension of the classical ca- sual Transformer module, namely the Continuous Causal Transformer (CCT). The CCT accepts spatio-temporal continuous functions input while including pretrained models regular time- and space-discrete data as a special case. Moreover, we will formally discuss the implications of this construction, showing the basic results required to describe the experiments we presented later.
valid token for any integer timestep.
3.1 TIME CONTINCITY
Following classical approaches (Cotterell et al. 2023 we define a natural sentence as a sequence [W1, W Wr) c W of tokens, sampled from an underlying distribution p (1,, W2, W2,..., Wr), where each token w, only depends on previous timesteps, i.e. pl (W W2,..,, WT) Pi (T=2 (w,lw<t), where defined Wat (W1...., W.-1). Moreover, given contin- uous function E : W + Rdd that embeds any token w, d-dimensional vector x, := E(w,), we name the push-forward distribution p(XTT) := Exp(w W w the distribution of natural sentences. Clearly, since the set W is inherently discrete, then the set X Rg(E), i.e., the range of &, is finite set, to which we refer as the space of valid embeddings. Indeed, in any classical formalisation of language, sentence is considered to be finite both in time and space.
In this work, we hypothesise that any observed sentence {x:]T1 p(x-T) originates from the integer discretisation of function x(t), defined the real interval [0, T). Clearly, there exist infinitely many of these functions. this section, we assume for x(t) the simplest, possible form: stepwise constant function, defined as
x(t) (x,.(a)
where ((o,,,.](t) (t) is the indicator function of the interval [a,, bz]. whose value is te [a,, b.], otherwise. For the intervals {[a., T we assume that:
3

---

Published as a conference paper at ICLR 2025
(H1) [[a,:b,1]2+ define partition of the interval [0, T i...
T b.] [0. 7).
T N s=1
Ul 8=1
aa b=]===]=
(H2) 8 [a,,bs by] for any 1....., 7.
With this assumption, sentence can be seen continuous flow of information, where the duration of each word is defined as the length of the interval defining it, i.e. b, - dg. Throughout the rest of this paper, will refer the duration of token X5 as dg b, ag. A representation of this concept is summarised in Figure
To be able to process time continuous inputs, need extension of the typical causal Trans- former architecture, which we name Continuous Causal Transformer (CCT). We argue that any Transformer-basse LLM can be seen discretisation of CCT, and propose a technique to modify the architecture of standard LLMs to handle stepwise-constant sentences as input, which represents the basis of our experiments Section 4
To prove our statement, we begin by considering the classical formulation of multi-head causal attention module, where the transformed output {yt):-1 associated with the sequence {xx)=-1 is defined as:
q kg Vd
Σ 8-1 2
Yt
exp
Vs:
k vd
where Ze := Ee=1 exp
is normalisation constant, and:
a(l) x()) k(1)= = ((x=)(x)x)))) v(1) (())((()()..
where W(4), (+)), and w()) are the attention matrices that are learned during training. For an in-depth derivation of Equation refer to Appendix A.I]
Therefore, a continuous extension of Equation can be simply obtained by substituting the sum with integral, thus obtaining the continuous causal atlention module
y(t) S: Z,
k()))((s) Vd
exp
v(s)ds,
where Z So exp
q(1) k(()) (k()
ds.
Vd
The multi-head version of Equation is obtained by simply considering independent copies of (t) (namely, (t)(t)...., (t) concatenating them and multiplying the result with a parameter matrix W()):
((t) ( ca)
(5)
Note that the learned matrices W(9), (K),, W(v), and (()) do not depend on the time discretisation (since they act on the feature domain of x, and yı). Consequently, we can use pretrained weights from any classical LLM.
To complete the construction of our CCT architecture, we remark that the Add&Norm scheme can be naturally re-used as it is, computing the final output x(t) as:
x(t) = LayerNorm (w()) + x(t)),
(6)
(t)) LayerNorm (y()) x(t)).
4

---

Published as a conference paper at ICLR 2025
Finally, observe that Equation 4 can be simplified by considering our stepwise- assump- tion for the language, as Equation !
Indeed, we show in Appendix A.2
that:
T y(t) = Σ k-1 Z
q
exp
Vadks
(8)
where 7 is the only integer such that L E
[ag, be]. whose existence and uniqueness guaran- teed by [+ and (H22 Note that Equation 8 is equivalent to Equation 2 as long as the partition
and
[[ax, 1 is chosen so that each token has uniform duration dy for all & ....., T. since
in this case for any integer timestep t,
T
1
T 4:
kk
yz= y(t
exp
Vkr
Ze
Vd
which is exactly Equation
However, the CCT module is more general in the sense that it can easily handle arbitrarily stepwise constant functions, for example with non-uniform duration. Indeed, we can simply choose any partition of the interval [0, 7' into sub-intervals satisfying condition (H2) and apply Equation 8 compute the continuous transformed output y(t). Interestingly, Equation implies that, for fixed input sentence x(1), the output y()) does not depends on the chosen partition {[ by. [) but only on the durations de of each token. This suggests that our CCT shows shifting-invariance, i.e. the output does not change if the input gets shifted in time, long as the shifted partition satisfies (HI) and (H2) On the other hand, the CCT is not scale-invariant, since scaling will alter the token duration. These properties have been observed empirically in Appendix D.I
3.2 SPACE CONTINUITY
Note that, in our construction, we never explicitly used the fact that the range of x(1) is subset of X. i.e. that any value of xt) is an admissible token. This motivates the introduction of spatial continuous CCT's where we consider more general sentence in the form of equation []] where x, is not necessarily the embedding a meaningful word w Note that our CCT model does not require any explicit modifications to be adapted to this setup.
Spatial continuity particularly relevant when the value x, is obtained by interpolating be- tween two meaningful tokens. Interestingly, show in Section 4.3 that pretrained LLMs assign a semantic meaning to these intermediate embeddings, which results in something distinct from the two tokens which used compute the interpolation. Note that this is non-trivial and non- predictable, since the LLM never explicitly saw the majority of non-meaninguul tokens as input during training, suggesting intriguing properties of the CCT architecture itself (which we aim to analyse more in-depth in future work).
To conclude, we remark that the stepwise constant assumption on the continuous language structure as in Equation [ can be easily generalised to any other function structure for which a closed-form solution of the integral in Equation 4 can be obtained. This happens, for example, for any choice of piece-wise polynomial function defnedd over a partition of [0, 2'. satisfying the assumptions (HI) and (H2) Testing the behaviour of the CCT architecture for other choices of x(t) is left future work.
In the next sections, we will prove through several experiments that not only our proposed CCT model acts as natural generalisation of classical Causal Transformer, recovering the same be- haviour when uniform discretisation of the domain into intervals of length is considered, but also that the CCT seems to understand the concept of temporal fraction word.
4 PRETRAINED LLMS ARE IMPLICITLY CONTINUOUS
In this section, we use our generalisation of LLMs to study the time continuous and contt-consinuuus behaviours of pretrained L.Mss. Thanks extension, we identify several novel properties of dis-
5

---

Published as a conference paper at ICLR 2025
cretely trained models, such the key role of duration as semantic component and the existence of meaningful intermediate embeddings that do not map to any known token. Unless otherwise spec- ified, our results hold for wide variety of models, including Llama2- 1eB-C3BBChhhh (Touvron et al.
2023), Llama3-8B (Dubey et al.
2024), Mni-3--Medium--4-Insttu (Abdin et al. 2024), Gemma-1
7B Gemma Team et al. 2024a). Gemma-2-9B (Gemma Team et al. 2024b), and Mistral-7B (Jiang)
et al. 2023).
4.1
SINGLE-TOKER TIME CONTINUITY
We begin by studying how LLMs respond to variations in the time duration of token. Consider the following input prompt to Llama3-8B:
In the sentence "apple apple apple apple", how many fruits are mentioned?
The answer is naturally "4", and we expect language models to reply similarly However, suppose that reduce the duration of the portion of the sentence between double quotes, defined in Section 3). i.e.,
In the sentence "apple apple apple appl=", how many fruits mentioned?
As the duration of the four "apple" tokens varies, we expect the model to output either (1) "4", since the number of tokens has not changed or (2) nonsensical/unrelated tokens, since such an input would Instead, Llama 3 returns output that both is meaningful and differs from that of the original sentence. As shown in Figure 2 the output consists of each number from 1 to 4, with peaks that vary with the token duration. In other words, the LLM interprets the sentence's content as if there were, respectively, 1, 2, 3 and 4 "apple" tokens.
be
From a linguistic perspective, the model returns outputs that, while reasonable, are hard reconcile with the traditional interpretation of language in humans. LLMs naturally embody notions such as half a token (i.e., a token whose duration that LLMs interpret language differently compared to humans.
one time step), which humans lack This suggests
We quantitatively study this phenomenon by repeating this experiment on a dataset of 200 word counting tasks. In particular, we reduce the duration of all repeated tokens (in our example, 'apple") and measure how many unique applicable peaks we observe as the duration varies. For instance, if the word is repeated four times, we vary the duration factor we expect the model to count, for different duration factors, 1, 2, 3, and 4 elements f A discrete interpretation of LLMs would predict that the model consistently predicts the same number (i.e. 4) regardless of the duration factor. Instead, we observe on average 190% more unique predictions. In other words, our results are incompatible with discrete interpretation of the behaviour of LLMs. Refer to Appendix C.1 for a more in-depth overview of our methodology and results.
In the next section, stress the generality of this observation by applying the notion of time dura- tion to multiple tokens and entire sentences.
4.2 BEYOND SINGLE-TOKEN TIME CONTINUITY
A natural extension of token-level time continuity involves changing the duration of entire linguistic units.
We first study how LLMs behave when summing 2-digit numbers, where the duration of one of the addends is reduced. Consider the following input to Llama2-13B
Indeed, all the models studied replied with "4"
'To obtain the same output from humans, one would modify the input to include instructions such as Consider each apple word as half an apple'. We do not need to prompt an LLM with such instructions.
Wee treat 0 as an unexpected peak since the semantics of a zero-duration sentence are ill-defined. We use Ilama2 instead of laama as the latter treats both digits single token.

---

Published as a conference paper at ICLR 2025
0.8
0.6
Probability
0.4
0.2
0.0
0.2
0.4
0.6
0.8
1.0
Duration Factor
Other Digits
Other Tokens
Figure 2: Time continuity experiments on the example in Section 4.1 If we reduce the time duration of the "apple" tokens, the transition between each output answer (a number between and 4) is continuous.
The sum of 24 and
3
is
deg
As shown in Figure 3a by shrinking the duration of the tokens "1" and "3", observe that the model transitions from predicting "3" (i.e., the first token of the sum 24 13) to "2" (i.c.. the model progressively treats "13" as single-digit number). Refer Appendix C.3 for more examples of this behaviour across models and choices of numbers.
Additionally, we study how LLMs behave when we reduce the duration of entire sentences. For instance, consider the following passage, which is fed to Llama3-8B.
Alice goes to the shop.
She buys a carton of milk. She buys an apple.
dep She buys a potato. She buys a loaf of bread.
dag How many items did Alice buy?
dag
By reducing the duration of each sentence (ds, dag day ds,). we once again observe the model replying if Alice bought 1, 2, 3 items (Figure (b). which is consistent with findings in the previous section. In particular, we observe on average 205% more unique predictions than what would be expected from discrete interpretation of LLMs. Refer Appendix C.2 for further data on this behaviour, which we observed to be present across all models.
There are thus reasons believe that the notion time continuity is innate in pretrained LLMs. Such notion might emerge natural consequence of their nature as smooth function approxima- tions, though further research this direction is needed.
4.3 SPACE CONTINUITY IN PRETRAINED LLMS
In addition time continuity, study the nature of space continuity in LLMSs.

---

Published as a conference paper at ICLR 2025
1.0
Probability
0.6
Prahuhiiry
0.5
0.4
0.4
02
0.2
0.4
0.6
Duration Factor
Duration
Other Tokens
Other Digits
Otber Tokens
(a) When foeding "The sum of 24 and 13 is" to Llama 2 and shrinking 13, we observe transition in the out- put from "3" (i.e. the result of 24 13) "2" (i.e. the result of 24 + single-digit number).
(b) If we reduce the time duration of each sentence, the transition between each output answer number between "1" and "4") is continuous.
Figure 3: Time continuity experiments as per Section 4.2 with Llama3-8B.
0.55
0.35
0.30
Prohabilit
0.40
ProbubiBity
0.20
0.35
0.30
0.30
0.00
0.0
0.4
0.8
1.0
0.0
0.2
0.4
0.5
0.8
1.0
Interpebation Factor
Interpolation Factor
supermseket
shop
Yes
No
Otber Tokens
market
famesss
grecery
Other Tokens
(b) Predicted next token for the sentence "Alice bought some * at the" for Llama 3. All ported tokens have a probability of at least 5% at any point of the interpolation. For the other tokens, we report the cumulative distribution.
(a) Predicted next token for the sentence "Are
* red?" for 3.
Figure 4: The linear embedding hypothesis holds for Llama3 and extends to the output prediction.
In the NLP literature, it is widely known that the embeddings of semantically similar tokens tend to share some of their semantics, an observation often referred as the linear embedding hypothe- sis (Mikolov et al. 2013b Park al. 2023). However, thanks to generalisation that such hypothesis also holds for LLMs in the output space. In other words, inputs undergo a make an LLM predict the next word; yet, the intermediate
discover
series of non-linear transformations embeddings and the output preserve the semantics of the interpolated inputs, with the region of the embedding space that, while not having any meaningful interpretation, are treated as proper concepts with well-defined properties.
Consider the following example for Llama3-8B:
Are
red?
8

---

Published as a conference paper at ICLR 2025
0.7
0.6
0.6
0.5
Frobahillty
Probabailty
0.4
04
0.3
0.2
0.1
Interpelation Factor
Interpolation Factor
green
yellow
Yos
No
Other Tokens
(b) Predicted next token for the sentence "The most common colour for * is" All reported tokens have a probability at least 5% at any point of the interpolation. For the other tokens, we report the cumulative distribution.
(a) Predicted next token for the sentence "Are fruits?" for Llama 3.
Figure 5: Beyond the linear embedding hypothesis on Llama 3.
In the previous example, represents linear interpolation of the embeddings of the "apples" and "bananas" tokens. Intuitively, such an interpolation does not have proper semantics in human language (there is such thing "apple-bananas") In fact, the interpolation does not map to the embedding of any known token (see Appendix C.4. Nevertheless, Llama3's output (as well other LLMs') smoothly transitions between outputting "yes" and "no", shown in Figure (left). This behaviour is further confirmed by similar prompts like "Alice bought some * at the" (right). In other words, any interpolation between "apples" and "bananas" is treated as grammatically correct part of sentence.
While one may argue that the context plays role in modelling the range of possible answers to these questions (e.g., in first example "yes" and "no" are the only reasonable options), this interpretation only partially captures the nuances of LLMs' behaviour with space-continuous inputs. In fact, if we prompt the model with the following input:
Are fruits?
the model always replies "yes", reported in Figure 5 (left). Any interpolation of "apples" and "bananas" indeed a valid fruit for the LLM. Additionally, for subset of models (namely Llama 3, Gemma 1, Mistral, and partially Gemma 2), when we feed the input:
The most common colour for is
we discover that the intermediate colour of "apples" and "bananas" is "green" (Figure 5). i.e., these Transformers hold the knowledge that there is fruit in between "apples" and "bananas" whose colour is neither "red" nor "yellow". Refer Appendix [.4] for more quantitative and qualitative results.
In short, LLMs assign semantic meaning to their embedding space, but this meaning is neither trivial nor consistent with human intuition. These results challenge the assumption that the way LLMs interpret language a surrogate of that of humans.
IMPLICATIONS
Our results show that the current understanding of language models is incomplete. this section, highlight what believe are promising implications of our findings.
9

---

Published as a conference paper at ICLR 2025
LLMs learn continuous representation of language. While LLMs are mostly trained on dis- crete data, they learn representations that go beyond the meaning and interplay of each token. We thus argue that our generalisation of Transformers opens up ample, multiple sub-tokens can be generated in parallel as interpolations of sentences with similar templates but different semantics. The same intuition solving non-trivial issue: tokens fed simultancously and in "superposition" (e.g., an interpolation of multiple, semantically similar words) generate an output where each corresponding token should be disentangled and reassigned to its original sentence.
inference techniques: for
be applied to training. Yet, it requires
Language models treat language differently than humans. Most of the examples reported in this paper contradict human intuition about language. Duration deeply affects a model's output in ways humans hardly grasp. Similarly, LLMMs assign meaning to interpolations of embeddings even when such representations do not map to well-defined concepts. These behaviours represent a significant deviation from how humans reason about language, one that cannot be explained by simple lack of data. We believe that the field of linguistics, alongside that of Machine Learning, should embrace the challenge of studying the continuous language of LLMs, synthesising classic tools from linguisties and deep learning. For instance, the notion of space continuity deeply intertwined with how I.LMs interpret language: we believe that our generalisation of Transformers can help better understand the strong performance of L.MMs low-frequency inputs, as well as explain why they fail on edge cases that are semantically meaningful to humans.
Overall, our findings suggest that understanding more in-depth the continuous nature of LLMs can both improve their performance and align their representations with human reasoning.
6 CONCLUSION
In this paper, we introduce a generalisation of causal Transformers to study how pretrained LLMs respond to continuous inputs. We characterise the notions of time and space continuity, which we use to show that the language LLMS learn diverges from that of humans. In particular, LLMs assign complex semantic meanings otherwise meaningless interpolations of embeddings and treat duration as a key property of their language. These results suggest that our traditional understanding of LLMs is incomplete.
We hope that, by studying the continuous behaviour of LLMs, future work will be able to shed further insight into the language of Large Language Models, with implications for both linguistics and LLM design.
ACKNOWLEDGEMENTS
This work was supported by the EPSRC Centre for Doctoral Training in Autonomous Intelligent Machines and Systems EP/Y035070/1, in addition to Microsoft Ltd and the Collegio Superiore di Bologna. Emanuele La Malfa supported by the Alan Turing Institute. We would like to thank Aleksandar Petrov and Constantin Venhoff for their insightful discussions.
REFERENCES
Marah Abdin, Sam Ade Jacobs, Ammar Ahmad Awan, Jyoti Aneja, Ahmed Awadallah, Hany Awadalla, Nguyen Bach, Amit Bahree, Arash Bakhtiari, Harkirat Behl, et al. Phi-3 technical re- port: A highly capable language model locally on your phone. arXiv preprint arXiv:2404. 14219, 2024.
Adrian Akmajian, Ann Farmer, Lee Bickmore, Richard A Demers, and Robert M Hamish.. Lin- guistics: An introduction to language and communication. MIT press, 2017.
Tamer Alkhouli, Andreas Guta, and Hermann Ney. Vector space models for phrase-based ma- chine translation. In Dekai Wu, Marine Carpuat, Xavier Carreras, and Eva Maria Vecchi (eds.), Proceedings of SSST-8, Eighth Workshop Syntax, Semantics and Structure in Statistical Trans- lation, pp. 1-10, Doha, Qatar, October 2014. Association for Computational Linguistics. doi: 10.31 1/3115/v1/// 14-4001. URL httpssttss://///tm http://ccoaattooooo..ooooo.o. /1//:/11144000 404001
10

---

Published as a conference paper at ICLR 2025
Anthropic. Scaling monosemanticity: Extracting interpretable features from claude 3 son- net. Transformer Circuits, 2024. Seallaac..onoeermttttttttt.aaaa.
Andy Arditi, Oscar Obeso, Aaquib Syed, Daniel Paleka, Nina Panickssery, Wes Gurnee, and Neel Nanda. Refusal in language models is mediated by a single direction. arXiv preprint TrXfv:2406.11717, 2024.
Aaron Baier-Reinio and Hans De Sterck. N-ode transformer: A depth-adaptive variant of the trans- former using neural ordinary differential equations. arXiv preprint arXiv:2010. 2020.
Yoshua Bengio, Réjean Ducharme, and Pascal Vincent. A neural probabilistic language model.
Advances in neural information processing systems, 13, 2000.
Samuel R Bowman, Luke Vilnis, Oriol Vinyals, Andrew M Dai, Rafal Jozefowicz, and Samy Ben- gio. Generating sentences from a continuous space. arXiv preprint arXiv:1571.06349, 2015.
Tom B. Brown, Benjamin Mann, Nick Ryder, et al. Language models are few-shot learners. In Advances in Neural Information Processing Systems 33: Annual Confer- ence on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual, 2020. URL http//ss//pprcccedngggssssss 1457c0dbbt 667774797445 8ofb8ac1ll......
/ttppp/ppr/222/astt// 71144466718888011111122 42f Abt html
Ricky T. Q. Chen, Yulia Rubanova, Jesse Bettencourt, and David Duvenaud. Neural ordinary dif- ferential equations, 2019.
Yuqi Chen, Kan Ren, Yansen Wang, Yuchen Fang, Weiwei Sun, and Dongsheng Li. Contiformer: Continuous-time transformer for irregular time series modeling. Advances in Neural Information Processing Systems, 36, 2024.
Noam Chomsky. Language and nature. Mind, 104(413):1-61, 1995.
Ryan Cotterell, Anej Svete, Clara Meister, Tianyu Liu, and Li Du. Formal aspects of language modeling. arXiv preprint arXiv:2311.044 1.04329, 2023.
Jacob Devlin. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv: (eX.vv/8/0..0 1at../80000.,.. 2018
Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Amy Yang. Angela Fan, et al. The llama 3 herd of models. arXiv preprini arXiv:2407.22 1783, 2024.
Subhabrata Dutta, Tanya Gautam, Soumen Chakrabarti, and Tanmoy Chakraborty. Redesigning the transformer architecture with insights from multi particie dynamical systems. Advances in Neural Information Processing Systems, 34:5531-5544, 2021.
Antonio Fonseca, Emanuele Zappala, Josue Ortega Caro, and David Dijk. Continuous spa- abs/ 2301 13338
tiotemporal transformers, 2023. URL
Gemma Team, Thomas Mesnard, Cassidy Hardin, Robert Dadashi, Surya Bhupatiraju, Shreya Pathak, Laurent Sifre, Morgane Rivière, Mihir Sanjay Kale, Juliette Love, al. Gemma: Open models based on gemini research and technology. arXiv preprint arXiv:2403.08299 2024a.
Gemma Team, Morgane Riviere, Shreya Pathak, Pier Giuseppe Sessa, Cassidy Hardin, Surya Bhu- patiraju, Léonard Hussenot, Thomas Mesnard, Bobak Shahriari, Alexandre Ramé, et al. Gemma 2: Improving open language models at a practical size. arXiv preprint arXiv:2408.0 00008000/14 18, 2024b.
Shansan Gong, Mukai Li, Jiangtao Feng, Zhiyong Wu, and LingPeng Kong. Diffuseq: Sequence to sequence text generation with diffusion models. arXiv preprini arXXv:2210.08933 2022.
Raffaele Guarasci, Giuseppe De Pietro, and Massimo Esposito. Quantum natural language process- ing: Challenges and opportunities. Applied sciences, 12(1 1):561,, 2022.
Ishaan Gulrajani and Tatsunori B Hashimoto. Likelihood based diffusion language models. Ad- vances in Neural Information Processing Systems, 36, 2024.

---

Published as a conference paper at ICLR 2025
Wes Gurnee and Max Tegmark. Language models represent space and time. arXiv preprint arXiv:2310.02207, 2023.
S Hochreiter. Long short-term memory, Neural Computation MIT-Prees, 1997.
Charles F Hockett and Charles Hockett. The origin of speech. Scientific American, 203(3):88-9)) 1960.
Albert Q Jiang, Alexandre Sablayrolles, Arthur Mensch, Chris Bamford, Devendra Singh Chaplot, Diego de las Casas, Florian Bressand, Gianna Lengyel, Guillaume Lample, Lucile Saulnier, et al. Mistral 7b. arXiv preprint arXiv:2310.06825 2023.
Patrick Kidger. On neural differential equations, 2022. URL https://arxiv.orrt
22C2.02433
Patrick Kidger, James Morrill, James Foster, and Terry Lyons. Neural controlled differential equa- tions for irregular time series. In H. Larochelle, M. Ranzato, Hadsell, M.F. Balcan, and H. Lin (eds.), Advances in Neural Information Processing Systems, volume 33, pp. 6696-6707. Cur- ran Associates, Inc,, 2020. URL URL//tpps///rroceddss....ee e / htt.:////00000277700000000556660
ec/paprr files/
Bei Li. Quan Du, Tao Zhou, Yi Jing, Shuhan Zhou, Xin Zeng, Tong Xiao, JingBo Zhu, Xuebo Liu, and Min Zhang. ODE transformer: An ordinary differential equation-inspired model for sequence generation. In Smaranda Muresan, Preslav Nakov, and Aline Villavicencio (eds.), Pro- ceedings of the 60th Annual Meeting of the Association for Computational Linguistics ( (Volume I: Long Papers), pp. 8335-8351, Dublin, Ireland, May 2022a. Association for Computational Lin- guistics. doi: acl- 1el--ong.57.
Xiang Li, John Thickstun, Ishaan Gulrajani, Percy S Liang, and Tatsunori B Hashimoto. Diffusion- Im improves controllable text generation. Advances in Neural Information Processing Systems, 35:4328-43433 2022b.
Fangru Lin, Emanuele La Malfa, Valentin Hofmann, Elle Michelle Yang, Anthony Cohn, and Janet B Pierrehumbert. Graph-enhanced large language models in asynchronous plan reasoning. arXiv preprint urXiv:2402.02805, 2024.
Justin Lovelace, Varsha Kishore, Yiwei Chen, and Kilian Q Weinberger. Diffusion guided language modeling. arXiv preprint arXiv:2408.0422 2024a.
Justin Lovelace, Varsha Kishore, Chao Wan, Eliot Shekhtman, and Kilian Q Weinberger. Latent dif- fusion for language generation. Advances Neural Information Processing Systems, 36, 2024b.
Christopher D Manning. Foundations of statistical natural language processing. The MIT Press, 1999.
Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg S Corrado, and Jeff Dean. Distributed representa- tions of words and phrases and their compositionality. Advances in neural information processing systems, 26, 3a.
Tomas Mikolov, Wen-tau Yih, and Geoffrey Zweig. Linguistic regularities in continuous space word representations. In Lucy Vanderwende, Hal Daumé III, and Katrin Kirchhoff (eds.), Proceedings of the 2013 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pp. 746-751, Atlanta, Georgia. June 2013b. Asso- ciation for Computational Linguistics. httptt / lancholothyoyy org N1 3 3-1000
Andriy Mnih and Geoffrey E Hinton. A scalable hierarchical distributed language model. Advances in neural information processing systems, 21, 2008
Fernando Moreno-Pin Álvaro Arroyo, Harrison Waldon, Xiaowen Dong, and Álvaro Cartea. Rough transformers: Lightweight continuous-time time sequence modelling with path signatures, 2024. UtL.httss:/ www.aawwwww..rg///////////////
20799
12

---

Published as a conference paper at ICLR 2025
James Morrill, Cristopher Salvi, Patrick Kidger, and James Foster. Neural rough differential equa- tions for long time series. In Marina Meila and Tong Zhang (eds.), Proceedings of the 38th International Conference on Machine Learning, volume 139 of Proceedings of Machine Learn- ing Research, pp. 7829-7838. PMLR, 18-24 Jul 2021. URL https: httpp::///rocceedecc ngs. mml...........................m. .mlr.
press/ http//139//mm/ 11w.i. htm
Robert Östling and Jörg Tiedemann. Continuous multilinguality with language vectors. In Mirella Lapata, Phil Blunsom, and Alexander Koller (eds.), Proceedings of the 15th Conference of the European Chapter of the Association for Compulational Linguistics: Volume 2, Short Papers, pp. 644-649, Valencia, Spain, April 2017. Association for Computational Linguistics. URL https:
//aclanthology.oee wwwpe/ooooooo.gg/ii.ee org
2202
Kiho Park, Yo Joong Choe, and Victor Veitch. The linear representation hypothesis and the geometry of large language models. arXiv preprint arXiv:231 I. 1.06558, 2023.
Matthew E. Peters, Mark Neumann, Mohit Iyyer, Matt Gardner, Christopher Clark, Kenton Lee, and Luke Zettlemoyer. Deep contextualized word representations. In Marilyn Walker, Heng Ji, and Amanda Stent (eds.), Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies. Volume I (Long Papers), pp. 2227-2237, New Orleans, Louisiana, June 2018. Association for Computational Lin- guisties. doi: 10.18/63/v1/NI 8- 1202. URL hwt.h:tttts//.cm
wewellnnhhloogoo oog.llogyyyoyoolooooo 8 1202
Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. Language models are unsupervised multitask learners. OpenA/ blog, 1(8):9, 2019.
Rafael Rafailov, Archit Sharma, Eric Mitchell, Christopher D Manning, Stefano Ermon, and Chelsea Finn. Direct preference optimization: Your language model is secretly reward model. Advances in Neural Information Processing Systems, 36, 2024.
Shauli Ravfogel, Michael Twiton, Yoav Goldberg, and Ryan Cotterell. Linear adversarial concept erasure. In International Conference Machine Learning, pp. 18400-18421. PMLR, 2022.
John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv: 177.v:1777.06377 2017.
Holger Schwenk. Continuous space language models. Computer Speech Language, 21(3):492- 518, 2007. ISSN 0885-2308. doi: https://b..oog//0000166/...so..0 2006 09.00990003 9930 URL https: //www 7/www.co www.scienneiic.ccc rect. com/ http:///cceeeeatccl/l///////////
Michael Studdert-Kennedy. How did language go discrete. Language origins: Perspectives on evolution, ed. M. Tallerman, pp. 44-67,777 2005.
Martin Sundermeyer, Ralf Schlüter, and Hermann Ney. Lstm neural networks for language model- ing. In Interspeech, volume 2012, pp. 194-197, 2012.
Zineng Tang, Shiyue Zhang. Hyounghun Kim, and Mohit Bansal. Continuous language generative flow. In Chengqing Zong, Fei Xia, Wenjie Li, and Roberto Navigli (eds.), Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the I 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pp. 4609 4622, Online, August 2021. Association for Computational Linguistics. doi: 10. 12218663/11122211allllooooo 2021 acll long.355
URL
Eric Todd, Millicent L Li, Arnab Sen Sharma, Aaron Mueller, Byron C Wallace, and David Bau. Function vectors in large language models. arXiv preprint arXiv:23 15213, 2023.
Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Niko- lay Bashlykov. Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. Llama 2: Open founda- tion and fine-tuned chat models. arXiv preprint arXiv:2307.092:
2023.
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural In- formation Processing Systems 30: 2017, December 4-9, 2017, Long Beach, CA, USA, pp. wttpps.cccpaaaee wttp://ccccpppee/////aaaaaaa 5998 $99886008, 2017. URL Abet:a03..tteeeeeaaaaaaatttattt 3355e2245547dee111tbdb hrt.s//6ee........a.a.aoaaaaaaaa
13

---

Published as a conference paper at ICLR 2025
Luke Vilnis and Andrew McCallum. Word representations via gaussian embedding. arXiv preprint arXiv:1412.6223, 2014.
Jing Zhang, Peng Zhang, Baiwen Kong, Junqiu Wei, and Xin Jiang. Continuous self-attention mod- els with neural ode networks. In Proceedings of the AAAI Conference on Artificial Intelligence. volume 35, pp. 14393-14401, 2021.
Yizhe Zhang, Jiatao Gu, Zhuofeng Wu, Shuangfei Zhai, Joshua Susskind, and Navdeep Jaitly. Plan- ner: generating diversified paragraph via latent language diffusion model. Advances in Neural Information Processing Systems, 36, 2024.
14

---

Published as a conference paper at ICLR 2025
A DETAILED DERIVATION OF SECTION 3
A.1 A RECAP ON DISCRETE TRANSFORMER
In this section, we briefly recall how classical causal transformers work. Let X whose rows are x Then, each head of causal attention mechanism computes a matrix Y e R gxxd such that:
Tx be the matrix
QOK Vd + M -MV.
Y Attention(( (Q, K. V) softmax
(10)
where Q, e RTxd, RR'xdd are the queries, the keys, and the value, respectively, while M RTx is the causal attention mask, which is introduced to ensure that each row yf of Y only depends on observations X, with s $ t. The matrices Q, K, are defined as:
Q xW
K XW
V= XW
(11)
where W(s), W()), and W()) are the attention matrices that are learned during training, while the causal attention mask M is defined as:
if 8,
Mr.3
(12)
-00 if 8.
The multi-head version of this causal attention mechanism typically used in modern architecture obtained by computing H independent versions (Y,...., Yu) of Equation 10 and defining a learnable matrix W()) Radxdd which combines them to obtain single transformed observation matrix:
Y cat......,, (n))o..,,,,,))))))) Yn)w(o)
(13)
continuous version a multi- head attention network can be simply obtained by considering Equation 10 single timestep f E [O, Indeed, it can be rewritten as:
[
QKT Vd
Y: Σ softmax
M
Vo.
(14)
where:
QKT
exp
QKT v7
M
softmax
M
16.0
(15)
Vd
1/,5/
Σx exp
([QKT + +M
VJ
1,5'
Consequently,
QKT
QKT
softmax
+M
exp
exp [M]] ]r,e
Vd
Vd Le,
1..0
(16)
9 k. vd
exp
if s <t otherwise,
0
Where q. and k, are the t-th and the s-th rows of Q and KT respectively. Altogether, the above equations imply that:
15

---

Published as a conference paper at ICLR 2025
yr = Σ exp
q k. Vd
Vss
(17)
7
s-1
where Z Σ exp vd
is normalisation constant. The above formula then used in
Section to define CCT.
A.2 DERIVATION OF EQUATION
We recall that:
T
q(t) w(wx((1)
-E
1 x (ar.br
(18)
K-1
k(t) W x(1=
Σ
((k)x (an (t);
(19)
v(t) M (x0x(0)) x(1) Σ
w()) x xa (t).
(20)
Consequently,
1
q(t)
k(s) v(s)ds
y(1)
J0
Z
exp
Vd
20
1
k(s)
W(')xx xx | (s)
exp
Z
Vd
bk
1
k(s)
Σ
exp
Ze
Vd
T
1
w
b.
(tt) w()) xx Mavr ds
exp
Zr
Vd
Sm be
q(t) (+)))
(21)
Σ
(
X1:
exp
ds
Zt
Vd
k=1
T
1
(ETn, W( xx 1 (andber(t) w())
S.m0
bh ds
xx))xx
Zi
Vd
ax
(w(()xs)² T (x)x)
1
Σ
(v) x1 exp
(bx - ax)
k=1 Z+
Vd
T
1
of kb
Σ
exp
vade.
Z+
Vd
which proves Equation
B EXPERIMENTAL SETUP
We now describe the shared aspects of our experiments.
16

---

Published as a conference paper at ICLR 2025
B.1 IMPLEMENTING CCT
CCTs can be implemented with little effort by starting with the implementation of regular trans- former and applying three modifications:
Modifying so that accepts arbitrary embeddings, rather than only tokens;
2. Modifying that positional indices be floating points, instead of only integers;
3. Adding support for custom floating-poii attention masks.
In experiments, used HuggingFace, which natively supports 1. and 3. and can be easily adapted to support 2.
Note that the last modification is necessary in order to support non-standard durations. In fact, the Euler discretisation of the integral in Equation is equivalent to regular attention with carefully chosen attention coefficients.
Proof The discretisation of Equation 4 is, assuming that we have n samples at positions P1y--ea Pn: which represent the value of piecewise constant function defined over the intervals Pp., (Pr-1.Po)
q(t)"((p)) v(pi),
-P-1P) y(t) = Σ (P:--)-) exp del iel...., Zt
(22)
Vd
with Po = O. In other words, if equivalent to applying attention coefficients of the form p; P; pa-1. Intuitively, this means that the further apart samples are, the higher the weight of the latter sample.
using multiplicative attention coefficients, the discretisation is
Note that for additive coefficients we can simply bring P:-1 inside the exponential:
2 exp log(pi- -Pi-1) q(i)" sel ie Ze
y(t) Σ
v(pi).
(23)
Vd
which is equivalent additive coefficient of p. Pi-1-
In Practice
the implementation level, a sequence of n elements with durations di,..., dn and En is fed to the extended transformer as follows:
embeddings e
The embeddings e1...., en are fed directly, rather than feeding the sequence as tokens and mapping them to embeddings;
The positional encodings are defined such that no "holes" are left the piecewise constant function. In other words, the position p; defined as p; Σド dy:
The durations encoded using the formulae described in Equations
and (23
B.2
EXPERIMENT HYPERPARAMETER
Since we study the logits, we do not use any typically generation- relattd hyperparameters (e.g. temperature and top-k). Aside from those described in Appendix B.I we do not perform any other modification. Experiment-specific parameters are reported in the respective subsections of Appendix C.4
C CONTINUITY FULL RESULTS
C.I SINGLE-TORE CONTINUITY
C.1.1 QUALITATIVE RESULTS
For single-token continuity, we shrink the subset of considered tokens with a coefficient the range [0.1,
17

---

Published as a conference paper at ICLR 2025
Since the LLMs do not necessarily return numeric value, all of the queries wrapped with prompt to coax the model into doing so. The template for our prompts is thus:
Question: In the sentence " "[REPEATED WORDS] ", how many times is [CATEGORY] mentioned? Reply with a single-digg digett number
Answer:
For Gemma 1, Llama 2 and Mistral we used a slight variation, since they did not return a numeric
output:
Question:
How many [REPEATED WORDS] "? Reply with single-digit number
[CATEGORY] are listed in the sentence
Answer:
We used variations of these two prompts throughout most of this paper. See the source code for fur- ther information. Alongside apples, we also tested the same prompt with the word "cat" (category: "animal") and "rose" (category: "flower"). See Figures to for full results.
C.1.2 QUANTITATIVE RESULTS
We reduce the duration of all the steps (following the procedure described in Appendix B and measure the time sensitivity, i.e. the number of unique applicable token peaks divided by the expected number of peaks For instance, if there are 4 steps, expect to see peaks for 2, 3, and 4. Our dataset is composed of 200 sentences with the same template as Appendix [C.1.] Note that, for some sentence+tokenizer combinations, single word might be split into multiple tokens. As our analysis focuses on single-token words, we ignore such cases. Refer to Table I for the percentages of considered results for each model.
Note
We define unique relative peak as situation where. for at least one duration factor, a certain class the top prediction. For example, if by varying the duration factor the top class becomes '1', then '2', then '1 again, then '3', the unique relative peaks will be 2, In our case, we only consider the probabilities numerical tokens.
We normalise the number of relative peaks by the number of expected peaks (e.g., if word is repeated four times and we observe three unique relative peaks, the normalised frequency is 3/4 0.75). Note that, if the discrete interpretations of LLMs held true, we would only observe one unique relative peak (since the prediction would be constant as the duration factor varies). We name the hypothetical frequency in case such hypothesis held true the counterfactual normalised frequency.
We report in Table counterfactual and observed normalised frequencies for the various models, well as the average per-sample ratio between the two. Overall, the observed peak frequency is significantly higher than the counterfactual frequency; these results are thus incompatible with discrete interpretation of LLMs.
For the sake of completeness, we report in Table 3 the results where we only count the expected peaks as valid (i.e. if element is repeated four times, only the unique relative peaks '1', '2', '3' and '4' are considered valid).
18

---

Published as a conference paper at ICLR 2025
Dumaten
Dumaten
8.5
Dilui
Llama
(b) Llama 2
(c) Gemma
0.33
1.1
0.23
Deratio
Dharation
Drpndinn Fxrtce
Odde Taless
Digh
(d) Gemma
(c) Phi 3
(f) Mistral
Figure 6: Predicted next token for the sentence "In the sentence 'apple apple apple apple', how many fruits are mentioned?" with duration shrinking for all studied models.
0.4
4.2
008
Duaaatia Factor
Dharatin Factor
Danabe Tacter
Olke Taless
Die Digi
Tiken
Llama
(b) Llama 2
(c) Gemma
0.5
Donates Factor
Facter
Obe Digi
Odi Soucs
Obu Dight
Ode Soure
Digh
Odie Soucs
(d)
Gemma 2
(e) Phi 3
(f)
Mistral
Figure 7: Predicted next token for the sentence "In the sentence 'cat cat cat cat', how many animals mentioned?" with duration shrinking for all studied models.
19

---

Published as a conference paper at ICLR 2025
4.5
0.3
02
Dua Daaaaiee Featie
Duaaiien Faster
Dasabin Parter
Orler Tekin
(a) Llama
(b) Llama 2
(c) Gemma
0.55
0.55
8.A
0.11
0/0
0.88
0.
0.
0.4
Oba Dight
Odel Toless
Ober
(d) Gemma
(c) Phi 3
(f) Mistral
Figure 8: Predicted next token for the sentence "In the sentence 'rose rose rose rose", how many flowers mentioned?" with duration shrinking for all studied models.
Model Name
Valid Ratio
Llama 8b
93.5%
Llama 2 13b
54.5%
Gemma 7b
100.0%
Gemma 2 9b 100.0%
Phi Medium
54.5%
Mistral 7b
76.0%
Global
79.8%
Table 1: Percentage of valid setups (i.e. setups where word is treated as a single token) for the single token counting experiment. The 'Global' row refers to all valid records divided by all records.
Model name
Normalised Peak Frequency
Average Ratio
Counterfactual
Observed
Llama 3 8b
0.2594
0.8953
3.57
Llama 2 13b
0.2599
0.9174
3.60
Gemma 1 7b 0.2610
0.5127
1.95
Gemma 2 9b
0.2610
0.8513
3.37
Phi 3 Medium
0.2599
0.8836
3.43
Mistral 7b
0.2584
0.4737
1.85
Global
0.2600
0.7404
2.90
Table 2: Counterfactual and observed normalised peak ratios for the single-token counting experi- ment, with all peaks (including unexpected ones). Note that the 'Global' row an average weighted by the number of valid records.
20

---

Published as a conference paper at ICLR 2025
Model name
Normalised Peak Frequency
Average Ratio
Counterfactual
Observed
Llama 3 8b
0.2594
0.8914
3.56
Llama 2 13b 0.2599
0.8263
3.27
Gemma 7b 0.2610
0.3503
1.34
Gemma 9b
0.2610
0.8513
3.37
Phi Medium
0.2599
0.792
3.09
Mistral 7b
0.2584
0.4737
1.85
Global
0.2600
0.6849
2.70
Table 3: Counterfactual and observed normalised peak ratios for the single-token counting experi- ment, with only expected peaks. Note that the 'Global' row is an average weighted by the number of valid records.
C.2 COUNTING EVENTS
C.2.1 QUALITATIVE RESULTS
Similarly to Appendix we used prompt to coax the models into giving numeric outputs, as well as coefficients in the range [0.1, 1]. Alongside the shop example, we tested two other passages:
The class went to the zoo. They saw lion. They saw an elephant. They saw giraffe. They saw a penguin. How many animals did the class see?
Emily went to the beach. She found a seashell. She found starfish. She found a smooth stone. She found piece of seaweed. How many things did Emily find?
See Figures to I1 for full results.
C.2.2 QUANTITATIVE RESULTS
In addition to our qualitative results, we report further quantitative experiments for time duration.
We consider the sequential dataset from Lin al. (2024), which contains 200 curated how-to tuto- rials split by step. Our template is as follows:
Tutorial: [Tutorial Title] [Steps]
Question: How many steps are necessary to complete the tutorial?
Reply with single-digit number
Answer: It takes
We then compute, in the same fashion Appendix C.I.2 the normalised peak frequency, both when considering all peaks (Table 4) and only the expected peaks (Table
21

---

Published as a conference paper at ICLR 2025
Model Name
Normalised Peak Frequency
Average Ratio
Counterfactual
Observed
Llama 8b
0.2186
0.7564
3.70
Llama 13b
0.2186
0.7274
3.42
Gemma 7b
0,2186
0.6967
3,46
Gemma 9b
0,2186
0.6188
3.21
Phi
0,2186
0.7123
3.385
Mistral
0,2186
0.5119
2.52
Global
0.2186
0.6706
3.28
Table 4: Counterfactual and observed normalised peak ratios for the event counting experiment, with all peaks (including unexpected ones).
Model Name
Normalised Peak Frequency
Average Ratio
Counterfactual
Observed
Llama 8b
0,2186
0.6397
3.26
Llama 13b
0.2186
0.4854
2.54
Gemma 7b
0,2186
0.5984
3.04
Gemma 9b
0.2186
0.5740
3.01
Phi
0.2186
0.5436
2.75
Mistral
0.2186
0.4517
2.29
Global
0,2186
0.6097
3.05
Table 5: Counterfactual and observed normalised peak ratios for the event counting experiment, with only expected peaks.
Frobaalty
00
(a) Llama
(b) Llama 2
(c) Gemma
8.5
Dhanatie Fietier
Dharatin
Drandine Forice
Obe Ditis
Obe
Ochec Socee
Obe Dat
(d) Gemma 2
(e) Phi 3
(f) Mistral
Figure 9: Predicted next token for the shop passage for all studied models, with duration shrinking.
22

---

Published as a conference paper at ICLR 2025
84
0.18
02
62
Faatio
Dharadin
Ode Bah
Order Teiees
O6e Righ
Otler Sitres
(a) Llama 3
(b) Llama 2
(c) Gemma
1.1
80
Duratiia
Durake
(d)
Gemma
(e) Phi 3
(f) Mistral
Figure 10: Predicted next token for the zoo passage for all studied models, with duration shrinking.
80
02
6.6
1.0
66
AA
Rigk
Telns
D6 Tigh
Othe Telws
Bigs
(a) Llama
(b) Llama 2
(c) Gemma
1.3
8.2
Dunaten Etattor
Daanatic
02
3,5
Digo
Gemma
(c) Phi 3
(f) Mistral
Figure 11: Predicted next token for the beach passage for all studied models, with duration shrinking.
23

---

Published as a conference paper at ICLR 2025
Model Name
Valid Rate
Llama 8b
60.0%
Llama 2 13b
19.5%
Gemma 1 7b 94.5%
Gemma 2 9b 95.0%
Phi 3 Medium
48.5%
Mistral 7b
93.0%
Global
68.4%
Table 6: Percentage of valid records (i.e. records where the unmodified output of the sum is correct) in the sums experiment.
C.3
NUMBER SUMS
C.3.1 QUALITATIVE RESULTS
Our experimental setup is identical to that of Appendix C.1 In addition 24 13, repeat experiments with the sums 13 74 and 32 56. Refer to Figures 12 to 14 for full results.
C.3.2 QUANTITATIVE RESULTS
We consider a dataset 100 questions involving sums, such as the following:
Question: Mia delivered 82 packages in the morning and 38 packages in the afternoon. How many packages did Mia del i vver in total? Answer: Mia delivered
where item.1 1 and item.2 are two-digit numbers. The specific items and questions vary, but in all cases the answer is the sum of two-digit numbers.
For each sentence, we independently shrink each of the two numbers, for total of 200 records. In each record, we observe how the predicted probabilities vary the duration factor varies. We only consider records where the model correctly computes the first digit of the sum on the unaltered sentence (see To a per-model breakdown).
Let Yo be the original label (i.e. the first digit of the sum of the two numbers) and Y, the shrunk labels (i.e. the set of predicted digits in case the shrunk number is treated as a single-digit number. For instance, in the sum 24 37, the original label is 6 (24 + 37 = 61), but the shrunk labels are (24 + 27) and (24+) + 31). Note that we ignore non-nun con-numeiicl labels.
We then check three properties:
P1: For certain duration factor, the collective probability of the labels in Y, is higher than that of yo:
P2: For certain duration factor, the collective probability of the labels in Y, is higher than that of yo and any other numerical label;
P3: For certain duration factor, the collective probability of the labels in Y, is higher than that of yo and any other numerical label. Additionally, at no point is another numerical label (i.e. neither yo nor an element of Y,) the top label.
Note that P3 implies P2 and that P2 implies P1. We report how frequently each property is true in Table
24

---

Published as a conference paper at ICLR 2025
0.
Darsinn Fadter
Danaion Fadar
(a) Llama
(b) Gemma
Derviia Farka
Durviia Facter
Durxtea Parks
(c) Gemma
(d) Phi 3
(e) Mistral
Figure 12: Predicted next token for the sentence "The sum of 24 and 13 is" in all studied models (except Llama 3) with shrinking of 13.
0.5
Freseni 0.4
0.8
Darrttie Packer
Danation Faster
(a) Llama
(b) Gemma 1
5.2
DarainaTas
Duralia Tacher
Duraina Facka
(c) Gemma
(d) Phi
(e) Mistral
Figure 13: Predicted next token for the sentence "The sum of 13 and 74 is" in all studied models (except Llama 3) with shrinking of 74.
25

---

Published as a conference paper at ICLR 2025
0.5
011
Deratia Facker
Daration Facter
(a) Llama
(b) Gemma
0.
Durviiaa Facter
Dureiina
Dursion Facker
Otker Trkees
Other Tokana
(c)
Gemma
(d) Phi 3
(c) Mistral
Figure 14: Predicted next token for the sentence "The sum of 32 and 56 is" in all studied models (except Llama 3) with shrinking of 32.
Model Name
P1 Frequency
P2 Frequency
P3 Frequency
Llama 8b
29.17%
25.83%
25.83%
Llama 2 13b
92.31 %
87.18%
76.92%
Gemma 7b
97.88%
97.35%
90.48%
Gemma 2 9b
95.79%
95.79%
89.47%
Phi 3 Medium
100.00%
100.00%
87.63%
Mistral 7b
100.00%
100.00%
87.10%
Global
87.82%
86.97%
79.05%
Table 7: Frequency of each property for valid records in the sums experiment. Note that the 'Global' row is an average that weighted by the number valid records.
26

---

Published as a conference paper at ICLR 2025
C.4 SPACE CONTINUITY
C.4.1 QUALITATIVE RESULTS
We report the full results concerning interpolations of embeddings in the main paper in Figures 15
to T7 [9 We also check that the intermediate interpolation does not correspond to any existing token by asking the LLM to repeat the embedding:
Repeat the word
As shown in Figure 19 the repetition of does not correspond to any existing token (as shown by the lack of peaks for tokens other than those related to apples and bananas).
Additionally, we adapt some experiments to another pair of tokens, namely cats and dogs, where we find that the interpolation of and dogs is an animal, but whether cats-dogs meow depends on the Similarly, refer to Figures 24 to 27 for
position along the interpolation axis (see Figures 20 to 23 our results on the water-juice interpolation.
C.4.2 BOOLEAN INTERPOLATION
We then test how results compare with studies interpolation of Boolean formulae. To do so, we perform linear interpolations of Boolean binary operators and study how intermediate operators behave. In particular, study interpolations of:
AND and OR;
AND and XOR;
AND and NAND;
. OR and NOR.
We report our results for all models whose tokenizers treat the operators as having the same number of tokens. While the models often struggle compute the correct Boolean results for discrete inputs, we nonetheless observe the emergence of "fuzzy" operators, whose truth values can be best represented floating points.
C.4.3 QUANTITATIVE RESULTS
We consider 50 pairs of objects having some properties in common (e.g. apples and bananas both fruits). For each pair, we consider one common property, one property shared by one element of the pair, property shared by the other element of the pair, and property that is shared by neither them, for a total of 200 records. We then interpolate (with 40 steps) between the sentence containing one object the other. For instance, for a property shared by both apples and bananas, we interpolate between the sentences:
Question: Can apples be eaten raw? (yes/no) \nAnswer: Question: Can bananas be eaten raw? (yes/no no) AnAnswer:
and compute the predicted scores of 'yes' and 'no'.
Note that some questions may have borderlinc answers (i.c. the answer could be argued to be true false); still consider such questions valid, as output throughout the interpolation rather than the specific answer. We however ignore object- tokenizer pairs where the resulting sentences have different tokenized lengths (as that prevents interpolation). We report the percentage of valid records in Table 8
interested in the variation of the
To measure the smoothness of the variation in output, compute the maximum of the absolute derivative across the interpolation interval, i.e. max [f'(x)) (which can be seen as an estimate of the Lipschitz constant). We then normalize by dividing by the amplitude (i.e. max f(x) minze[a..) If fx)). Although imperfect, this metric provides insight into the 'sharpest' variation in output for model. We report the average metric in Table 9 In general, we observe that Llama and Gemma 2 have higher normalised maximum absolute derivatives, while the other models tend to have similar normalised values.
27

---

Published as a conference paper at ICLR 2025
1.55
0.25
0.2
035
02
07
Yo
Yo
(a) Llama
(b) Llama 2
(c) Gemma
1.422
1.20
8375
0.50
03
02
1250
8.0
Intepelaton Fatter
60
62
Intrgelation
84
3.5
6.0
6.2
Interelation
9.4
1.0
Vei
No
Dian Ditoess
Yn
Diaer Titiems
(d) Gemma
(e) Phi 3
(f) Mistral
Figure 15: Predicted next token for the sentence "Are * red?", where * is an interpolation of "apples" and "bananas".
0.
24
02
Y0
No
Y
Yo
No
(a) Llama 3
(b) Llama 2
(c) Gemma
1.0
0.4
0.4
0.2
83
01:
00
02
180
600
83
60
02
2.4
18
Vel
No
Dio Thloes
Yel
ooe Dise Thinel
(d) Gemma 2
(e) Phi 3
(f) Mistral
Figure 16: Predicted next token for the sentence "Are * fruit?", where * is an interpolation of "apples" and "bananas".
28

---

Published as a conference paper at ICLR 2025
Pre
42
84
Intepelation.11
Integelatiin.
Intrgelatin Factor
yelor
yolo
Stices
pr0
Jdan
(a) Llama
(b) Llama 2
(c) Gemma
4.5
4.5
0.0
Idtepulatinn Facto
Idtepdaciin Factor
Jdice
Ober Sdice
(d) Gemma 2
(e) Phi 3
(f) Mistral
Figure 17: Predicted next token for the sentence "The most common colour is", where is an interpolation of "apples" and "bananas". We report all tokens with probability of at least 5% at any point of the interpolation.
0.33
0.50
03
0:30
8330
8:5
02
144
equraika
Interpattaa
grary
xgo g9
rade:
g000y
Oltec Tokeos
(a) Llama 3
(b) Llama 2
(c) Gemma
0.35
0.5
035
0.5
0.75
0:35
8:15
011
060
810
0.
06
C2
0.2
14
InterpCatiin Padter
300
(d) Gemma 2
Ioal
Obse Takes
(e) Phi 3
(f) Mistral
Figure 18: Predicted next token for the sentence "Alice bought some * at the", where * is an interpolation of "apples" and "bananas". We report all tokens with a probability of at least 5% at any point of the interpolation.
29

---

Published as a conference paper at ICLR 2025
Thitekiiee
8.
8.0
8.
0.0
02
8.4
1.0
0.0
0.2
0.0
6.
9.4
0.
100
Tetrgelation
Tetrgeelatinn
Interelation
Dam
Obe Takes
Obt Tikee
Appli
Obe Tokecn
(a) Llama
(b) Llama 2
(c) Gemma
0.5
0.3
Iator-dttion Parter
Intergetaton
Agp
Ofeer
(d) Gemma 2
(e) Phi 3
Mistral
Figure 19: Predicted next token for the sentence "Repeat the word where * is interpolation of "apples" and "bananas". We report all tokens with a probability of at least 5% at any point of the interpolation.
(a) Llama
(b) Gemma 1
(c) Gemma
(d) Mistral
Predicted next token for the sentence "Do meow?", where * is an interpolation of "cats" and "dogs". Results for Llama 2 and Phi 3 are not reported due to the two sentences having different number of tokens.
Figure 20:
Sarptabe Taker
Darpeiede Tirke
Inarcdatte Sunte
Marplabe Tacer
(a) Llama
(b) Gemma 1
(c) Gemma 2
(d) Mistral
Figure 21: Predicted next token for the sentence "Are * animals?". where * an interpolation of "cats" and "dogs". Results for Llama 2 and Phi not reported due to the two sentences having different number of tokens.
30

---

Published as a conference paper at ICLR 2025
Meyialle Facko
(a) Llama
(b) Gemma 1
(c) Gemma 2
(d) Mistral
Figure 22: Predicted next token for the sentence "We bought two * at the", where * an inter- polation of "cats" and "dogs". We report all tokens with probability of at least 5% at any point of the interpolation. Results for Llama and Phi are not reported due to the two sentences having a different number of tokens.
Mdrglaae Tacks
Dap
Ag
(a) Llama
(b) Gemma 1
(c) Gemma 2
(d) Mistral
Figure 23: Predicted next token for the sentence "Repeat the word * .. where * is an interpolation of "cats" and "dogs". We report all tokens with probability of at least 5% at any point of the interpolation. Results for Llama 2 and Phi 3 are not reported due the two sentences having different number of tokens.
(a) Llama
(b) Gemma
(c) Gemma
(d) Mistral
Figure 24: Predicted token for the sentence "Does contain sugar?", where * is interpola- tion of "water" and "juice". Results for Llama and Phi are not reported due to the two sentences having different number of tokens.
Take
Darpelebe Turke
Marplabe Taker
(a)
Llama
(b) Gemma 1
(c) Gemma 2
(d) Mistral
Figure 25: Predicted next token for the sentence "Is * a drink?", where * is an interpolation of "water" and "juice". Results for Llama 2 and Phi 3 not reported due to the two sentences having a different number tokens.
31

---

Published as a conference paper at ICLR 2025
(a) Llama
(b) Gemma 1
(c) Gemma
(d) Mistral
Figure 26: Predicted next token for the sentence "We drank some * in the", where is an interpo- lation of "water" and "juice". We report all tokens with a probability of at least 5% at any point of the interpolation. Results for Llama and Phi reported due the two sentences having different number of tokens.
(a) Llama
Obe Tare
(b) Gemma
(c) Gemma 2
(d) Mistral
Figure 27: Predicted next token for the sentence "Repeat the word * 2,, where is an interpolation of "water" and "juice". We report all tokens with probability of least 5% at any point of the interpolation. Results for Llama 2 and Phi 3 are not reported due to the two sentences having different number of tokens.
(a) (0, 0)
(b) (0, 1)
(c) (1. 0)
(d) (1, 1)
Figure 28: Predicted next token for interpolations of AND and OR Llama 3.
(a) (0, 0)
(b) (0, 1)
(c) (1, 0)
(d) (1, 1)
Figure 29: Predicted next token for interpolations of AND and OR Llama
32

---

Published as a conference paper at ICLR 2025
68
X2
So0es
(a) (0, 0)
(b) (0, 1)
(c) (1. 0)
(d) (1, I)
Figure 30: Predicted next token for interpolations of AND and OR in Gemma.
42
(a) (0, 0)
(b) (0, 1)
(c) (1. 0)
(d) (1,
Figure 31: Predicted next token for interpolations of AND and OR in Gemma 2.
Tater
Darpelebe
Tutter
Taker
stoe
(a) (0, 0)
(b) (0, 1)
(c) (I. 0)
(d) (I,
Figure 32: Predicted next token for interpolations of AND and OR in Phi 3.
(a) (0, 0)
(b) (0, 1)
(c) (1, 0)
(d) (1, 1)
Figure 33: Predicted next token for interpolations AND and OR in Mistral.
Mepitabe
(a) (0. 0)
(b) (0, 1)
(c) (1. 0)
(d) (I. 1)
Figure 34: Predicted next token for interpolations of AND and XOR in Llama 3.
33

---

Published as a conference paper at ICLR 2025
60
Serpelabe Packer
144
Thace
(a) (0, O)
(b) (0,
(c) (1. 0)
(d) (1,
Figure 35: Predicted next token for interpolations of AND and XOR in Gemma.
(a) (0, O)
(b) (0, 1)
(c) (1. 0)
(d) (1, 1)
Figure 36: Predicted next token for interpolations of AND and XOR in Gemma 2.
Sunce
Mepilabe Facks
(a) (0, 0)
(b) (0, 1)
(c) (1, 0)
(d) (1, 1)
Figure 37: Predicted next token for interpolations of AND and NAND in Llama 3.
400
Tiner
Diles
(a) (0, 0)
(b) (0, 1)
(c) (1. O)
(d) (1,
Figure 38: Predicted next token for interpolations of AND and NAND in Gemma.
(a) (0. 0)
(b) (0, 1)
(c) (1. 0)
(d) (1. 1)
Figure 39: Predicted next token for interpolations of AND and NAND in Gemma 2.
34

---

Published as a conference paper at ICLR 2025
Model Name
Valid Rate
Llama 8b
74.0%
Llama 2 13b 34.0%
Gemma 1 7b 84.0%
Gemma 2 9b 84.0%
Phi 3 Medium
34.0%
Mistral 7b
46.0%
Global
59.3%
Table 8: Percentage of valid records (i.e. where both sentences have the same tokenized length) in the embedding interpolation experiment.
Model Name
Normalised Maximum Absolute Derivative
Llama 8b
4.959
Llama 2 13b
9.005
Gemma 7b 5.090
Gemma 9b
5.402
Phi Medium
9.279
Mistral
7.445
Global
6.214
Table Average normalised maximum absolute derivative for each model. The "Global" row an average weighted by the number of valid records.
We also study whether the intermediate embeddings have outputs that are significantly different from those the embedding extremes. In theory, we would expect the probability of an output computed on an intermediate embedding to be interpolation between the value for one object or the other. Let f(a) be the probability score for one extreme of the interpolation and f(b) the probability score for the other extreme. We consider expected range [min (f f(b).. (a)x(((a), [b))]. We then verify whether, for some intermediate value, the predicted probability of "yes" or 'no" is outside their respective ranges [6] In particular, compute the maximum difference between the allowed range and the actual value, i.e.:
(1(()) min(f(a), f(x) < f(z) max(f(a).
Maiff max
[I((x) + (a). 2=(0..)
(24)
We define Max as the maximum of the maa values for 'yes' and 'no'. Note that if the function only has values in (m)n((()..f()) f fb))], Mmax will be 0. We report the average M-aa and the percentage of records where M-max 0.05 Table We also report the histograms describing the distributions of mmax in Figure 40) In general, we observe on average that 20% of records have Mmux higher than 0.05, which cannot be explained by simple interpolation-basel model of LLM bchaviour.
D ADDITIONAL RESULTS
complement our previous observations on time continuity with experiments on two common sequence transformations, namely shifting and scaling.
'Note that increasing the probability of 'yes' does not necessarily decrease the probahility of 'no', as the model also provide spurious outputs.
35

---

Published as a conference paper at ICLR 2025
Model Name
Average Maxx
(17am 0.05)
Llama 8b
0.0434
32.43%
Llama 13b
0.0639
23.53%
Gemma 7b
0.0332
22.02%
Gemma 9b
0.0178
9.52%
Phi Medium
0.0212
14.71%
Mistral
0.0362
22.83%
Global
0.0339
20.79%
Table 10: Average mmax for each model and percentage of records where Mmaa 0.05. The "global" row is an average weighted by the number of valid records.
3500
2000
2500
Frequesit
2000
1500
1500
1000
500
0.00
0.05
0.10
0.20
0.25
0.0
0.2
0.4
0.6
0.8
Variation
Variatio Llama
(a) Llama
4000
4000
Tiqquecy
3000
5000
2000
1000
1000
0
0.00
0.05
0.10
0.15
0.20
0.25
0,000
0.025
0.050
0.075
0.100
0.125
0.150
0.175
Varistion
(c) Gemma
(d) Gemma 2
2500
2000
Frequeicy
1500
1500
1000
500
Variation (c) Phi
Viriation
3
Mistral
Figure 40: Distribution of mmax for all the studied models.
36

---

Published as a conference paper at ICLR 2025
D.1 TRANSLATIONAL INVARIANCE
For shifting, we increment the positional embeddings of each token (as well as the lower bound of integration) by a fixed amount (up 10) without actually changing the sentence's duration. In particular, we feed the following input to Llama3-8B:
The capital of France
Ad
Ad
Ad
Ad dug
dag
In addition to the sentence "The capital of France is", we study the following sentences:
"The Great Gatsby is my favourite";
"O Romeo, Romeo, wherefore art thou".
We report our full results for translation in Figures t0 43
D.2 (LACK OF) SCALE INVARIANCE
On the other hand, for scaling we increase/decrease the duration of the entire sentence:
The capital of France 1s
dey >1
A2g
dag >1
dag
21
dag >
See Figures 44
46 for our results.
D.3 ANALYSIS
As shown for instance in Figure 47 we find that while the impact of shifting on an LLM's output is negligible, scaling significantly changes how the LLM interprets the input (and thus what the LLM outputs). This phenomenon occurs regardless of the model and sentence, empirically confirming the theoretical observations we already made about translation invariance in Section 3
We believe that shifting does not affect LLM's output due to the fact that positional and rotary- embeddings (Vaswani et al.] 2017]] Gemma Team et al. 2024b) are robust to translations: as long the relative positions between tokens preserved, model's 's output remains consistent, On the other hand, scaling leads to significant variations in an L.LM's output.
Our results suggest that beyond interpreting time continuously, duration is itself an intrinsic property of our generalised Transformers that can explain why LLMs are robust on inputs with low frequency in the training data (e.g., their embedding may interpolate with others with similar semanties).
D.4 SHIFTING INVARIANCE WITH LEARNED POSITIONAL EMBEDDINGS
While the properties of common positional encodings (in particular sinusoidal position encoding and Rotary Positional Encoding) inherently incentivise translation invariance, we study whether such phenomenon takes place in models with learned positional encodings. To do so, we repeat our experiments with translation in GPT2, which uses this form of encoding.
We report results in Figure 48 While the magnitude of the effect is certainly less strong com- pared to RoPE encodings, we observe that the top class remains consistent under translation for moderate shifts, which consistent with our RoPE results.
37

---

Published as a conference paper at ICLR 2025
0.
Trandtie Facter
Treedatie Farter
Talonaa
1k
Oibar 7ikai
Pice
(a) Llama 3
(b) Llama 2
(c) Gemma
08
04
02
Traniatkeaatt
TranbikeFFain
Ocsc Tolccs
Patk Odu Tokuxa
Dh
cEc
(d) Gemma 2
(c) Phi 3
7m
(f) Mistral
Ube
Figure 41: Predicted next token for the sentence "The capital of France is" in all studied models with shifting. We report all tokens with probability of at least 5% at any point of the interpolation.
0.15
08
8.29
0.4
0:23
Trandatied Farter
Transaaion Facker
a0d
(a) Llama
baok
(b) Llama 2
1kk
(c) Gemma
0.25
8:59
8.50
8.45
8:40
6.4
8.30
03
8.30
035
02
0.25
0.38
Trenciativ Farter
Trandeike
Tranciaiiv Farter
and
Obbur Tnice
badl
Tthe 34mm
xnd
Obat Frice
(d) Gemma 2
(c) Phi 3
(I) Mistral
Figure 42: Predicted next token for the sentence "The Great Gatsby is my favourite"' in all studied models with shifting. We report all tokens with probability of at least 5% at any point of the interpolation.
38

---

Published as a conference paper at ICLR 2025
14
08
Oiher Tokes
Razao
08 Talen
Tara
O8 Talen
(a) Llama 3
(b) Llama 2
(c) Gemma
Tranbiike FIEE
Trandatin Fater
Tradiike Fater
(d) Gemma
(e) Phi 3
(f) Mistral
Figure 43: Predicted next token for the sentence "O Romeo, Romeo, wherefore thou" in all studied models with shifting. We report all tokens with a probability of at least 5% at any point of the interpolation.
0.4
05
Trikadde
0.0
Scalin
Scating Porter
682
2200
Pods
Oth Takons
Daaa
Ober Tokena
(b) I.aaa 2
(a) Llama
(c) Gemma
07
0.5
0.5
03
0.4
Sciting Facder
1.2
Smiling
Scalig Facker
(d) Gemma
(e) Phi 3
Pale
10w Tokoes
2000
(f) Mistral
Pacx
Othe Telonn
Figure 44: Predicted next token for the sentence "The capital of France is" in all studied models with scaling. We report all tokens with a probability of at least 5% at any point of the interpolation.
39

---

Published as a conference paper at ICLR 2025
04
%
012
Scallng Facter
Sorling Farte
Scaling Paster
a00d
OBher Biccra
(a) Llama
(b) Llama 2
(c) Gemma
0.2
0.5
0.3
0.0
Scalinz Faclor
Sciling Faste
Scilnn Perter
nord
Obtr Tieze
(d)
Gemma
(e) Phi 3
(f) Mistral
Figure 45: Predicted next token for the sentence "The Great Gatsby is my favourite" in all studied models with scaling. We report all tokens with a probability of at least 5% at any point of the interpolation.
1.0
10
Trodakil
02
Scaliu
Flcther
(a) Llama
(b) Llama
(c) Gemma
0.8
42
02
00
Scaling Factir
02
2.4
2.6
1.2
14
Scalng
Reams
(d) Gemma 2
Olke Tries
Rize
Other Tikes
(f) Mistral
(e) Phi 3
Figure 46: Predicted next token for the sentence "O Romeo, Romeo, wherefore art thou" in all studied models with scaling. We report all tokens with probability of least 5% any point of the interpolation.
40

---

Published as a conference paper at ICLR 2025
0.40
0.4
0.35
Probahility
Probsbiiity
0.25
0.2
0.15
0.1
0.2
0.4
0.5
0.8
1.0
1.2
1.4
Tranclation Factor
Scalling Factor
also Other Tokens
the
Otber Tokeus
Paris
the
(a) Shifting does not impact an L.M's output.
(b) Scaling visibly impacts an LLM''s output.
Figure 47: Effect of shifting and scaling on Llama 3 for the sentence "The capital of France is".
04
23
30
1ED0
13.
28.0
17.5
Trandatioo Fautie
Trandation Fumerr
oped
(a) France
(b) Gatsby
(c) Romeo
Figure 48: Predicted next token for the France, Gatsby and Romeo sentences in GPT2 with transla- tion.
41


Reviews:
[{"review_id": "jX4rL4Ja3r", "reviewer": "Reviewer_R12D", "summary": "In this paper, the authors explore how Transformer-based language models, which traditionally operate on discrete token sequences, can implicitly represent language in a continuous manner. They introduce a novel continuous extension of Transformers, termed the Continuous Causal Transformer (CCT), allowing models to handle continuous inputs in both time and space. Through experiments on state-of-the-art models like Llama3 and Mistral, they demonstrate that these models exhibit continuity in their internal representations, causing different responses to variations in input duration and interpolation between tokens. The findings suggest that these models create implicit, continuous representations that differ fundamentally from human linguistic understanding.", "questions": "One possible use case of the theoretical framework proposed in the paper is probing which continuous space model best matches the one learned by the LM, i.e., we can come up with different continuations schemes and examine which best matches the observed one. Does that make sense? do you have any thoughts about that?", "limitations": "", "rating": 6, "confidence": 4, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "The paper explores the intriguing hypothesis that language models, despite being trained on discrete sequences, learn to form inherently continuous representations of language. To investigate this, the authors propose a formalization of continuous Transformers, which \"collapse\" back to the discrete case when evaluated at discrete time steps. This formulation offers flexibility to probe the nature of model representations, such as by adjusting the \"duration\" of tokens in a sequence. The paper clearly articulates this formulation and its expressive power, laying a solid foundation for the subsequent experiments.\n\nThe experiments logically build on this framework and provide support for the hypothesis that models represent language in a continuous manner. For example, by modifying the duration of tokens in a sequence of repeated items, the model produces varied answers to simple counting tasks, indicating a sensitivity to continuous input features. In another set of experiments, interpolation between the representations of two tokens shows how the model continuously change its prediction according to the \"weight\" of each token in the interpolation.\n\nOverall, the main contribution of the paper is providing a framework for thinking about LMs as continuous processes, which lends itself to simple probing experiments on the nature of LM representations.", "weaknesses": "I don't find any weakness in the theoretical formulation. I have some reservations regarding the *interpretations* of the findings and the lack of reference to previous work on the subject:\n\n* First, I am not entirely clear on the details of the experiment in Section 4.1. Am I correct in understanding that this setup is no longer equivalent to a \"regular,\" discrete Transformer, as the duration of different tokens is no longer uniform? Could the model, in principle, have learned a different behavior (i.e., the \"human\" interpretation of the sequence)? Specifically, is it correct that when using, for instance, a duration of 0.25 for each of the four occurrences of \"apple,\" the attention dedicated to them would be identical to the attention given to a single occurrence of \"apple\" in a standard Transformer? If this is indeed the case, the result is unsurprising, as the representations fed into the model would be identical to those in the prompt, \"In the sentence 'apple,' how many fruits are mentioned?\". In that case, the manipulation in that experiment is just a different way to acknowledge the fact that LMs are fed continuous vectors and not discrete symbols.\n\n* The interpolation experiments in Section 4.1 do provide evidence of the continuous nature of language model representations. However, these findings are not novel, and the paper lacks sufficient references to a substantial body of prior work. The continuous representation of distinct symbolic linguistic processes dates back to the creation of dense vectors via SVD of PMI matrices. Additionally, in interpretability research, there has been extensive work on the continuous representation of symbolic properties, such as linear concept erasure, which identifies specific manipulations in the latent space to isolate particular concepts.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "oFINxfytYG", "reviewer": "Reviewer_8hjw", "summary": "This paper aims to demonstrate that transformer-based language models not only learns to process input sequences consisting of discrete tokens, but are also able to \"reason\" about the continuous interpolation of discrete tokens along the temporal and spatial dimensions. The paper first presents a continuous generalization of the classical transformer model to make it accept spatially and temporally interpolated continous inputs. It then shows via exemplar analyses that one can manipulate the \"temporal duration\" of input tokens to control model prediction on simple reasoning tasks; it also shows that the \"spatial interpolation\" of input tokens, formulated as their weighted averages, also elicit meaning outputs from the tested language models. The authors therefore claim that LLMs process natural language in a way that is fundamentally different from human speakers.", "questions": "For the single-token time continuity test in section 4.1, what would happen if you use input prompts with different entity names from the same category? (e.g. In the sentence \"apple banana pear orange\", how many fruits are mentioned?)", "limitations": "", "rating": 6, "confidence": 4, "soundness": 2, "presentation": 3, "contribution": 2, "strengths": "1. The continuous generalizations of key transformer modules such as multi-head self-attention seem novel and theoretically sound.\n\n2. The presented examples of controlled input manipulation and the resulting model predictions in section 4 are interesting and intuitively make sense.", "weaknesses": "1. Despite the novelty of the main arguments and the proposed continuous generalization of transformers, the paper did not provide suffcient empirical evidence and quantitative evaluation to support them. In particular, the analyses in section 4 are based on only a couple of example input sequences, with a very special type of prompt template. It would make this section more convincing if the authors could curate and evaluate LLMs on a dataset of \"temporally\" or \"spatially\" interpolated input sentences, and define a more general evaluation metric to capture the variation of model prediction when manipulating the time durations or spatial weights of target tokens. \n\n\n2. The claim that \"LLMs reason about language (continuously)\" seems also to be an overstatement given the input- and output-level simplicity of the evaluation tasks (e.g. counting the mentions of certain entity type in a short sentence). I'm curious to see whether the model could still produce fluent outputs on more complex text generation tasks (e.g. long-form QA) if we manipulate input tokens as suggested in section 3. If not, it would suggest that LLMs in fact do not assign meaningful representations for the spatio-temporally interpolated counterparts of input token embeddings.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "7B2vGL8sSQ", "reviewer": "Reviewer_T7Uh", "summary": "This paper shows that Transformer language models (LM) implicitly learns continuous sentence representations in both space and time dimensions. The paper generalizes the standard discrete LM inputs to continuous cases, and demonstrate some interesting phenomena like stretching input sequence lengths can bias predictions accordingly (time continuity), and interpolating two inputs enables the model to generate meaningful outputs (space continuity). The paper argues that treating LM as continuous models deepens our understanding of its nature and promises performance improvement.", "questions": "1. If the claim that LMs are temporally continuous, then what if we give them input sequences which are curves that fit the discrete token inputs? In other words, we can consider discrete token inputs as \"samples\" from continuous signals, so it's natural to ask what would the outputs look like if we input the LM with the original \"continuous\" signals.\n\n2. Evidences provided by the paper to support the claim that LM is \"spatially continuous\" (Sec 4.4) are pretty much the same as the classical word vector algebra (e.g. \"queen\" - \"woman\" + \"man\" = \"king\"), and kind of expected. It might be more interesting to provide some more sophisticated examples that are unique to LM's capabilities, for example interpolating between two logic expressions that a LM can predict well, and observe whether the model is able to find novel logical relations.\n\n3. While it is interesting to provide observations indicating that LMs are time and spatial continuous, what are the implications of this finding on controlling LM behavior and improving its quality? The paper only briefly mentioned some items in Sec 5, but they do not appear to be very concrete or convincing.\n\n4. Beyond the examples that the paper provided, it would be more interesting and insightful to train a LM with inputs being compressed or stretched (like in the time duration cases), or just do inference on a wider variety of more difficult tasks (e.g. reasoning, coding, maths etc.), and compare model behavior differences.", "limitations": "", "rating": 6, "confidence": 4, "soundness": 2, "presentation": 3, "contribution": 3, "strengths": "The paper provides a novel perspective of analyzing LMs, that is its representations are implicitly as continuous. This is an interesting and insightful observation that deserves follow-up analysis and further investigation.", "weaknesses": "Evidences supporting the claim that LMs are implicitly continuous are not sufficient and limited. Deeper analysis and more diverse experiments are desirable.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "FRXvZ66l64", "reviewer": "Reviewer_hfUi", "summary": "The paper looks at transformer architecture (function) from a step function mixture viewpoint and proposes a continuous generalization of the transformer architecture by introducing token duration. From here, the paper investigates into two genres of properties of the transformer architecture (both quite linear) from the transformer architecture:\n- time wise, the architecture is shown to be quite linear with time (through for example counting experiments)\n- space wise, the architecture is shown to be able to perform linear interpolation on semantic space\n\nThe paper also shows some invariance/variance properties of currently used position embeddings.", "questions": "What are the exact experimental settings to produce results in 4.1 and 4.2 please? More precisely:\n- How are durations taken into account in the modification? Are these done through attention modification as shown in eq (4)?\n- How are position embeddings handled in those experiments? When duration is longer/shorter, do authors also adjust position embeddings to reflect the duration change please?", "limitations": "", "rating": 5, "confidence": 3, "soundness": 2, "presentation": 2, "contribution": 2, "strengths": "The experiments that vary the duration is interesting and looks novel to me; besides, it follows directly from the established continuous extension of the transformer architecture. The paper shows that the counting or to some extent meaning retention has some correlation with the token duration through various experiments. \n\nIt is nice to see semantic interpolation for LLMs, although this is a well known results for word embeddings.", "weaknesses": "While the time duration looks interesting and novel, I am not able to tell from the paper what are the experimental settings used to produced the results in the paper (I have put my exact questions in the question section). Thus unfortunately, I am not able to reproduce such experiments and I am not able to see any insights for cause and effects of this phenomenon.\n\nshifting-invariant and scale-variant are well known effects and can be derived directly for models using ROPE embeddings and such properties hold similarly for a large range of models. Such contribution in the paper does not match ICLR acceptance standard, I think.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}]

Author rebuttal:

Decision: Accept (Poster)