[BidClub_]
Machine Learning Street Talk · · 67 分钟

LSTM:卷土重来?[Sepp Hochreiter 教授]

Sepp Hochreiter

YouTube
TL;DR
  • Hochreiter 的核心判断是,扩展语言模型只会让它们更大,不会让它们更聪明。他认为,LLM 是一种「数据库技术」,把人类知识存进文本,也可能包括代码,再进行重组;它或许能在既有程序空间中走得很远,但一旦进步需要真正的新概念,在他看来就会失效。「我们的路径止于扩展规模。」

  • xLSTM 的卷土重来建立在 3 项架构变化之上:指数门控、基于 Hopfield network 的矩阵记忆,以及并行化。指数门控允许模型修改此前的存储决策;但由于早期的指数激活会破坏学习,必须加入归一化;更大的记忆可以存储更丰富的结构,而不只是一个标量。

  • Hochreiter 声称,xLSTM 目前在训练和推理速度上都已超过 FlashAttention。其分块设计在优化后的 attention 与递归之间交替,并根据 GPU 缓存来设定分块大小;如果 xLSTM 的推理速度快100倍,o1/Strawberry 式系统就能用同样的预算进行「多100倍的思考」。

  • 更具差异化的商业机会可能是嵌入式工业 AI,而不是又一个语言产品。无论序列包含100个还是1亿个元素,xLSTM 使用的都是固定大小的记忆;Hochreiter 认为,这让内存需求可预测,并支持面向机器人、无人机和自动驾驶系统的高速、节能系统。一家未具名的无人机公司据称认为结果「难以置信」,其无人机如今已能自主飞行,但公司没有披露公开基准测试。

  • Hochreiter 不认为有必要把每项推理能力都塞进一个学习模型。他偏好的路径是构建混合系统,调用形式证明器、数学软件和知识工具:「在我看来,把所有东西塞进一个系统是愚蠢的。」奥地利规模约4000万欧元的「Bilateral AI」项目,旨在把符号 AI 与亚符号 AI 结合起来,构建稳健的工业系统。

  • NXAI 围绕 xLSTM 和神经模拟展开,而不是加入拥挤的通用语言市场。首笔1000万欧元据称投入了算力和第一篇论文;Hochreiter 表示,7B xLSTM 可以与 Transformer 技术竞争,同时具备速度和能耗优势。据称,公司的模拟工作已将一次汽车设计计算从3周缩短至3分钟。

  • 工业领域最大的主张是,学习得到的抽象可以替代成本高到无法承受的超细粒度数值模拟。模型不必计算每个粒子或网格点,而是识别数千个元素协同运动的结构——模拟「雪球」,而不是每一片雪花。Hochreiter 表示,一个原型系统可能耗资1亿欧元,或许可以因此避免,但他明确保留前提:「如果这能奏效。」

摘要 · 为研究而整理的核心内容

1. 扩展规模能存下更多知识,却解决不了智能问题

  • Hochreiter 的框架是:LLM 是一种「数据库技术」,把人类知识记录在文本中,也可能包括代码,再通过替换和重组实现泛化——比如把周二换成周三。这种能力很强,但处理的始终是「已经存在」的东西。

  • 决定性问题在于:是否每一段代码实际上都已经被写出来。如果答案是肯定的,重组可能走得极远;但如果进步需要「新代码、新想法或新概念」,Hochreiter 不认为当前的语言模型能够创造出来。

  • 主持人的反驳值得保留:o1 等系统可以生成程序、组合原始操作,并利用测试时计算间接搜索程序空间。Hochreiter 承认:「你可以不断调整,而且会走得非常远。」但他仍然坚持边界:模型无法获得既有组件之外的新概念。

  • 他的直白结论是,更多训练数据主要让系统变得更大,而不是更聪明:「我们只是更大了。」模型正在接近他所称的近乎大脑的规模,但人类只需少量样本就能学习、适应、抽象和规划,方式截然不同。「有些东西缺失了。」

2. 真正的推理需要目标、规则与外部工具

  • Hochreiter 区分了人类推理中的概念——矛盾、归纳、形式规则和结构化证明——与 LLM 所谓的「重复推理」:后者来自输入中已经出现的内容。模型可以替换变量或复现代码模式,但轻微改动仍可能让整个过程失效。

  • 模型可以学会一套形式逻辑,生成语法正确的公式,并把其中的规则应用到新对象上。但 Hochreiter 的疑虑在于语义和方向性:构造证明需要由目标驱动的中间步骤,而在一套形式系统中学到的能力未必能迁移到另一套系统。此类系统仍不完美,通常也不如人类。

  • 面对 AlphaGo 的 Move 37,Hochreiter 接受系统确实创造了新知识,但认为那来自对棋局的理解、蒙特卡洛树搜索和价值函数的结合。他偏好的通用架构同样采取分工方式:调用证明器、Mathematica 或查询工具,而不是把每项操作都强行塞进一个网络。

3. 梯度消失直接催生了 LSTM

  • Hochreiter 记得 Jürgen 极具说服力,也始终充满创作冲动:3名研究者为约50名慕尼黑学生准备研讨课题时,Jürgen 到场就说自己没有准备,但最终每个学生都选了他的神经网络课题。他当时也考虑过成为艺术家,而不是科学家。

  • 在 Hochreiter 的毕业论文工作中,神经网络需要把一条信息保留到序列末尾。他看着屏幕上的数字不断流过,注意到「小得离谱的数字」:梯度已经消失,序列开头不再获得有用的信用分配信号。

  • LSTM 的记忆单元经过特殊构造,使反向信号不再被反复缩放;这样,开头的梯度就可以与结尾保持一致。他把成果写进毕业论文,Jürgen 后来回来问是否应该发表,两人于是完成了论文。

  • Hochreiter 表示,LSTM 仍在 Google 的应用中支持洪水预测,也用于美国和加拿大政府的相关系统,并在这一任务上优于替代方案。它还支撑了 AlphaStar,并在2017年之前主导语言领域,通常与 attention 配合使用;随后「Attention Is All You Need」把整个领域推向 Transformer。

