SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2106.08208 · NeurIPS · 2021

SUPER-ADAM: Faster and Universal Framework of Adaptive Gradients

Feihu Huang, Heng Huang, Junyi Li

arXiv · PDF · Open in the Atlas

Code that ran

2 of 4 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 1 failure of our instrument; 2 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2106.08208.json · badge: /api/ran/2106.08208.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
lijunyi95/superadam canonical (classifier label)
classifier basis: classifier_2025
1 ran · 1 no recorded run
LIJUNYI95/SuperAdam canonical (classifier label)
classifier basis: census
1 ran · 1 no recorded run
FunctionStatusWhere it lives
SuperAdam Ran
ran on a synthesized input
lijunyi95/superadam/SuperAdam.py
code served (permissive licence) · get_code("cf1cff04ac96cd7d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned NoneType. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
from torch.optim.optimizer import Optimizer
from torch import Tensor
import math
from typing import List

def superadam(params: List[Tensor], grads: List[Tensor], exp_avgs: List[Tensor], exp_avg_sqs: List[Tensor], grad_norm_sum: List[Tensor], state_steps: List[int], glob_H: bool, coord_glob_H: bool, tau: bool, beta: float, k: float, c: float, m: float, gamma: float, eps: float):
    for i, param in enumerate(params):
        grad = grads[i]
        exp_avg_sq = exp_avg_sqs[i]
        exp_avg_sq.mul_(beta).addcmul_(grad, grad, value=1 - beta)
    if coord_glob_H:
        exp_avg_sq_norm = torch.norm(torch.cat([g.sqrt().reshape(-1) for g in exp_avg_sqs]))
    if glob_H:
        grad_norm = torch.norm(torch.cat([g.reshape(-1) for g in params]))
    for i, param in enumerate(params):
        grad = grads[i]
        exp_avg = exp_avgs[i]
        exp_avg_sq = exp_avg_sqs[i]
        step = state_steps[i]
        if not tau:
            exp_avg.add_(grad)
        else:
            eta = k / (m + step) ** (1 / 2)
            alpha = c * eta
            exp_avg.mul_(1 - alpha).add_(grad, alpha=alpha)
        bias_correction2 = 1 - beta ** step
        if glob_H:
            g_sum = grad_norm_sum[i]
            g_sum.mul_(beta).add_(grad_norm ** 2, value=1 - beta)
            denom = g_sum.sqrt().add_(eps)
        elif coord_glob_H:
            denom = exp_avg_sq_norm.add_(eps)
        else:
            denom = (exp_avg_sq.sqrt() / math.sqrt(bias_correction2)).add_(eps)
        if not tau:
            eta = gamma * k / (m + step) ** (1 / 3)
        else:
            eta = gamma * k / (m + step) ** (1 / 2)
        param.addcdiv_(exp_avg, denom, value=-eta)
    return

class SuperAdam(Optimizer):
    """Implements SuperAdam Optimizer."""

    def __init__(self, params, tau=False, gamma=0.01, k=0.001, m=100, c=5, beta=0.999, eps=0.001, glob_H=False, coord_glob_H=False):
        defaults = dict(tau=tau, k=k, beta=beta, eps=eps, c=c, m=m, gamma=gamma, glob_H=glob_H, coord_glob_H=coord_glob_H)
        super(SuperAdam, self).__init__(params, defaults)

    def __setstate__(self, state):
        super(SuperAdam, self).__setstate__(state)
        for group in self.param_groups:
            group.setdefault('amsgrad', False)

    @torch.no_grad()
    def step(self):
        """Performs a single optimization step."""
        for group in self.param_groups:
            params_with_grad = []
            grads = []
            exp_avgs = []
            exp_avg_sqs = []
            grad_norm_sum = []
            state_steps = []
            for p in group['params']:
                if p.grad is not None:
                    params_with_grad.append(p)
                    if p.grad.is_sparse:
                        raise RuntimeError('Super-Adam does not support sparse gradients')
                    grads.append(p.grad)
                    state = self.state[p]
                    if len(state) == 0:
                        state['step'] = 0
                        state['exp_avg'] = torch.zeros_like(p, memory_format=torch.preserve_format)
                        state['exp_avg_sq'] = torch.zeros_like(p, memory_format=torch.preserve_format)
                        state['grad_norm_sum'] = torch.zeros_like(p, memory_format=torch.preserve_format)
                    exp_avgs.append(state['exp_avg'])
                    exp_avg_sqs.append(state['exp_avg_sq'])
                    grad_norm_sum.append(state['grad_norm_sum'])
                    state['step'] += 1
                    state_steps.append(state['step'])
            
            superadam(params_with_grad, grads, exp_avgs, exp_avg_sqs, grad_norm_sum, state_steps,
                     group['glob_H'], group['coord_glob_H'], group['tau'], group['beta'],
                     group['k'], group['c'], group['m'], group['gamma'], group['eps'])


INIT_ARGS = {
    'params': [torch.nn.Parameter(torch.randn(4, 3)), torch.nn.Parameter(torch.randn(3, 2))],
    'tau': False,
    'gamma': 0.01,
    'k': 0.001,
    'm': 100,
    'c': 5,
    'beta': 0.999,
    'eps': 0.001,
    'glob_H': False,
    'coord_glob_H': False
}

ARGS = {}

METHOD = 'step'

if __name__ == '__main__':
    optimizer = SuperAdam(**INIT_ARGS)
    
    for param in optimizer.param_groups[0]['params']:
        param.grad = torch.randn_like(param)
    
    optimizer.step()
    print("SuperAdam step executed successfully")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type NoneType — a NoneType output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a NoneType output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
format_time Ran
ran; our contract draft was wrong, not the code
LIJUNYI95/SuperAdam/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from JunlinHan/YOCO, is pointer only (licence: NONE) · get_code("8d7ec010c29e813b")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from JunlinHan/YOCO, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_mean_and_std Not yet run
unverified (harvested, no recorded run)
LIJUNYI95/SuperAdam/utils.py
code served (permissive licence) · get_code("7bd3a77007a65eec")
How it ran

no invocation recorded.

superadam Not yet run
unverified (harvested, no recorded run)
lijunyi95/superadam/SuperAdam.py
code served (permissive licence) · get_code("750c06d20dcd9da0")
How it ran

no invocation recorded.

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 2 the same month, 2 later) and 2 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
format_time 37 other papers
15 dated earlier, 2 the same month, 20 later
1603.05027 (2016-03)
Identity Mappings in Deep Residual Networks
1605.07146 (2016-05)
Wide Residual Networks
1805.11327 (2018-05)
Lightweight Probabilistic Deep Networks
and 34 more not named here
get_mean_and_std 18 other papers
9 dated earlier, 2 the same month, 7 later
1603.05027 (2016-03)
Identity Mappings in Deep Residual Networks
1605.07146 (2016-05)
Wide Residual Networks
1805.11327 (2018-05)
Lightweight Probabilistic Deep Networks
and 15 more not named here

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

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

