# 液态神经网络

液态神经网络是一种循环神经网络，其隐藏单元遵循带有输入依赖时间常数（即系统对变化做出响应的快慢）的连续时间微分方程，因此网络自身的动力学随其接收的信号而变化。这一类网络是为自适应、时间序列驱动的任务而开发的，例如机器人控制和自主导航——在这些场景中，离线训练的模型必须在训练时未曾见过的条件下于在线运行时持续保持合理的行为。

其决定性特征是液态时间常数：每个隐藏单元的有效时间常数是当前状态和输入的函数，而非固定的超参数。直观地说，液态时间常数网络根据其观测到的输入改变自身的方程<sup>[1](https://www.science.org/doi/10.1126/scirobotics.adc8892)</sup>，麻省理工学院对该工作的报道将其描述为“改变其底层方程以持续适应新数据输入的算法”。<sup>[2](https://news.mit.edu/2021/machine-learning-adapts-0128)</sup> 在架构上，它们是由非线性互联门控调制的线性一阶动力系统网络，其输出由数值微分方程求解器计算。<sup>[3](https://arxiv.org/pdf/2006.04439)</sup><sup> • </sup><sup>[4](https://research-explorer.ista.ac.at/record/10671)</sup>

| 关键事实 | 详情 |
|---|---|
| 模型类别 | 具有输入依赖（液态）时间常数的连续时间 RNN<sup>[1](https://www.science.org/doi/10.1126/scirobotics.adc8892)</sup> |
| 定义性动力学 | \( \frac{d\mathbf{x}}{dt} = -\left[\frac{1}{\tau} + f(\mathbf{x}(t), \mathbf{I}(t), t, \theta)\right]\cdot\mathbf{x}(t) + f(\mathbf{x}(t), \mathbf{I}(t), t, \theta)\cdot\mathbf{A} \)<sup>[3](https://arxiv.org/pdf/2006.04439)</sup> |
| 有效时间常数 | \( \tau_{\mathrm{sys}} = \frac{\tau}{1 + \tau f(\mathbf{x}(t), \mathbf{I}(t), t, \theta)} \)，输入依赖<sup>[3](https://arxiv.org/pdf/2006.04439)</sup> |
| 时间序列基准 | 在 7 项实验中的 4 项里，相较 LSTM、CT-RNN、CT-GRU 和神经常微分方程提升 5% 至 70%<sup>[3](https://arxiv.org/pdf/2006.04439)</sup> |
| 导航迁移 | 学到的飞行导航技能迁移到新的、分布外环境<sup>[1](https://www.science.org/doi/10.1126/scirobotics.adc8892)</sup> |
| 无求解器变体 | CfC 网络去除 ODE 求解器，训练和推理速度至少快一个数量级<sup>[5](https://www.nature.com/articles/s42256-022-00556-7)</sup><sup> • </sup><sup>[6](https://arxiv.org/pdf/2106.13898)</sup> |
| 商业化 | Liquid AI，由丹妮拉·鲁斯（Daniela Rus）、拉明·哈萨尼（Ramin Hasani）、马蒂亚斯·莱希纳（Mathias Lechner）和亚历山大·阿米尼（Alexander Amini）共同创立<sup>[2](https://news.mit.edu/2021/machine-learning-adapts-0128)</sup> |

## 工作原理

每个隐藏单元是一个一阶[线性系统](https://www.edgepedia.org/zh/linear-system)，其泄漏率由一个小型神经网络 \( f \) 调制。大小为 \( D \) 的隐藏状态 \( \mathbf{x}(t) \)、输入 \( \mathbf{I}(t) \)、固定时间常数向量 \( \tau \) 和偏置向量 \( \mathbf{A} \) 按如下方式组合：

\[ \frac{d\mathbf{x}(t)}{dt} = -\left[\frac{1}{\tau} + f(\mathbf{x}(t), \mathbf{I}(t), t, \theta)\right]\cdot\mathbf{x}(t) + f(\mathbf{x}(t), \mathbf{I}(t), t, \theta)\cdot\mathbf{A} \]

全程使用逐元素（哈达玛）乘积。<sup>[3](https://arxiv.org/pdf/2006.04439)</sup><sup> • </sup><sup>[1](https://www.science.org/doi/10.1126/scirobotics.adc8892)</sup> 由于 \( f \) 依赖于状态和输入，有效系统时间常数

\[ \tau_{\mathrm{sys}} = \frac{\tau}{1 + \tau f(\mathbf{x}(t), \mathbf{I}(t), t, \theta)} \]

在每个时间点都发生变化，使单个隐藏状态元素能够在输入特征到达时专门化于这些特征。<sup>[3](https://arxiv.org/pdf/2006.04439)</sup>

有界的状态和时间常数保证了当输入持续增大时输出动力学的稳定性<sup>[3](https://arxiv.org/pdf/2006.04439)</sup>，已发表的分析进一步指出，LTC 是具有有界状态和时间常数的稳定动力系统，即使在训练后也能改变其行为，并且能够学习不规则采样的数据。<sup>[7](https://simons.berkeley.edu/sites/default/files/docs/17404/raminhasanitfcssynthesisslides.pdf)</sup>

## 实现方法

训练使用标准的时间反向传播（BPTT），以内存换取数值精度，而非使用基于伴随的优化，通常配合 Adam 优化器。<sup>[3](https://arxiv.org/pdf/2006.04439)</sup> 官方代码库在文档化的协议下用 BPTT 训练连续时间模型（lstm、ctrnn、ltc、ltc_rk、ltc_ex）：小批量大小 16、32 个隐藏单元、LTC 学习率 0.01–0.02（其他模型为 0.001）、200 个训练轮次、BPTT 长度 32、ODE 求解器步长为输入采样周期的 1/6。<sup>[8](https://github.com/raminmh/liquid_time_constant_networks)</sup>

实际障碍在于求解器。LTC 的 ODE 实现了一个刚性方程组，这可能迫使显式龙格-库塔积分器（如 torchdiffeq 中默认的 Dormand–Prince）采取非常小的步长，从而需要非常多的离散化步骤，使这类显式 RK 求解器在实践中不适用。<sup>[3](https://arxiv.org/pdf/2006.04439)</sup> 因此作者提出了一种固定步长的融合求解器，结合隐式欧拉的稳定性与显式欧拉的效率，其单步更新为

\[ \mathbf{x}(t+\Delta t) = \frac{\mathbf{x}(t) + \Delta t \cdot f(\mathbf{x}(t), \mathbf{I}(t), t, \theta)\cdot\mathbf{A}}{1 + \Delta t \cdot \left(1/\tau + f(\mathbf{x}(t), \mathbf{I}(t), t, \theta)\right)} \]。<sup>[3](https://arxiv.org/pdf/2006.04439)</sup>

## 起源

该公式源于一个生物物理模型。拉明·哈萨尼（Ramin Hasani）及其同事在 2018 年的一篇较早的 arXiv 论文中提出了液态时间常数 RNN 的概念，这是连续时间 RNN 的一个子类，其变化的神经元时间常数通过非线性突触传递实现，灵感来自蛔虫、水蛭和秀丽隐杆线虫等小型物种的神经系统。<sup>[9](https://ar5iv.labs.arxiv.org/html/1811.00321)</sup><sup> • </sup><sup>[10](https://doi.org/10.48550/arxiv.1811.00321)</sup> 在该模型中，神经元的膜充当积分器，

\[ C_{m_{i}} \frac{dV_{i}}{dt} = G_{\mathrm{Leak}_{i}}\left(V_{\mathrm{Leak}_{i}} - V_{i}(t)\right) + \sum_{j=1}^{n} I_{\mathrm{in}}^{(ij)} \]

其中 S 形化学突触为 \( I_{s_{ij}} = \frac{w_{ij}}{1 + e^{-\gamma_{ij}(V_{j} + \mu_{ij})}}(E_{ij} - V_{i}(t)) \)。取 \( \tau_{i} = C_{m_{i}} / G_{\mathrm{Leak}_{i}} \)，系统时间常数变为 \( \tau_{\mathrm{sys}} = \frac{1}{1/\tau_{i} + (w_{ij}/C_{m_{i}})\sigma_{i}(V_{j})} \)，这将 LTC 细胞与经典连续时间 RNN（CTRNN）细胞区分开来，后者的时间常数是固定的。<sup>[9](https://ar5iv.labs.arxiv.org/html/1811.00321)</sup> 该论文还证明，\( n \) 维连续动力系统的任意有限轨迹都可以由 LTC 网络的隐藏单元和 \( n \) 个输出单元逼近。<sup>[9](https://ar5iv.labs.arxiv.org/html/1811.00321)</sup>

液态时间常数网络的现代形式由拉明·哈萨尼（Ramin Hasani）及其同事于 2020 年在 arXiv 上提出。<sup>[11](https://doi.org/10.48550/arxiv.2006.04439)</sup> 经同行评审的版本《液态时间常数网络》发表于《AAAI 人工智能会议论文集》第 35 卷，第 7657–7666 页。<sup>[12](https://ojs.aaai.org/index.php/AAAI/article/view/16936)</sup> 麻省理工学院新闻报道了这项在 2 月 AAAI 会议上发表的工作，第一作者拉明·哈萨尼（Ramin Hasani）当时是麻省理工学院 CSAIL 的博士后，共同作者包括[丹妮拉·鲁斯](https://www.edgepedia.org/zh/daniela-rus)（Daniela Rus）、亚历山大·阿米尼（Alexander Amini）、马蒂亚斯·莱希纳（Mathias Lechner，奥地利 IST）和拉杜·格罗苏（Radu Grosu，维也纳工业大学）。<sup>[2](https://news.mit.edu/2021/machine-learning-adapts-0128)</sup> CSAIL 主任鲁斯与研究附属人员哈萨尼、莱希纳和阿米尼 后来共同创立了 [Liquid AI](https://www.edgepedia.org/zh/liquid-ai)，这家初创公司最初旨在构建一个由液态神经网络驱动的通用人工智能系统；其当前的液态基础模型（[LFM2](https://www.edgepedia.org/zh/lfm2) 及后续版本，截至 2026 年发布）则改用了一种混合骨干架构，将门控短卷积与少量分组查询注意力块相结合。<sup>[2](https://news.mit.edu/2021/machine-learning-adapts-0128)</sup><sup> • </sup><sup>[13](https://arxiv.org/html/2511.23404)</sup>

## 变体

**CfC。** 闭式连续时间网络由拉明·哈萨尼（Ramin Hasani）及其同事于 2022 年发表在《自然·机器智能》上<sup>[5](https://www.nature.com/articles/s42256-022-00556-7)</sup><sup> • </sup><sup>[14](https://doi.org/10.1038/s42256-022-00556-7)</sup>，它计算液态时间常数动力学中出现的一个积分的近似解，且近似误差有严格的界限，而该积分此前没有已知的闭式解。<sup>[5](https://www.nature.com/articles/s42256-022-00556-7)</sup> 其公式为

\[ \mathbf{x}(t) = \sigma(-f(\mathbf{x}, \mathbf{I}; \theta_{f}) \cdot t) \odot g(\mathbf{x}, \mathbf{I}; \theta_{g}) + \left[1 - \sigma(-[f(\mathbf{x}, \mathbf{I}; \theta_{f})] \cdot t)\right] \odot h(\mathbf{x}, \mathbf{I}; \theta_{h}) \]

带有时间连续的门控项；测试了四个子变体：Cf-S、CfC-noGate、CfC 和 CfC-mmRNN（将 CfC 作为 LSTM 等 RNN 的记忆状态）。<sup>[5](https://www.nature.com/articles/s42256-022-00556-7)</sup> CfC 具有显式时间依赖性，无需数值 ODE 求解器：\( p \) 阶求解器的代价为 \( O(K \cdot p) \)，其中 \( K \) 为 ODE 步数，而 CfC 的代价为 \( O(\tilde{K}) \)，其中 \( \tilde{K} \) 为外源输入时间步数，通常比 \( K \) 小一到三个数量级。<sup>[5](https://www.nature.com/articles/s42256-022-00556-7)</sup> 在训练和推理中，它们比基于 ODE 的对应模型至少快一个数量级，且不损失精度。<sup>[6](https://arxiv.org/pdf/2106.13898)</sup>

**Liquid-S4。** 该变体将 S4 中状态转移矩阵的对角加低秩分解与线性液态时间常数状态空间模型相结合，得到一个输入依赖的状态转移模块，在推理时适应到来的输入。<sup>[15](https://arxiv.org/pdf/2209.12951.pdf)</sup>

**NCP、LRC、LTC-SE。** 一个比较分类法将 NCP 归为稀疏的、受生物启发的 ODE 神经元（紧凑、可解释，但需要专家调参），LRC/LRCU 归为具有液态电容的 ODE，LTC-SE 则由比多拉赫哈尼（Bidollahkhani）、阿塔索伊（Atasoy）和阿卜杜勒拉特夫（Abdellatef）于 2023 年提出，旨在增强灵活性和代码组织，同时保持与嵌入式系统的兼容性。<sup>[16](https://arxiv.org/html/2510.07578v1)</sup><sup> • </sup><sup>[17](https://arxiv.org/pdf/2407.20590)</sup><sup> • </sup><sup>[18](https://doi.org/10.48550/arxiv.2304.08691)</sup> 一篇 NeurIPS 2025 论文通过对非线性状态空间模型的并行化来扩展液态电阻-液态电容（LRC）网络，定义了每个神经元的遗忘电导 \( f_{i}(x,u) \) 和更新电导 \( z_{i}(x,u) \)。<sup>[19](https://papers.nips.cc/paper_files/paper/2025/file/f778e9efdb4392e56332d25647b87c09-Paper-Conference.pdf)</sup>

## 应用

**飞行导航。** 在《科学·机器人学》中，液态智能体学会了从视觉输入中提炼任务并丢弃无关特征，因此其导航技能迁移到了新的、分布外环境，表现优于若干其他最先进的深度智能体。<sup>[1](https://www.science.org/doi/10.1126/scirobotics.adc8892)</sup> 更一般地，基于 LTC 的模型在离线训练、在线闭环测试的端到端机器人控制任务中更为鲁棒，例如移动机器人、自主地面车辆和自主飞行器。<sup>[5](https://www.nature.com/articles/s42256-022-00556-7)</sup>

**驾驶与嵌入式控制。** CfC 在 RNN 组件中仅用约 4,000 个可训练参数就完成了端到端自主车道保持任务，显示出与 NCP 相似的参数效率和与基于 ODE 的 LTC 网络相似的鲁棒性。<sup>[5](https://www.nature.com/articles/s42256-022-00556-7)</sup> 一项已报道的自动驾驶 NCP 任务仅使用 19 个神经元和 253 个突触，比 LSTM 小几个数量级。<sup>[16](https://arxiv.org/html/2510.07578v1)</sup>

**医疗与不规则数据。** 当数据存在局限性和不规则性时（医疗数据、金融时间序列、机器人学、闭环控制），当训练和推理效率重要时（嵌入式应用），以及当可解释性重要时，推荐使用 CfC；对于数据充足的语言建模，变换器模型仍是首选。<sup>[5](https://www.nature.com/articles/s42256-022-00556-7)</sup> CfC 与知识图谱相结合，支撑了一个用于分析医疗中复杂患者数据的框架。<sup>[17](https://arxiv.org/pdf/2407.20590)</sup>

**基准。** 在时间序列预测实验中，使用融合求解器实现的 LTC 在七项实验中的四项里相较 LSTM、CT-RNN（ODE-RNN）、CT-GRU 和神经常微分方程取得了 5% 至 70% 的性能提升，其余三项性能相当。<sup>[3](https://arxiv.org/pdf/2006.04439)</sup> Liquid-S4 在长程竞技场基准的 ListOps、文本、检索、图像、Pathfinder 和 Path-X 任务上平均性能达到 87.32%，在完整的原始语音命令数据集上达到 96.78% 的准确率，同时相比 S4 参数数量减少 30%。<sup>[15](https://arxiv.org/pdf/2209.12951.pdf)</sup>

## 局限与替代方案

**梯度与长期依赖。** LTC 在通过梯度下降训练时表现出梯度消失现象，作者表示它们“以当前形式不会是在学习长期依赖时的显而易见的选择”。<sup>[3](https://arxiv.org/pdf/2006.04439)</sup> CfC 可能表现出同样的问题；对于长期依赖，CfC 作者推荐混合记忆网络（CfC-mmRNN）或对转移矩阵进行适当的参数化。<sup>[5](https://www.nature.com/articles/s42256-022-00556-7)</sup>

**求解器敏感性。** LTC 的性能与数值实现方式紧密相关，使用现成的显式欧拉方法会大幅下降，而神经常微分方程虽然显著更快但缺乏表达能力。<sup>[3](https://arxiv.org/pdf/2006.04439)</sup> 对于长度为 \( T \) 的输入序列，计算复杂度为 \( O(L \times T) \)，其中 \( L \) 为离散化步数，与具有相同单元数的稠密 LSTM 相当。<sup>[3](https://arxiv.org/pdf/2006.04439)</sup> CfC 以近似误差和更复杂的理论为代价去除了求解器。<sup>[16](https://arxiv.org/html/2510.07578v1)</sup>

**比较。** 标准 RNN 遭受梯度消失或爆炸，难以处理长期依赖；LSTM 缓解了梯度问题但计算繁重、参数众多；GRU 参数更少、速度更快，但在某些任务上表达能力略逊。<sup>[16](https://arxiv.org/html/2510.07578v1)</sup> 与状态空间模型相比，标准连续时间 SSM 为 \( x'(t) = A \cdot x(t) + B \cdot u(t) \)，\( y(t) = C \cdot x(t) + D \cdot u(t) \)，而 LTC 的状态空间公式在长程依赖任务上显示出改进的泛化能力，且通常比 S4 需要更少的参数。<sup>[16](https://arxiv.org/html/2510.07578v1)</sup>

**硬件。** 据报道，在 Loihi-2 神经形态芯片上的 LNN 使用的参数比其他神经网络少 1–3 个数量级<sup>[16](https://arxiv.org/html/2510.07578v1)</sup>，综述指出这种参数效率使其能够在功耗更低的更小设备上运行。<sup>[17](https://arxiv.org/pdf/2407.20590)</sup> 然而，确保 LNN 的受生物启发方程与神经形态架构的特定特性之间的兼容性仍是一个关键的研究空白。<sup>[17](https://arxiv.org/pdf/2407.20590)</sup> 有一点需要注意：在一个自动驾驶风格的基准上，CfC 的总参数数（230,828）与 NCP（233,139）相当，仅略低于 LSTM（259,733）；大幅节省出现在循环组件中（4,184 对 33,089 个参数）。<sup>[6](https://arxiv.org/pdf/2106.13898)</sup>

## References

1. [Robust flight navigation out of distribution with liquid neural networks (Science Robotics)](https://www.science.org/doi/10.1126/scirobotics.adc8892)
2. ['Liquid' machine-learning system adapts to changing conditions (MIT News)](https://news.mit.edu/2021/machine-learning-adapts-0128)
3. [Liquid Time-constant Networks (arXiv:2006.04439)](https://arxiv.org/pdf/2006.04439)
4. [Liquid time-constant networks (AAAI 2021 institutional record)](https://research-explorer.ista.ac.at/record/10671)
5. [Closed-form continuous-time neural networks | Nature Machine Intelligence](https://www.nature.com/articles/s42256-022-00556-7)
6. [Closed-form Continuous-time Neural Networks (CfC, arXiv:2106.13898)](https://arxiv.org/pdf/2106.13898)
7. [Ramin Hasani synthesis slides (Simons Institute)](https://simons.berkeley.edu/sites/default/files/docs/17404/raminhasanitfcssynthesisslides.pdf)
8. [raminmh/liquid_time_constant_networks, official code repository](https://github.com/raminmh/liquid_time_constant_networks)
9. [Liquid Time-constant Recurrent Neural Networks as Universal Approximators (arXiv:1811.00321)](https://ar5iv.labs.arxiv.org/html/1811.00321)
10. [Hasani, Ramin M. and colleagues (2018). Liquid Time-constant Recurrent Neural Networks as Universal Approximators. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1811.00321)
11. [Hasani, Ramin and colleagues (2020). Liquid Time-constant Networks. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2006.04439)
12. [Liquid Time-constant Networks, Proceedings of the AAAI Conference on Artificial Intelligence](https://ojs.aaai.org/index.php/AAAI/article/view/16936)
13. [LFM2 Technical Report](https://arxiv.org/html/2511.23404)
14. [Ramin Hasani and colleagues (2022). Closed-form continuous-time neural networks. Nature Machine Intelligence.](https://doi.org/10.1038/s42256-022-00556-7)
15. [Liquid Structural State-Space Models (Liquid-S4, arXiv:2209.12951)](https://arxiv.org/pdf/2209.12951.pdf)
16. [Accuracy, Memory Efficiency and Generalization: A Comparative Study on Liquid Neural Networks and Recurrent Neural Networks (arXiv:2510.07578)](https://arxiv.org/html/2510.07578v1)
17. [Liquid Neural Networks survey (arXiv:2407.20590, 2024)](https://arxiv.org/pdf/2407.20590)
18. [Bidollahkhani, Michael, Atasoy, Ferhat, Abdellatef, Hamdan (2023). LTC-SE: Expanding the Potential of Liquid Time-Constant Neural Networks for Scalable AI and Embedded Systems. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2304.08691)
19. [Parallelization of Non-linear State-Space Models: Scaling Up Liquid-Resistance Liquid-Capacitance Networks for Efficient Sequence Modeling (NeurIPS 2025)](https://papers.nips.cc/paper_files/paper/2025/file/f778e9efdb4392e56332d25647b87c09-Paper-Conference.pdf)

---
*Initially written Sep 29, 2026 · Edited: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › Machine learning and neural computation › Neural networks and deep learning › Titles I to Z

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/liquid-neural-network

English original: https://www.edgepedia.org/liquid-neural-network