4. Transformer 凭硬件吞吐取胜,而非渐近效率

  • LSTM 的输入门类似早期的 attention,负责筛选哪些序列元素值得存储;遗忘门则降低旧记忆的权重。递归结构与压缩后的记忆交互,每次新查询的交互成本恒定,因此总计算量随序列长度线性增长。

  • Attention 会将每个查询与此前的 key 进行比较,因此在上下文长度上呈二次增长,主要是成对计算。Hochreiter 认为,递归记忆可以让新 token 与由多个早期 token 共同形成的抽象交互,而不只是逐一比较 key-value。

  • 但二次复杂度的 attention 反而跑得更快,因为 GPU 可以并行处理这些比较,而经典 LSTM 只能按顺序更新记忆。FlashAttention 仍然是二次复杂度——「数学没法作弊」——但它对寄存器、快速内存访问和硬件特性的利用极其高效,实际吞吐最终压倒了 LSTM。

5. xLSTM 能覆盖坏记忆,存储更丰富结构

  • xLSTM 项目要回答的问题是:LSTM 能否继承 Transformer 的可扩展骨架,同时修复自身局限。团队并行化了递归、扩大了记忆,并解决了一个关键缺陷:经典 LSTM 一旦做出存储选择,就无法重新修改。

  • Hochreiter 用买衣服举例:模型需要同时考虑价格和是否适配鞋子。当后来出现更好的商品时,模型应该大幅提高它的权重,并压低此前的赢家;但上限为1的 sigmoid 门无法通过施加大于1的因子,抵消此前的降权。

  • 指数门控取消了这个上限;归一化则除以累计的指数输入门,效果「像一个滚动 softmax」。最初的动机是允许模型修改决策,但 Hochreiter 也观察到,模型开始重新学习时会出现梯度峰值;学习动力学为何改善,目前仍只是明确的推测。

  • 矩阵记忆用带门控的 Hopfield network 取代原来的标量记忆,通过加入 key 和 value 的外积,同时降低旧内容的权重。他认为 Mamba-2 与这一设计高度接近——「没有输入门的 xLSTM」——但输入门的缺失在他看来很重要。

6. 分块递归瞄准更低推理成本与实时控制

  • xLSTM 将 FlashAttention 分块与递归更新交替使用,并选择能高效装入 GPU 缓存的分块大小。Hochreiter 表示,这一想法来自 FlashAttention 的开发者,但他声称最终系统在训练和推理上都快于完整上下文的 FlashAttention,这一结果出乎他的预期。

  • 自回归生成暴露了 attention 的弱点:即使使用缓存,每生成一个新词,系统仍要反复查询不断增长的历史。Hochreiter 将 xLSTM 更快的递归推理与 o1/Strawberry 式「思考」联系起来:在其所说的快100倍这一条件下,系统就能按比例增加推理时的计算量。

  • 部署优势在于固定内存:包含100个元素的序列和包含1亿个元素的序列,使用的都是同样设计好的递归状态。Hochreiter 认为,这种可预测性,加上能耗和速度优势,为嵌入式机器人提供了路径;由 Transformer 驱动的智能体可能需要数秒才能作出反应。

  • 一家未具名的公司据称曾在无人机 GPU 上测试 xLSTM,称结果「难以置信」,并告诉 Hochreiter,其无人机如今已经能够自主飞行并进行实时控制。他还把机会扩展到汽车,甚至手机,但称手机场景「也许有些牵强」,因为他不了解其约束条件。

7. 工业 AI 需要符号保证与学习得到的抽象

  • Hochreiter 表示,自己从未见过 AI 系统真正形成全新的抽象:语言是人类创造的,甚至 ImageNet 中目标物体的位置也是由人类选择的。xLSTM 或许能把太阳、海滩和鸡尾酒压缩成「度假」这一概念,但他谨慎地说:「我不知道它能不能做到。」

  • 他的战略答案是神经符号融合。数十年的符号方法可以为学习系统提供工具、稳健性和保证,尤其是在生产流程停摆不可接受的场景;奥地利规模约4000万欧元的「Bilateral AI」项目正在推进这种结合。

  • 目前这种融合仍然「笨拙」:符号研究者提出用机器学习来拟合参数,亚符号研究者则把符号逻辑当成外部护盾。Hochreiter 希望让学习进入形式系统,让形式推理成为集成组件,尽管两个研究群体彼此都存在抵触。

  • 他也否定了干净利落的 System 1/System 2 二分法。人类行为从不假思索地伸手拿东西,到在两条路线之间作出选择,再到长期规划一盘棋,实际上是连续变化的;AI 形成的抽象也可能不同于人类概念,因为 AI 系统以不同方式生活在同一个世界中,并对其进行操作。

8. NXAI 将 xLSTM 与学习正确尺度的模拟结合起来

  • Hochreiter 在大学里难以为 xLSTM 融资,同时又希望把技术留在欧洲,于是创办了 NXAI。一名当地投资人支持「先修好技术,再在其上构建」的思路;首笔1000万欧元投入了算力和第一篇论文。

  • NXAI 目前有两条工业主线。Hochreiter 表示,7B xLSTM 可以与 Transformer 技术竞争,同时具备速度和能耗优势;但他不想与已经集中在语言领域的众多公司正面竞争,因为语言并不是大多数工业企业的核心业务。

  • 神经模拟通过识别相干结构,解决传统数值方法难以处理的超大规模粒子和网格问题。他的类比是:月球可以用位置、也许再加一个冲量和质量来表示;雪球可以作为一个整体建模,而不是逐片计算雪花。合适的抽象能够消除海量冗余计算。

  • 在一个汽车设计案例中,他表示数值模拟需要3周,而学习系统只需3分钟。对于无法按完整规模模拟的炼钢炉,目标是改为模拟真实系统,从而避免一个成本可能达到1亿欧元的原型——但前提仍然是他强调的那句:「如果这能奏效。」

Sepp Hochreiter

We need a new direction. Large language models are not our way to advance AI. Language models are, for me, a database technology. They are not artificial intelligence. You grab all human knowledge in text, perhaps also in code or whatever, and store it. Currently, their reasoning is not real reasoning; it is repeating reasoning—things or code that have already been seen. Our path ends with scaling up: you put more training data in to make it larger, but not smarter. The systems are not different, so we are only larger.

Speaker 1

Something is missing. You and Jürgen are pioneers of connectionism in a way, and you have always been neurosymbolic guys. Why is that, Sepp? It is an honor to have you on MLST. Thank you so much for joining us today.

Sepp Hochreiter

It is an honor for me that you have me.

Speaker 1

Oh, do not be silly. The thing that is amazing about language models and deep learning in general is that they capture a lot of subtle intuitions, cultural information, creativity, and so on. They are really good for generating programs.

