Machine Learning Q and AI: 30 Essential Questions and Answers on Machine Learning and AI
9781718503779, 9781718503762
If you're ready to venture beyond introductory concepts and dig deeper into machine learning, deep learning, and AI
141
48
English
Pages 490
Year 2024
Report DMCA / Copyright
DOWNLOAD EPUB FILE
Table of contents :
Cover Page
Title Page
Copyright Page
Dedication Page
About the Author
About the Technical Reviewer
BRIEF CONTENTS
CONTENTS IN DETAIL
FOREWORD
ACKNOWLEDGMENTS
INTRODUCTION
Who Is This Book For?
What Will You Get Out of This Book?
How to Read This Book
Online Resources
PART I: NEURAL NETWORKS AND DEEP LEARNING
1. EMBEDDINGS, LATENT SPACE, AND REPRESENTATIONS
Embeddings
Latent Space
Representation
Exercises
References
2. SELF-SUPERVISED LEARNING
Self-Supervised Learning vs. Transfer Learning
Leveraging Unlabeled Data
Self-Prediction and Contrastive Self-Supervised Learning
Exercises
References
3. FEW-SHOT LEARNING
Datasets and Terminology
Exercises
4. THE LOTTERY TICKET HYPOTHESIS
The Lottery Ticket Training Procedure
Practical Implications and Limitations
Exercises
References
5. REDUCING OVERFITTING WITH DATA
Common Methods
Collecting More Data
Data Augmentation
Pretraining
Other Methods
Exercises
References
6. REDUCING OVERFITTING WITH MODEL MODIFICATIONS
Common Methods
Regularization
Smaller Models
Caveats with Smaller Models
Ensemble Methods
Other Methods
Choosing a Regularization Technique
Exercises
References
7. MULTI-GPU TRAINING PARADIGMS
The Training Paradigms
Model Parallelism
Data Parallelism
Tensor Parallelism
Pipeline Parallelism
Sequence Parallelism
Recommendations
Exercises
References
8. THE SUCCESS OF TRANSFORMERS
The Attention Mechanism
Pretraining via Self-Supervised Learning
Large Numbers of Parameters
Easy Parallelization
Exercises
References
9. GENERATIVE AI MODELS
Generative vs. Discriminative Modeling
Types of Deep Generative Models
Energy-Based Models
Variational Autoencoders
Generative Adversarial Networks
Flow-Based Models
Autoregressive Models
Diffusion Models
Consistency Models
Recommendations
Exercises
References
10. SOURCES OF RANDOMNESS
Model Weight Initialization
Dataset Sampling and Shuffling
Nondeterministic Algorithms
Different Runtime Algorithms
Hardware and Drivers
Randomness and Generative AI
Exercises
References
PART II: COMPUTER VISION
11. CALCULATING THE NUMBER OF PARAMETERS
How to Find Parameter Counts
Convolutional Layers
Fully Connected Layers
Practical Applications
Exercises
12. FULLY CONNECTED AND CONVOLUTIONAL LAYERS
When the Kernel and Input Sizes Are Equal
When the Kernel Size Is 1
Recommendations
Exercises
13. LARGE TRAINING SETS FOR VISION TRANSFORMERS
Inductive Biases in CNNs
ViTs Can Outperform CNNs
Inductive Biases in ViTs
Recommendations
Exercises
References
PART III: NATURAL LANGUAGE PROCESSING
14. THE DISTRIBUTIONAL HYPOTHESIS
Word2vec, BERT, and GPT
Does the Hypothesis Hold?
Exercises
References
15. DATA AUGMENTATION FOR TEXT
Synonym Replacement
Word Deletion
Word Position Swapping
Sentence Shuffling
Noise Injection
Back Translation
Synthetic Data
Recommendations
Exercises
References
16. SELF-ATTENTION
Attention in RNNs
The Self-Attention Mechanism
Exercises
References
17. ENCODER- AND DECODER-STYLE TRANSFORMERS
The Original Transformer
Encoders
Decoders
Encoder-Decoder Hybrids
Terminology
Contemporary Transformer Models
Exercises
References
18. USING AND FINE-TUNING PRETRAINED TRANSFORMERS
Using Transformers for Classification Tasks
In-Context Learning, Indexing, and Prompt Tuning
Parameter-Efficient Fine-Tuning
Reinforcement Learning with Human Feedback
Adapting Pretrained Language Models
Exercises
References
19. EVALUATING GENERATIVE LARGE LANGUAGE MODELS
Evaluation Metrics for LLMs
Perplexity
BLEU Score
ROUGE Score
BERTScore
Surrogate Metrics
Exercises
References
PART IV: PRODUCTION AND DEPLOYMENT
20. STATELESS AND STATEFUL TRAINING
Stateless (Re)training
Stateful Training
Exercises
21. DATA-CENTRIC AI
Data-Centric vs. Model-Centric AI
Recommendations
Exercises
References
22. SPEEDING UP INFERENCE
Parallelization
Vectorization
Loop Tiling
Operator Fusion
Quantization
Exercises
References
23. DATA DISTRIBUTION SHIFTS
Covariate Shift
Label Shift
Concept Drift
Domain Shift
Types of Data Distribution Shifts
Exercises
References
PART V: PREDICTIVE PERFORMANCE AND MODEL EVALUATION
24. POISSON AND ORDINAL REGRESSION
Exercises
25. CONFIDENCE INTERVALS
Defining Confidence Intervals
The Methods
Method 1: Normal Approximation Intervals
Method 2: Bootstrapping Training Sets
Method 3: Bootstrapping Test Set Predictions
Method 4: Retraining Models with Different Random Seeds
Recommendations
Exercises
References
26. CONFIDENCE INTERVALS VS. CONFORMAL PREDICTIONS
Confidence Intervals and Prediction Intervals
Prediction Intervals and Conformal Predictions
Prediction Regions, Intervals, and Sets
Computing Conformal Predictions
A Conformal Prediction Example
The Benefits of Conformal Predictions
Recommendations
Exercises
References
27. PROPER METRICS
The Criteria
The Mean Squared Error
The Cross-Entropy Loss
Exercises
28. THE K IN K-FOLD CROSS-VALIDATION
Trade-offs in Selecting Values for k
Determining Appropriate Values for k
Exercises
References
29. TRAINING AND TEST SET DISCORDANCE
Exercises
30. LIMITED LABELED DATA
Improving Model Performance with Limited Labeled Data
Labeling More Data
Bootstrapping the Data
Transfer Learning
Self-Supervised Learning
Active Learning
Few-Shot Learning
Meta-Learning
Weakly Supervised Learning
Semi-Supervised Learning
Self-Training
Multi-Task Learning
Multimodal Learning
Inductive Biases
Recommendations
Exercises
References
AFTERWORD
APPENDIX: ANSWERS TO THE EXERCISES
Chapter 1
Chapter 2
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Chapter 7
Chapter 8
Chapter 9
Chapter 10
Chapter 11
Chapter 12
Chapter 13
Chapter 14
Chapter 15
Chapter 16
Chapter 17
Chapter 18
Chapter 19
Chapter 20
Chapter 21
Chapter 22
Chapter 23
Chapter 24
Chapter 25
Chapter 26
Chapter 27
Chapter 28
Chapter 29
Chapter 30
INDEX