“通过Hessian-free优化深度学习
- 格式:pdf
- 大小:137.26 KB
- 文档页数:8
JamesMartensJMARTENS@CS.TORONTO.EDU
UniversityofToronto,Ontario,M5S1A1,Canada
AbstractWedevelopa2nd-orderoptimizationmethodbasedonthe“Hessian-free”approach,andapplyittotrainingdeepauto-encoders.Withoutusingpre-training,weobtainresultssuperiortothosereportedbyHinton&Salakhutdinov(2006)onthesametaskstheyconsidered.Ourmethodispractical,easytouse,scalesnicelytoverylargedatasets,andisn’tlimitedinapplicabilitytoauto-encoders,oranyspecificmodelclass.Wealsodiscusstheissueof“pathologicalcurvature”asapossibleexplanationforthedifficultyofdeep-learningandhow2nd-orderoptimization,andourmethodinparticular,effectivelydealswithit.
1.IntroductionLearningtheparametersofneuralnetworksisperhapsoneofthemostwellstudiedproblemswithinthefieldofma-chinelearning.Earlyworkonbackpropagationalgorithmsshowedthatthegradientoftheneuralnetlearningobjectivecouldbecomputedefficientlyandusedwithinagradient-descentschemetolearntheweightsofanetworkwithmul-tiplelayersofnon-linearhiddenunits.Unfortunately,thistechniquedoesn’tseemtogeneralizewelltonetworksthathaveverymanyhiddenlayers(i.e.deepnetworks).Thecommonexperienceisthatgradient-descentprogressesex-tremelyslowlyondeepnets,seemingtohaltaltogetherbe-foremakingsignificantprogress,resultinginpoorperfor-manceonthetrainingset(under-fitting).
Itiswellknownwithintheoptimizationcommunitythatgradientdescentisunsuitableforoptimizingobjectivesthatexhibitpathologicalcurvature.2nd-orderoptimizationmethods,whichmodelthelocalcurvatureandcorrectforit,havebeendemonstratedtobequitesuccessfulonsuchobjectives.Thereareevensimple2DexamplessuchastheRosenbrockfunctionwherethesemethodscandemonstrateconsiderableadvantagesovergradientdescent.Thusitisreasonabletosuspectthatthedeeplearningproblemcouldberesolvedbytheapplicationofsuchtechniques.Unfortu-DeeplearningviaHessian-freeoptimization2pBp(1)whereB=H(θ)istheHessianmatrixoffatθ.Find-ingagoodsearchdirectionthenreducestominimizingthisquadraticwithrespecttop.ComplicatingthisideaisthatHmaybeindefinitesothisquadraticmaynothaveamini-mum,andmoreoverwedon’tnecessarilytrustitasanap-proximationoffforlargevaluesofp.ThusinpracticetheHessianis“damped”orre-conditionedsothatB=H+λIforsomeconstantλ≥0.
2.1.ScalingandcurvatureAnimportantpropertyofNewton’smethodis“scaleinvari-ance”.Bythiswemeanthatitbehavesthesameforanylinearrescalingoftheparameters.Tobetechnicallypre-cise,ifweadoptanewparameterizationˆθ=AθforsomeinvertiblematrixA,thentheoptimalsearchdirectioninthenewparameterizationisˆp=Apwherepistheoriginaloptimalsearchdirection.Bycontrast,thesearchdirectionproducedbygradientdescenthastheoppositeresponsetolinearre-parameterizations:ˆp=A−p.Scaleinvarianceisimportantbecause,withoutit,poorlyscaledparameterswillbemuchhardertooptimize.Italsoeliminatestheneedtotweaklearningratesforindividualparametersand/orannealgloballearning-ratesaccordingtoarbitraryschedules.Moreover,thereisanimplicit“scal-ing”whichvariesovertheentireparameterspaceandisdeterminedbythelocalcurvatureoftheobjectivefunction.Figure1.OptimizationinalongnarrowvalleyBytakingthecurvatureinformationintoaccount(intheformoftheHessian),Newton’smethodrescalesthegradi-entsoitisamuchmoresensibledirectiontofollow.Intuitively,ifthecurvatureislow(andpositive)inapar-ticulardescentdirectiond,thismeansthatthegradientoftheobjectivechangesslowlyalongd,andsodwillremainadescentdirectionoveralongdistance.Itisthussensi-bletochooseasearchdirectionpwhichtravelsfaralongd(i.e.bymakingpdlarge),eveniftheamountofreduc-tionintheobjectiveassociatedwithd(givenby−∇fd)isrelativelysmall.Similarlyifthecurvatureassociatedwithdishigh,thenitissensibletochoosepsothatthedis-tancetraveledalongdissmaller.Newton’smethodmakesthisintuitionrigorousbycomputingthedistancetomovealongdasitsreductiondividedbyitsassociatedcurvature:−∇fd/dHd.Thisispreciselythepointalongdafterwhichfispredictedby(1)tostartincreasing.Notaccountingforthecurvaturewhencomputingsearchdirectionscanleadtomanyundesirablescenarios.First,thesequenceofsearchdirectionsmightconstantlymovetoofarindirectionsofhighcurvature,causinganunstable“bouncing”behaviorthatisoftenobservedwithgradientdescentandisusuallyremediedbydecreasingthelearningrate.Second,directionsoflowcurvaturewillbeexploredmuchmoreslowlythantheyshouldbe,aproblemexacer-batedbyloweringthelearningrate.Andiftheonlydirec-tionsofsignificantdecreaseinfareonesoflowcurvature,theoptimizationmaybecometooslowtobepracticalandevenappeartohaltaltogether,creatingthefalseimpressionofalocalminimum.Itisourtheorythattheunder-fittingproblemencounteredwhenoptimizingdeepnetsusing1st-ordertechniquesismostlyduetosuchtechniquesbecom-ingtrappedinsuchfalselocalminima.