SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2607.16268 · 2026

PsiLogic: Chaos-Aware Active Cancellation for Adam with a Fair Cross-Domain Benchmark

Ali Sultonov

arXiv · PDF · Open in the Atlas

Code that ran

7 of 14 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; 3 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 4 failures of our instrument; 7 no recorded run), measured 2026-11-23; 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/2607.16268.json · badge: /api/ran/2607.16268.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
Troxter222/psilogic canonical (classifier label)
classifier basis: census
7 ran · 7 no recorded run
FunctionStatusWhere it lives
apply_preset Ran
ran; our contract draft was wrong, not the code
Troxter222/psilogic/psilogic/presets.py
code served (permissive licence) · get_code("51f22ebe5a49e424")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was 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 typing import Any

torch.manual_seed(0)

# The function takes two main dict arguments and an optional drop tuple
# Let's construct valid arguments

# Create a kwargs dict - this is the dict we're setting defaults on
kwargs = {
    "learning_rate": 0.001,
    "batch_size": 32,
}

# Create a preset dict - this contains default values to apply
preset = {
    "learning_rate": 0.01,  # Will not override since already in kwargs
    "weight_decay": 0.0001,  # Will be added to kwargs
    "gamma_T_max": 100,  # Will be dropped
    "use_foreach": True,  # Will be dropped
    "momentum": 0.9,  # Will be added to kwargs
}

# Create the drop tuple - keys to skip when applying preset
drop = ("gamma_T_max", "use_foreach")

