Deep Learning for NLP and Speech Recognition
Book information
Description
Foreword......Page 3 Preface......Page 5 Contents......Page 11 Notation......Page 23 --- ML, NLP & Speech Introduction......Page 25 1 Introduction......Page 26 1.1.1 Supervised Learning......Page 28 1.1.2 Unsupervised Learning......Page 29 1.2 History......Page 30 1.2.1 Deep Learning: A Brief History......Page 31 1.2.2 Natural Language Processing: A Brief History......Page 34 1.2.3 Automatic Speech Recognition: A Brief History......Page 38 1.3.1 Deep Learning......Page 41 1.3.2 Natural Language Processing......Page 42 1.3.3.3 Additional Tools and Libraries......Page 43 1.3.5 Online Courses and Resources......Page 44 1.3.6 Datasets......Page 45 1.4 Case Studies and Implementation Details......Page 48 References......Page 50 2.1 Introduction......Page 62 2.2.1 Input Space and Samples......Page 63 2.2.3 Training and Prediction......Page 64 2.3 The Learning Process......Page 65 2.4.1 Generalization–Approximation Trade-Off via the Vapnik–Chervonenkis Analysis......Page 66 2.4.2 Generalization–Approximation Trade-off via the Bias–Variance Analysis......Page 69 2.4.3.1 Classification Evaluation Metrics......Page 70 2.4.3.2 Regression Evaluation Metrics......Page 72 2.4.4 Model Validation......Page 73 2.4.5 Model Estimation and Comparisons......Page 76 2.4.6 Practical Tips for Machine Learning......Page 77 2.5.1 Linear Regression......Page 78 2.5.1.1 Discussion Points......Page 80 2.5.2.1 Discussion Points......Page 81 2.5.3 Regularization......Page 82 2.5.3.2 Lasso Regularization: L1 Norm......Page 83 2.5.4 Logistic Regression......Page 84 2.5.4.1 Gradient Descent......Page 85 2.5.4.2 Stochastic Gradient Descent......Page 86 2.5.5 Generative Classifiers......Page 87 2.5.5.1 Naive Bayes......Page 88 2.5.6 Practical Tips for Linear Algorithms......Page 89 2.6 Non-linear Algorithms......Page 90 2.6.1 Support Vector Machines......Page 91 2.7 Feature Transformation, Selection, and Dimensionality Reduction......Page 92 2.7.1.4 Discretization......Page 93 2.7.2.1 Principal Component Analysis......Page 94 2.8.1 Discrete Time Markov Chains......Page 95 2.8.2 Discriminative Approach: Hidden Markov Models......Page 96 2.8.3 Generative Approach: Conditional Random Fields......Page 98 2.8.3.2 CRF Distribution......Page 99 2.8.3.3 CRF Training......Page 100 2.9.2 Exploratory Data Analysis (EDA)......Page 101 2.9.3.1 Feature Transformation and Reduction Impact......Page 102 2.9.3.2 Hyperparameter Search and Validation......Page 105 2.9.4 Final Training and Testing Models......Page 106 References......Page 108 3.1.1 Computational Linguistics......Page 110 3.1.2 Natural Language......Page 111 3.1.3 Model of Language......Page 112 3.2 Morphological Analysis......Page 113 3.2.1 Stemming......Page 114 3.3.1 Tokens......Page 115 3.3.3 N-Grams......Page 116 3.3.4 Documents......Page 117 3.3.4.2 Bag-of-Words......Page 118 3.4 Syntactic Representations......Page 119 3.4.1 Part-of-Speech......Page 120 3.4.1.2 Hidden Markov Models......Page 121 3.4.2 Dependency Parsing......Page 122 3.4.2.2 Chunking......Page 123 3.5 Semantic Representations......Page 124 3.5.1 Named Entity Recognition......Page 125 3.5.2 Relation Extraction......Page 126 3.5.4 Semantic Role Labeling......Page 127 3.6.3 Anaphora/Cataphora......Page 128 3.7 Language Models......Page 129 3.7.2 Laplace Smoothing......Page 130 3.7.4 Perplexity......Page 131 3.8.1 Machine Learning Approach......Page 132 3.8.2.1 Emotional State Model......Page 133 3.8.2.2 Subjectivity and Objectivity Detection......Page 134 3.8.3 Entailment......Page 135 3.9 Text Clustering......Page 136 3.9.2.1 LSA......Page 137 3.10.1 Dictionary Based......Page 138 3.11 Question Answering......Page 139 3.11.1 Information Retrieval Based......Page 140 3.11.3 Automated Reasoning......Page 141 3.12.1 Extraction Based......Page 142 3.13.1 Acoustic Model......Page 143 3.13.1.2 MFCC......Page 144 3.14 Case Study......Page 145 3.14.2 EDA......Page 146 3.14.3 Text Clustering......Page 149 3.14.4.1 LSA......Page 152 3.14.5 Text Classification......Page 154 3.14.6 Exercises for Readers and Practitioners......Page 156 References......Page 157 --- Deep Learning Basics......Page 162 4.1 Introduction......Page 163 4.2.1 Bias......Page 165 4.3 Multilayer Perceptron (Neural Networks)......Page 168 4.3.1 Training an MLP......Page 169 4.3.2 Forward Propagation......Page 170 4.3.3 Error Computation......Page 171 4.3.4 Backpropagation......Page 172 4.3.5 Parameter Update......Page 174 4.3.6 Universal Approximation Theorem......Page 175 4.4 Deep Learning......Page 176 4.4.1 Activation Functions......Page 177 4.4.1.1 Sigmoid......Page 178 4.4.1.3 ReLU......Page 179 4.4.1.4 Other Activation Functions......Page 180 4.4.1.6 Hierarchical Softmax......Page 182 4.4.2.2 Mean Absolute (L1) Error......Page 183 4.4.3 Optimization Methods......Page 184 4.4.3.3 Adagrad......Page 185 4.4.3.5 ADAM......Page 186 4.5.1 Early Stopping......Page 187 4.5.2 Vanishing/Exploding Gradients......Page 188 4.5.4 Regularization......Page 189 4.5.4.2 L1 Regularization......Page 190 4.5.4.3 Dropout......Page 191 4.5.4.6 Batch Normalization......Page 192 4.5.5.2 Automated Tuning......Page 193 4.5.6 Data Availability and Quality......Page 194 4.5.6.3 Adversarial Training......Page 195 4.5.7.1 Computation and Memory Constraints......Page 196 4.6.1 Energy-Based Models......Page 197 4.6.2 Restricted Boltzmann Machines......Page 198 4.6.4 Autoencoders......Page 200 4.6.4.3 Sparse Autoencoders......Page 202 4.6.4.4 Variational Autoencoders......Page 203 4.6.6 Generative Adversarial Networks......Page 204 4.7 Framework Considerations......Page 205 4.7.1 Layer Abstraction......Page 206 4.7.2 Computational Graphs......Page 207 4.7.4 Static Computational Graphs......Page 208 4.8.1 Software Tools and Libraries......Page 209 4.8.2 Exploratory Data Analysis (EDA)......Page 210 4.8.3 Supervised Learning......Page 211 4.8.4 Unsupervised Learning......Page 215 4.8.5 Classifying with Unsupervised Features......Page 218 4.8.7 Exercises for Readers and Practitioners......Page 220 References......Page 221 5.2.1 Vector Space Model......Page 224 5.2.1.1 Curse of Dimensionality......Page 225 5.2.2.2 LSA......Page 226 5.2.3.1 Bengio......Page 227 5.2.3.2 Collobert and Weston......Page 228 5.2.4 word2vec......Page 229 5.2.4.1 CBOW......Page 230 5.2.4.2 Skip-Gram......Page 231 5.2.4.3 Hierarchical Softmax......Page 233 5.2.4.4 Negative Sampling......Page 234 5.2.4.6 word2vec CBOW: Forward and Backward Propagation......Page 235 5.2.4.7 word2vec Skip-gram: Forward and Backward Propagation......Page 238 5.2.5 GloVe......Page 240 5.2.6 Spectral Word Embeddings......Page 242 5.3.1 Out of Vocabulary......Page 243 5.3.2 Antonymy......Page 244 5.3.3 Polysemy......Page 245 5.3.3.2 Sense2vec......Page 246 5.4 Beyond Word Embeddings......Page 248 5.4.2 Word Vector Quantization......Page 249 5.4.3 Sentence Embeddings......Page 251 5.4.4 Concept Embeddings......Page 253 5.4.5 Retrofitting with Semantic Lexicons......Page 254 5.4.6.1 Word2Gauss......Page 255 5.4.6.2 Bayesian Skip-Gram......Page 256 5.4.7 Hyperbolic Embeddings......Page 257 5.5 Applications......Page 259 5.5.2 Document Clustering......Page 260 5.5.3 Language Modeling......Page 261 5.5.4 Text Anomaly Detection......Page 262 5.5.5 Contextualized Embeddings......Page 263 5.6.2 Exploratory Data Analysis......Page 264 5.6.3 Learning Word Embeddings......Page 265 5.6.3.2 Negative Sampling......Page 267 5.6.3.3 Training the Model......Page 268 5.6.3.5 Using the Gensim package......Page 269 5.6.3.6 Similarity......Page 270 5.6.3.7 GloVe Embeddings......Page 272 5.6.3.8 Co-occurrence Matrix......Page 273 5.6.3.9 GloVe Training......Page 274 5.6.3.10 GloVe Vector Similarity......Page 275 5.6.3.11 Using the Glove Package......Page 276 5.6.4.1 Document Vectors......Page 277 5.6.5 Word Sense Disambiguation......Page 278 5.6.5.2 Training with word2vec......Page 279 References......Page 280 6.1 Introduction......Page 283 6.2.1.2 The Convolution Operator and Its Properties......Page 284 6.2.2 Local Connectivity or Sparse Interactions......Page 285 6.2.4 Spatial Arrangement......Page 286 6.2.5 Detector Using Nonlinearity......Page 290 6.2.6.2 Average Pooling......Page 291 6.2.6.5 Spectral Pooling......Page 292 6.3 Forward and Backpropagation in CNN......Page 293 6.3.1 Gradient with Respect to Weights ∂E∂W......Page 294 6.3.2 Gradient with Respect to the Inputs ∂E∂X......Page 295 6.4 Text Inputs and CNNs......Page 296 6.4.1 Word Embeddings and CNN......Page 297 6.4.2 Character-Based Representation and CNN......Page 300 6.5 Classic CNN Architectures......Page 301 6.5.1 LeNet-5......Page 302 6.5.2 AlexNet......Page 303 6.6 Modern CNN Architectures......Page 305 6.6.1 Stacked or Hierarchical CNN......Page 306 6.6.2 Dilated CNN......Page 307 6.6.3 Inception Networks......Page 308 6.6.4 Other CNN Structures......Page 309 6.7 Applications of CNN in NLP......Page 312 6.7.1 Text Classification and Categorization......Page 313 6.7.4 Information Extraction......Page 314 6.7.5 Machine Translation......Page 315 6.7.7 Question and Answers......Page 316 6.8.2 Fast Filtering Algorithm......Page 317 6.9.1 Software Tools and Libraries......Page 320 6.9.3 Data Preprocessing and Data Splits......Page 321 6.9.4 CNN Model Experiments......Page 323 6.9.5 Understanding and Improving the Models......Page 327 6.9.6 Exercises for Readers and Practitioners......Page 329 References......Page 330 7.1 Introduction......Page 335 7.2.1 Recurrence and Memory......Page 336 7.2.2 PyTorch Example......Page 337 7.3.1 Forward and Backpropagation in RNNs......Page 338 7.3.1.1 Output Weights (V)......Page 340 7.3.1.2 Recurrent Weights (W)......Page 341 7.3.2 Vanishing Gradient Problem and Regularization......Page 343 7.3.2.1 Long Short-Term Memory......Page 344 7.3.2.2 Gated Recurrent Unit......Page 345 7.3.2.4 BPTT Sequence Length......Page 346 7.4.1 Deep RNNs......Page 347 7.4.2 Residual LSTM......Page 348 7.4.4 Bidirectional RNNs......Page 349 7.4.6 Recursive Neural Networks......Page 351 7.5 Extensions of Recurrent Networks......Page 353 7.5.1 Sequence-to-Sequence......Page 354 7.5.2 Attention......Page 355 7.5.3 Pointer Networks......Page 356 7.5.4 Transformer Networks......Page 357 7.6.1 Text Classification......Page 359 7.6.4 Topic Modeling and Summarization......Page 360 7.6.7 Language Models......Page 361 7.6.8 Neural Machine Translation......Page 363 7.6.8.1 BLEU......Page 365 7.6.9.2 Random Sampling and Temperature Sampling......Page 366 7.6.9.3 Optimizing Output: Beam Search Decoding......Page 367 7.7 Case Study......Page 368 7.7.2.1 Sequence Length Filtering......Page 369 7.7.2.2 Vocabulary Inspection......Page 371 7.7.3 Model Training......Page 375 7.7.3.1 RNN Baseline......Page 376 7.7.3.3 RNN, LSTM, and GRU Layer Depth Comparison......Page 377 7.7.3.5 Deep Bidirectional Comparison......Page 378 7.7.3.6 Transformer Network......Page 380 7.7.4 Results......Page 382 7.7.5 Exercises for Readers and Practitioners......Page 383 7.8.1 Memorization or Generalization......Page 384 References......Page 385 8.1 Introduction......Page 389 8.2.1 Speech Production......Page 390 8.2.2 Raw Waveform......Page 391 8.2.3.1 Pre-emphasis......Page 392 8.2.3.3 Windowing......Page 393 8.2.3.4 Fast Fourier Transform......Page 394 8.2.3.6 Discrete Cosine Transform......Page 395 8.2.4 Other Feature Types......Page 396 8.3 Phones......Page 397 8.4 Statistical Speech Recognition......Page 399 8.4.1 Acoustic Model: P(X|W)......Page 401 8.4.1.1 Lexicon Model: P(S|W)......Page 404 8.4.2 Language Model: P(W)......Page 405 8.4.3 HMM Decoding......Page 406 8.5 Error Metrics......Page 407 8.6 DNN/HMM Hybrid Model......Page 408 8.7 Case Study......Page 411 8.7.3 Sphinx......Page 412 8.7.3.1 Data Preparation......Page 413 8.7.4 Kaldi......Page 416 8.7.4.1 Data Preparation......Page 417 8.7.4.2 Model Training......Page 419 8.7.5 Results......Page 421 8.7.6 Exercises for Readers and Practitioners......Page 422 References......Page 423 --- Advanced Deep Learning Techniques......Page 425 9.1 Introduction......Page 426 9.2 Attention Mechanism......Page 427 9.2.1 The Need for Attention Mechanism......Page 428 9.2.2 Soft Attention......Page 429 9.2.3 Scores-Based Attention......Page 430 9.2.5 Local vs. Global Attention......Page 431 9.2.6 Self-Attention......Page 432 9.2.7 Key-Value Attention......Page 433 9.2.8 Multi-Head Self-Attention......Page 434 9.2.9 Hierarchical Attention......Page 435 9.2.10 Applications of Attention Mechanism in Text and Speech......Page 437 9.3.1 Memory Networks......Page 438 9.3.2.2 Input and Query......Page 441 9.3.2.6 Multiple Layers......Page 442 9.3.3 Neural Turing Machines......Page 443 9.3.3.1 Read Operations......Page 444 9.3.3.2 Write Operations......Page 445 9.3.3.3 Addressing Mechanism......Page 446 9.3.4 Differentiable Neural Computer......Page 447 9.3.4.2 Memory Reads and Writes......Page 448 9.3.4.3 Selective Attention......Page 449 9.3.5.1 Input Module......Page 450 9.3.5.3 Episodic Memory Module......Page 451 9.3.5.5 Training......Page 452 9.3.6.1 Neural Stack......Page 453 9.3.6.2 Recurrent Networks, Controller, and Training......Page 455 9.3.7.1 Input Encoder......Page 456 9.3.7.2 Dynamic Memory......Page 457 9.3.7.3 Output Module and Training......Page 458 9.4.1 Attention-Based NMT......Page 459 9.4.2.2 Model Training......Page 460 9.4.2.3 Bahdanau Attention......Page 464 9.4.2.4 Results......Page 468 9.4.3.2 Exploratory Data Analysis......Page 469 9.4.3.3 LSTM Baseline......Page 470 9.4.3.4 End-to-End Memory Network......Page 472 9.4.4 Dynamic Memory Network......Page 474 9.4.4.1 Differentiable Neural Computer......Page 475 9.4.4.2 Recurrent Entity Network......Page 477 9.4.5 Exercises for Readers and Practitioners......Page 478 References......Page 479 10.1 Introduction......Page 482 10.2 Transfer Learning: Definition, Scenarios, and Categorization......Page 483 10.2.1 Definition......Page 484 10.2.3 Transfer Learning Categories......Page 485 10.3 Self-Taught Learning......Page 486 10.3.1.1 Unsupervised Pre-training and Supervised Fine-Tuning......Page 487 10.3.2 Theory......Page 488 10.3.4 Applications in Speech......Page 489 10.4.1.1 Multilinear Relationship Network......Page 490 10.4.1.2 Fully Adaptive Feature Sharing Network......Page 492 10.4.1.3 Cross-Stitch Networks......Page 493 10.4.1.4 A Joint Many-Task Network......Page 495 10.4.1.5 Sluice Networks......Page 497 10.4.3 Applications in NLP......Page 499 10.5.1 Software Tools and Libraries......Page 501 10.5.2 Exploratory Data Analysis......Page 502 10.5.3 Multitask Learning Experiments and Analysis......Page 503 References......Page 508 11.1 Introduction......Page 513 11.1.1.1 Stacked Autoencoders......Page 514 11.1.1.2 Deep Interpolation Between Source and Target......Page 516 11.1.1.3 Deep Domain Confusion......Page 518 11.1.1.4 Deep Adaptation Network......Page 519 11.1.1.5 Domain-Invariant Representation......Page 520 11.1.1.6 Domain Confusion and Invariant Representation......Page 521 11.1.1.7 Domain-Adversarial Neural Network......Page 523 11.1.1.8 Adversarial Discriminative Domain Adaptation......Page 524 11.1.1.9 Coupled Generative Adversarial Networks......Page 526 11.1.1.10 Cycle Generative Adversarial Networks......Page 528 11.1.1.11 Domain Separation Networks......Page 529 11.1.2.1 Siamese Networks Based Domain Adaptations......Page 531 11.1.3 Applications in NLP......Page 533 11.1.4 Applications in Speech Recognition......Page 534 11.2.1 Zero-Shot Learning......Page 535 11.2.1.1 Techniques......Page 536 11.2.2.1 Techniques......Page 538 11.2.3.1 Techniques......Page 539 11.2.5 Applications in NLP and Speech Recognition......Page 540 11.3 Case Study......Page 541 11.3.2 Exploratory Data Analysis......Page 542 11.3.3 Domain Adaptation Experiments......Page 543 11.3.3.2 Experiments......Page 544 11.3.3.3 Results and Analysis......Page 547 11.3.4 Exercises for Readers and Practitioners......Page 548 References......Page 549 12.1 Introduction......Page 554 12.2 Connectionist Temporal Classification (CTC)......Page 555 12.2.2 Deep Speech......Page 558 12.2.2.1 GPU Parallelism......Page 559 12.2.3 Deep Speech 2......Page 560 12.2.4 Wav2Letter......Page 561 12.2.5.1 Gram-CTC......Page 562 12.3 Seq-to-Seq......Page 563 12.3.0.2 Location-Aware Attention......Page 564 12.3.2 Listen, Attend, and Spell (LAS)......Page 565 12.4 Multitask Learning......Page 566 12.5.1.1 N-gram......Page 568 12.5.2 CTC Decoding......Page 569 12.5.3.1 Shallow Fusion......Page 572 12.5.4.1 Deep Fusion......Page 573 12.5.5 Combined CTC–Attention Decoding......Page 574 12.5.6 One-Pass Decoding......Page 575 12.6.1 Speech Embeddings......Page 576 12.6.3 Audio Word2Vec......Page 577 12.7.1 Software Tools and Libraries......Page 578 12.7.2.2 Acoustic Model Training......Page 579 12.7.3 Language Model Training......Page 581 12.7.4 ESPnet......Page 583 12.7.4.2 Model Training......Page 584 12.7.5 Results......Page 587 References......Page 588 13.2 RL Fundamentals......Page 592 13.2.1 Markov Decision Processes......Page 593 13.2.2 Value, Q, and Advantage Functions......Page 594 13.2.3 Bellman Equations......Page 595 13.2.4 Optimality......Page 596 13.2.5.2 Policy Improvement......Page 597 13.2.5.4 Bootstrapping......Page 598 13.2.6 Monte Carlo......Page 599 13.2.7 Temporal Difference Learning......Page 600 13.2.7.1 SARSA......Page 602 13.2.8 Policy Gradient......Page 603 13.2.9 Q-Learning......Page 604 13.2.10 Actor-Critic......Page 605 13.2.10.1 Advantage Actor Critic A2C......Page 606 13.3.1 Why RL for Seq2seq......Page 607 13.3.2 Deep Policy Gradient......Page 608 13.3.3.1 DQN......Page 609 13.3.3.2 Double DQN......Page 611 13.3.3.3 Dueling Networks......Page 612 13.3.4 Deep Advantage Actor-Critic......Page 613 13.4.1 Information Extraction......Page 614 13.4.1.1 Entity Extraction......Page 615 13.4.1.2 Relation Extraction......Page 616 13.4.1.4 Joint Entity/Relation Extraction......Page 617 13.4.2 Text Classification......Page 618 13.4.3 Dialogue Systems......Page 619 13.4.4 Text Summarization......Page 620 13.5 DRL for Speech......Page 622 13.5.2 Speech Enhancement and Noise Suppression......Page 623 13.6.1 Software Tools and Libraries......Page 624 13.6.3 Exploratory Data Analysis......Page 625 13.6.3.2 Policy Gradient......Page 626 13.6.3.3 DDQN......Page 628 References......Page 629 Transition to AI-Centric......Page 631 Explainable AI......Page 632 NLP Trends......Page 633 Closing Remarks......Page 634 Index......Page 635
Similar books
Deep Learning for NLP and Speech Recognition
2019 · PDF
Deep Learning for NLP and Speech Recognition
2019 · PDF
Large Language Models: A Deep Dive
2024 · PDF
Transformers for machine learning. A deep dive.
Fórmulas y tablas de matemática aplicada
2000 · PDF
Mastering Java Machine Learning
2017 · PDF
Mathematical Handbook of Formulas and Tables
2018 · PDF
Manual de Fórmulas e Tabelas Matemáticas
2012 · PDF