The thing is, if we want to do abstraction, we need to have programs. But where do the programs come from? If we build systems that can create and acquire abstractions, we need to build systems that can write their own programs. It does not seem possible just to do discrete program search because it is too difficult.

1. LLMs Are Database Technology

Sepp Hochreiter

My view on large language models is that a large language model is, for me, a database technology. It has artificial aspects, but it is more or less a database technology. You grab all human knowledge in text, perhaps also in code or whatever, and store it. You generalize it, combine it—you know, if there is a Tuesday, I can replace it with Wednesday because these are days of the week. Names and numbers can also be generalized, but these are things that already exist.

The question is: Do we need new code? Is every piece of code already written somewhere, and do you only have to pull it together or combine it? If you really should come up with new code, a new idea, or a new concept, large language models can only pull out existing code they have been trained on. It is just not possible for them, because they were not trained for it, to produce something new.

Their reasoning capabilities are very limited, but they are very powerful because AI needs a knowledge representation. Right now, there is a problem with hallucination. How do you pull out the knowledge, also with inference? Perhaps the knowledge is already in the system, but how do I get it out? It is a database where I do not know how to access the information.

We need a new direction. Large language models are not our way to advance AI in the long term. They are a good database technology and a good knowledge-representation technology. They are important for AI, but we have to find new ways.

Speaker 1

Could I challenge that a tiny bit? I completely agree that vanilla LLMs are approximate retrieval engines. Even then, they are not quite databases because they have this interpolative property. Systems like o1 are approximate reasoning engines. They are doing test-time compute and searching through many combinations.

Even though an LLM is a finite-state automaton with a fixed amount of compute for a single forward pass, it can generate code, and the code contains all of these fundamental basis primitives that can be composed together. You can do this test-time search and compose programs together. In a sense, you can search Turing space indirectly by searching through the space of programs.

Are you saying that methods like o1 are the road to nowhere and that we need something completely different, or could we just tweak things a little bit?

Sepp Hochreiter

You can tweak it, and you will go very far because you have the program space. That is very nice. There are so many programs and so many combinations of programs that give you a new program.

If you think about Kolmogorov complexity, it is the length and complexity of programs. Programs with a simple Kolmogorov complexity are already stored or can be combined. But if you have to find a program that needs completely new concepts and cannot be combined out of existing programs, I do not think it can do it. It can only combine things it has already seen.

Large language models learn from code, but they cannot come up with completely new code concepts. Perhaps those concepts do not exist. If you say everything in code has already been invented and we only have to combine it, then there is nothing new. But if there is something new to invent, I do not think large language models can advance us.

Speaker 1

Let me push gently on that. I think this is a discussion about creativity and also epistemic foraging—creating new knowledge to explore. Reasoning is largely about programs, but you do have some logic if you do this very complex logic and your program is working.

If we say reasoning is knowledge acquisition, and we need systems to come up with new abstractions, and if we agree that those abstractions can be combinatorially deduced from abstractions that are already in the system, then we have combinatorial closure. Those abstractions do exist. Creating them is more a matter of understanding how to find a good abstraction using an algorithm.

Sepp Hochreiter

I think what we humans have is not only that we draw our ideas from coding, but that we understand the world and have all this world knowledge. From coding alone, you are limited. I think we have much greater reasoning capabilities outside of doing only programs, but I agree that you can go very far with programs.

If it is a program where you need a lot of reasoning and a lot of logic to go to the next step, then the next step, then the next step, and it was not in your training database, I do not think the current large language model can do it. Right now, I do not believe that they really understand reasoning.

They imitate reasoning and reproduce reasoning. They have already seen the concepts, but I do not know whether they understand them. There are many examples where you change something a little bit and then it goes wrong.

Speaker 1

Can you explain the difference between the kind of reasoning we do—strong reasoning, perhaps—and the kind of reasoning that we can do in current AI?

2. Reasoning Is Not Yet Real

Sepp Hochreiter

In current AI, the reasoning is not real reasoning. It is repeating reasoning—things or code that have already been seen in the input data—and combining them, also replacing some variables.

The reasoning we do involves concepts such as contradiction and induction. We learned all these things in school or during our studies, and it was hard to learn them. Now we have reasoning concepts: how we can do things, how we structure them, and how we show that something is true or not true.

For all these formal systems, you have to have formal rules. In theory, LLMs might learn some formal rules, and then they can do reasoning in a very specific domain. They can produce new things because they only apply the rules. If the rules are in the training data, they can apply them to new things.

In this reasoning system, they probably can reason. But if you go to another system or another domain, they lose their reasoning capabilities.

Speaker 1

One quick point on that: Would you consider Move 37 in AlphaGo reasoning? In AlphaGo, the Google Go-playing algorithm creatively discovered this amazing move.

Sepp Hochreiter

It was a move, yes. It created new knowledge. But there was a subsymbolic part. It was Monte Carlo tree search, which is a classical AI concept. At the end, you have the value functions and so on.

It discovered the move by checking things and evaluating them. It was a combination of understanding the game and computing a lot of moves into the future with Monte Carlo tree search.

Speaker 1

You could still say that it was an approximate value function. There were no formal guarantees or anything.

Sepp Hochreiter

Exactly, that is true.

Speaker 1

I completely agree that LLMs on their own are approximate retrieval engines. But we can build systems with formal verifiers. We can have neurosymbolic systems; we can use Lean, for example. We can build these systems. With systems like that, can we do reasoning?

Sepp Hochreiter

In principle, it should be possible, but I am not sure. I think the reasoning is limited to the domain you see in the training data.

There are different formal systems and different formal logics. You can learn one logic if you see enough of its rules. You know what to do with variables, what you can change, and how you can produce something. I think you can train an LLM for one logic system to produce new logic.

But you learn the syntax; you do not learn the semantics. If you want to prove something, then you have to have different steps toward the proof. I think this is where I would struggle. I would learn to do the formal things—the syntax. I have a sentence or a correct formula, and I produce another correct formula by applying rules it has learned and seen. It can do that, but it is not goal-directed step by step.

They are still not perfect. In many cases, they are not as good as humans.

Speaker 1

It is interesting. I agree that knowledge is created in service of a goal, and there is a creative component to reasoning. We can build systems that can dream and generate data, and we can bootstrap that. Some of it can come from the users of a system.

