Deep Learning को समझना
(udlbook.github.io)- Simon J.D. Prince की 2023 की MIT Press किताब Understanding Deep Learning के साथ पढ़ाई करने के लिए coding exercises, lecture material और additional reading को एक जगह इकट्ठा करने वाली learning site है
- पूरी किताब को कवर करने वाली 68 Python notebooks उपलब्ध हैं, जिनमें learner text पढ़ते हुए खाली code भरकर practice करता है
- instructors के लिए material में image files, पहले 12 chapters की video lectures, slides, answer booklet, classroom-use interactive figures, और equations की LaTeX file तक शामिल हैं
- slides को 20-lecture undergraduate deep learning course को ध्यान में रखकर बनाया गया है, और ये supervised learning से लेकर CNN, image generation, Transformers and LLMs तक जाती हैं
- additional reading material computer vision, machine learning mathematics, optimization, reinforcement learning, ML theory, Responsible AI आदि तक फैलता है, इसलिए यह self-study और lecture preparation दोनों में उपयोगी है
किताब की जानकारी और citation
- Understanding Deep Learning Simon J.D. Prince द्वारा लिखी गई किताब है, और BibTeX citation information में इसे MIT Press द्वारा 2023 में प्रकाशित बताया गया है
- दिए गए BibTeX entry में निम्न जानकारी शामिल है
author = "Simon J.D. Prince"title = "Understanding Deep Learning"publisher = "The MIT Press"year = 2023url = "http://udlbook.com"
किताब के साथ चलने वाली coding practice
- site पूरी किताब को cover करने वाली 68 Python notebook exercises प्रदान करती है
- exercises text के आधार पर खाली code भरने के format में हैं
- notebooks GitHub के
udlbook/udlbookrepository में हैं, और हर item कोipynb/colablink से खोला जा सकता है -
Basics और neural network construction
- शुरुआती chapters background mathematics, supervised learning, shallow neural networks, activation functions, network composition, और deep neural networks को cover करते हैं
- loss function exercises में least squares loss, binary cross-entropy loss, multiclass cross-entropy loss शामिल हैं
-
Optimization और learning computation
- optimization notebooks line search, gradient descent, stochastic gradient descent, momentum, Adam को cover करती हैं
- gradient computation exercises में toy model में backpropagation, general backpropagation, initialization शामिल हैं
-
Performance, regularization, CNN
- performance से जुड़ी exercises MNIST-1D performance, bias-variance trade-off, double descent, high-dimensional spaces को cover करती हैं
- regularization exercises में L2 regularization, implicit regularization, ensembling, Bayesian approach, augmentation शामिल हैं
- convolution exercises में 1D convolution, MNIST-1D convolution, 2D convolution, downsampling & upsampling, MNIST के लिए convolution शामिल हैं
-
Modern deep learning topics
- network stabilization और architecture से जुड़ी notebooks shattered gradients, residual networks, batch normalization को cover करती हैं
- Transformer exercises में self-attention, multi-head self-attention, tokenization, decoding strategies शामिल हैं
- graph neural network topics में graph representation, graph classification, neighborhood sampling, graph attention networks शामिल हैं
- generative model exercises GAN toy example, Wasserstein distance, normalizing flows, latent variable models, diffusion models को cover करती हैं
- reinforcement learning exercises में Markov decision processes, dynamic programming, Monte-Carlo methods, temporal difference methods, control variates शामिल हैं
- आखिरी topics में random data, full-batch gradient descent, lottery tickets, adversarial attacks, bias mitigation, explainability हैं
Lectures और instructor material
- instructor resources में figures, slides, answer booklet शामिल हैं
- MIT Press पर register करने पर answer booklet पाने के लिए registration link दिया गया है
- Interactive figures classroom में ideas समझाने के लिए इस्तेमाल होने वाला material है
- सभी equations वाली working Latex file उपलब्ध है
-
20-lecture undergraduate deep learning slides
- slides 20 lecture undergraduate deep learning course के लिए material हैं
- publicly available slide topics में Introduction, Supervised Learning, Shallow Neural Networks, Deep Neural Networks, Loss Functions, Fitting Models, Computing Gradients, Initialization, Performance, Regularization, Convolutional Networks, Image Generation, Transformers and LLMs शामिल हैं
Additional reading material
- site Understanding Deep Learning जैसी style और वही notation इस्तेमाल करने वाले अन्य articles, blogs, books को additional material के रूप में bundle करके देती है
-
Computer vision और machine learning basics
- Computer vision: models, learning, and inference 2012 में CUP से प्रकाशित किताब है, जो probabilistic models पर focus करती है और pre-deep learning दौर की ML सामग्री काफी शामिल करती है
- machine learning mathematics material linear algebra, probability introduction, probability distributions, fitting probability distributions, normal distribution को cover करता है
- machine learning material में learning and inference, regression models, classification models, few-shot learning और meta-learning शामिल हैं
-
Transformers, LLMs, NLP
- Transformers और LLMs material में LLM overview, Transformers I·II·III, LLM training और fine-tuning, LLM inference speed-up शामिल हैं
- NLP material neural natural language generation, parsing I·II·III, XLNet को cover करता है
- Transformer से जुड़े topics में self-attention, position encoding, multi-head architecture, Transformer block, encoder, decoder, training tricks शामिल हैं
-
Optimization, temporal models, reinforcement learning
- optimization material में gradient-based optimization, Bayesian optimization, SAT Solvers I·II·III शामिल हैं
- temporal model material Kalman filter, smoothing, Extended Kalman filter, Unscented Kalman filter, particle filtering को cover करता है
- reinforcement learning material Transformers in RL में RL की challenges, RL में Transformer के advantages, representation learning, reward learning, policy learning, interpretability, applications शामिल हैं
-
ODEs, SDEs, ML theory
- ODEs and SDEs in machine learning bundle ODEs, SDEs, gradient descent, stochastic gradient descent, residual networks, diffusion models, physics-informed machine learning को cover करता है
- related material में ODE introduction, ODE के closed-form solutions, ODE numerical methods, stochastic processes and SDEs शामिल हैं
- ML Theory material में gradient flow, neural tangent kernel, NTK applications, Bayesian ML I·II, Bayesian neural networks, neural network Gaussian processes शामिल हैं
-
Unsupervised learning, graphical models, Responsible AI
- unsupervised learning material complex data densities, variational autoencoders, normalizing flows को cover करता है
- graphical model material में graphical models, models for chains and trees, models for grids शामिल हैं
- Responsible AI material में bias and fairness, explainability I·II, differential privacy I·II शामिल हैं
1 टिप्पणियां
Hacker News की राय
यहाँ comments मोटे तौर पर दो तरह के हैं: 1) ऐसी जानकारी के बिना भी AI systems बना सकते हैं, इसलिए इसे जानना ज़रूरी नहीं, 2) असल में क्या हो रहा है यह समझने के लिए इस तरह की बुनियादी जानकारी चाहिए
दोनों सही हैं, और मुझे लगता है कि field अब ML engineer और ML scientist/researcher जैसी दो अलग क्षमताओं में बंट रही है
टीम में दोनों हों तो अच्छा है। Scientist धीमे हो सकते हैं, और engineer कई API और open source models को जल्दी-जल्दी try कर लेते हैं, लेकिन जब बात अटकती है या algorithm बदलना पड़ता है, तो कई engineer लड़खड़ा जाते हैं। तब R&D-style सोच की ज़रूरत होती है, जो कई engineers के लिए अनजान होती है, और यहीं AI scientist अहम हो जाता है
पिछले 10 सालों में कई teams में यही pattern देखा है। company के पास थोड़ा budget आ जाता है और वह मानने लगती है कि उसकी problem खास है, फिर कुछ papers वाले PhD data scientists hire करती है, लेकिन अक्सर उन्हें सिर्फ R आता है और वे अभी-अभी Python bootcamp खत्म किए हुए स्तर के होते हैं
3 महीने बाद भी खास output नहीं होता, बस ढेरों Jupyter notebooks होती हैं; production code नहीं होता, और कुछ लोगों के पास तो experiment environment भी नहीं होता
business problem वैसी की वैसी रहती है। company को समझ आता है कि अगर data scientists बहुत हैं और data/ML engineers कम, तो या तो production deployment पर अटकेंगे, या Python की कम समझ के कारण data pipeline+algorithm+infrastructure का Death Star बना देंगे और 70% ज़्यादा resources खर्च करेंगे
project delay होता है और लोग बेचैन होने लगते हैं। अब सालाना 2.5 million dollar वाली team batch या REST API से serve नहीं कर पा रही, इसलिए proof of concept भी नहीं दे पा रही
company momentum खो देती है, और competitor अधूरा लेकिन आगे का solution निकालकर users जुटाते और उसे सुधारते जाते हैं। इसके बाद PM और engineering manager जिम्मेदारी को लेकर लड़ते हैं, और product/engineering VP बलि का बकरा ढूंढता है। कुछ PhD लोगों को निकाल दिया जाता है और वे local universities में पढ़ाने चले जाते हैं
उस मायने में ML engineer/scientist वाली यह split कहाँ से आती है, समझ नहीं आता, और यह कुछ लोगों की self-satisfaction के लिए बनाई गई distinction जैसी लगती है
इसे miss कर चुके व्यक्ति के तौर पर, मुझे जानना है कि इसे अब सीखने का मतलब सिर्फ historical significance रह गया है या यह future employment के लिए अभी भी relevant है
AI के मामले में ऐसा लगता है कि OpenAI सबका lunch छीन लेगा; क्या यह पूरी तरह गलत सोच है?
Karpathy का हाल का LLM explainer video जैसे resources आम लोगों के लिए अच्छे, थोड़े exaggerated materials हैं, लेकिन उससे एक level गहरी practical समझ खुद हाथ आज़माए बिना मिलना मुश्किल है। पूरा math याद करने की ज़रूरत नहीं, लेकिन components के “interfaces” कैसा feel देते हैं, यह जानना अच्छा है
हर model technique असल में क्या करती है, खासकर inference time पर क्या करती है जब उसे बाकी stack के साथ अच्छी तरह integrate होना होता है, यह महत्वपूर्ण है
यह अभी relevant है या नहीं, इस सवाल पर: किसी specific function को optimize करने के लिए trained dense neural network के अर्थ में deep learning practical रूप से करीब 15 साल से fundamentally नहीं बदली है, theory के स्तर पर तो और भी पुरानी है, और ज़्यादातर uses में OpenAI जैसी चीज़ों से कहीं अधिक महत्वपूर्ण और व्यापक रूप से इस्तेमाल होती है
ad optimization या financial modeling जैसी चीज़ें जिनमें numerical estimation होता है, वे LLM नहीं इस्तेमाल करतीं; वे बड़े system के हिस्से के तौर पर purpose-built models इस्तेमाल करती हैं। “numbers डालो और numbers पाओ” वाला interface explainable है, software stack में integrate करना आसान है, और measure करना भी अच्छा है
समझ में आने वाली error bars होती हैं, और कभी-कभी तो consistency भी होती है। controllable interface भी होता है जो अचानक company secrets नहीं उगलता या JSON serialization भूल नहीं जाता। latency और cost भी बहुत कम होती है
अगर web page को 100ms के अंदर render करना है या लाखों choices पर optimization चलानी है, तो generative AI practical option नहीं है, और मुझे लगता है आगे भी ऐसा होने की संभावना कम है
मेरा math या theoretical ML background बहुत बड़ा नहीं है, लेकिन पिछले 10 सालों का ज़्यादातर समय मैंने ML experts के साथ infrastructure, data pipelines और monitoring बनाते हुए बिताया है। मैं मौके पर sigmoid integrate नहीं कर सकता, लेकिन वह core बात नहीं है। एक बार कर चुका हूँ, function कैसे behave करता है इसका अंदाज़ा है, और black-box component के तौर पर reasoning कर सकता हूँ
ML के दूसरे क्षेत्रों के उलट, deep learning में components आपस में अच्छी तरह fit होते हैं। चाहें तो Transformer को CNN के साथ भी इस्तेमाल कर सकते हैं। यह text, image, video, audio जैसे किसी भी data पर machine learning लागू करने देता है, और computationally भी naturally scale होता है
इस field से काफी जुड़ा होने के नाते, मुझे अफसोस होता है कि LLM की वजह से लोग ML और deep learning से दूर जा रहे हैं और “अब इसे करने की कोई वजह नहीं” वाली गलतफहमी को मान रहे हैं। बड़े algorithms चलाने में महंगे हैं, throughput धीमा है, और purpose-built models की तुलना में आम तौर पर performance कम होता है। कई tasks में वे encoder networks के मुकाबले इस्तेमाल में आसान भी नहीं हैं
यह biased सोच हो सकती है, लेकिन मुझे लगता है computing में सीखने के लिए यह सबसे मज़ेदार fields में से एक है। अगर अच्छा idea हो तो घर के normal GPU से भी state-of-the-art चीज़ बनाई जा सकती है। बस LLM जितना attention न पाने वाली niche ढूंढनी होगी
deep learning उसका एक हिस्सा है। बहुत-सी चीज़ें पहले ही libraries और APIs में wrap हो चुकी हैं, इसलिए काम सही data तैयार करने, सही API call करने, और results का इस्तेमाल करने का हो जाता है
उदाहरण के लिए, OpenAI को शायद हवा में किसी specific molecule को real time में detect करने वाले sensor chip पर छोटे embedded neural network के development में रुचि नहीं होगी
यह किताब प्रभावशाली है। इसमें मेरे पसंदीदा विषय डीप लर्निंग की अकारण प्रभावशीलता पर भी एक अध्याय है। क्या और भी कोई किताबें हैं जिन पर ध्यान देना चाहिए?
जिन्हें जल्दी है, वे स्लाइड 123 देख सकते हैं। मुख्य सिफारिशें Murphy, Gelman, Barber, Deisenroth हैं
यह ध्यान में रखना चाहिए कि इन स्लाइडों में Bayesian bias है। फिर भी Murphy एक बेहतरीन डीप लर्निंग किताब है, और generalized linear models से होते हुए डीप लर्निंग में जाना भी अच्छा तरीका है
रोचक बात यह है कि बदनाम Attention paper 10,000 citations के करीब पहुंच रहा है और शायद इस साल के अंत तक वहां पहुंच जाएगा। संभवतः यह इस महत्वपूर्ण milestone तक सबसे जल्दी पहुंचने वाला paper होगा
Attention paper से पहले लिखी गई डीप लर्निंग किताबों को पुराना माना जाना चाहिए और उन्हें update की जरूरत है। हालत कुछ वैसी है जैसे कोई पुरानी physics textbook जिसमें Newton के laws तो हों, लेकिन Einstein की energy equivalence missing हो
अगर अभी शुरू करके AI पढ़ूं और सीखूं, तो क्या expert के करीब स्तर तक पहुंच सकता हूं?
चिंता है कि कहीं मैं ऐसा सफर तो शुरू नहीं कर रहा जिसके लिए master's या PhD चाहिए
हालांकि असली systems चलाने के लिए जरूरी छोटे tips और intuition जैसी practical lessons छूट सकती हैं। इसमें समय लगता है, और मेरे हिसाब से यह science जितना है उतना ही art भी है
“क्या मैं expert बन सकता हूं?” जैसे सवाल अस्पष्ट हैं, इसलिए अच्छे milestone बनना मुश्किल है
मशहूर tech companies में कई machine learning platforms पर 10 साल काम किया है, और जिन चीजों पर मैंने काम किया वे सब काफी जल्दी पुरानी हो गईं
ML algorithms से लेकर compute platforms तक सब बहुत अस्थायी थे। इसमें यह तथ्य जोड़ दें कि ML innovations का अधिकतर हिस्सा कुछ elite companies बनाती हैं, तो ऐसी सामग्री को बहुत सीखना अपने-आप में विरोधाभासी लगता है
लेकिन machine learning algorithms और ideas नहीं। अगर SVN या naive Bayes सीखकर भी आपको आज के लिए कुछ उपयोगी नहीं मिला, तो असल में आपने कुछ सीखा ही नहीं
उदाहरण के लिए, Transformer को लंबी sequences में LSTM के vanishing gradients को हल करने और LSTM के time dimension में inherently sequential होने के कारण GPU utilization कम रहने की समस्या सुधारने के लिए विकसित किया गया था
बुनियाद बहुत ज्यादा नहीं बदलती। इस field में कई धाराएं हैं, और बहुत से algorithms लंबे समय तक टिकते हैं और सच में इस्तेमाल होते हैं। बेशक चाहें तो कुछ को upgrade कर सकते हैं, लेकिन अगर आप endless white rabbit के पीछे भागते रहेंगे, तो हाथ में सिर्फ रुई का गुच्छा बचेगा
व्यक्तिगत रूप से, मुझे लगता है कि evolution जैसी ही forces technology को चलाती हैं। शायद Linus Torvalds ने भी कभी कहा था कि Linux natural selection के जरिए evolve हुआ
ऐसी किताबों का आकलन करना बहुत मुश्किल है। क्या सिर्फ table of contents देखकर फैसला करना चाहिए?
जानना चाहता हूं कि लेखक कौन हैं, क्या उनकी और कोई highly regarded writings हैं, क्या subject जानने वालों के अच्छे reviews हैं, या कुछ न जानने वाले students के अच्छे reviews हैं
इस किताब को मैं paperback में खरीदने वाला हूं
आपने पूछा कि क्या सिर्फ table of contents देखकर फैसला कर रहे हैं, लेकिन linked site से chapters 1–21 का 500+ pages का draft डाउनलोड किया जा सकता है
लेखक Simon J. D. Prince University of Bath में computer science के emeritus professor हैं और Computer Vision: Models, Learning and Inference के author हैं। वे AI और deep learning में specializing research scientist हैं और Anthropics Technologies Ltd, Borealis AI आदि में academia और industry में research scientist teams lead कर चुके हैं
अन्य highly regarded publications में CVPR, ICCV, SIGGRAPH जैसी top conferences में 50 से ज्यादा peer-reviewed papers हैं: https://scholar.google.com/citations?user=fjm67xYAAAAJ&hl=en
reviews की बात करें तो, यह किताब अभी प्रकाशित नहीं हुई है और अभी आप जो देख रहे हैं वह सचमुच free draft है। Amazon पर यह $85 pre-order के रूप में listed है
https://github.com/udlbook/udlbook/releases/download/v1.16/U...
आशा है यह बेवकूफी भरा सवाल नहीं है, लेकिन paperback कैसे खरीद सकते हैं?
https://mitpress.mit.edu/9780262048644/understanding-deep-le...
PDF की तस्वीर में ऐसा लगता है कि Why does deep learning work का इशारा Deep learning and ethics की ओर है, और उल्टा भी वैसा ही है
2016 में Ian Goodfellow की Deep Learning आखिरी बार पढ़ने वाले व्यक्ति के तौर पर, यह दिलचस्प है कि RNN चैप्टर नहीं है और Transformer चैप्टर है
इसलिए अब इसका ज्यादा इस्तेमाल नहीं होता। हालांकि व्यक्तिगत रूप से मुझे यह conceptually काफी रोचक लगता है, इसलिए ऐसी lecture में इसे शामिल किया जाना चाहिए