1 पॉइंट द्वारा GN⁺ 2024-05-26 | 1 टिप्पणियां | WhatsApp पर शेयर करें
  • TNGD एक न्यूरल नेटवर्क ट्रेनिंग विधि है जो Natural Gradient Descent (NGD) को analog thermodynamic computer और GPU के hybrid loop पर चलाकर second-order optimization का computational burden कम करने की कोशिश करती है
  • second-order learning methods loss landscape की curvature information का उपयोग करती हैं, इसलिए convergence characteristics अच्छे होते हैं, लेकिन digital hardware पर Fisher information matrix की गणना और linear system solve की लागत के कारण इन्हें बड़े पैमाने की training में इस्तेमाल करना कठिन है
  • equilibrium state वाले analog systems के thermodynamic properties और physical Ornstein–Uhlenbeck process का उपयोग करके NGD के parameter update rule को implement किया जाता है
  • उपयोगकर्ता model architecture को बनाए रख सकता है और analog computer केवल training को accelerate करता है, इसलिए यह उन कुछ analog inference acceleration तरीकों से अलग है जिनमें model को hardware पर fixed करना पड़ता है
  • numerical experiments में classification और language model fine-tuning में इसने आधुनिक digital first-order और second-order learning methods से बेहतर परिणाम दिखाए, और पर्याप्त parallelization होने पर Adam·SGD के करीब per-iteration runtime संभव है

TNGD जिस training cost समस्या को लक्षित करता है

  • उन्नत AI models की training cost बढ़ने के साथ, दुनिया के अग्रणी models को train करने की लागत सैकड़ों मिलियन डॉलर तक पहुँच गई है
  • digital hardware में Moore’s Law और Dennard’s Law का अंत execution time और energy efficiency को प्रभावित कर रहा है
  • ये सीमाएँ AI model training efficiency बढ़ाने के लिए special-purpose nontraditional hardware की आवश्यकता को बढ़ाती हैं
  • digital hardware उपयोगकर्ता के लिए उपलब्ध training algorithms की range को भी सीमित करता है
    • SGD, Adam और उनके variants DNNs और बड़े AI models की training में व्यापक रूप से उपयोग होते हैं
    • अधिक sophisticated optimizers computational overhead अधिक होने के कारण digital hardware पर कम ही उपयोग किए जाते हैं

second-order optimization के फायदे और bottleneck

  • second-order methods loss landscape की curvature information को पकड़ती हैं, इसलिए सिद्धांततः इनमें अधिक मजबूत convergence characteristics होती हैं
  • Natural Gradient Descent (NGD) को Fisher information matrix जैसे second-order quantities का estimation करना पड़ता है, और हर epoch में महँगा linear system solve करना पड़ता है
  • K-FAC जैसी NGD approximation methods ने संभावनाएँ दिखाईं और Adam से बेहतर performance भी दिखाई, लेकिन इन्हें arbitrary neural network architectures पर लागू करना अभी भी कठिन है

hybrid digital-analog training loop

  • TNGD एक hybrid digital-analog loop में काम करता है जहाँ GPU analog thermodynamic computer के साथ communicate करता है
  • training के दौरान निश्चित समयांतराल पर gradient और Fisher information matrix या किसी अन्य positive semidefinite curvature matrix की गणना की जाती है, और उनके बीच analog dynamics चलती रहती है
  • analog system की equilibrium state में दिखाई देने वाले thermodynamic properties को computational resource की तरह उपयोग किया जाता है
  • उपयोगकर्ता model architecture प्रदान करता है, और analog computer केवल training process को accelerate करता है
    • यह उन कुछ analog AI inference acceleration प्रस्तावों के विपरीत है जिनमें model को hardware पर fixed कर दिया जाता है और उपयोगकर्ता architecture को स्वतंत्र रूप से बदल नहीं सकता

computational complexity और experimental results

  • TNGD कुछ parameter regimes में NGD के समतुल्य है, लेकिन अत्यधिक महँगे linear system solve से बचता है
  • physical Ornstein–Uhlenbeck process का उपयोग करके NGD के parameter update rule को implement किया जाता है
  • per-iteration runtime parameter count के सापेक्ष linear scale करता है
  • उचित parallelization के साथ Adam और SGD जैसे first-order optimizers के करीब runtime संभव है
  • numerical experiments में classification tasks और extractive question answering सहित language model fine-tuning में TNGD ने आधुनिक digital first-order और second-order learning methods से बेहतर परिणाम दिए