It feels like we can build systems that can reason, but perhaps they would not have something that we have. Maybe we have something extra.

Sepp Hochreiter

I would bet on that. Why should you learn to reason? Why not use a reasoning system? Why not call a subprogram and ask, “Can you prove this?” Or use a theorem prover, Mathematica, or something like that.

You can learn it, perhaps, and that is also okay. But I do not see the necessity, because we also use tools. Why should future AI systems not use tools for everything—for mathematics, for looking up knowledge, and things like that?

For me, it is stupid to push everything into one system, because we do not do that either. We know how to use our tools. Somehow, I feel that is a better solution.

Speaker 1

What has happened in the last 2 years since we spoke?

Sepp Hochreiter

A lot of things happened. For example, I founded a company, NXAI. It is dedicated to industrial AI. Also, xLSTM happened—this revival of the LSTM method, which now should compete with Transformer technology.

Speaker 1

We are going to get on to that. Before we do, it would be good to go on an intellectual journey through the history of LSTMs.

Just before we get there, we have not really spoken about some broader things. What was it like working with Jürgen?

Sepp Hochreiter

Jürgen is a very special person. He is very inspiring. I can tell you one story from the Technical University of Munich, where we were both there.

There was a seminar with 3 people. One person tried to get all the students into multi-agent systems, another was working on spatial cognition, and Jürgen was working on neural networks. Jürgen came and said, “I am not prepared. I do not know what to do.”

Out of 50 students, everyone selected his topic. You see, he can convince people.

It was fun. I was sitting there doing programming, and Jürgen was doing his art—he made circles, and out of the circles, women appeared. He did a lot of things. He once told me that it was not clear to him whether he would go into art or science, but it was always fun with him and always inspiring.

Speaker 1

You worked under Jürgen, and you are both pioneers in the realm of artificial intelligence. It is insane. What gave you the intuition, all those years ago, that you were working on the right things?

Sepp Hochreiter

You mean LSTM, which stands for long short-term memory?

3. The Birth of LSTM

Jürgen introduced me to neural networks, in particular recurrent neural networks. But they did not work. In my diploma thesis, he was my supervisor, and he gave me a task. It was called a truncation system, where you have a sequence and everything that you can predict can be removed from the sequence because it is predictable anyway. You shorten the sequence and can learn it. That was the idea of the truncation system.

This was a sort of solution because recurrent neural networks were not working. Then 2 things happened. First, I built a neural network where only 1 weight had to be adjusted, as a way to store a piece of information that you needed at the end of a sequence. The network could not do this.

I did all my printfs and all my coding on the screen. Numbers flowed over the screen, and then I saw these super-small numbers. These were the gradients. There was no weight update; the gradients were not there.

This was the discovery of the vanishing gradient: If you have a target and want to know what is needed to predict that target, you do credit assignment through the sequence, but at the beginning of the sequence you get no signal. The gradient vanishes.

Now I knew that recurrent networks did not work, and the solution was LSTM, or long short-term memory. I built a memory cell that made sure that, as the gradients were propagated back, they did not scale down but remained the same. At the beginning of the sequence, there was exactly the same gradient as at the end of the sequence. There was no vanishing gradient anymore.

This was the memory-cell architecture, which is the core of LSTM. I discovered LSTM and wrote it up in my diploma thesis. Later, Jürgen came back and asked me, “You did something in your diploma thesis. Should we publish it?” Then we published it.

Speaker 1

It has been one of the most cited papers in the history of deep learning and a very, very impactful paper. Reflecting back on it, what do you think the long-term impact of LSTM has been?

Sepp Hochreiter

I think it is still used. In my keynote, I gave 1 example from this year: predicting floods. LSTM is a major model in the Google app, and it is also used for predicting floods by the US government and the Canadian government.

For this task, LSTM works better than everything else—better than Transformers and so on. OpenAI built a big LSTM network as an agent. DeepMind used a big LSTM network with StarCraft; AlphaStar was a big LSTM network.

LSTM became the major technology in language up to 2017. Everybody used LSTM, together with attention. Attention was used together with LSTM, and then the paper “Attention Is All You Need” came out, meaning that you only need attention and do not need LSTM anymore. That was where the Transformer was born, and the new technology took over language.

LSTMs still performed well in time-series prediction, reinforcement-learning agents, and so forth, but Transformers were stronger, especially in language. At that time, Transformers took everything over because they were better parallelizable. You could throw more data at the model and train on more data, so they were faster. LSTMs could not compete at that time.

Speaker 1

How did the LSTM solve the trade-off between storing new data and protecting data that was already stored?

Sepp Hochreiter

That is a very interesting question, and it is also the strength of the new xLSTM. The key idea is gating. We have different gates, and perhaps the most important one is the input gate. It scales new incoming information up or down. It can be scaled down to 0, so it is not stored, or it can be set to 1, so everything is stored.

The input gate is something like an early attention mechanism. You have a time series, and you want to choose which sequence elements you pay attention to. The input gate does that. Then there is a forget gate. The forget gate asks whether the memory that is already stored is important or whether it should be downscaled.

The input gate is especially important because it picks out specific sequence elements to store, so irrelevant material is not stored. It was one of the first attention mechanisms, but we called it gating.

Speaker 1

Before we get to xLSTM, you have this amazing new invention, which solves many of the problems that the original LSTM had. Could you tell me about the computational complexity of an LSTM compared with an RNN? How did it compare?

Sepp Hochreiter

An LSTM is an RNN. A vanilla RNN is an RNN without all of the gating, and the complexity is only increased by the gating mechanism. It is still linear in time.

Perhaps it is better to compare it with attention. If you have a new query, a new piece of information, attention has to look back at all previous items. LSTM only interacts with the memory containing everything already stored, so for 1 query it has a constant interaction with the memory.

Attention has to go through all the keys and perform all these pairwise interactions. There are 2 disadvantages. The first is computational: It is quadratic in the context length. The second is that you only have pairwise interactions. You do a dot product and then an exponential of the dot product, which is the softmax, but you only have pairwise comparisons.

It could be better if more sequence elements were pulled together and a new element interacted with an abstraction of these different tokens. The Transformer has the disadvantage of quadratic computational complexity, plus very simple interactions.

LSTM is like a recurrent network. All recurrent networks are linear in the sequence length, or linear in the context length. LSTM is a little more complex because it has the gating mechanism, but it is by far not as complex as a Transformer with its quadratic complexity.

Speaker 1

