# Oral 31880

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

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

Alright, welcome everyone. Today I'm gonna talk about our paper on oscillatory state space models. This is joint work with my post-doc advisor Daniela Russe. So there's been a lot of th does it work? Okay. So there's been a lot of architectures in sequence modelling, right. So I guess the most prominent one, the most famous one is transformers these days, um which really powers most of A_I_ systems and as you all know it's based on the self-attention mechanism, but let's not forget about R_N_N_s, recurrent neural networks.
s um which have been sort of among the first machine learning-based sequence models. And uh in this talk actually I'm gonna talk about statespace models or S_S_M_s. So statespace models have been around since twenty twenty two, were suggested by Goudal
And they are really sort of like recurrent neural networks, okay. So you have the same sort of premise as in R_N_N_s, you have some sequential input U_ you have some hidden representation Y_ which gets updated recurrently based on the input and then you uh decode it into some output. And uh but there's some differences to R_N_N_s obviously. So first of all the way information gets propagated forward in time, uh in the S_S_M_ it's using this linear time invariant system you can see here.
here uh A_ B_ C_ and D_ are matrices and A_ is what we typically call the state matrix, and the key differences to R_ and N_s is first of all it's a purely linear dynamic, right? You don't see a non-linear activation function anywhere in the in the O_D_E_ formulation. Second, we need a very specific structure of the the state matrix A_ and because of this linearity of the dynamics and the specific structure of A_ we can leverage tools from high performance computing and uh
uh or from signal processing to have very fast solutions of this underlying system of ordinary differential equations, okay. So the core challenge in designing new state-based models is to design state-based models that are stable, also able to learn long-range interactions, but also expressive at the same time, right? It's always the same set of set of question in in deep learning. So our
Our approach here is that we draw inspiration from neuroscience, more specifically from neurodynamics. So what we look into are so-called neural oscillations, which are very central, which are known to be very central for information processing in the human brain. And the idea is to leverage the structure of these neural oscillations as an inductive bias to construct state space models. Okay, as I will show you in the next slides, the benefit here is that this leads to very favourable properties when it comes to learning.
Vulnerability.
Okay, the way we do that is what we call oscillator state space models. Um and the way to do that is you model your S_S_M_ via the system of forced harmonic oscillators. Here again A_B_C_D_ are are matrices and A is the state matrix and in this case the structure of the state matrix is that it's diagonal that means we only have entries on the diagonal of the matrix. And the resulting model is what we call linear oscillator state space model or Linos in short. And you can think of it as a sequence model that takes in sequential
and sequential input such as pixel-wise information from a CIFAR-10 image, right. And it propagates for this information according to a system of false harmonic oscillators, and then uses this to make its prediction. Right, in this case it predicted correctly, it's a truck and this is how HoloLens works. Now there's a few questions when it comes to designing this this model. The first one is um how can we solve the underlying system of O_D_E_s very fast in time. Typically if you you know you you have a you have an O_D_E_ system, if you want you
You want to solve that on a computer, you have to apply tricks from numerical analysis, you have to, you know, use numerical integration methods such as Euler, Ronge-Kutter methods and so on.
And because this O_D_E_ is linear what it boils down to is that you have to solve a discrete linear recurrence of the for following general form, X_N_ equals A_M_ X_ minus one plus V_N_ and you can imagine that if you just computed naively, it's purely sequential, right. So the computational time is of N_ where N_ is the length of your input array. So clearly this is just as bad as R_N_N_s are, so so far we haven't gained anything. The question is can we do better? The answer is yes, we can.
vastly improve on that by first realizing that linear recurrence can actually be represented as a scan. Now what is a scan? A scan is a tool from high performance computing, let's take a deeper look into that. So a scan requires two things, first an input array, uh and second an operator, and then it computes the following output. So our simple example would be using the sum as the operator and then the output is simply the cumulative sum of the input. Okay, so how can we represent linear recurrence with that?
Well, the answer is as follows. Um we construct input as follows and also the operator. We just plug it in, we see it as as the output. Now let's take a look at the second argument of the tuples of the output array. We can't just rewrite it in a s in a simpler form and recover the recurrence we wanted to compute from the beginning on. Okay. So to conclude, linear recurrence can indeed be represented as a scan and it turns out if the operator is associative and we have some sparsity in the matrix M_ this can be computed now in O_ of log n time instead of O_ of end
and time on parallel hardware meaning on GPUs.
So our contribution here is that you can't just use the the standard formulation of the scan to compute the the solution to the to the force harmonic oscillator. What you have to do is you have to construct new associative operators which are implicit, symplectic, implicit, explicit, that sort of preserve the structure of the underlying ODE system also in your discrete solution, right. There's also a bunch of other questions. The first one is how do we even parameterize our
diagonal state matrix because the goal here is again we want to learn long-range interactions and you can show this is equivalent to having an eigenspectrum um which has as close to unit norm as possible. And uh it turns out that if we just assume that the entries of our diagonal uh state matrix are non-negative, we can even compute the the eigenspectrum explicitly. And in particular we can show that the spectral radius is bounded by one meaning it's it's it's stable.
And the only thing we needed is that the entries are non-negative, right? What is a way to enforce that during training? Well, you won't con just use the radio activation. You can also square the entries and so on, but we found that radio works pretty well. A second question is now that we know how to parametrise, we need to know how to initialise. Um again we want to initialise in such a way that the gradients don't vanish. So also that the contributions of our inputs to the hidden states don't vanish over time.
And this boils down to basically having the nth moments of the absolute eigenvalues to be in a computable range, given some random initialization of course. So what we can show is that if we initialize uniform at random within the interval zero to a max, we can compute the nth moment actually explicitly. And now let's plug in a few numbers, okay, let's take just a max to be one, that means we initialize uniform at random within the unit.
The unit interval, and we assume a very long input sequence, meaning the length of a hundred thousand, then the moment is still of of uh power of ten to the mo power of minus five. So it's in a computable range. With that we can conclude, we can just use a simple uniform uh uh random initialization for the entries, even for, you know, very long sequences. If we go in the millions and like even more, then we can just um adapt our a max parameter a little bit.
Okay, now I've been talking a lot about trainability, I also wanna talk about expressivity and about approximation power. So what we do here is we prove a very central very mathematically interesting result. So it goes as follows. The the set-up is we have an operator mapping between two time-series, right? So we have an operator not a function between two function spaces. And this operator should be first causal, meaning that the prediction at time T_ depends only on the history until time T_ of the input.
And second we need some sort of continuity um assumption. So here we assume that the operator is continuous with respect to the L_ infinity norm of the input and output signals. And then we can show this very central theorem which which says that for any such operator we can indeed construct a linear model that approximates this to any desired accuracy. Okay. So the proof is actually the main result of the Harris paper. The proof is twenty five, thirty pages long, I'm not gonna go into detail.
So but basically the main idea is to encode the infinite dimensional operator phi with a uh function or operator which is finite dimensional which makes explicit use of the structure of Lennox, which is um we are using time-varying sign transformations to reconstruct the input signal and time-varying sign transformations is nothing else than just a solution of the fourth harmonic oscillator. Okay, in the end of course you can't just show very nice theoretical results, you also need to have some
some, you know, pleasing uh uh empirical results. So in this case we tried on on a bunch of benchmark problems ranging from, you know, neuroscience data over to genomics, to medical applications and so on. And uh we benchmark against the state of the art, you know, Mamba, S_ five, S_ six, L_R_U_ and so on. And we see that Linus really uh
reach a state of the art on on the majority of these these benchmarks. And what I want to highlight here is the most uh sort of challenging one here is the one on the very right, the PPGDalia, because the input sequences are very long. So the input sequence length is fifty thousand um and uh on that one we even outperform Mamba by almost two X_ which I think is is quite quite uh quite good. Okay. So to conclude um this oscillatory inductive bias actually lead to very expressive
set-based models that learn long-range interactions, we have a lot of theoretical insights into the proposed into the proposed model that also sort of inform the design further of our model. Um we get set of departed results. Uh I just want to highlight in the end um that you know there there are more nice properties and theoretical insights. So please take a look at the paper if you're excited about that. For instance we can show that linear preserves the symmetry of time reversibility, which leads for instance to very
uh efficient implementations on hardware and so on. If I get one more minute, Mm-hmm. I just want to highlight one thing. Um I'm starting a new research lab at Max Planck Institute and Alice in Tübingen, it's gonna be called Computational Applied Math and AI Lab. If you're interested in that line of work and you wanna do a P_H_D_ or a post-doc or research internship, engineering uh uh position, please reach out to me. Um and with that I thank you. Uh I have two good questions. Uh the first is that uh have you tried any experiments on the long term behaviour
time time series forecasting I see you all have Oh yeah yeah, yeah. We did actually, I didn't put it in the in the slides because it's just twelve minutes. We have done yeah, we have done uh sequence classification, sequence regression and uh forecasting. Um we have done the classic weather forecasting where you read in seven hundred twenty past hours and you want to predict some climate variables for the for the future seven hundred and twenty hours. Lino seems to perform really well. It's not surprising because weather is inherently
at least oscillatory radio some sort of periodic signals. Um so if you have a model which is already periodic in some sense, it's not surprising that works well. Try it on weather data or climate data I think this is a really good idea. Yeah, so so the model may be much much better than the t uh classical one, such as MABA and the transformer. It will When be, yeah. the range is very long. Yeah yeah exactly exactly. Oh yeah. Hi. Fantastic work. Uh I have two s short question, one is about the memory consumption of your algorithm.
Um that's number one. And the second is you took inspiration great inspiration from the neuronal science about the auditory system. Do you think like you can circle back to like mentioned how your work sort of a impact on the current understanding of the neuronal science? Yeah, these are quick questions. So the first one the memory requirement. So we have to pay in terms of memory if we want to speed up things right. So what we do is if you use this this parallel scan we use parallel hardware. So the requirements
The requirement goes up to N log N, I think. But we get this efficiency gain in terms of we are much faster. Um and in the end we benchmark in the appendix to all the other models on all the benchmarks we did in terms of hardware consumption, uh computational time and so on like really measured in in in wall clock time and so on. And it seems that Linux is much better than Mamba um and all the others sort of um so, you know, you pay something in order to be faster, but I think these days
We don't really mind, we just want fast models that perform well, right. Uh, the second one, uh, that's very interesting, so this is a follow-up work sort of on on on on things I've been doing in the R_N_N_ community before. So instead of using forced harmonic oscillators, which are inherently linear, we have been using non-linear oscillators. And non-linear oscillators are everywhere in neuroscience. And there is now I'm not a neuroscientist myself, so I come from applied math and and physics.
But from what I have seen there's now a big community that actually builds up on our models, use them to understand, you know how the human brain works better from from a computational neuroscience perspective. So they use it as a new computational model to emulate some of the, you know, qualitative behaviour. There's work from Rob Singer for instance, is it's really famous who used exactly our model to sort of study neural oscillations in in a more computational way.
way yeah Hi, great talk. So I get that, I think with the A matrix, with it being diagonal, it's to the purpose of computation and stuff like that, right? But does it limit expressivity at all, or do your theoretical results show that's not an issue? So it it's not a problem for the for the expressivity result because okay what I didn't tell you is that you have to stack two layers on top of each other so basically you know you don't have if you just use one layer with in-situ
insights-based models, you don't have any mixing going on. But the moment you use the second layer, basically through the inputs matrix, which is dense, um wide, which is usually of of of uh dimension uh h-dim times h-dim, uh you get all the mixing within the second layer. So you have some sort of delayed mixing, delayed by the layers. But it turns out for for the universality results that's that's all you need. Um so this is this no issue. Um
It might be interesting to look into, you know, including some convolutional layers maybe um and still being computationally v very efficient. Um using a diagonal matrix is is sort of the first thing you do, right? Because everything is so nice and so easy to to so sort of understand. Now the next step would be to to see if you can put in some tridiagonal matrices or convolutional matrices, template matrices and so on. Yep.
