SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2002.05202 · 2020

GLU Variants Improve Transformer

Noam Shazeer

arXiv · PDF · Open in the Atlas

Code that ran

9 of 9 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, 4 violated it and 0 have no contract verdict; 2 failures of our instrument; 0 no recorded run), measured 2026-11-21; 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/2002.05202.json · badge: /api/ran/2002.05202.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
copy not recorded community
not in the paper's declared repositories
7 ran · 0 no recorded run
lucidrains/sinkhorn-transformer extension (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
FunctionStatusWhere it lives
always Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from lucidrains/linear-attention-transformer
pointer only · get_code("dd3db53ae7ad1c85")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

cast_tuple Ran
ran, violated the contract we drafted
this paper's copy was not recorded; identical code first harvested from lucidrains/compressive-transformer-pytorch
pointer only · get_code("369eced62e96d690")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

cast_tuple Ran
ran, honoured the contract we drafted
lucidrains/sinkhorn-transformer/sinkhorn_transformer/sinkhorn_transformer.py
code served (permissive licence) · get_code("e0b73c0c3c680d31")
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 tuple, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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)

# The function cast_tuple takes a single parameter 'x' and returns it as a tuple
# if it's not already a tuple, or returns it unchanged if it is a tuple.
# We need to test both cases.

# Test case 1: x is not a tuple (e.g., an integer, string, tensor, list, etc.)
x_not_tuple = 42

ARGS = {
    "x": x_not_tuple
}
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 tuple, ndim 1, dtype family int — a tuple output has no array shape of its own; none is stated
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
default Ran
ran, violated the contract we drafted
this paper's copy was not recorded; identical code first harvested from lucidrains/compressive-transformer-pytorch
pointer only · get_code("a1bda7590dd9a4d2")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

default Ran
ran, violated the contract we drafted
this paper's copy was not recorded; identical code first harvested from lucidrains/linear-attention-transformer
pointer only · get_code("b5307f70349f5c27")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

default Ran
ran, honoured the contract we drafted
lucidrains/sinkhorn-transformer/sinkhorn_transformer/sinkhorn_transformer.py
code served (permissive licence) · get_code("ebbe83e33bdee406")
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
from inspect import isfunction

torch.manual_seed(0)

def ARGS_default_x():
    """A callable that returns a default value"""
    return 42

def ARGS_default_static():
    """A static default value"""
    return "default_value"

# Test case 1: x is None, d is a static value
ARGS = {
    "x": None,
    "d": 100
}
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
exists Ran
ran, violated the contract we drafted
this paper's copy was not recorded; identical code first harvested from ThomasMrY/VCT
pointer only; the stored copy get_code serves, from ThomasMrY/VCT, is pointer only (licence: NONE) · get_code("aa5486a3650902d8")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

identity Ran
ran, honoured the contract we drafted
this paper's copy was not recorded; identical code first harvested from lucidrains/marge-pytorch
pointer only · get_code("caeb28d34b34bc2a")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

to Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from lucidrains/compressive-transformer-pytorch
pointer only · get_code("7417c98099ec4e15")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 9 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 1 the same month, 7 later) and 0 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
exists 486 other papers
12 dated earlier, 2 the same month, 470 later, 2 undated · 78 only as an assembly brick
1603.08155 (2016-03)
Perceptual Losses for Real-Time Style Transfer and Super-Resolution
1611.07004 (2016-11)
Image-to-Image Translation with Conditional Adversarial Networks
1804.04637 (2018-04)
EMBER: An Open Dataset for Training Static PE Malware Machine Learning Models
and 483 more not named here
cast_tuple 5 other papers
3 dated earlier, 2 later · 1 only as an assembly brick
1812.01243 (2018-12)
Efficient Attention: Attention with Linear Complexities
1910.06764 (2019-10)
Stabilizing Transformers for Reinforcement Learning
1911.05507 (2019-11)
Compressive Transformers for Long-Range Sequence Modelling
and 2 more not named here
identity 5 other papers
1 dated earlier, 4 later
1912.11554 (2019-12)
Composable Effects for Flexible and Accelerated Probabilistic Programming in NumPyro
2003.05997 (2020-03)
Efficient Content-Based Sparse Attention with Routing Transformers
2006.04768 (2020-06)
Linformer: Self-Attention with Linear Complexity
and 2 more not named here
default 4 other papers
1 dated earlier, 3 later
1812.01243 (2018-12)
Efficient Attention: Attention with Linear Complexities
2006.16236 (2020-06)
Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
2303.11249 (2023-03)
What Makes Data Suitable for a Locally Connected Neural Network? A Necessary and Sufficient Condition Based on Quantum Entanglement
and 1 more not named here
default 3 other papers
3 dated earlier
1812.01243 (2018-12)
Efficient Attention: Attention with Linear Complexities
1910.06764 (2019-10)
Stabilizing Transformers for Reinforcement Learning
1911.05507 (2019-11)
Compressive Transformers for Long-Range Sequence Modelling
to 3 other papers
3 dated earlier
1812.01243 (2018-12)
Efficient Attention: Attention with Linear Complexities
1910.06764 (2019-10)
Stabilizing Transformers for Reinforcement Learning
1911.05507 (2019-11)
Compressive Transformers for Long-Range Sequence Modelling
always 2 other papers
1 dated earlier, 1 later
1812.01243 (2018-12)
Efficient Attention: Attention with Linear Complexities
2006.16236 (2020-06)
Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
cast_tuple 1 other paper
1 later
2108.12630 (2021-08)
GroupFormer: Group Activity Recognition with Clustered Spatial-Temporal Transformer
default 1 other paper
1 later
2108.12630 (2021-08)
GroupFormer: Group Activity Recognition with Clustered Spatial-Temporal Transformer

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

Repositories linked to this paper

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

Abstract

Gated Linear Units [Dauphin et al., 2016] consist of the component-wise product of two linear projections, one of which is first passed through a sigmoid function. Variations on GLU are possible, using different nonlinear (or even linear) functions in place of sigmoid. We test these variants in the feedforward sublayers of the Transformer [Vaswani et al., 2017] sequence-to-sequence model, and find that some of them yield quality improvements over the typically-used ReLU or GELU activations.

For agents

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

get_harvested_code_for_paper("2002.05202")
get_code_for_paper("2002.05202")
have("2002.05202")

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

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

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

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

Connect an agent — have() is free.