Could you explain to the audience why something quadratic, which should be worse, actually ran faster?

Sepp Hochreiter

It ran faster because of the implementation on the GPU—graphics processing units. Everything was implemented on these chips. We had things like FlashAttention, which is a very fast attention mechanism, and hardware optimization.

The other thing is that you can do it in parallel. A query looks back at all the keys, but it can look back at all the keys at the same time. You can do everything in parallel. Assume you have a sequence—a sentence—and all the words are pushed up 1 layer simultaneously, while a recurrent network or LSTM has to go through it sequentially.

The first element builds up a new memory, then the next element builds up a new memory. Attention can push everything up in parallel. At that time, attention was much faster than LSTM because of this parallelism. The second thing was that you could optimize it for the GPU and the hardware.

These 2 things—parallelization and hardware optimization—gave attention a big advantage. You could train on much more data in the same amount of time, and LSTM could not compete with the technique.

Speaker 1

You mentioned FlashAttention as well. Can you quickly explain that to the audience? Does it mean that, in certain circumstances, you do not actually need to do the full quadratic attention?

Sepp Hochreiter

It is still quadratic, but it is highly optimized. You use fast memory access in the GPU. You even use registers, which are very fast memory entities in the GPU.

It still has the same complexity, because mathematically it is quadratic and you cannot cheat mathematics. But you can do it extremely fast. FlashAttention was very fast because it was hardware-optimized.

Speaker 1

Wonderful. Can you bring in xLSTM, this new invention, and explain how it overcomes some of these problems with the original LSTM?

Sepp Hochreiter

I will start with a spoiler. Because I talked about FlashAttention, we are faster than FlashAttention, both in training and in inference, especially inference.

4. xLSTM Reclaims Sequence Memory

Going back to xLSTM, after seeing the rise of the Transformer, we thought: First of all, could it not be LSTM? Is the residual backbone architecture for building very large models the key? Is it important to build big models, or is it important to have some specific technology for looking back and compressing the history?

We thought LSTM should be able to do it. We asked the question: Can we scale up LSTM like Transformers and get the performance of Transformers?

We knew some limitations and drawbacks of LSTMs. One was parallelization. We made LSTM parallel as well, using the same ideas as attention to parallelize it.

But there were 2 other limitations. One was that LSTM could not revise decisions. If you stored something and then saw that something different came along, you could not revise the decision. Let me give you an example.

Suppose you want to find new clothes. You find clothes at a certain price, and then, if you look further on the internet, you find clothes that are even better and have a lower price. Perhaps the clothes should also fit your shoes or whatever. If you find something better, you should throw away what you already have stored, both in terms of how well it matches your shoes and how surprising it is.

The old LSTM could not do this. If I found a better-matching item and had to memorize the surprise, I would have to delete everything I had stored. xLSTM can do this.

The idea is exponential gating, which allows us to revise a storage decision. If I find something better, I upweight it very heavily and then normalize it. Therefore, the old best solution is downweighted. In this way, I can find something better and throw away my old information.

In theory, the forget gate could do this, but in practice you cannot learn to forget at the same time as learning to store something very precisely. Exponential gating—exponential input gating—was the key. It says, “I have something better; forget everything that came before.” This gave us an advantage.

The second thing was a matrix memory. The original LSTM has a scalar memory, a single number that you can store. That is not much. The new xLSTM has a whole Hopfield network. We use a classical Hopfield network, which became popular again because of the Nobel Prize awarded to John Hopfield.

Instead of a single scalar, we use a whole Hopfield network. It is like a classical Hopfield network plus gating. The input gate says what we should store in the Hopfield network, and the forget gate says how much the old storage items should be downweighted.

It is a Hopfield network equipped with gating. We merged the Hopfield-network idea with the LSTM idea, and this gave us an LSTM with a much stronger and much bigger memory.

The first ingredient was exponential gating, the second was increasing the memory, and the third was parallelizing it. We used these 3 ingredients to build the new xLSTM. The results were fantastic. To be honest, we did not expect them to be so good.

Speaker 1

I suppose the memory mechanism is also reminiscent of the fast-weights approach that programmers were using in the 1990s.

Sepp Hochreiter

Exactly. Like Hopfield networks, it is always an outer-product memory. You have a memory and a new item. You have 2 vectors: One we call the key, as in attention, and the other we call the value. You take the outer product of the key and value and add it to the memory.

That is the basic idea. What we added was an input gate for the new item that is added and a forget gate for the old memory. It is a known technique. This outer-product storage idea is even older: Ising models in the 1970s already had these ideas, and Hopfield networks used the same idea. Fast weights also used it.

Speaker 1

Could you give a little more intuition about the gating? You moved from exponential gating rather than sigmoid. In the 1990s, people were using sigmoid and hyperbolic tangent, even as activation functions. What was the intuition at the time for using sigmoid, and in a little more detail, how does the exponential version fix the problem?

Sepp Hochreiter

The sigmoid is natural for gating. It is between 0 and 1. A value of 1 means the gate is open and everything goes through; a value of 0 means nothing goes through and the gate is closed. In between, you do scaling. The sigmoid is a natural function to use for gating.

But it has a problem. Suppose you encounter 1 sequence element and say, “I will multiply it by 0.5.” Then another element comes along, and you say, “If this is 0.5, I should multiply it by 4.” That does not work because the sigmoid only goes up to 1. You cannot override it.

Exponential gating is not limited in that way. You can always use larger values. The problem is that we never used exponential activation functions in the earlier days because learning would break down.

We need a second ingredient: normalization. You have an exponential quantity, and then you normalize it by the exponential input gates. It is like a softmax. In a softmax, you have e to the power of something—the exponentials—and then divide by the sum of those exponentials.

It is like a rolling softmax. We went in the direction of attention with LSTM, but it is recursive. It is very similar: You have an exponential input gate, but then divide by the sum of all input gates. It is a little like a softmax, but different.

There is another thing: It changes the dynamics of learning. We do not have a clear understanding of exactly what is happening. We tried different architectures, and softmax with this exponential function gave us an advantage in the learning dynamics.

When other systems got stuck or stopped learning, there were some gradient peaks that allowed the Transformer to learn. We now observe the same thing with xLSTM. The original reason was to revise a storage decision, but the learning dynamics were also modified in a positive way.

It is not completely understood. There may be some random directions where, if learning is no longer progressing, random weight updates help it move forward. But that is speculation.

