Analog AI Is Back, But Can It Survive Its Own Noise?

Analog AI Is Back, But Can It Survive Its Own Noise?

模拟 AI 回归:它能克服自身的噪声吗?

Why chipmakers are betting on physics to fix AI’s energy problem, and what happens when you actually simulate that noise yourself 为什么芯片制造商押注物理学来解决 AI 的能耗问题?当你亲自模拟这些噪声时会发生什么?

Somewhere in a data center right now, a GPU is spending most of its energy not on math, but on moving numbers around. Fetching weights from memory, shuttling them to a compute unit, doing a multiplication, and shuttling the result back. Do that billions of times a second, for months, across a training run, and you start to understand why AI’s electricity bill has become a boardroom problem rather than an engineering footnote. 此时此刻,在某个数据中心里,GPU 消耗的大部分能量并非用于数学运算,而是在搬运数据。从内存中获取权重,将其传输到计算单元,执行乘法,然后再将结果传回。如果每秒钟重复数十亿次,且在数月的训练过程中持续进行,你就会明白为什么 AI 的电费账单已经从一个工程脚注演变成了董事会层面的难题。

The numbers back this up. Gartner expects global data center power demand to climb from 104 gigawatts in 2025 to 132 gigawatts in 2026, and to reach roughly 290 gigawatts by 2030, with generative AI workloads named as the primary driver. AI-optimized servers alone are projected to account for nearly a third of data center power consumption this year. 数据支持了这一观点。Gartner 预计,全球数据中心电力需求将从 2025 年的 104 吉瓦攀升至 2026 年的 132 吉瓦,并到 2030 年达到约 290 吉瓦,其中生成式 AI 工作负载被认为是主要驱动力。仅 AI 优化服务器一项,预计今年就将占到数据中心总功耗的近三分之一。

This is the backdrop for a quiet resurgence of an old idea: analog computing. Actual analog circuits, using continuous voltages and currents instead of 1s and 0s, to do the matrix multiplications that dominate neural network inference. The pitch is seductive: instead of computing about physics digitally, why not let physics compute directly? 这就是一个古老概念悄然复兴的背景:模拟计算。利用连续的电压和电流(而非 1 和 0)来执行神经网络推理中占主导地位的矩阵乘法。这个构想极具吸引力:与其用数字方式计算物理过程,为什么不直接让物理过程本身进行计算呢?

It’s not a new idea, of course, analog computers predate digital ones. It was abandoned decades ago for good reasons. And this article is about both halves of that story: why the pitch is truly compelling, and why what killed analog computing the first time hasn’t actually gone away. I’ll walk through the mechanism, then run some small, honest simulations that show exactly where it breaks, and how researchers are starting to patch it. 当然,这并非新点子,模拟计算机的出现早于数字计算机。它在几十年前被放弃是有充分理由的。本文将探讨这个故事的两个方面:为什么这个构想如此引人注目,以及为什么当年导致模拟计算被淘汰的问题至今依然存在。我将先介绍其工作机制,然后运行一些简单且真实的模拟,展示它在何处失效,以及研究人员如何开始修补这些缺陷。

How analog in-memory computing actually works

模拟内存计算的实际工作原理

In a conventional chip, memory and compute are separate. Every time you multiply a weight by an input, that weight has to travel from a memory array, across a bus, into a compute unit, and the result has to travel back. Researchers estimate this movement can cost anywhere from 3 to 10,000 times more energy than the arithmetic itself, that’s the so-called von Neumann bottleneck. 在传统芯片中,内存和计算是分离的。每当你将权重与输入相乘时,该权重必须从内存阵列出发,穿过总线,进入计算单元,最后将结果传回。研究人员估计,这种移动所消耗的能量可能是算术运算本身的 3 到 10,000 倍,这就是所谓的“冯·诺依曼瓶颈”。

Analog in-memory computing (AIMC) collapses that trip. Weights are stored as physical conductance values in a grid of memory cells, often built from phase-change memory or resistive RAM. Apply an input as a voltage across that grid, and two laws of physics do the rest: Ohm’s law (current = voltage × conductance) computes each multiplication, and Kirchhoff’s current law (currents sum when wires meet) computes the accumulation. A full matrix-vector multiply, the operation neural networks spend most of their time on, happens in a single physical step, no bus required. 模拟内存计算(AIMC)省去了这一过程。权重以物理电导值的形式存储在内存单元网格中,这些单元通常由相变存储器或阻变存储器(RRAM)构成。将输入作为电压施加到该网格上,剩下的工作由两条物理定律完成:欧姆定律(电流 = 电压 × 电导)计算每次乘法,基尔霍夫电流定律(电流在导线汇合处相加)计算累加。神经网络大部分时间都在进行的矩阵向量乘法,现在只需一个物理步骤即可完成,无需总线参与。

There’s a catch hiding in that sentence, though: the multiplication itself is essentially free, but the input and output still have to cross the boundary between the analog and digital worlds: voltages in, currents out, both needing conversion. In practice, the ADCs and DACs doing that conversion are often where the real energy and area budget goes, not the crossbar array itself. It’s a bit of an irony at the heart of the field: the physics does the math for free, and then a meaningful share of the chip is spent paying to talk to it. 然而,这句话中隐藏着一个陷阱:乘法本身几乎是免费的,但输入和输出仍然必须跨越模拟世界与数字世界之间的边界:输入电压、输出电流,两者都需要转换。在实践中,执行这种转换的 ADC(模数转换器)和 DAC(数模转换器)往往才是真正的能耗和面积消耗大户,而非交叉阵列本身。这是该领域核心的一个讽刺:物理过程免费完成了数学运算,但芯片中相当大的一部分资源却被用来支付与它“沟通”的成本。

Simulating it yourself

亲自模拟

You don’t need exotic hardware to see the mechanism at work. Here’s a minimal simulation: a “perfect” digital matrix multiply, compared against the same operation with realistic analog imperfections layered in, device-to-device programming noise (weights don’t get written to the exact conductance you asked for), read noise (thermal/shot noise every time you use the array), and finite ADC precision (the analog result still has to be converted back to a digital number eventually). 你不需要昂贵的硬件就能观察到这一机制。这是一个极简模拟:将“完美”的数字矩阵乘法与叠加了现实模拟缺陷的相同运算进行对比,包括设备间的编程噪声(权重无法被精确写入到你要求的电导值)、读取噪声(每次使用阵列时的热噪声/散粒噪声)以及有限的 ADC 精度(模拟结果最终仍需转换回数字)。

(Code snippet omitted for brevity)

Running this with increasing amounts of realism produces a clean, escalating error curve. Going from a perfect multiply to one with both noise sources and a cheap 4-bit ADC introduces over 8% relative error, on a single layer, before that error has any chance to compound across a deep network. 随着模拟真实度的提高,会产生一条清晰且不断上升的误差曲线。从完美乘法过渡到包含两种噪声源和廉价 4 位 ADC 的乘法,仅在单层上就会引入超过 8% 的相对误差,而这还没算上误差在深层网络中累积的可能性。