List of Figures
List of Tables
Author Bios
Foreword
Preface
Contributors
Deep Learning and Transformers: An Introduction
1.1 DEEP LEARNING: A HISTORIC PERSPECTIVE
1.2 TRANSFORMERS AND TAXONOMY
1.2.1 Modified Transformer Architecture
1.2.1.1 Transformer block changes
1.2.1.2 Transformer sublayer changes
1.2.2 Pretraining Methods and Applications
1.3 RESOURCES
1.3.1 Libraries and Implementations
1.3.2 Books
1.3.3 Courses, Tutorials, and Lectures
1.3.4 Case Studies and Details
Transformers: Basics and Introduction
2.1 ENCODER-DECODER ARCHITECTURE
2.2 SEQUENCE TO SEQUENCE
2.2.1 Encoder
2.2.2 Decoder
2.2.3 Training
2.2.4 Issues with RNN-based Encoder Decoder
2.3 ATTENTION MECHANISM
2.3.1 Background
2.3.2 Types of Score-Based Attention
2.3.2.1 Dot Product (multiplicative)
2.3.2.2 Scaled Dot Product or multiplicative
2.3.2.3 Linear, MLP, or additive
2.3.3 Attention-based Sequence to Sequence
2.4 TRANSFORMER
2.4.1 Source and Target Representation
2.4.1.1 Word Embedding
2.4.1.2 Positional Encoding
2.4.2 Attention Layers
2.4.2.1 Self-Attention
2.4.2.2 Multi-Head Attention
2.4.2.3 Masked Multi-Head Attention
2.4.2.4 Encoder-Decoder Multi-Head Attention
2.4.3 Residuals and Layer Normalization
2.4.4 Position-wise Feed-Forward Networks
2.4.5 Encoder
2.4.6 Decoder
2.5 CASE STUDY: MACHINE TRANSLATION
2.5.1 Goal
2.5.2 Data, Tools and Libraries
2.5.3 Experiments, Results and Analysis
2.5.3.1 Exploratory Data Analysis
2.5.3.2 Attention
2.5.3.3 Transformer
2.5.3.4 Results and Analysis
2.5.3.5 Explainability
Bidirectional Encoder Representations from Transformers (BERT)
3.1 BERT
3.1.1 Architecture
3.1.2 Pre-training
3.1.3 Fine-tuning
3.2 BERT VARIANTS
3.2.1 RoBERTa
3.3 APPLICATIONS
3.3.1 TaBERT
3.3.2 BERTopic
3.4 BERT INSIGHTS
3.4.1 BERT Sentence Representation
3.4.2 BERTology
3.5 CASE STUDY: TOPIC MODELING WITH TRANSFORMERS
3.5.1 Goal
3.5.2 Data, Tools, and Libraries
3.5.2.1 Data
3.5.2.2 Compute embeddings
3.5.3 Experiments, Results, and Analysis
3.5.3.1 Building Topics
3.5.3.2 Topic size distribution
3.5.3.3 Visualization of topics
3.5.3.4 Content of topics
3.6 CASE STUDY: FINE-TUNING BERT
3.6.1 Goal
3.6.2 Data, Tools and Libraries
3.6.3 Experiments, Results and Analysis
Multilingual Transformer Architectures
4.1 MULTILINGUAL TRANSFORMER ARCHITECTURES
4.1.1 Basic Multilingual Transformer
4.1.2 Single-Encoder Multilingual NLU
4.1.2.1 mBERT
4.1.2.2 XLM
4.1.2.3 XLM-RoBERTa
4.1.2.4 ALM
4.1.2.5 Unicoder
4.1.2.6 INFOXL
4.1.2.7 AMBER
4.1.2.8 ERNIE-M
4.1.2.9 HITCL
4.1.3 Dual-Encoder Multilingual NLU
4.1.3.1 LaBSE
4.1.3.2 mUSE
4.1.4 Multilingual NLG
4.2 MULTILINGUAL DATA
4.2.1 Pre-training Data
4.2.2 Multilingual Benchmarks
4.2.2.1 Classification
4.2.2.2 Structure Prediction
4.2.2.3 Question Answering
4.2.2.4 Semantic Retrieval
4.3 MULTILINGUAL TRANSFER LEARNING INSIGHTS
4.3.1 Zero-shot Cross-lingua