AI, graphs and neural networks · AI、图与神经网络
| English | 中文 | Pinyin · 拼音 |
|---|---|---|
| machine learning/məˈʃiːn ˈlɜːnɪŋ/ | 机器学习 | jī qì xué xí |
| deep learning/diːp ˈlɜːnɪŋ/ | 深度学习 | shēn dù xué xí |
| graph/ɡræf/ | 图 | tú |
| neural networks/ˈnjuːrəl ˈnetwɜːks/ | 神经网络 | shén jīng wǎng luò |
| nodes/nəʊdz/ | 节点 | jié diǎn |
| edges/ˈedʒɪz/ | 边 | biān |
| minimax/ˈmɪnɪmæks/ | 极小化极大 | jí xiǎo huà jí dà |
| weight/weɪt/ | 权重 | quán zhòng |
| activation function/ˌæktɪˈveɪʃn ˈfʌŋkʃn/ | 激活函数 | jī huó hán shù |
| hidden layers/ˈhɪdn ˈleɪəz/ | 隐藏层 | yǐn cáng céng |
The program that learned to see without being told what to look for
- In 2012 a team entered an image-recognition competition with a program that had never been given a single rule about what a cat looks like. It had been shown a million labelled photographs, and it worked out the rules itself.
- It halved the error rate of every hand-programmed entry. Within three years the entire field had abandoned writing rules.
- That reversal is the subject of this topic: not "how do we tell a computer what a cat is", but "how does a computer work that out from examples".
- This lesson is what machine learning 机器学习 and deep learning 深度学习 mean, how a graph 图 turns AI problems into search, and what an artificial neural network actually computes.
没人告诉它该看什么,它却学会了看
- 2012 年,一个团队带着一个程序参加图像识别比赛,而这个程序从未被给过任何一条关于猫长什么样的规则。它被看了一百万张有标签的照片,规则是它自己琢磨出来的。
- 它把所有手写规则参赛作品的错误率砍了一半。三年之内,整个领域放弃了写规则。
- 这个逆转就是本单元的主题:问题不再是"我们怎样告诉计算机猫是什么",而是"计算机怎样从例子里把这件事琢磨出来"。
- 这一课讲机器学习(machine learning)和深度学习(deep learning)是什么意思、图(graph)怎样把 AI 问题变成搜索,以及人工神经网络究竟在算什么。
AI, machine learning and deep learning
- Artificial intelligence is the broad goal: systems performing tasks that normally need human intelligence, such as vision, speech, translation and driving.
- Machine learning is the approach that dominates it: algorithms that learn patterns from data rather than being programmed step by step.
- Deep learning is machine learning using neural networks 神经网络 with many layers. It has led the field since the 2010s because it learns straight from raw data, pixels or audio or text, with no hand-designed features.
- They nest: deep learning is part of machine learning, which is part of AI.
Three circles, not three rivals
AI、机器学习和深度学习
- 人工智能是那个宽泛的目标:让系统执行通常需要人类智能的任务,比如视觉、语音、翻译和驾驶。
- 机器学习是其中占主导的方法:算法从数据中学习规律,而不是被一步步编程。
- 深度学习是使用多层神经网络(neural networks)的机器学习。自 2010 年代起它领跑该领域,因为它直接从原始数据——像素、音频或文本——学习,不需要人工设计的特征。
- 它们是嵌套的:深度学习属于机器学习,机器学习属于 AI。