ARGS = {
    "kwargs": kwargs,
    "preset": preset,
    "drop": drop,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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: none by the harness; any seed is in the setup block
auto_gamma Ran
ran, honoured the contract we drafted
Troxter222/psilogic/psilogic/_chaos.py
code served (permissive licence) · get_code("3df4cfa235f42569")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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

torch.manual_seed(0)

ARGS = {
    "slow_t": torch.tensor(0.05),
    "step": 10,
    "gamma_base": 0.1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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: none by the harness; any seed is in the setup block
build_latex_table Ran
ran; our contract draft was wrong, not the code
Troxter222/psilogic/benchmark/fairbench/analysis.py
code served (permissive licence) · get_code("62c9f93ebf17e2ca")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was 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 csv
import os
import tempfile
from pathlib import Path

# Create a temporary directory for test files
temp_dir = tempfile.mkdtemp()

# Create aggregate.csv with test data
aggregate_data = [
    {
        'arena': 'CartPole',
        'optimizer': 'adam',
        'metric_mean': '0.85',
        'metric_std': '0.05'
    },
    {
        'arena': 'CartPole',
        'optimizer': 'psilogic',
        'metric_mean': '0.90',
        'metric_std': '0.03'
    },
    {
        'arena': 'CartPole',
        'optimizer': 'sgd',
        'metric_mean': '0.80',
        'metric_std': '0.07'
    },
    {
        'arena': 'Pendulum',
        'optimizer': 'adam',
        'metric_mean': '0.75',
        'metric_std': '0.08'
    },
    {
        'arena': 'Pendulum',
        'optimizer': 'psilogic',
        'metric_mean': '0.78',
        'metric_std': '0.04'
    },
    {
        'arena': 'Pendulum',
        'optimizer': 'sgd',
        'metric_mean': '0.72',
        'metric_std': '0.09'
    }
]

aggregate_path = os.path.join(temp_dir, 'aggregate.csv')
with open(aggregate_path, 'w', newline='', encoding='utf-8') as f:
    writer = csv.DictWriter(f, fieldnames=['arena', 'optimizer', 'metric_mean', 'metric_std'])
    writer.writeheader()
    writer.writerows(aggregate_data)

# Create significance.csv with test data
significance_data = [
    {
        'arena': 'CartPole',
        'metric': 'final_metric',
        'baseline': 'adam',
        'p_value': '0.02'
    },
    {
        'arena': 'CartPole',
        'metric': 'final_metric',
        'baseline': 'sgd',
        'p_value': '0.008'
    },
    {
        'arena': 'Pendulum',
        'metric': 'final_metric',
        'baseline': 'adam',
        'p_value': '0.15'
    },
    {
        'arena': 'Pendulum',
        'metric': 'final_metric',
        'baseline': 'sgd',
        'p_value': '0.03'
    }
]

significance_path = os.path.join(temp_dir, 'significance.csv')
with open(significance_path, 'w', newline='', encoding='utf-8') as f:
    writer = csv.DictWriter(f, fieldnames=['arena', 'metric', 'baseline', 'p_value'])
    writer.writeheader()
    writer.writerows(significance_data)

ARGS = {
    'output_dir': temp_dir,
    'metric': 'metric',
    'lower_is_better': True,
    'reference': 'psilogic'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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: none by the harness; any seed is in the setup block
effective_warmup Ran
ran, honoured the contract we drafted
Troxter222/psilogic/psilogic/_chaos.py
code served (permissive licence) · get_code("c855bed0089376df")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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.

# Setup code for effective_warmup function

ARGS = {
    "step": 100,
    "total_steps": 1000,
    "base_warmup": -1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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: none by the harness; any seed is in the setup block
layer_norms Ran
ran; our contract draft was wrong, not the code
Troxter222/psilogic/psilogic/debug.py
code served (permissive licence) · get_code("813a66b26b78b305")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was 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

torch.manual_seed(0)

# Create a simple model with named parameters
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

model = SimpleModel()

ARGS = {
    "model": model
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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: none by the harness; any seed is in the setup block
nlp_defaults Ran
ran; our contract draft was wrong, not the code
Troxter222/psilogic/psilogic/presets.py
code served (permissive licence) · get_code("d0db2bfc3ee1df51")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was 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

torch.manual_seed(0)

ARGS = {
    'total_steps': 1000
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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: none by the harness; any seed is in the setup block
resolve_warmup Ran
ran, honoured the contract we drafted
Troxter222/psilogic/psilogic/_chaos.py
code served (permissive licence) · get_code("39076ef82bbdec9f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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

torch.manual_seed(0)

# Test case 1: warmup_cfg >= 0 (explicit warmup value)
ARGS_1 = {
    "warmup_cfg": 100,
    "total_steps": 5000
}

# Test case 2: warmup_cfg == -1 with large total_steps
ARGS_2 = {
    "warmup_cfg": -1,
    "total_steps": 10000
}

# Test case 3: warmup_cfg == -1 with small total_steps (uses floor)
ARGS_3 = {
    "warmup_cfg": -1,
    "total_steps": 1000
}

# Test case 4: warmup_cfg == -1 with total_steps == 0 (uses fallback)
ARGS_4 = {
    "warmup_cfg": -1,
    "total_steps": 0
}

# Use the most general test case
ARGS = ARGS_2
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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: none by the harness; any seed is in the setup block
as_fairbench_kwargs Not yet run
unverified (harvested, no recorded run)
Troxter222/psilogic/psilogic/presets.py
code served (permissive licence) · get_code("aedcdee501da691f")
How it ran

no invocation recorded.

gpt_param_groups Not yet run
unverified (harvested, no recorded run)
Troxter222/psilogic/psilogic/param_groups.py
code served (permissive licence) · get_code("fa97e00f150e4e80")
How it ran

no invocation recorded.

infer_architecture Not yet run
unverified (harvested, no recorded run)
Troxter222/psilogic/psilogic/convenience.py
code served (permissive licence) · get_code("7038130c0b4e1f05")
How it ran

no invocation recorded.

launch_leader_sums Not yet run
unverified (harvested, no recorded run)
Troxter222/psilogic/psilogic/_cuda/kernels.py
code served (permissive licence) · get_code("c002465b34a42a92")
How it ran

no invocation recorded.

launch_multi_fused_step Not yet run
unverified (harvested, no recorded run)
Troxter222/psilogic/psilogic/_cuda/kernels.py
code served (permissive licence) · get_code("156644cfc76fd26c")
How it ran

no invocation recorded.

main Not yet run
unverified (harvested, no recorded run)
Troxter222/psilogic/benchmark_nlp_5000_psilogic.py
code served (permissive licence) · get_code("4055d49d30e44912")
How it ran

no invocation recorded.

vit_param_groups Not yet run
unverified (harvested, no recorded run)
Troxter222/psilogic/psilogic/param_groups.py
code served (permissive licence) · get_code("42546ac4c1b335c3")
How it ran

no invocation recorded.

Also present in other papers' code

Of 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 14 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 14 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.

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-23.

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 optimizers such as Adam and AdamW apply the same update rule regardless of whether training is in a chaotic early phase or near convergence. We introduce PsiLogic (ΨLogic), an optimizer that augments Adam with a dynamic Active Cancellation Term gated by a dual exponential moving average (EMA) of scale-normalized gradient norms. The resulting chaos detector strengthens damping when gradient statistics are unstable and fades to zero as training stabilizes, providing an implicit warmup without a hand-tuned schedule. We evaluate PsiLogic against Adam, AdamW, and Lion using FairBench-a reproducible benchmark protocol with per-optimizer learning-rate sweeps, identical initialization per seed, and Welch t-tests. On an NVIDIA H100 80GB reference run (4 arenas, 3 seeds, 2000 steps, bf16 AMP), PsiLogic achieves the best validation metric in three of four arenas: NLP perplexity 7.79 ± 0.18 vs. 8.17 ± 0.08 (AdamW, p = 0.049), ViT top-1 accuracy 0.244 ± 0.006 vs. 0.223 ± 0.002 (AdamW, p = 0.015), and ResNet top-1 accuracy 0.222 ± 0.001 vs. 0.172 ± 0.004 (Adam, p = 0.001). On diffusion, validation MSE is statistically tied with Adam/AdamW (p = 0.49). ResNet accuracy vs. AdamW is a numerical tie without significance at three seeds (p = 0.44). Peak GPU memory is comparable across optimizers; PsiLogic incurs 1.2-1.8× wall-clock overhead on transformer-heavy arenas (implementation-bound; Section 6). We release an open-source PyTorch implementation, the full FairBench harness, and all raw CSV outputs to support independent verification.

For agents

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

get_harvested_code_for_paper("2607.16268")
get_code_for_paper("2607.16268")
have("2607.16268")

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

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

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

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

Connect an agent — have() is free.