Someone forgot to tell me that... I started in high school carrying my laptop everywhere with me to pull out (of my backpack) every time there is the slightest bit of boredom.
> 1.2B people use ChatGPT each week, and many of them turn to it to research products, compare options, and decide what to buy...
> To accept payment from ChatGPT Wallet, websites need to ensure agents are not inadvertently blocked.
ChatGPT Wallet is a data gathering ploy. Sam Altman and co. want dense, up-to-date pricing signal, so they tell stores, "we will redirect traffic your way if you start giving us this data."
The stores already give customers this data, and should give customers' AI representatives this data. That does not extend to all agents. The stores should charge like $0.01/request, which is a rounding error for someone actually looking up a dozen products to buy, but prevents the DDoS of random agents scraping for training data or stupidity.
I think it is pretty well done and far above the quality of most papers. I also think the prose is not up to the same standard you applied for the places where you made choices (e.g. presentation, layout, communicating key ideas). But I totally understand where you are coming from. It takes a ton of work to apply theory of mind to figure out how to say things intuitively for your audience (the main gap of LLM prose here), probably 10x the work of carefully choosing what ideas and in what order to communicate them.
This article is only about understanding the implementation of positional embeddings, but to really understand positional embeddings you have to understand the theory. Positional embeddings are group representations. This is how you find them, and this is also how you parameterize them to make them differentiable/learnable. To give a few examples:
1. Rotary positional embeddings are representations of the translation group. The n-dimensional translation group ℝⁿ is abelian, so its irreducible representations are all one-dimensional ρ: ℝⁿ → ℂ, specified by a momentum vector m: ρₘ(x) = exp(i⟨m, x⟩). You can get a multi-dimensional representation by choosing several m, which are your learnable parameters.
2. If you wanted RoPE embeddings to also preserve rotation (perhaps you have scenes viewed at arbitrary angles), you are looking for representations of the special Euclidean group. The irreducible representations in four dimensions are your familiar particles: electrons, protons, etc., and in general are parameterized by a momentum vector and a discrete spin vector. You would have to do some kind of annealing process to train the spin vector (or you could just make it constant).
3. If you want to do attention on quadtrees, well, what is the group? Suppose every node in the quadtree has local coordinates scaled to [0, 1]. Moving up/down/to a neighbor in the quadtree requires an affine transformation of the local coordinates, which compose, so we can label every node by its affine transformation to the root (x, d): y → x + 2⁻ᵈy, where x is the node's translation in the image and d is its depth in the tree. The finite-dimensional irreducible representations are parameterized by momentum vectors m as well as a modulus M and basis vectors {e₁, e₂, ..., eₖ} where k = ord₂(M) and look like ρₘ,ₑ(x, d) = DPᵈ where D is the diagonal matrix with entries Dⱼⱼ = exp(2πi⟨2ʲm, x⟩ / M) and P permutes the basis vectors.
As I understand, this is post-factum rationalization of what positional embedding is, not the actual theory used to build neural networks.
From what I usually see, ML researches just throw everything at the wall and see what sticks. Whatever approach turns out to work better, gets used more often, and sometimes theoretical background is developed for why it works. RoPE works not because it’s good math, just it turned out to work better than some other equally arbitrary approaches at some point, and then other approaches have also been developed that work better than RoPE.
This is the most frustrating part of trying to understand machine learning. You can read a bunch of really great math books that rigorously build concepts from the ground up (calculus, linear algebra), then you start to get into the more hand wavey math (_some_ statistical concepts feel like this) and then you start getting into some of the theory behind machine learning systems and expecting the same amount of rigor and ability to understand _why_ something works and it’s always an unsatisfying explanation. I really wish there would be more disclosure like “this is what we tried and this seems to work, we think this is why” rather than present the method, give some mathematical formalization of the method, then go “it works great” and then move on. It leaves people like me wondering if there is something that I’m missing or some hole in my knowledge that is obvious to everyone else, OR does no one actually know why this works and just don’t want to say. Just give us a hint, make the shrug emoji or something, the more I learn about machine learning, the more I get that it really is more art than science.
Most people who write ML papers are at the stage of alchemy—try a bunch of things and see if you can create gold out of lead. Usually their papers are not worth reading, because even if they do something right, they do not know what made it right, and it cannot lead to further or generalizable insights.
A few ML researchers do actually have a lot of this theoretical knowledge. You can see this in papers like Variational Diffusion Models, Continuous Normalizing Flows, <?> Delta Attention. These papers are usually also better written, because the authors understand why things work so they can deprioritize irrelevant details.
I presume your comment is in reference to this speech, as he famously states: "Machine Learning has become alchemy" in it. For anyone who has some time and hasn't watched it, I'd highly recommend it.
Most people who publish papers in ML are alchemists, but please do not assume all of us are. The original authors of the RoPE paper knowingly designed their embedding to be translation invariant. I do not know if they were aware it was a group representation, but what they were trying to design was in essence a group representation.
Both things can be true and useful. You can search for solutions in a fairly arbitrary manner, and when you find something that works you can attempt to develop a theory to explain it in the hope that said theory will enable more efficient search efforts going forward.
There is no enlightenment in this. Are you going to make the next breakthrough by throwing yet more mud at the wall, or are you going to take educated steps based on a "post-factum" analysis of what has worked well?
I dont think the target audience for the blog is abstract algebra grad students
However would be good to add that the solution can be structural(like in NoPE), then you dont need explicit representations and it just falls out of your architecture.
When I see a title "Understanding..." I assume it will be about understanding theory not implementation or the theory of implementation. When I see a title "Surveying..." or "Understanding Implementation..." I assume it will be about surveying the implementation of that theory. There was just a title mismatch so I felt it was prudent to fill in the gap in understanding the blog did not cover.
Also, I expect the target audience of the blog is ML researchers, since he goes into some of the math, and umm... the kind of ML researcher that is not at least aware of the basics of abstract algebra is closer to an alchemist than a researcher.
That seems to skip a few steps that explain why any of that is important for a positional encoding. I think the original author of RoPE explains the motivation behind it in his own blogpost quite well ( https://spaces.ac.cn/archives/8265 ). And it doesn’t seem to treat group theoretic understanding as something foundational. It mostly relies on engineering goals and geometrical intuition.
> The irreducible representations in four dimensions are your familiar particles: electrons, protons, etc
Can you explain more what you mean here? What do electrons (elementary particles) have to do with protons (complex composite particles) and with general principles of four-dimensional spatial transformation? The electrical force is not a direct consequence of space-time geometry, and even less so the specific particles we happen to find in our universe.
But still - the basic space-time group properties and symmetries don't give you the actual particles, not even a little bit. You could maybe say they give you a concept of a particle, and you can describe the actual particles that happen to exist in our universe using the properties that this group defines - sure. But you can't simply write the group symmetries and discover that a particle with spin 1/2 and mass 0.15MeV has to exist - you just discover that particles in this theory are described by mass and spin, with a certain relation between possible combinations of mass and spin. But there's still an infinite number of such possible combinations, and only 30 or so actual elementary particles.
Plus, calling the particles that you get out of such a theory "the electron" or "the quark" is profoundly misleading. If you only start with a space-time related symmetry, you don't get "electrons", you maybe get particles with the spin and mass of an electron. But it doesn't have charge, nor color nor weak hypercharge. It doesn't decay and doesn't absorb photons nor do anything else that an electron does - it's not an electron. You need to combine this with a lot more symmetry groups to start getting the actual particles, and even then you still need to add the experimentally discovered values to match physics - the math allows for infinite numbers of various particles with properties similar to the ones our universe actually contains.
I'd also note that apparently the Euclidean group doesn't have anything to do with particles anyway, it's the Poincarre group whose irreducible symmetries lead to the (mass, spin) description of particles.
The Euclidean group is a Wick rotation off from the Poincaire group. I think it is valid to call these particles. You can tack on the gauge group later to get your 'qualia'.
Particles yes, but not electrons, quarks, etc. The math gives you "point-like things that have momentum and spin". The gauge groups add charge, color, weak hypercharge (and the associated interactions). And then you add actual parameters you have to get from experiments to discover which of the infinite number of possible particles that have these characteristics actually exist. For example, nothing in the pure math will tell you that there has to exist a particle with electrical charge but no color charge, like the electron and the positron - this is a fact about the universe that comes out of experiments.
Regardless, that line of reasoning would still seem counterproductive to me, even if it did predict electrons.
We have found particles and empirically identified their symmetries. To model the propagations of the particles' fields, we replace those discrete symmetries by corresponding continuous ones. Then, we are shocked to find that we can work backwards from the continuous symmetries to the discrete ones again!
The continuous symmetries are widely taken to be the fundamental thing, because they make the math of Lagrangian mechanics easier, and in QFT we can 'quantize the field'. I don't this stands up to philosophical scrutiny though. We don't actually have 'electrons rotated by 10 degrees', we only have 'electron field excitation with momentum p, rotated by 10 degrees phase'.
At the quantum level, nature seems to use the half spin ireps, but I fail to see if they are useful for 2D images or maybe 3D shapes as inputs for LLMs. Any ideas?
It is called representation theory, and once you have seen even the basics of representation theory it is obvious the authors of the original RoPE paper were trying to rederive a representation for the translation group.
The reason you want to know the general theory behind positional embeddings is it lets you work with other kinds of relative positions. For example, quad/octtrees are useful for faster attention on large images/videos, or a Gaussian splat might want 3D translation + rotation invariance.
I believe you can also go further and start adding in gauge groups and whatnot, but I just thought about that off the top of my head.
What do you think it would take to cure all cancers, and what capabilities do you think AI will have within the next decade? Need I remind you that, in the span of five years, AI went from not being able to add to solving Millenium Prize problems?
What would it take for AI to not replicate that in biology? Either curing cancer has to be a much harder problem, which is doubtful given targeted treatments like immunotherapy humans have already stumbled across, or AI progress has to slow down massively, which is doubtful given all the trends say it is speeding up.
My understanding of drug dev is that finding stuff that might work is not the challenge, but verifying how well and with what side effects is.
That verification might start in some simulated computer environment but needs to move into physical wet lab, animal testing and then human testing.
So medicine is quite a bit different than code/math where you have a perfectly verifiable problem space that can be iterated within by AI infinitely.
A good example might be Alzheimer's where the brain plaque was thought to be a cause, lots of research on various ways to prevent or reduce the plaque and then it turns out that doesn't matter at all, or is more a byproduct than a cause of the disease.
edit: In general we have many diseases we don't understand and drugs that work via mechanisms we don't understand. So it seems very hard to have a computer simulation in which AI can test medicine. The simulator work seems like the actual problem to solve, not the invention portion.
I think this is a bit misleading. Less than 10% of phase 1 trials end up passing phase 3 and going to market. You can claim that means the challenge is verifying how well they work since you need to run a bunch of phase 3 trials but I think the real challenge is finding a phase 1 target that will end up passing phase 3. Doing a better job of quickly eliminating bad targets is the real challenge. If AI turns that 10% number into 20% then you can get twice as many marketable drugs for the same number of trials. I guess another way of putting it is that finding stuff that has a small chance of working is not a challenge, but finding stuff that has a good chance of working is a huge challenge.
I got annoyed at yet another primer that does not put information theory as foundational, so I decided to write my own.
The Little Pamphlet of AI Foundations: An Unintuitive Philosophical Primer
Losses
Intelligence is the ability to explain phenomena. One is more intelligent where they can better explain phenomena.
A phenomenon is any correspondence between data, and an explanation is an encoding of that correspondence. There is an infinite amount of data so an intelligence must be a program that generates new explanations when it sees new data.
A program is a string of bits run by an interpreter. Since strings of bits are data, programs may be generated by other programs, and a program's interpreter may itself be another program or intelligence. This recursion eventually bottoms out in physical ware. Human and artificial intelligences differ mainly in their ware, though human intelligences also have an impredicative recursion property that artificial intelligences are only expected to gain in 2027.
At a low level of intelligence, a calculator takes in numbers and operations through electrical impulses, moves electrons through a series of transistors, which creates new outputs to be displayed on the screen.
At a higher level, a neural network training algorithm takes in examples and outputs weights, usually through preconditioned gradient descent.
At an even higher level, a language model takes in words and outputs possible continuations. To convert this to the correct continuation, an additional error correction code must be provided for every word it outputs. This unexplained gap in the language model, or 'loss', dominates in the limit of a large number of words. To consistently provide short explanations, a model must have a small loss.
At the highest level, an explanation of an environment must encode all data in that environment, including any intelligences. An intelligence encompasses a larger share of its environment if it is harder to encode. Under a fixed loss budget, the hardest intelligence to encode provides explanations weighted exponentially by their length. This is the origin of the common mantras that a short explanation is exponentially more likely to be the correct one, colloquially known as Occam's razor, Solomonoff's lightsaber, and Kolmogorov's complexity.
The important takeaway is that a loss represents the average size of an error correction code, and a smaller loss is better.
Architecture
An intelligence is a program that generates encodings of data correspondences. Choosing an architecture with better data topologies enables it to do so more efficiently.
A data topology consists of data and possible connections between the data, with computational costs determined by the architecture. As computational resources grow superexponentially, the goal of architecting is generally to lower the computational complexity of creating connections, encapsulated colloquially as 'The Bitter Lesson'. To give a few examples:
1. The limited liability corporation lowered the personal risk of starting a business from the size of the business to a fixed cost, making economic connections cheaper to form.
2. Residual networks directly form connections between neuron data and output gradients, bypassing the exponentially weakening connections that previously made deep learning impossible.
3. Flow transport models improve upon continuous normalizing flows by giving target distribution data along the entire generation process.
4. Quadratic attention connects every input datum to every input datum, instead of relying on fringe connections from the nonlinearity in activation functions. Linear attention further lowers this cost by adaptively selecting data to go into a memory bank, and only forming connections with the memory bank.
5. A gradient descent preconditioner modifies the weight flow density, so distributions of weights are squeezed closer together or spread further apart. In the extreme, this no longer looks like gradient descent and looks closer to an intelligence directly writing weight updates based on new examples.
Learning Theory
A perfect intelligence provides explanations weighted exponentially by their length. A Bayesian neural network is a network generated by a perfect intelligence as an explanation for a dataset, and its distribution of weights—its 'partition function'—will be concentrated in regions with exponentially low loss. Analogous to physics, much can be gleaned from the partition function.
In adversarial contexts such as generative adversarial networks or reinforcement learning, examples rotate through a cyclic group of six elements, being positive, neutral, or negative examples depending on what the other intelligences have learned. This creates an anyonic partition function for each learnable feature and the familiar sextessential steep upwards loss curve before a plateau. Similarly, an alternating cycle of learning and forgetting gives the fermionic partition function and a loss curve colloquially referred to as grokking. Most learning is just learning and looks bosonic in nature: losses quickly go down, then settle into an exponential curve.
In the limit of a large number of training examples, the network's loss dominates the size of the explanation, but it still takes a logarithmically increasing number of bits to describe the path the weights take along the weight flow. To be precise, the explanation length grows as
nL(w) + λ log n − (m − 1) log log n
where n is the number of training examples, L is the network's loss, λ the real log canonical threshold, and m its multiplicity. It is possible to subsume the logarithmic terms into the loss by adding normal noise to the weights after each training iteration with variance dηT/λn, where η is the learning rate, T the temperature, and d the model dimension. In the nonsingular case λ = d/2.
I think this is downstream of The Debtor's Revolt[1] and antinormative conspiracies expropriating object-level gains[2] from creators. Those closer to the central bank have lower rates to buy out value-creating startups which are assimilated into the antinormative conspiracy. This ancestral mirroring is a fundamental issue with central planning, anathema to the federation necessary for capitalism to succeed.
reply