三个同心圆,不是三个对手
Machine learning means an algorithm that: · 机器学习意味着一个算法:
ML learns from data; deep learning is ML using multi-layer neural networks. · 机器学习从数据学习;深度学习是用多层神经网络的机器学习。
How do AI, machine learning and deep learning relate? · AI、机器学习和深度学习是什么关系?
AI is the goal, machine learning is the dominant approach to it, and deep learning is machine learning with many-layered networks. · AI 是目标,机器学习是实现它的主流方法,深度学习是使用多层网络的机器学习。
Graphs, and why so much AI is search
- A graph is a set of nodes 节点 joined by edges 边. Nodes are states, places or concepts; edges are moves, roads or relationships.
- Pathfinding: a road network is a graph, and finding a route is a graph search, using Dijkstra's algorithm or A*.
- Game playing: every board position is a node and every legal move an edge, so the game is a tree that minimax 极小化极大 searches, assuming each player takes their best option.
- Knowledge representation: a semantic network holds concepts as nodes and relationships as edges. Breadth-first and depth-first search are the standard tools for exploring any of these.
图,以及为什么大量 AI 就是搜索
- 图是由边(edges)连接的一组节点(nodes)。节点是状态、地点或概念;边是移动、道路或关系。
- 寻路:道路网就是一张图,找路线就是图搜索,用 Dijkstra 算法或 A*。
- 下棋:每个棋局是一个节点,每步合法的走法是一条边,于是棋局是一棵树,由极小化极大(minimax)搜索,假定每位棋手都走最优选择。
- 知识表示:语义网络把概念当节点、关系当边。广度优先和深度优先搜索是探索这类图的标准工具。
In AI, a graph consists of: · 在 AI 中,一个图由以下组成:
Graphs model states/places as nodes and moves/relationships as edges — used for pathfinding, game trees and knowledge. · 图把状态/地点建模为节点,把移动/关系建模为边——用于寻路、博弈树和知识。
Worked example: model a problem as a graph
- A delivery company wants the shortest route between two towns. Describe how this is represented as a graph.
- Each town is a node; each road is an edge joining two nodes; the edge carries a weight, the distance or the travel time.
- The problem is then "find the path between the two nodes with the smallest total weight", which Dijkstra's algorithm solves.
- Say what the nodes are, what the edges are, and what the weights mean. An answer that only says "it is a graph" earns nothing.
例题:把问题建模成图
- 一家配送公司想找两个城镇之间的最短路线。描述这怎样表示成一张图。
- 每个城镇是一个节点;每条道路是一条边,连接两个节点;边带一个权重,即距离或行驶时间。
- 问题于是变成"找出两个节点之间总权重最小的路径",这由 Dijkstra 算法解决。
- 要说出节点是什么、边是什么、权重代表什么。只说"这是一张图"的答案不得分。
A road network is modelled as a graph to find the shortest route. Which statements are correct? Select all · 所有 that apply. · 把道路网建模成图以寻找最短路线。哪些说法正确?选出所有适用的。
Places are nodes and connections are edges. Saying what the weights represent is the third mark. · 地点是节点,连接是边。说出权重代表什么是第三分。
The artificial neuron
- An artificial neuron takes several inputs. It multiplies each input by a weight 权重, adds them together with a bias, then passes the total through a non-linear activation function 激活函数 to produce its output.
- The weights are what the network learns. The activation function is what makes the network able to represent something other than a straight line: without it, any number of layers would collapse into a single linear formula.
Multiply, add, then bend
人工神经元
- 人工神经元接收若干输入。它把每个输入乘以一个权重(weight),把它们连同一个偏置加起来,再把总和送过一个非线性的激活函数(activation function)得出它的输出。
- 权重就是网络所学到的东西。激活函数则让网络能表示直线以外的东西:没有它,多少层都会塌缩成一个线性公式。

相乘、相加,然后弯折
Put the steps inside one artificial neuron in order. · 把一个人工神经元内部的步骤按顺序排列。
Multiply, sum, activate, pass on. Without the non-linear activation, any depth of network would collapse into one linear formula. · 相乘、求和、激活、传出。没有非线性激活,任何深度的网络都会塌缩成一个线性公式。
Layers, and what "deep" means
- Neurons are arranged in layers. The input layer receives the data. One or more hidden layers 隐藏层 learn internal patterns. The output layer produces the answer, a class or a number.
- A network is called deep when it has many hidden layers, and training such a network is deep learning.
- Why the hidden layers matter: in an image network the early ones learn edges, the middle ones shapes, the later ones objects. Nobody designed that hierarchy; it is what training produced.
Input, hidden, output, and the learning is in the weights between them
层,以及"深"是什么意思
- 神经元按层排列。输入层接收数据。一个或多个隐藏层(hidden layers)学习内部规律。输出层给出答案,一个类别或一个数。
- 当一个网络有很多隐藏层时,它被称为深的,而训练这样的网络就是深度学习。
- 隐藏层为什么要紧:在图像网络里,靠前的层学到边缘,中间的层学到形状,靠后的层学到物体。没有人设计这个层级;那是训练产生的。

