In short
A linear transformer trained on masked matrix block completion implicitly discovers a unified numerical solver, EGLE (Emergent Algorithm for Global Low-Rank Estimation), a two-line update rule related to Newton–Schultz matrix inversion.
Key claims
EGLE is parameter-free, performs implicit matrix inversion (not gradient descent), and reproduces the transformer’s internal computations with ~1e-6 to 1e-4 error.
Notable examples
framed as predicting missing block D from observed blocks A, B, C under low-rank assumptions; connects to Nystrom extrapolation.
Guests
No named guests; only researchers/authors are referenced indirectly.
Written by AI. May contain mistakes. Listen to the episode to check what was said.
Chapters
Tap a time to open that second in VOIntroduction to Linear Transformers
0:45 to 2:03
Exploration of how a linear transformer can discover mathematical algorithms.
“No specific instructions on how to iterate.”
Masked Block Completion Tasks
2:03 to 3:26
Description of the masked block completion task setup used in the research.
“How did they design this masked block completion task to be so effective?”
Understanding the EGLE Algorithm
3:26 to 5:37
Deep dive into the EGLE algorithm discovered by the AI and its implications.
“The only things that changed were things like attention masks or internal dimensions.”
The Nature of EGLE
5:37 to 8:01
Discussion on the mathematical nature and implications of the EGLE algorithm.
“The extracted EGL rule could reproduce the transformer's actual internal calculations, layer by layer, with incredibly high fidelity.”
Performance Comparison Across Regimes
8:01 to 12:20
Comparison of EGLE's performance under different computational constraints.
“in those three regimes, unconstrained, distributed, and sketched.”
The Future of Algorithm Discovery
12:20 to 14:00
Speculation on the potential of AI to discover sophisticated algorithms in larger models.
“So if you compress by a vector of 10, you might need 10 times more iterations.”
Exploring New Avenues in AI
14:00 to 14:15
Discover the exciting potential of AI in addressing complex scientific problems.
“It opens up a completely new avenue, doesn't it?”
Transcript
Automatic transcript. May contain errors.0:00Welcome back to the Deep Dive. Today we're digging into something pretty mindending actually. can a simple AI just trained on pattern matching really invent a world-class mathematical algorithm from scratch? It sounds like science fiction, doesn't it? But yeah, the research we're looking at suggests exactly that. We're talking about a linear transformer, nothing super fancy architecturally. It was trained on millions of these mask block completion tasks. Think of it like next token prediction, but for numbers in a grid. Okay, wait, let's really grasp this core idea. The AI gets incomplete data, and its only job is to fill in the blanks.
0:38Exactly. Fill in the missing block in a matrix. And crucially, no hints. No pre-programmed math rules. No, like, here's how iteration works. Zero hints. No normal equations. No specific instructions on how to iterate. Not even a clue that all these little matrix puzzles were related. Just predict the missing numbers accurately. And somehow, out of that simple task... Right. The researchers looked under the hood. They algebraically unrolled the weights the transformer had learned. And instead of some complex spaghetti code, they found this single elegant two-line update rule. They called it EGLE.
1:12That's the Emergent Algorithm for Global Low-Rank Estimation. EGLE, an algorithm discovered by the AI. And you're saying it's actually good, like competes with human design methods. Oh, yeah. It's competitive. It's fast, robust, especially under certain conditions we'll get into. So for you listening, why does this matter? It's more than just a faster way to solve a niche math problem, right? Absolutely. This could fundamentally change how we find solutions in high-performance computing, maybe even science more broadly. Instead of humans spending years crafting these complex solvers for big data problems, well, maybe we can just train an AI to discover the best, most adaptive solver directly from the data.
1:51It's like a shortcut to mathematical discovery, potentially huge. A huge shortcut. It positions transformers not just as language models, but as potential engines for scientific discovery itself. Okay, let's dive into the setup. How did they design this masked block completion task to be so effective? What did the input actually look like? So imagine a matrix, Z dollars dealer. They divide it into four blocks, A, B, C, and D. They deliberately zeroed out the bottom right block, D. That's the mask. The transformer sees A, B, and C, and its task is just to predict D, assuming the original complete matrix had this property called low rank.
2:30Low rank, meaning the data has some underlying simple structure, not just random noise. Exactly. It implies redundancy or patterns that can be compressed. And the AI's job is to find that structure in A, B, and C to figure out D. That seems simple on the surface, but the source material notes this one setup covers multiple important problems, like Nystrom extrapolation. What's that? Nystrom is a classic technique. If you have a massive matrix too big to handle, Nystrom lets you approximate it by looking just a few of its rows and columns. By framing the task as predicting that missing D block, the transformer was basically forced to learn the core idea behind Nystrom, how to infer the whole from just parts, a really crucial skill for big data.
3:09Got it. So same basic task, fill in the matrix block, but then they tested how the AI adapted when they put constraints on it, simulating different real world limits. Precisely. And they use the same core transformer architecture for all three scenarios, which is key. The only things that changed were things like attention masks or internal dimensions. Right. So what were the three regimes? First was unconstrained, or you could call it centralized, basically the ideal case. Full visibility of the data, no artificial limits on how information flows or how much compute it uses per step. The baseline.
3:45Give it everything. Okay, what about the tougher scenarios? Second, distributed computation. This mimics having data spread across multiple machines, like in a big computing cluster. They used a multi-head transformer, where each head could only see its local chunk of data. Communication between them was really restricted, only happening through updates to those C &D blocks. Very sparse messaging. Okay, that's super relevant. Because often, moving data between nodes in a supercomputer is the real bottleneck, not the calculation itself, right? You nailed it. Communication latency can kill performance.
4:16So this regime forces the AI to find a communication-lite solution. Makes sense. And the third one? The third was computation-limited, or sketched. Here, they directly attack the computational cost per step. They put a hard limit on the internal dimensionality, specifically the size of the query and key embeddings in the attention mechanism. Let's call that size TE or$2. Okay, let's make that bottleneck concrete. You mentioned big O notation. How much faster does this make things? Yeah, so typically the compute cost might scale like one dayer, where the one is the matrix size. In this sketch regime, they force the internal dimension$2 to be much smaller than$1.
4:54This constraint drastically reduces the cost, down to something like R-Day-R-D-I. If$2 is tiny compared to DARE, you're talking orders of magnitude less computation per layer. A massive speed up per step, but it forces the AI to work with a really compressed, maybe lossy representation of the data? Exactly. It has to be smarter with less information. All right, so here's the kicker. Three very different sets of rules. Unlimited resources, limited communication, limited computation. And yet... The AI found the exact same underlying algorithm in all three cases. That's the astonishing part. They unrolled the weights, did the math, and out popped the same simple two-line iterative rule, EGLE.
5:33Not three variations, one unified algorithm. And it wasn't just conceptually similar. The extracted EGL rule could reproduce the transformer's actual internal calculations, layer by layer, with incredibly high fidelity. Like errors down around$6,$10 to$4. Tiny. Wow. It's almost like the transformer found a kind of mathematical platonic ideal for this problem. The constraints just changed how it implemented that ideal solution, not the solution itself. That's a great way to put it. The constraints shaped the expression of EGLE, but the core logic remained constant. So what is EGL doing, mathematically speaking?
6:09What's in those two lines? Analytically, it's described as being parameter-free. It uses what they call a continuous conditioning update. and its structure is deeply related to a known classical method called the Newton-Schultz iteration, which is a powerful technique for finding the inverse of a matrix. Okay, Newton-Schultz for matrix inversion. Now, I remember reading some earlier takes on AI discovering things like this, often calling it preconditioned gradient descent or GD++ day. But the researchers here seem quite clear that EGLE is not just another form of gradient descent. why the distinction?
6:45Yeah, that's a really critical point they make. Gradient descent fundamentally is about optimizing parameters. You have a model with weights, and GED nudges those weights over many steps to minimize some error, right? It needs explicit knowledge of those parameters and an error signal. EGL isn't doing that. The transformer running EGLE is performing a direct data-to-data transformation. It takes the input state, the ABC blocks, and transforms it towards the output state, the D block, using this fixed rule. They call it implicit matrix inversion. Okay, can we make that distinction clearer, an analogy perhaps?
7:18Okay, think of GDE like tuning a radio dial. You slowly turn the knob parameters, listening for the signal to get clearer, minimize error, it's iterative adjustment of the tuner. EGLE is more like maybe having a perfectly cut key, the input beta A, B, C, and inserting it into the right lock, the implicit matrix structure. The mechanism inside the lock, the EGLE update, directly turns and opens the door, reveals D. It's transforming the state based on the input data structure itself, not tuning internal knobs over time. That helps. It's not optimizing its own weights during the process. It's applying a learned transformation to the data.
7:56Exactly. The weights define the transformation, but the process itself is about changing the data state. So how does this single EGLE rule then manifest differently in those three regimes, unconstrained, distributed, and sketched. It's all about how it uses an internal component, basically a sketch matrix, let's call it doubles. In the unconstrained setting, there are no limits, so someone just behaves like the identity matrix dollar-dollar, uses the full dimensions of the data. Simple enough. What about distributed, where communication was the bottleneck? There, the core EGLE update rule runs identically on each separate machine on its local data.
8:29The clever part is the communication step. After the local updates, they only need to average the resulting changes to the C and D blocks across the machines. These updates are relatively small. The communication cost scales nicely, like no more D plus D E. So very little data needs to be shipped around each round. Okay, low cost per round. We still need to know if it needs more rounds, but the cost per round is low. Got it. And the computation limited or sketched mode. This is maybe the most intriguing. The transformer doesn't need you to give it a sketch matrix. it learns to create one implicitly within its own weights.
9:03It effectively materializes a random orthogonal sketch, seal allers, and uses it to operate on compressed versions of the data columns. That's how it achieves that Dolan computational cost per layer by figuring out the compression itself. That self-adapting compression is really something. Okay, the adaptability is cool, but let's talk brass tacks. Performance. Why ditch tried-and-true methods like QR, conjugate gradient, or SGD? Right, does it actually win? In the centralized setting, the big story is convergent speed, especially on difficult problems. EGLE achieves what's called second-order convergence.
9:36The key metric here is how performance relates to the condition number, kappa. Remind us quickly what the condition number kappa signifies. Sure. Kappa-kappa basically measures how sensitive a problem is to small errors or changes in the input. A high kappa means a problem is ill-conditioned. Very tricky. Very prone to blowing up errors. Think of it as how wobbly the mathematical landscape is. And high kappa usually means slow convergence for standard iterative methods. Often, yes. Many methods slow down linearly as kappa increases. But EGLE, its iteration count scales only with the logarithm of kappa log kappa.
10:12Log kappa, that's a massive difference. So as the problem gets exponentially harder, EGLE only gets slightly slower. Exactly. Exponentially better scaling. Empirically, they compared it to conjugate gradient, CG, which is a workhorse iterative solver. On a problem with kappa 104 ECMU, pretty ill-conditioned, EGLE needed about 100 times fewer iterations than CEG to reach the same accuracy. 100 times fewer iterations? That's not just faster. That could enable simulations that were simply impossible before due to time constraints. Precisely. It puts EGLE in this sweet spot. It's iterative, so potentially cheaper per step than direct methods like QR decomposition.
10:50But its convergence rate on tough problems is so good, it almost rivals the robustness of those direct methods just off by that log factor. Okay. That's compelling for the centralized case. Now, distributed, you said the cost per round was low. What about the number of rounds and this data diversity index alpha-doc? Right. The number of rounds is crucial for total time. The key finding here relates to scalability with the number of machines, dollar-other. They found that if the data distributed across the machines is sufficiently diverse, meaning alpha is as close to moment one, the different machines have genuinely different perspectives on the data, then the total number of iterations needed barely increases as you add more machines in the dollar.
11:28Whoa. Okay. So the convergence time becomes independent of the number of workers. Pretty much, yeah. Under high diversity. That's huge for scaling up. You can throw more computers at the problem, and it actually gets solved faster, linearly faster, because you're not paying a penalty in needing more communication rounds. That kills a major headache in distributed computing. You get true horizontal scaling. Exactly. Compared to standard distributed gradient descent, EGLE needed, again, something like 10 to 100 times fewer communication rounds overall, while keeping the cost per round low. It's built for communication bottlenecks.
12:02Impressive. Okay, last one. Computation Limited, the sketched version. You said the cost per iteration dropped massively, like 7x in one test. What was the tradeoff? Did it need way more iterations? There is a tradeoff, yes. Because it's working with compressed data, the number of iterations does increase. It scales linearly with the compression ratio. Basically none. So if you compress by a vector of 10, you might need 10 times more iterations. Roughly, yes. But here's the thing. Even with more iterations, EGLE often still wins. Because the underlying update rule is still that powerful second-order Newton-Schultz-type step.
12:37Compared to other sketched methods like stochastic gradient descent, SGD, which are only first order, EGLE's better update quality means it handles ill-conditioned data much more effectively, even in the sketch setting. It maintained a significant advantage there. So it seems like whatever the constraint compute communication memory EGLE finds a way to be highly efficient by adapting its internal structure. That really sums it up. A neural net trained on a simple prediction task genuinely discovered a unified, highly efficient numerical algorithm. And EGL automatically configures itself for the resources available.
13:11It's, well, it's data-driven algorithm design. Which leads us to the really big provocative thought here. This was a linear transformer, relatively simple by today's standards. If this architecture could implicitly find something as sophisticated as EGLE, a fast, second-order solver for linear algebra, What else is hiding inside the weights of much larger, more complex models like GPT-4 or CLAWD? Exactly. Are there fundamental algorithms for, say, fluid dynamics or protein folding or optimization problems currently latent within these giant models just waiting for us to figure out how to extract them?
13:45This research strongly suggests the transformer isn't just for language. It might be a general purpose mathematical discovery machine. So the future might not just be about humans painstakingly designing algorithms, but maybe setting up the right fill-in-the-blank problems for AI to solve and then interpreting the incredibly efficient solutions they discover. It opens up a completely new avenue, doesn't it? A really exciting, potentially revolutionary path towards tackling complex scientific challenges, finding the hidden EGLEs for all sorts of problems.
From the publisher
The academic paper introduces a study on training a linear transformer to perform masked-block completion tasks on low-rank matrices, which simulates complex numerical problems like Nyström extrapolation. Surprisingly, the transformer implicitly discovers a single, unified, iterative numerical solver, termed EAGLE (Emergent Algorithm for Global Low-rank Estimation), despite being trained only on input-output pairs under a mean-squared loss objective. This discovered algorithm is robustly the same across three distinct computational constraints: centralized (full visibility), distributed (restricted communication), and computation-limited (low-dimensional attention) settings. Theoretically and empirically, EAGLE exhibits second-order convergence, which is significantly faster in terms of iteration complexity than classical first-order methods like Conjugate Gradient or Gradient Descent, positioning it as an efficient, resource-adaptive solver for prediction, estimation, and completion tasks.