Abstract

Adaptive gradient methods have shown excellent performances for solving many machine learning problems. Although multiple adaptive gradient methods were recently studied, they mainly focus on either empirical or theoretical aspects and also only work for specific problems by using some specific adaptive learning rates. Thus, it is desired to design a universal framework for practical algorithms of adaptive gradients with theoretical guarantee to solve general problems. To fill this gap, we propose a faster and universal framework of adaptive gradients (i.e., SUPER-ADAM) by introducing a universal adaptive matrix that includes most existing adaptive gradient forms. Moreover, our framework can flexibly integrate the momentum and variance reduced techniques. In particular, our novel framework provides the convergence analysis support for adaptive gradient methods under the nonconvex setting. In theoretical analysis, we prove that our SUPER-ADAM algorithm can achieve the best known gradient (i.e., stochastic first-order oracle (SFO)) complexity of Õ( -3 ) for finding an -stationary point of nonconvex optimization, which matches the lower bound for stochastic smooth nonconvex optimization. In numerical experiments, we employ various deep learning tasks to validate that our algorithm consistently outperforms the existing adaptive algorithms. Code is available at https://github.com/LIJUNYI95/SuperAdam

For agents

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

get_harvested_code_for_paper("2106.08208")
get_code_for_paper("2106.08208")
have("2106.08208")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2106.08208.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2106.08208.svg)](https://syntology.ai/paper/2106.08208)

Connect an agent — have() is free.