S3-03 · 基础 · S3 门面页 S3-03 · Foundation · S3 Gateway

注意力 · 让重要来源的线更粗 Attention · Make Important Sources Pull Harder

one position asks → sources receive weights → information is gathered

注意力(Attention)让一个位置按任务需要,从其他位置加权汇总信息。线的粗细只表示当前计算分到的权重,不表示模型像人一样“在意”或“理解”。 Attention lets one position gather a weighted mix of information from other positions for the current task. Line thickness shows computational weight, not human-like care or understanding.

01 · 听到“它”时先看回哪里 01 · Where do you look when you hear “it”?

“小狗追着皮球,因为它滚远了”——“它”该从哪些词汇总信息? “The dog chased the ball because it rolled away.” Which words should “it” gather from?

02 点击“它”,再重分三条线 Select “It,” Then Redistribute Three Lines

线宽 = 权重 Width = weight
查询位置 Query position
当前要补信息的位置 position gathering context
最大来源 Top source
皮球
65%
权重总和 Weight sum
100%
归一化后 after normalization

S3 统一视觉语法:所有注意力页都用 lineWidth = 1.5 + weight × 10;粗线表示更大权重。 S3 visual grammar: every attention page uses lineWidth = 1.5 + weight × 10; thicker means more weight.

03 注意力的 4 个零件 Four Parts of Attention

看谁 · 分多少 · 拿什么 Match · weigh · gather
PART 01

查询位置 Query position

“它”是当前要补足上下文的位置。 “It” is the position currently seeking context.

PART 02

候选来源 Candidate sources

小狗、皮球和滚远都可以提供信息。 Dog, ball, and rolled can each provide information.

PART 03

归一化权重 Normalized weights

三条线按比例分完 100%,粗细对应数值。 The three lines divide 100%; thickness follows the number.

PART 04

聚合结果 Gathered result

来源内容按权重混合,改权重就改结果。 Source content mixes by weight; changing weights changes the result.

04 最小机制:不是选一个,而是加权汇总 Minimal Mechanism: Weighted Gathering, Not One Pick

output = Σ αivi
αdog + αball + αrolled = 1
滑杆是原始量,画布使用归一化后的 α。把皮球滑杆拉高,皮球线会更粗且聚合描述立即偏向皮球。 Sliders hold raw amounts; the canvas uses normalized α. Raise ball and its line thickens while the gathered description shifts toward ball.
匹配当前需要 Match current need 各来源得到原始分数 Sources receive scores
变成权重 Normalize weights 总和锁为 1 Sum locks to one
按比例汇总 Gather by proportion 粗线贡献更多 Thicker lines contribute more

05 边界实验:把最粗线故意给错对象 Boundary Test: Give the Thickest Line to the Wrong Source

主动制造失败 Create a failure

权重能驱动结果,不保证结果正确 Weights drive the result; they do not guarantee correctness

强行把“小狗”拉到最大。“它”的聚合结果会稳定偏向小狗,即使句中“滚远了”更像在描述皮球。 Force “dog” to the top. The gathered result will reliably lean toward dog even though “rolled away” better fits the ball.

尚未执行。当前最粗线指向皮球。 Not run yet. The thickest line currently points to ball.
注意力就是模型在思考。 Attention is the model thinking. → ✓ 它是按权重汇总信息的计算机制。 It is a weighted information-gathering mechanism.
最粗线一定代表事实。 The thickest line must be factual. → ✓ 最粗线只代表当前权重最大。 It only marks the largest current weight.
注意力只复制一个词。 Attention copies one word. → ✓ 它通常混合多个来源的内容。 It usually mixes content from several sources.
06 · 一句话带走 06 · One line to keep

注意力让一个位置按任务需要,从多个位置加权汇总信息;拖动权重,就能用线宽和聚合结果同时检验这条因果链。 Attention lets one position gather a weighted mix from other positions for the task. Adjust the weights to verify the same cause through line width and the gathered result.