输入、隐藏、输出,而学习就在它们之间的权重里
Tap the parts of a neural network · 点击一个神经网络的各部分
Explore the layers. Data flows left to right: the input layer takes the features, the hidden layers learn patterns, and the output layer gives the answer — with every connection carrying a weight that training adjusts. · 探索各层。数据从左到右流动:输入层接收特征,隐藏层学习模式,输出层给出答案——每个连接携带一个训练调整的权重。
Match each part of a neural network to its role. · 把一个神经网络的每个部分与它的作用配对。
Features enter the input layer, hidden layers learn patterns, the output layer answers; learning = tuning the weights. · 特征进入输入层,隐藏层学习模式,输出层回答;学习 = 调整权重。
A neural network is called "deep" when it has many hidden layers, and each neuron takes a weighted sum of its inputs (plus a bias) before applying an activation function. · 一个神经网络在它有许多隐藏层时被称为“深度”,而且每个神经元在应用一个激活函数之前取它的输入的一个加权和(加一个偏置)。
Stacking many hidden layers lets the network learn richer patterns — training such a network is deep learning. · 堆叠许多隐藏层让网络学习更丰富的模式——训练这样一个网络是深度学习。
A neural network is called "deep" when it has: · 一个神经网络在它有以下时被称为“深度”:
Many hidden layers make a deep neural network; training one is deep learning. · 许多隐藏层做一个深度神经网络;训练一个是深度学习。
During training, the values adjusted inside a neural network are its . · 训练过程中,神经网络内部被调整的值是它的。
The architecture and the activation function are chosen by the designer; what the network learns is stored in the weights. · 结构和激活函数由设计者选定;网络学到的东西存在权重里。
Worked example: describe how a neuron computes
- Describe what happens inside a single artificial neuron. [3]
- Each input is multiplied by its own weight, and the products are added together along with a bias.
- The resulting sum is passed through an activation function, which is non-linear.
- The result is the neuron's output, which becomes an input to the neurons in the next layer. The weights and bias are the values adjusted during training.
例题:描述神经元怎样计算
- 描述一个人工神经元内部发生了什么。[3]
- 每个输入乘以它自己的权重,这些乘积连同一个偏置加起来。
- 得到的和被送过一个激活函数,该函数是非线性的。
- 结果就是这个神经元的输出,它成为下一层各神经元的输入。权重和偏置就是训练过程中被调整的值。
Marks that slip away
- Machine learning learns patterns from data; it is not "programmed step by step" and it is not magic. Say what it learns from.
- "Deep" means many hidden layers, not "very clever" or "very large".
- A graph is nodes and edges, and a graph answer must say what each represents in this problem.
- The weights are what training changes. The activation function and the architecture are chosen by the designer.
容易丢掉的分
- 机器学习学的是数据中的规律;它不是"一步步编程",也不是魔法。要说出它从什么里学。
- "深"意味着很多隐藏层,不是"很聪明"或"很大"。
- 图是节点和边,而图的答案必须说出在这个问题里它们各代表什么。
- 训练改变的是权重。激活函数和网络结构由设计者选定。
You've got it
- AI is the goal, machine learning learns patterns from data instead of following written rules, and deep learning is machine learning with many-layered neural networks
- a graph of nodes and edges turns pathfinding, game playing and knowledge representation into search, using Dijkstra, A*, minimax, breadth-first and depth-first
- an artificial neuron multiplies inputs by weights, adds a bias, and applies a non-linear activation function
- layers run input, hidden, output; deep means many hidden layers, and the learning lives in the weights
你掌握了
- AI 是目标,机器学习从数据中学习规律而不是遵循写好的规则,深度学习是使用多层神经网络的机器学习
- 由节点和边构成的图把寻路、下棋和知识表示变成搜索,用 Dijkstra、A*、极小化极大、广度优先和深度优先
- 人工神经元把输入乘以权重、加上偏置,再应用非线性的激活函数
- 各层依次是输入、隐藏、输出;深意味着很多隐藏层,而学习就存在于权重之中