Speaker 1

Exponential gating, matrix memory, and parallelization. I am interested in what triggered the flash of inspiration. If you could go back in time and tell your younger self about this, would your younger self have said, “Yes, absolutely”? Would you have done it then?

Sepp Hochreiter

Yes, but my younger self would have had to see a couple of examples. At that time, we did not have these big language models or the problems where we could see that exponential gating and a big memory would help. We did not have these datasets.

If I had known what to do, but also what data would come, I would have said, “Yes, of course. I have such a small storage capacity. If you want to store much more, of course you have to do this.” I would have seen it. But I also needed a glimpse into the future of what kind of data would come.

Speaker 1

In your paper, you studied how these things scale with data, model size, and so on. Can you tell me about some of the theoretical underpinnings?

Sepp Hochreiter

These are standard scaling laws. They were not developed by us. You increase the number of model parameters and follow a certain exponential law, a certain curve. Then you compare it with Transformers or state-space models, which also follow a certain law, and you can extrapolate.

You can say that if you build larger models, they will also be better. These are scaling laws that were used, and were not invented by us. They are useful because you can predict how larger models will behave if you make a model larger or use more data.

Speaker 1

You mentioned state-space models and things like Mamba. Could you contrast xLSTM with that?

Sepp Hochreiter

Mamba was the most competitive method for LSTM. After our publication on xLSTM, Mamba-2 came out. The nice thing is that Mamba-2 is xLSTM without the input gate. It is exactly the same in that respect.

Mamba-2 has e to the power of a softplus. Softplus is a sigmoid; you can do the mathematics and see that it also has forget gates. Mamba-2 is like xLSTM, but without the input gate. It is nice to see that different methods converge to a similar architecture.

I do not think it is the same as Mamba, because Mamba does not have an input gate. I think the input gate is important. But the remaining architecture is very, very similar. We started with state-space models, and we started with LSTM, Hopfield networks, and so on. Now we are increasingly converging on very similar architectures.

Speaker 1

Are you seeing any hints of industry adoption of xLSTM?

Sepp Hochreiter

First of all, xLSTM is now faster than FlashAttention in inference and also in training. I can tell you why. With FlashAttention, you also have to put things across the whole context into the GPU.

What we do is use chunks of FlashAttention, and between the chunks we do the recurrent operation. We designed the chunks of FlashAttention so that we could be more efficient on a GPU. If you have smaller chunks, you do not have to squeeze everything in and do inefficient operations. You can make the chunks exactly the size of the caches.

We use FlashAttention technology—we took the idea from these guys—but we use the right size of FlashAttention. We do FlashAttention, recurrence, FlashAttention, recurrence, and now we are faster than applying FlashAttention over the whole context.

This gives us speed in both training and inference. I did not expect that we could be faster than FlashAttention in training. I thought, “No way.” But it is unbelievably good.

We knew we would be fast in inference because attention also has to be autoregressive. You have to produce a new word in generation and then push everything into the system again. You produce a new word, and you have to push everything into the system. You can cache some of the processing and do it fast, but attention is not well suited to an autoregressive mechanism.

In training, you have the whole sequence, so we should not be faster. It is unbelievable that we are. But in inference, I was sure that we would be faster.

Speaker 1

You are aware of the Strawberry or o1 thing.

Sepp Hochreiter

Oh yes. It is doing more on the inference side. It is thinking more. On the inference side, we would be much faster. If we were 100 times faster in inference, we could do 100 times more thinking. This is a big opportunity, and it plays into our hands. We are exactly in that area: We are fast at inference.

5. xLSTM Enters Industrial AI

This fast inference speed also helps us move away from language and go into industrial applications. Language is not at the core of many industries. There are many companies working on language, but it is not the main business for many industries.

Now I can go into robotics. Transformers have been used for robotics. DeepMind had a paper, and Tesla had a paper, but they all struggled because a Transformer is too slow. Sometimes you have to wait a couple of seconds before the agent reacts.

Now we have something that is much faster. We have a second advantage: We have a fixed memory. We know in advance how large the memory is. If we put it on an embedded device, we know how large the memory is, and we can design the xLSTM with a fixed memory.

No matter how long the sequence is—whether it has 100 sequence elements or 100 million—you use the same fixed memory. We can fix the memory and make it very fast.

These 2 things give us an advantage for embedded systems and robotics. Somebody has already tried it with drones. They have GPUs on the drones, and they emailed us. They do not want to reveal who they are, but they said the results were unbelievable. The drones are now flying autonomously.

You need real-time control. You cannot wait, and with xLSTM it is working. It is fantastic. Someone also talked to me at NeurIPS, and I said, “I do not know whether I want to reveal this, because it is so good for them.” It is a company.

The same applies to robotics and drones, and also to self-driving cars. In a car, you want to be energy-efficient, fast, concise, and small, while still having a powerful system. I see big advantages with xLSTM.

Perhaps it could even go into a cellphone. I am not sure; I do not know the constraints of a cellphone, so perhaps that is too far-fetched. But we have something that is energy-efficient and fast, and we can control the amount of memory. We can design the memory for the particular embedded device.

Speaker 1

Do you think xLSTM moves us closer to something that resembles symbolic manipulation?

6. Neurosymbolic AI Takes Shape

Sepp Hochreiter

I do not know. We have a project about neurosymbolic AI and symbolic manipulation.

In one sense, I would say that xLSTM is better at building abstractions. What I am missing in the AI systems we have out there is that I have never seen an AI system build proper abstractions. They are always human-made. Language is human-made. If you look at ImageNet, a human put the object in the middle.

I want to see an artificial system come up with a new concept that is not human-made. I do not know whether xLSTM can do it. But in its memory, by combining more tokens and more information from the past, perhaps it can build a concept.

It is more efficient to store a concept or an abstraction than to store individual items, as attention would do. If you can compress information into something, then you can store it more efficiently.

Suppose you see the sun, a beach, a cocktail, and so on. You might say, “Perhaps somebody is on a beach holiday.” That is 1 abstract concept, and storing it may be more efficient than storing the individual items.

The same should happen in industrial applications. You see concepts and structures, and you store the structure rather than the individual things. If you have the right abstraction, you are better at generalization because you will hopefully encounter those abstract concepts again in the future.

Speaker 1

The reason I asked is that you also have your symbolic AI paper, and I am really interested in neurosymbolic architectures. There are many approaches to doing that. In some systems, people use Transformers to generate programs. Some people skip explicit program generation and get Transformers to perform symbolic-like tasks.

