CSCI-SHU 376: Natural Language Processing
Hua Shen
Course Agenda: 2026 Spring-NLP-[CSCI-SHU-376]-Class Schedule
2026-02-26
Spring 2026
Lecture 8: Transformers
Today’s Plan
Recap: Seq2seq
Issues with RNNs
Issues with RNNs
Attention is all you need
Transformers
7
Transformers
8
Recap: Attention
Understanding Attention Intuitions
10
Self-Attention
11
Query, Key and Value in Self-Attention
12
Self-attention in equations
13
Self-attention in Matrix Notations
14
Self-attention in Matrix Notations
15
Multi-Head Attention
16
Multi-Head Attention
17
Multi-Head Attention
18
Positional Encoding
19
Feed-forward Blocks
20
Residual Connections
21
Layer Norm
22
Transformers encoder
23
Transformers decoder
24
Masked multi-head attention
25
Multi-head cross-attention
26
Training Transformer
27
Summary: Transformer
28
Summary: Transformer
29
Summary: Transformer
30
Transformers: Machine Translation
31
Transformers: document generation
32
Transformers: pros and cons
33
Work on improving on quadratic self-attention cost
34
Still Challenging!
35
Transformer-XL
36