SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2006.00719 · 2020

ADAHESSIAN: An Adaptive Second Order Optimizer for Machine Learning

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 11 functions out of this paper's own repositories and ran 5 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
amirgholami/adahessian canonical 4 of 9
morganmcg1/ImageNette_ImageWoof_ImageWang pwc_unofficial 1 of 2
FunctionStatusWhere it lives
average_sqr_diag_hessian Ran morganmcg1/ImageNette_ImageWoof_ImageWang/AdaHessian.py
code served (permissive licence) · get_code("387ee05bb55df246")
bn_relu Ran amirgholami/adahessian/adahessian_tf/Models/Resnets.py
code served (permissive licence) · get_code("8b69e8ab29b336b3")
conv3x3 Ran amirgholami/adahessian/image_classification/models/resnet.py
code served (permissive licence) · get_code("fac5364e2f53c6db")
get_params_grad Ran amirgholami/adahessian/image_classification/utils.py
code served (permissive licence) · get_code("de32ddb77d1b5144")
test Ran amirgholami/adahessian/image_classification/utils.py
code served (permissive licence) · get_code("beeda9e1db69fe81")
VGG Not yet run amirgholami/adahessian/adahessian_tf/Models/VGGs.py
code served (permissive licence) · get_code("dedf33bd0adc1f56")
adahessian_step Not yet run morganmcg1/ImageNette_ImageWoof_ImageWang/AdaHessian.py
code served (permissive licence) · get_code("6d822742f437ca1a")
conv_block Not yet run amirgholami/adahessian/adahessian_tf/Models/VGGs.py
code served (permissive licence) · get_code("6290891118db623e")
getData Not yet run amirgholami/adahessian/image_classification/utils.py
code served (permissive licence) · get_code("52e6b930397c2338")
original_block Not yet run amirgholami/adahessian/adahessian_tf/Models/Resnets.py
code served (permissive licence) · get_code("b13423aecaba1080")
shortcut Not yet run amirgholami/adahessian/adahessian_tf/Models/Resnets.py
code served (permissive licence) · get_code("0a1815a3309d2414")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

We introduce ADAHESSIAN, a second order stochastic optimization algorithm which dynamically incorporates the curvature of the loss function via ADAptive estimates of the HESSIAN. Second order algorithms are among the most powerful optimization algorithms with superior convergence properties as compared to first order methods such as SGD and Adam. The main disadvantage of traditional second order methods is their heavier per iteration computation and poor accuracy as compared to first order methods. To address these, we incorporate several novel approaches in ADAHESSIAN, including: (i) a fast Hutchinson based method to approximate the curvature matrix with low computational overhead; (ii) a root-mean-square exponential moving average to smooth out variations of the Hessian diagonal across different iterations; and (iii) a block diagonal averaging to reduce the variance of Hessian diagonal elements. We show that ADAHESSIAN achieves new state-of-the-art results by a large margin as compared to other adaptive optimization methods, including variants of Adam. In particular, we perform extensive tests on CV, NLP, and recommendation system tasks and find that ADAHESSIAN: (i) achieves 1.80%/1.45% higher accuracy on ResNets20/32 on Cifar10, and 5.55% higher accuracy on ImageNet as compared to Adam; (ii) outperforms AdamW for transformers by 0.13/0.33 BLEU score on IWSLT14/WMT14 and 2.7/1.0 PPL on PTB/Wikitext-103; (iii) outperforms AdamW for SqueezeBert by 0.41 points on GLUE; and (iv) achieves 0.032% better score than Adagrad for DLRM on the Criteo Ad Kaggle dataset. Importantly, we show that the cost per iteration of ADAHESSIAN is comparable to first order methods, and that it exhibits robustness towards its hyperparameters.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2006.00719")
get_code_for_paper("2006.00719")
have("2006.00719")

Connect an agent — have() is free.