Transformers are incredibly limited. They cannot copy or count, and there are many things they cannot do. Do you think xLSTM could overcome some of these obvious computational limitations of the Transformer?

Sepp Hochreiter

Probably it can overcome some of them, but I think the solution is to combine both. What we have right now is not the final solution. We have to go symbolic.

There are already systems where a Transformer perhaps uses MATLAB to solve an equation, or queries the internet, or whatever. We need this because there are so many symbolic techniques that have been developed over the last 50 years. We should somehow integrate them and use them.

I do not know whether everything is learnable in principle, but a shortcut would be to use what is already there and combine it in the right way. In Austria, the biggest AI project is about 40 million euros. I am leading it. It is called Bilateral AI, because it brings symbolic and subsymbolic AI together.

We need this because, as I said in my talk, scaling is over. Now we have to go into the industrialization of AI. We need new techniques, and perhaps not only new techniques from the subsymbolic side—from neural networks. We may also need things from the symbolic side to make systems more robust.

If a production process stops or stalls, that should not happen. Therefore, you may need symbolic methods integrated with or surrounding subsymbolic methods such as large language models.

Speaker 1

I completely agree. We need to build hybrid systems.

Sepp Hochreiter

Yes, that is the neurosymbolic approach, and that is what we are doing in Austria in this large project. It is hard to bring the 2 communities together. Sometimes they do not like each other. One side says, “We have big success stories,” and the other says, “We have other success stories.”

But I think this is the way to advance AI and to build industrial AI. For industrial AI, we need symbolic systems to make things robust and to guarantee certain behavior. We now have to team up with the symbolic people to advance AI.

Speaker 1

I completely agree that we need formal verification. The problem with hybrid neurosymbolic systems is the amount of human engineering. Can we have our cake and eat it? Can we automate their creation with some kind of architecture search?

We are building large systems with many components, many verifiers, and so on. How much of that can we automate?

Sepp Hochreiter

In the group where we work on neurosymbolic AI, the symbolic people say, “We need machine learning, perhaps to adjust the parameters of our symbolic systems.” The subsymbolic people say, “We can use symbolic AI as a shield surrounding it.” But they do not merge or integrate the systems—for example, by learning rules or learning new symbolic rules.

I know how symbolic systems work, but perhaps some rules are better. You have to integrate these things better. Right now, the 2 groups are thinking in their own domains, and I am missing this integration.

If somebody is doing it, they take something from this community and something from that community and glue it together, but it is clumsy and not elegant. Elegant systems would learn some formal systems, with the learning going into the formal systems and the formal systems becoming an integrated subcomponent of a large language model or whatever.

Right now, it is not there. These 2 groups are too separated.

Speaker 1

On the connectionist side, there are Hinton, Bengio, LeCun, and you and Jürgen as pioneers of connectionism. You are also neurosymbolic people. You have always been that way. Why is that?

Sepp Hochreiter

Going back in history, Germany and Austria were very strong in symbolic AI. There was a lot of work on formal systems and many professors working in that area. In the United States and elsewhere, there were also these developments.

Jürgen was a very unusual person. He was always thinking along different lines. There was a large group working on AI, but it was formal AI. Jürgen said, “No, I think neural networks are the way to go.”

When I went to university, I was a student and everything was boring. There were theories that were 50 or 100 years old, and all of computer science was about old things—quicksort and so on. But there was this neural-network work, and nobody knew what would come out of it.

You learned something new. It was super interesting. This was also Jürgen’s attitude. It was something new, not something traditional. In our group, we also read science-fiction books. I would say, “I have a new science-fiction book,” and many ideas came from that.

We discussed how you could traverse the universe with generation ships, what was possible, what was not possible, and various good ideas. It was an exciting time. Recurrent networks were a new technology, and there were many innovative ideas.

Moving away from traditional symbolic systems and into this new neural-network work was super fascinating. You did not know what would come out of it. You changed something here or there and saw what happened. That was exciting.

Speaker 1

In a way, that is very polymathic. It is knowledge of so many different fields at once. Jürgen was talking about things like Gödel machines, recursive self-improvement, and artificial creativity. All these amazing ideas were, in some sense, before their time.

Do you think things are starting to swing back the other way? I am seeing many neurosymbolic architectures coming out of DeepMind, for example. Do you think consensus is changing a little bit?

Sepp Hochreiter

I think so. Perhaps it has to, because our path ends with scaling up and making things larger. We build larger models, but I do not know whether that was the right way. It is more about storing more information in these systems. You put more training data in to make them larger, but not smarter.

The systems are not different, so we are only larger. If this has an end, we have to become smarter. I think the symbolic or neurosymbolic approach has to come because it may give us what is missing.

I do not know where the subsymbolic approach—where neural networks—should go next. We scale it up. We now have almost brain-like models, but something is missing. They are not doing what humans do.

Humans learn differently, with a few examples. We have other abstraction capabilities, and we are much more adaptive. We can plan. Something is missing, and perhaps symbolic methods can give us what is missing.

Speaker 1

How do we blend these ideas together? People think of System 1 and System 2 as being completely different, but they might be very interlinked. A lot of reasoning is perception-guided. How do we really integrate these ideas?

Sepp Hochreiter

It is very popular after Kahneman, and also in Turing Award speeches. They always use System 1 and System 2 because it is compelling. But I am not sure there is a clear separation.

There may be a clear separation if you play a game of chess and start to plan; then you have System 2. But there are intermediate things. Sometimes you have a gut feeling and grab something without thinking about it. Sometimes you think a little bit.

I think there is a gradient. Sometimes you think very quickly, and sometimes you plan 2 steps: “Should I go here or there? Which is faster? I hear some people coming.” You make a couple of decisions, and it is a little bit of planning. It is intermediate.

I do not think there is a clear difference between System 1 and System 2. There are many things you do intuitively, like System 1, and sometimes you think about something for a long time. But there are many things in between.

For example, if I leave here, will I go home? I can go straight ahead, or perhaps I can go down there. I make a couple of decisions. It is a little bit of planning.

Speaker 1

I agree. Should the abstractions in these systems always be human-intelligible? Elizabeth Spelke discussed core-knowledge priors, things like agents, spatial reasoning, objects, and so on.