1 टिप्पणियां

 
GN⁺ 2024-05-26
Hacker News टिप्पणियाँ
  • मुख्य बात यह है कि natural gradient descent एक second-order method है। मुख्य update equation ∇̃L(θ) = F⁻¹∇L(θ) है, और इसके लिए एक linear system solve करना पड़ता है
    इसके लिए लेखक के पिछले पेपर Thermodynamic Linear Algebra की method इस्तेमाल की जा सकती है। पूरे neural network को thermodynamic computer पर implement करना मुश्किल है, इसलिए पेपर इसे सामान्य GPU के साथ parallel में चलाने का तरीका सुझाता है। संरचना ऐसी है कि GPU F और ∇L(θ) calculate करता है, और linear system को digital system के साथ parallel में चलने वाले thermodynamic computer को सौंप दिया जाता है (Figure 1)। हालांकि Figure 3 के “Runtime vs Accuracy” graph में यह बात अहम है कि जरूरी computer अभी मौजूद नहीं है, इसलिए इसमें TNGD algorithm का time model इस्तेमाल होता है
  • बढ़िया और दिलचस्प। लेखक loss landscape की curvature, यानी second derivative, को reflect करने वाला hybrid digital-analog training loop propose करते हैं, और numerical simulation से दिखाते हैं कि अगर इस तरीके को physical system के रूप में implement किया जाए, तो training loop की हर iteration की computation cost parameters की संख्या के साथ linear बढ़ती है
    अगर thermodynamics के laws को AI model training का काम करवाकर मौजूदा digital hardware और training methods की scaling limits और मुश्किलों से आगे निकला जा सकता है, तो ऐसी direction खोजने के पक्ष में हूँ
  • पेपर मुख्यतः deep learning/neural network training और optimization results पर है, लेकिन उत्सुकता है कि वही optimization framework दूसरी तरह की कठिन या बड़ी optimization problems पर कितनी आसानी से apply किया जा सकेगा। Extropic(https://www.extropic.ai/) से जुड़ी पोस्ट पहली बार देखते समय भी यही विचार आया था
    neural networks के अलावा optimization problems model की जा सकती हैं या नहीं, यह देखने के लिए वेबसाइट पर API या software stack की public जानकारी ढूँढी, लेकिन लगता है अभी public नहीं है। अभी भी हल करने लायक कई बड़े NP-hard combinatorial optimization या large-scale analytical optimization problems हैं, और व्यक्तिगत रूप से मेरी दिलचस्पी EDA और semiconductor design problems में है। adiabatic quantum computing भी optimization problems solve करने का वादा करने वाली technology थी, और quantum computing अभी भी ज्यादातर छोटे-scale solutions के इर्द-गिर्द आगे बढ़ रही है। उम्मीद है कि ये नए “thermodynamic computing” startups भी ऐसी problems explore करने के लिए शानदार technology देंगे
  • thermodynamics का इस्तेमाल करके second-order updates को ज्यादा efficiently calculate करना निश्चित रूप से cool और explore करने लायक है, लेकिन deep learning के context में इसकी practical usefulness को लेकर अभी भी संदेह है
    classical hardware पर पहले से ही बहुत efficiently चलने वाले second-order methods[1] मौजूद हैं, लेकिन practice में वे शायद ही इस्तेमाल होते हैं और ADAM जैसे first-order methods से पीछे रह जाते हैं। वजह यह है कि deep learning models जैसी बेहद non-linear loss functions को optimize करने के लिए, चाहे first-order हो या second-order, आखिरकार बहुत low learning rate चाहिए होता है। इसलिए second-order methods हर step में थोड़ा बेहतर parameter update दे सकते हैं, लेकिन अक्सर उनकी cost उससे ज्यादा बढ़ जाती है, इसलिए आम तौर पर उनकी value कम होती है
    [1] https://andrew.gibiansky.com/blog/machine-learning/hessian-f...
    • cool होने पर सहमत हूँ, और इस बात से भी सहमत हूँ कि second-order methods को valuable बनाना मुश्किल है। कभी-कभी dataset इतना बड़ा होता है कि minibatch का gradient भी ठीक-ठाक estimate करना मुश्किल हो जाता है
      पूरे dataset के लिए second-order information को उपयोगी ढंग से estimate करना और भी कठिन है, खासकर यह देखते हुए कि minibatch इस्तेमाल करने की वजह ही computational feasibility है
  • पेपर को detail में नहीं पढ़ा, लेकिन क्या कोई बता सकता है कि इसमें आकर्षण क्या है? Table 1 देखकर लगता है कि sample size के हिसाब से इसकी SGD जैसी asymptotic complexity है
    आज के बड़े और over-specified models में एक-दूसरे से मिलते-जुलते कई extrema होते हैं, इसे देखते हुए पता नहीं कि इसकी सच में जरूरत भी है या नहीं। अगर यह quasi-linear भी नहीं, और sublinear नहीं है, तो इसमें दिलचस्पी लेने की वजह नहीं दिखती
  • करीब 10 साल पहले AI class में पढ़ी simulated annealing याद आ गई
    https://en.wikipedia.org/wiki/Simulated_annealing
  • animal neurons कैसे सीखते हैं, इस पर अभी की best estimate क्या है?
  • Geoffrey Hinton ने करीब एक साल पहले कुछ ऐसा ही नहीं कहा था?
  • समझ नहीं आया। gradient descent calculations बहुत बार होती हैं और state/input लगातार बदलते रहते हैं, तो फिर thermal landscape को बहुत बार initialize करना पड़ेगा—इसका क्या मतलब है? यहाँ speedup की संभावना दिखती ही नहीं
    इसके बजाय electromagnetic fields या उनकी interference, शायद 3D structures के साथ, कुछ किया जा सकता है
  • “analog thermodynamic computer चाहिए” तक तो ठीक लगा, फिर—रुको, क्या? अच्छा होगा अगर physics ठीक से पढ़ा कोई व्यक्ति समझा सके
    • पेपर का Appendix C काफी अच्छी तरह समझाता है। कई operational amplifiers, RC time constants (शायद digital potentiometers का इस्तेमाल), और PC से जुड़ने वाले multi-channel ADC/DAC interface से integrator matrix बनाया जाता है। मूल रूप से यह dedicated differential equation solver है
      इसलिए यह पुराने-style analog computing और modern GPU-based code का combination है। असल में hardware interface overhead और integrators के stable होने तक wait करने के time की वजह से यह ज्यादा समय लेता है, लेकिन मेरी समझ में दावा यह है कि optimized implementation convergence को accelerate करके pure digital solution से बेहतर हो सकता है। core idea यह है कि मौजूदा gradient descent मूलतः linear operations हैं, जबकि जिस gradient को वास्तव में follow किया जाता है वह curved surface है, इसलिए केवल digital domain में process करने पर उसे approximate करने के लिए अनावश्यक कई steps लेने पड़ते हैं। समस्या यह है कि Seymour Cray के बाद से बहुत लोगों ने मुश्किल से सीखा है कि आखिरकार CMOS हमेशा जीतता है। क्योंकि पूरी industry की funding CMOS optimization में लगती है
    • मेरी समझ के अनुसार https://extropic.ai ठीक यही कर रहा है, और पेपर authors की company https://normalcomputing.ai/ भी शायद यही कर रही है
    • natural laws का इस्तेमाल करके AI models को train करना, और digital hardware तथा मौजूदा training methods की limits और scaling problems से आगे निकलना ही core है
    • एक example quantum annealer हो सकता है। यहाँ “programming” का मतलब उचित initial conditions set करना और thermodynamic relaxation के जरिए optimum तक पहुँचने देना है
    • अगर ऐसा product बनाया जा सके तो यह आकर्षक हो सकता है। दुनिया भर में हर साल tens of billions of dollars, शायद उससे भी ज्यादा, numerical optimization पर खर्च होते हैं, और अगर इसे काफी accelerate किया जा सके तो यह बहुत profitable हो सकता है