# Poster 30999

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

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

Howdy, my name's Nate. I'm a PhD student at Brown, and I'm here to talk with you about
This tool that we built called a Fourier head, and what it does is it helps LOMs learn complex probability distributions. The alternative title for this talk is a better way for LOMs to model non-linguistic tokens. Now, when I think of non-linguistic tokens, the first thing that I think of is numbers. So first thing I'm going to talk about is a failure case for LOMs to model probabilistic distributions of numbers. So suppose, for example, what happens if we prompt LAMA with...
With the following prompt, let's say, here's a list of normally distributed random numbers in this interval with this mean and this standard deviation, and then we give a few in context examples, and then we expect it to continue with more examples. How does Loma do? Not super well. The green is what we would expect and what we hope for, but the orange is...
the empirical samples. So we can see that not only are your empirical samples, Wendell Wellen's used this prompt a bunch of times, not only are these samples having the wrong mean and standard deviation, it's not even remotely Gaussian shaped.
So our goal is can make it more like this guy on the right, you know, more Gaussian shaped in the correct area, etc. Now, when we think of LLMs modeling non -linguistic tokens, it's not just numbers, right? LLMs have been used recently to model protein sequences, time series, music.
um uh actions of uh offline rel agents you know etc the the list is on and it keeps growing so what have we done um we've invented a tool that we think is useful in these types of situations and it's called the fourier head so what the fourier head is is a drop-in replacement for the linear classification head that goes on at the or that happens at the end of the um
of the LLM. So the Fourier head operates in two steps. The first step is it learns a continuous density using Fourier series. The second step is it returns a discrete approximation of that density. The Fourier head is built using Fourier series, namely weighted sums of sines and cosines where these amplitudes, aka Bk's, are learned. These are very useful because they're universal function approximators.
And they're especially useful because they can learn multimodal densities more flexibly than Gaussian mixture models where you might have to tell the model in advance how many heads, or sorry, how many Gaussians that you wish to model. Now I'm just going to talk about the utility of this in a large-scale example. So what we're looking at right here is a playthrough of the Atari Sequest game. And the salient part of this video is that the...
The player has a task to accomplish, and they accomplish this task by choosing the next action, but this latent action space has continuous structure, namely moving to the right is similar to moving right and then down to the right. So we were kind of thinking that it might be better if the classification head, instead of being like a general unstructured linear classification head, instead had some sort of continuity inductive bias.
to it. And it turns out that the Fourier head indeed achieves this, right? The Fourier head gives smoother and more accurate next action distributions because it outputs actions of similar likelihood when they're close together. The downstream effect of this is higher returns because the learned action distribution is smoother and takes advantage of this latent continuous action distribution.
And also, I just want to highlight that this Fourier head fixes the failure case that I showed you earlier, right? So on the left is the original LAMA model, and on the right is once you have lower fine tuning and the Fourier head intervention, which notably is a significant improvement over just regular lower fine tuning.
Now, the very last thing that I wish to highlight is that we've proven this thing that we're calling the Fourier head scaling law, which just formalizes your intuition that when you use more frequencies, it gives you more expressive power, so you're able to model more complicated class of densities, right? So here in green, we have the complicated density that we want to model, and we can see that when we only use one frequency, it doesn't do so well, but as we do more frequencies, the KL divergence goes down, and we can, you know, better approximate this.
ground truth density until we have 64 frequencies and then there's no daylight at all between the ground truth green frequency and our learned blue frequency and we just proved a theorem that puts us into precise mathematical terms in general and this is a fun animation to check out our web page for more animations and that's it thank you for listening
