SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2502.21309 · NeurIPS · 2025

Reasoning is Periodicity? Improving Large Language Models Through Effective Periodicity Modeling

Jia Li, Hao Zhu, Ge Li, Kechi Zhang, Xue Jiang, Yihong Dong, Yongding Tao, Jinliang Deng, Huanyu Liu, Jiazheng Ding, Hong Mei

arXiv · PDF · Open in the Atlas

Code that ran

2 of 3 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 0 have no contract verdict; 2 failures of our instrument; 1 no recorded run), measured 2026-11-24; 2 contract verdicts on these samples were measured on the host before the contract probe was jailed (2026-09-18T14:29:13Z) or are undated; 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/2502.21309.json · badge: /api/ran/2502.21309.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
YihongDong/FANformer canonical (classifier label)
classifier basis: classifier_2025
2 ran · 1 no recorded run
FunctionStatusWhere it lives
activation_checkpoint_function Ran
ran; our contract draft was wrong, not the code
YihongDong/FANformer/olmo/model.py
code served (permissive licence) · get_code("efa1d877de0e24c2")
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) and returned partial. 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 functools import partial

torch.manual_seed(0)

class ModelConfig:
    def __init__(self, attention_dropout=0.1, embedding_dropout=0.1, residual_dropout=0.1):
        self.attention_dropout = attention_dropout
        self.embedding_dropout = embedding_dropout
        self.residual_dropout = residual_dropout

cfg = ModelConfig(
    attention_dropout=0.1,
    embedding_dropout=0.1,
    residual_dropout=0.1
)

ARGS = {
    "cfg": cfg
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type partial — a partial output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a partial 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
causal_attention_bias Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
YihongDong/FANformer/olmo/model.py
code served (permissive licence) · get_code("8eb82bd106525d67")
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) and returned Tensor, ndim 4, dtype family float, shape (1, 1, 5, 5) 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 = {
    "seq_len": 5,
    "device": torch.device("cpu"),
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (1, 1, 5, 5) — shape (1, 1, 5, 5) 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
should_checkpoint_block Not yet run
unverified (harvested, no recorded run)
YihongDong/FANformer/olmo/model.py
code served (permissive licence) · get_code("bf036aa619ce406c")
How it ran

no invocation recorded.

Also present in other papers' code

Of 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 3 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 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
causal_attention_bias 16 other papers
5 dated earlier, 11 later
2406.10670 (2024-06)
CoLoR-Filter: Conditional Loss Reduction Filtering for Targeted Language Model Pre-training
2409.17146 (2024-09)
Molmo and PixMo: Open Weights and Open Data for State-of-the-Art Vision-Language Models
2410.01380 (2024-10)
Knowledge Entropy Decay during Language Model Pretraining Hinders New Knowledge Acquisition
and 13 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-24.

Repositories linked to this paper

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

Abstract

Periodicity, as one of the most important basic characteristics, lays the foundation for facilitating structured knowledge acquisition and systematic cognitive processes within human learning paradigms. However, the potential flaws of periodicity modeling in Transformer affect the learning efficiency and establishment of underlying principles from data for large language models (LLMs) built upon it. In this paper, we demonstrate that integrating effective periodicity modeling can improve the learning efficiency and performance of LLMs. We introduce FANformer, which adapts Fourier Analysis Network (FAN) into attention mechanism to achieve efficient periodicity modeling, by modifying the feature projection process of attention mechanism. Extensive experimental results on language modeling show that FANformer consistently outperforms Transformer when scaling up model size and training tokens, underscoring its superior learning efficiency. Our pretrained FANformer-1B exhibits marked improvements on downstream tasks compared to open-source LLMs with similar model parameters or training tokens. Moreover, we reveal that FANformer exhibits superior ability to learn and apply rules for reasoning compared to Transformer. The results position FANformer as an effective and promising architecture for advancing LLMs. Our code is available at https://github.com/YihongDong/FANformer.. We propose FANformer, a novel LLM architecture, which uses a simple yet effective approach to adapt FAN into attention mechanism for efficient periodicity modeling, consistently outperforming Transformers in scaling model parameters and training tokens. ❸ We pretrain and open-source FANformer-1B, which surpasses SOTA publicly available LLMs with similar parameter counts or training token budgets on downstream tasks. In this section, we combine formalization with illustrative cases to demonstrate why periodicity modeling facilitates language modeling and reasoning, thereby elucidating the motivation behind the development of FANformer. The essence of periodicity lies in the repetitive manifestation of certain invariance under transformations, which can be strictly defined through invariance under group actions in Abstract Algebra Dummit and Foote [2004]. Let X be a set and G be a group acting on X. An element x ∈ X is said to be periodic with respect to the action of G if there exists a non-identity element p ∈ G such that p • x = x, where • denotes the group action. The element p is called a period of x. Periodicity implies that x is invariant under the action of the cyclic subgroup generated by p, denoted by ⟨p⟩. For example, f (a) = f (a + T ) can be seen as a specific instance of the abstract definition p • x = x, where x = f , p = T , and the group action is translation. When the input a and the group G are extended to higher dimensions or non-temporal domains, the manifestation of the period T also changes accordingly. Crucially, for many reasoning tasks, the underlying operation or inference rule remains invariant across structurally similar subproblems, that is, for all inputs belonging to a certain equivalence class, the same functional rule is applied, which precisely reflects periodic invariance. Consider addition as an illustrative case: let f represent the addition operation, a denote the digit position index, and let the period T = 1 correspond to the positional shift in place value. The reasoning proceeds as:

For agents

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

get_harvested_code_for_paper("2502.21309")
get_code_for_paper("2502.21309")
have("2502.21309")

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

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

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

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

Connect an agent — have() is free.