# 神经网络

神经网络是一种计算模型，由多层简单单元构成，每个单元先计算其输入的加权和，再经过一个非线性激活函数，其权重根据数据调整，使整个网络逼近某个目标函数。人工神经网络（ANN）如今是使用最广泛的人工智能方法之一，在图像分类（AlexNet）、对话（ChatGPT、LaMDA）、游戏（围棋、星际争霸II）和蛋白质结构预测等领域，表现达到或超过人类水平。<sup>[1](https://pmc.ncbi.nlm.nih.gov/articles/PMC10604784/)</sup><sup> • </sup><sup>[2](https://www.nature.com/articles/s41467-018-04316-3)</sup>

| 关键事实 | 详情 |
|---|---|
| 基本单元 | 一个神经元先对其输入做加权线性求和，再经过非线性激活函数，如sigmoid、tanh或ReLU<sup>[3](https://scikit-learn.org/stable/modules/neural_networks_supervised.html)</sup> |
| 训练算法 | 反向传播——在计算图上进行反向微分——是最常用的训练算法，使梯度下降对多层网络变得可行<sup>[4](https://developers.google.com/machine-learning/crash-course/neural-networks/backpropagation)</sup><sup> • </sup><sup>[5](https://web.stanford.edu/~jurafsky/slp3/old_dec20/ed3book_dec302020.pdf)</sup> |
| 主流激活函数 | ReLU对负输入返回0，否则返回输入本身；它比sigmoid或tanh更不易受梯度消失问题影响，计算也更简单<sup>[6](https://developers.google.com/machine-learning/crash-course/neural-networks/activation-functions)</sup> |
| 奠基模型 | 罗森布拉特的感知机，1957年首次实验，1958年论文中描述，通过强化学习训练了一个模式识别系统<sup>[7](https://ieeexplore.ieee.org/document/9357585)</sup> |
| 现代架构 | Transformer（2017）是第一个完全依赖自注意力、不含序列对齐的循环或卷积的序列转导模型<sup>[8](https://proceedings.neurips.cc/paper_files/paper/2017/file/3f5ee243547dee91fbd053c1c4a845aa-Paper.pdf)</sup> |
| 算力增长 | 自2012年以来，深度神经网络模型的计算需求快速增长，超过了摩尔定律<sup>[9](https://www.nature.com/articles/s41586-021-04223-6)</sup> |

## 网络如何计算

标准监督模型——多层感知机（MLP）——从数据集中学习一个函数 \( f: R^{m} \rightarrow R^{o} \)，其中 \( m \) 是输入维度数，\( o \) 是输出维度数。输入层与输出层之间有一层或多层隐藏层。每个隐藏神经元用加权线性求和 \( w_{1}x_{1} + w_{2}x_{2} + \cdots + w_{m}x_{m} \) 变换前一层的值，再经过非线性激活函数 \( g(\cdot): R \rightarrow R \)。<sup>[3](https://scikit-learn.org/stable/modules/neural_networks_supervised.html)</sup>

激活函数正是深度之所以有力的原因。线性运算作用于线性运算仍然是线性，因此层与层之间若没有非线性变换，堆叠层数不会带来任何增益。而非线性叠加非线性，每一层实际上都在原始输入之上学到了更复杂、更高层的函数。<sup>[6](https://developers.google.com/machine-learning/crash-course/neural-networks/activation-functions)</sup>最常见的三种函数是：sigmoid，将输入映射到0到1之间的值；tanh，映射到−1到1之间的值；以及修正线性单元（ReLU），定义为 \( F(x) = \max(0, x) \)。<sup>[6](https://developers.google.com/machine-learning/crash-course/neural-networks/activation-functions)</sup>

网络的区别在于信息如何流动。在前馈网络中，信息从输入经过中间计算传到输出，没有反馈连接；加入反馈连接后，模型就是循环神经网络，它可以按时间展开为一个前馈系统，每一层对应一个时间步的网络状态。<sup>[10](https://www.deeplearningbook.org/contents/mlp.html)</sup><sup> • </sup><sup>[11](https://pubmed.ncbi.nlm.nih.gov/32970997/)</sup>卷积网络通过通道层处理图像，其神经元接收来自空间偏好相似的神经元的连接，这种安排由核大小描述。<sup>[11](https://pubmed.ncbi.nlm.nih.gov/32970997/)</sup>

## 训练

训练网络就是调整其权重和偏置以最小化损失函数。反向传播计算损失对所有权重的梯度，然后梯度下降按梯度的一个比例——学习率——更新权重，并在训练数据批次上反复进行。<sup>[4](https://developers.google.com/machine-learning/crash-course/neural-networks/backpropagation)</sup><sup> • </sup><sup>[12](https://codelabs.developers.google.com/codelabs/cloud-tensorflow-mnist)</sup>反向传播背后的链式法则可追溯到十七世纪的微积分，而现代前馈网络可以看作几个世纪以来用梯度下降做函数逼近工作的集大成。<sup>[10](https://www.deeplearningbook.org/contents/mlp.html)</sup>

实际训练会遭遇典型的失败模式。在深层网络中，较低层的梯度涉及许多小项相乘，可能消失，使这些层训练缓慢甚至完全无法训练；ReLU激活有助于防止这一点。非常大的权重则导致相反的问题——梯度爆炸，批归一化或较低的学习率可以缓解。一个ReLU单元的加权和若低于零，就可能变成“死”单元，输出0并阻断梯度流动；较低的学习率和LeakyReLU等变体是常用的补救办法。<sup>[4](https://developers.google.com/machine-learning/crash-course/neural-networks/backpropagation)</sup>

带隐藏层的MLP具有非凸损失函数，存在多个局部极小值，因此不同的随机权重初始化可能导致不同的验证准确率。该方法还需要调节超参数，如隐藏神经元数、层数和迭代次数，并且对特征缩放敏感。<sup>[3](https://scikit-learn.org/stable/modules/neural_networks_supervised.html)</sup>

## 历史

[弗兰克·罗森布拉特](https://www.edgepedia.org/zh/frank-rosenblatt)（Frank Rosenblatt，1928–1971）是一位康奈尔出身的心理学家，他的感知机是迈向人工智能的早期一步：他1957年的首次实验训练了一个人工模式识别系统，使其通过强化学习不断改进，1958年的论文描述了改进后的模型。<sup>[7](https://ieeexplore.ieee.org/document/9357585)</sup>此后，明斯基和佩珀特于1969年证明单个感知机单元无法建模像XOR这样简单的函数，该领域随之衰落。<sup>[5](https://web.stanford.edu/~jurafsky/slp3/old_dec20/ed3book_dec302020.pdf)</sup>

后来的思想明确借鉴了脑研究。[监督学习](https://www.edgepedia.org/zh/supervised-learning)规则可追溯到训练感知机的理论，而该理论本身受大脑启发；福岛和Miyake（1982）的层级架构以及LeCun和Bengio（1995）的卷积原理，都与自休伯尔和维泽尔以来对灵长类视觉系统的认识密切相关。<sup>[13](https://pmc.ncbi.nlm.nih.gov/articles/PMC11576090/)</sup>现代纪元始于2012年，Krizhevsky及其同事证明反向传播可以在图形处理器上高效执行，用于训练大型深度网络做图像分类。<sup>[9](https://www.nature.com/articles/s41586-021-04223-6)</sup>2017年，[Transformer](https://www.edgepedia.org/zh/transformer)用多头自注意力取代了编码器-解码器架构中最常用的循环层，允许显著更多的并行计算。<sup>[8](https://proceedings.neurips.cc/paper_files/paper/2017/file/3f5ee243547dee91fbd053c1c4a845aa-Paper.pdf)</sup>

## 与大脑的关系

这个名字是谱系，不是描述。感知机明确以麦卡洛克-皮茨对生物神经元的理想化为模型，但随着人工系统规模增长，人工单元与生物神经元之间的类比已经减弱；人工单元不是生物神经元，尽管人工神经网络是通用近似器。<sup>[14](https://www.sciencedirect.com/science/article/pii/S014976342600401X)</sup>比较两者的综述指出，它们在构成单元、网络架构和动力学原理上存在巨大差异。<sup>[15](https://www.frontiersin.org/journals/psychology/articles/10.3389/fpsyg.2022.970214/full)</sup>许多研究报道了大脑与ANN之间的相似性，但更细致的比较揭示了惊人的差异。<sup>[13](https://pmc.ncbi.nlm.nih.gov/articles/PMC11576090/)</sup>

这种关系仍然是双向的。ANN为神经科学家提供了一种方式，来构建复杂行为、异质神经活动和回路连接的模型，而传统模型并非为此设计，且大多数系统神经科学技术可以直接应用于人工网络。<sup>[13](https://pmc.ncbi.nlm.nih.gov/articles/PMC11576090/)</sup>比较猴子视觉皮层和深度卷积网络对同一张图像的处理，结果显示下颞叶皮层的反应最好由网络的最后一层预测，而V4区的反应则更好地由中间层预测。<sup>[13](https://pmc.ncbi.nlm.nih.gov/articles/PMC11576090/)</sup>

## 硬件、能耗与可解释性

[深度学习](https://www.edgepedia.org/zh/deep-learning)的增长受硬件制约。传统处理器通过冯·诺依曼瓶颈不断在内存与处理单元之间传输数据，增加延迟并降低能效；对于嵌入式平台上的边缘推理，数据科学家所需的计算复杂度与硬件架构师所能提供的容量之间的差距正在扩大。<sup>[16](https://www.nature.com/articles/s41467-023-40770-4)</sup><sup> • </sup><sup>[17](https://www.nature.com/articles/s41928-018-0059-3)</sup>在商业部署中，[推理](https://www.edgepedia.org/zh/inference)占深度学习能耗成本的高达90%，这推动了基于传统电子学之外物理基底（如光学和模拟电子交叉阵列）的加速器的研发。<sup>[9](https://www.nature.com/articles/s41586-021-04223-6)</sup>训练同样能耗密集：独立研究人员估计，训练OpenAI的GPT-3产生了超过500吨二氧化碳，相当于约35名美国公民的年排放量。<sup>[18](https://time.com/6271657/a-to-z-of-artificial-intelligence/)</sup>

可解释性是第二个限制。要解释训练好的网络中每个节点代表什么、对模型性能有多重要，颇具挑战，这个问题在生物学和临床应用中的分量尤其重。<sup>[19](https://www.nature.com/articles/s41467-022-29268-7)</sup>在一个大模型内部，同一个神经元可能对截然不同的概念产生反应——代码中的分号、提到墨西哥卷饼、或者[金门大桥](https://www.edgepedia.org/zh/golden-gate-bridge)。[Anthropic](https://www.edgepedia.org/zh/anthropic)的研究人员通过研究神经元群体而非单个神经元来应对这一问题，在一个拥有数十亿人工神经元的模型Claude Sonnet中识别出了数百万个特征；他们提醒说，识别所有特征所需的算力将超过最初训练该模型的算力。<sup>[20](https://time.com/6980210/anthropic-interpretability-ai-safety-research/)</sup>

## 泛化局限

当训练数据和测试数据来自同一分布时，深度学习能取得强劲结果，但当两个分布不同时，网络在分布外数据上的性能往往急剧退化。<sup>[21](https://arxiv.org/abs/2106.03721)</sup>这种分布偏移下的脆弱性是核心的实际关切，对卷积网络的研究发现，同时增加训练集规模和模型规模能显著提高对分布偏移的鲁棒性。<sup>[22](https://arxiv.org/abs/2007.08558)</sup>

## References

1. [Evaluation of the Hierarchical Correspondence between the Human Brain and Artificial Neural Networks: A Review, PMC](https://pmc.ncbi.nlm.nih.gov/articles/PMC10604784/)
2. [Scalable training of artificial neural networks with adaptive sparse connectivity inspired by network science, Nature Communications](https://www.nature.com/articles/s41467-018-04316-3)
3. [1.17. Neural network models (supervised), scikit-learn documentation](https://scikit-learn.org/stable/modules/neural_networks_supervised.html)
4. [Neural Networks: Training using backpropagation, Google Machine Learning Crash Course](https://developers.google.com/machine-learning/crash-course/neural-networks/backpropagation)
5. [Bibliographical and Historical Notes, Speech and Language Processing (3rd ed. draft), Jurafsky & Martin](https://web.stanford.edu/~jurafsky/slp3/old_dec20/ed3book_dec302020.pdf)
6. [Neural networks: Activation functions, Google Machine Learning Crash Course](https://developers.google.com/machine-learning/crash-course/neural-networks/activation-functions)
7. [The Perceptron: A Probabilistic Model for Information Storage and Organization (1958), Ideas That Created the Future, MIT Press](https://ieeexplore.ieee.org/document/9357585)
8. [Attention is All you Need, NeurIPS 2017](https://proceedings.neurips.cc/paper_files/paper/2017/file/3f5ee243547dee91fbd053c1c4a845aa-Paper.pdf)
9. [Deep physical neural networks trained with backpropagation, Nature](https://www.nature.com/articles/s41586-021-04223-6)
10. [Deep Feedforward Networks, Chapter 6, Deep Learning (Goodfellow, Bengio, Courville)](https://www.deeplearningbook.org/contents/mlp.html)
11. [artificial neural networks for neuroscientists:a primer - pubmed](https://pubmed.ncbi.nlm.nih.gov/32970997/)
12. [TensorFlow, Keras and deep learning, without a PhD, Google Codelabs](https://codelabs.developers.google.com/codelabs/cloud-tensorflow-mnist)
13. [Artificial Neural Networks for Neuroscientists: A Primer, Neuron (Yang & Wang, 2020)](https://pmc.ncbi.nlm.nih.gov/articles/PMC11576090/)
14. [From silicon to synapse: Why the artificial unit is not a kind of neuron, Neuroscience & Biobehavioral Reviews](https://www.sciencedirect.com/science/article/pii/S014976342600401X)
15. [How can artificial neural networks approximate the brain? Frontiers in Psychology](https://www.frontiersin.org/journals/psychology/articles/10.3389/fpsyg.2022.970214/full)
16. [Hardware-aware training for large-scale and diverse deep learning inference workloads using in-memory computing-based accelerators, Nature Communications](https://www.nature.com/articles/s41467-023-40770-4)
17. [Scaling for edge inference of deep neural networks, Nature Electronics](https://www.nature.com/articles/s41928-018-0059-3)
18. [The A to Z of Artificial Intelligence, TIME](https://time.com/6271657/a-to-z-of-artificial-intelligence/)
19. [Current progress and open challenges for applying deep learning across the biosciences, Nature Communications](https://www.nature.com/articles/s41467-022-29268-7)
20. [No One Truly Knows How AI Systems Work. A New Discovery Could Change That, TIME](https://time.com/6980210/anthropic-interpretability-ai-safety-research/)
21. [OoD-Bench: Quantifying and Understanding Two Dimensions of Out-of-Distribution Generalization, arXiv](https://arxiv.org/abs/2106.03721)
22. [On Robustness and Transferability of Convolutional Neural Networks, arXiv](https://arxiv.org/abs/2007.08558)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026; Oct 15, 2026 · Edited: Sep 30, 2026; Oct 15, 2026 · Last review: Oct 15, 2026*

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

Copyright 2026 Edgepedia

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

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

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