It is almost as if there is a core set of basis functions that we have acquired or learned about how the world works. That suggests that any reasoning system would simply compose those simple priors together.

Is that all there is to reasoning, or do you think AI systems could discover strange, alien forms of reasoning that we would not understand?

Sepp Hochreiter

I believe there can also be different concepts. We develop concepts and words, and that is what helps us. For example, a neural network might have speed and acceleration, and you have these concepts.

But if you apply a linear transformation to them, you have the same information, just mixed up a little bit. For a neural network, that is not a problem, because you can apply the inverse transformation. It is the same information, distributed differently. Sometimes it may help to have information distributed differently.

For us, we develop concepts and abstractions that help us as humans. They help us convey experience from one generation to the next generation and inform other people about what we have learned.

That is the most important thing we do. If our children had to learn for themselves which mushrooms are poisonous and which are not, it would take a long time. Most of the information our children acquire comes from previous generations. They go to school and learn from other people.

I think our language, our abstractions, and our way of thinking are tailored to transmit information from one generation to the next. Much of the information that you acquire as an individual human is far less than what you acquire through culture and society.

Our abstractions and language are tailored to our society. I think AI systems should come up with completely different kinds of reasoning and different abstractions for themselves. Other concepts might be much more useful to them because they live in the same world in a different way and manipulate the world in a different way.

Speaker 1

It is something I think about a lot, because there is a constructive component to abstractions. There is the language game and this cultural transfer, and it seems to be in service of the utility of understanding each other.

But abstractions are still grounded in the physical world. Acceleration is a thing in the physical world, is it not?

Sepp Hochreiter

For us, perhaps it is acceleration plus something else combined. That might be the real thing. I do not know whether acceleration alone is the concept, or whether it is acceleration plus location. I do not know.

Speaker 1

Humans also have this strange ability to think about things that do not come directly from sensory experience—abstract mathematical or Platonic ideas. Where do those come from?

Sepp Hochreiter

Many of these things could first of all be symbols. They could be placeholders for something more interesting. This also happens in physics. You have the concept of an atom, but you probably never saw an atom. I have not seen one, at least.

You have a concept of an atom. If you ask what shape an atom has, you might say it is a ball or a circle. Why not a triangle or whatever? You make these kinds of abstractions, and you have some image in your head for things.

Often, it is a placeholder. You say, “If this and this are together, let us call it this,” and you invent a nice word for it. You have an intuition, and perhaps you even have an image in your head, but sometimes it is abstract. It has no counterpart in reality.

Speaker 1

Exactly. There is a huge difference between semantics and the actual thing. I often think that if we gave a 21st-century physics book to Newton and went back in time, he would not understand very much of it.

Sepp Hochreiter

I completely agree. We are trained in a specific way of thinking, and it may be different from the way many generations ago thought.

Speaker 1

This has been amazing. Can you tell the audience a bit more about NXAI?

7. NXAI Builds Industrial Simulations

Sepp Hochreiter

NXAI is a new company. I already told you about the first idea behind its founding. I was super excited about xLSTM. I went to the media and said, “I have a new idea, but I do not have the money to show that it is a good idea.”

Then venture capital came in. They asked, “Do you have a business plan?” I said, “No. I am not interested in a business plan. I need some money to show that this is a good idea. I want to keep this idea in Europe and keep it local.”

Nobody understood the concept until somebody local said, “Yes, I will give you some money. Let us first fix the technology and then build on top of it, perhaps vertically.”

NXAI started with xLSTM. The first 10 million euros went into compute and the first paper. Now NXAI has expanded into a company dedicated to industrial AI.

One pillar is xLSTM, which is a new technology that we want to develop. We showed that, with a 7-billion-parameter model, we can compete with Transformer technology. It is powerful enough, but it has other advantages, such as energy efficiency and speed.

That allows us to go in other directions—not only in language, but also in industry. There are many companies working on language, and it is difficult to compete. I do not know whether you can make money there, and it is not our core business.

The second pillar is AI for simulation. We have some big success stories there because we can now do simulations that numerical methods struggle with.

There are discrete-element methods, which are based on particles. If you have 1 million particles, 10 million particles, or 100 million particles, numerical methods cannot cope anymore. The same is true with mesh points. In computational fluid dynamics, for example, you have mesh points if air flows over a car or an airplane.

Sometimes there are so many mesh points that the numerical methods no longer work. Now we have systems where, for example, if you change something on a car, a numerical simulation takes 3 weeks. The engineer makes a change, goes home, and after 3 weeks looks at what came out. We can do it in 3 minutes.

Speaker 1

What is the idea behind these neural simulations? Why are they so good?

Sepp Hochreiter

I always use the example of the Moon. The Moon can be described by its location, perhaps an impulse, and its mass. We do not describe every particle, every atom, or every grain of dust, but we can still predict very well where the Moon will be in an hour, the next day, or whatever.

In many numerical simulations, you can group particles because they form structures. If you can group them, you can speed up the simulation. If you throw a snowball, you do not simulate every snowflake. You simulate the whole snowball, and that is good enough.

An AI system can identify structures in which 10,000 particles stick together, do the same thing, or move in parallel. It can speed up the simulation.

For example, suppose you have corn in a machine. There is no need to model every corn kernel down to the atomic level. If you have 1 corn kernel and another corn kernel, you can learn the physics of how they interact—what happens if they are a little wet, a little larger, and so on.

Then, instead of representing thousands of points that a numerical simulation needs, you can represent a kernel or a grain. You learn the physics of the grains. There is no need to model every particle at the atomic level, and this helps speed up the simulations considerably.

These systems are extremely powerful because we can simulate situations where numerical methods struggle. In the steel industry, for example, there are huge furnaces filled with steel. They cannot simulate the process because there are too many particles—numerically, there are simply too many.

Often, they have to build a large prototype because the simulation cannot cope with the real system. Now we can skip the prototype. A prototype can cost 100 million euros, and we can simulate the real thing instead.

That could give industry a very big push if it works. That is the idea behind simulation. Johannes is the person who can tell you much more about it, and I think it is a very fruitful and very cool direction.

Speaker 1

He is coming here in 30 minutes, so I will ask him about it. Sepp, it has been an honor and a pleasure to have you on. Thank you so much for joining us today.

Sepp Hochreiter

It was a pleasure to be here. It was fun. I enjoyed it. Thank you.

LSTM:卷土重来?[Sepp Hochreiter 教授] — 文字稿与摘要 | BidClub