SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2102.09407 · 2021

Adaptive Rational Activations to Boost Deep Reinforcement Learning

arXiv · PDF · Open in the Atlas

Code that ran

6 of 6 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; 6 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/2102.09407.json · badge: /api/ran/2102.09407.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
k4ntz/activation-functions canonical (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
copy not recorded community
not in the paper's declared repositories
3 ran · 0 no recorded run
FunctionStatusWhere it lives
Rational_PYTORCH_A_F Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
this paper's copy was not recorded; identical code first harvested from ml-research/rational_activations
pointer only · get_code("39ec3d1f9d97cc5c")
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.

Rational_PYTORCH_A_F Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
k4ntz/activation-functions/activations/torch/rationals/rational_pytorch_functions.py
code served (permissive licence) · get_code("6e9f17d4218ef85b")
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 2, dtype family float, shape (2, 4) 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)

# Create small input tensor
x = torch.randn(2, 4)

# Create weight tensors for numerator and denominator
weight_numerator = torch.tensor([0.5, 0.3, 0.2])
weight_denominator = torch.tensor([0.1, 0.4])

# training flag
training = True

ARGS = {
    "x": x,
    "weight_numerator": weight_numerator,
    "weight_denominator": weight_denominator,
    "training": training
}
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 2, dtype family float, shape (2, 4) — shape (2, 4) 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
Rational_PYTORCH_B_F Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
this paper's copy was not recorded; identical code first harvested from ml-research/rational_activations
pointer only · get_code("15a510212432a6c3")
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.

Rational_PYTORCH_B_F Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
k4ntz/activation-functions/activations/torch/rationals/rational_pytorch_functions.py
code served (permissive licence) · get_code("b2ce1b13b9074606")
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 2, dtype family float, shape (2, 4) 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)

# Analyze the function:
# - x: tensor that gets viewed as 1D, then reshaped back to original shape
# - weight_numerator: list/sequence, len() is called on it
# - weight_denominator: list/sequence, len() is called on it
# - training: boolean flag (not used in function body, but part of signature)

# Create a small input tensor
x = torch.randn(2, 4)

# weight_numerator and weight_denominator are used as:
# - len() is called on them
# - they are multiplied element-wise with xps (via .mul())
# - they are summed
# So they should be 1D tensors or lists of scalars

# Looking at xps construction:
# - xps starts with [z], then appends z^2, z^3, etc.
# - max(len_numerator, len_denominator + 1) - 2 iterations
# - then inserts ones at position 0
# - final shape is (z.numel(), max(len_numerator, len_denominator + 1))

# For numerator: xps.mul(weight_numerator).sum(1)
# This means weight_numerator should have shape matching xps columns
# For denominator: xps[:, 1:len_deno + 1].mul(weight_denominator).sum(1)
# This means weight_denominator should have shape matching the slice

len_num = 3
len_deno = 2

# xps will have shape (z.numel(), max(3, 2+1)) = (8, 3)
# weight_numerator needs 3 elements
# weight_denominator needs 2 elements

weight_numerator = torch.tensor([0.5, 0.3, 0.2])
weight_denominator = torch.tensor([0.1, 0.4])

training = True

ARGS = {
    "x": x,
    "weight_numerator": weight_numerator,
    "weight_denominator": weight_denominator,
    "training": training,
}
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 2, dtype family float, shape (2, 4) — shape (2, 4) 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
Rational_PYTORCH_C_F Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
this paper's copy was not recorded; identical code first harvested from ml-research/rational_activations
pointer only · get_code("6e3e9a40d8b5f9f7")
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.

Rational_PYTORCH_C_F Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
k4ntz/activation-functions/activations/torch/rationals/rational_pytorch_functions.py
code served (permissive licence) · get_code("960dbf127ba74109")
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 2, dtype family float, shape (2, 4) 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)

# Analyze the function:
# - x: tensor that gets viewed as 1D, then reshaped back to original shape
# - weight_numerator: list/sequence with len() called, elements multiplied with xps
# - weight_denominator: list/sequence with len() called, elements multiplied with xps
# - training: boolean flag (not used in the function body)

# Create small test tensors
x = torch.randn(2, 4)  # batch_size=2, feature_dim=4

# weight_numerator and weight_denominator are used in:
# xps.mul(weight_numerator).sum(1) and xps[:, :len_deno].mul(weight_denominator).sum(1)
# They need to be broadcastable with xps which has shape (batch_flattened, max_len+1)
# So they should be 1D tensors of appropriate lengths

weight_numerator = torch.randn(5)  # arbitrary length for numerator
weight_denominator = torch.randn(4)  # arbitrary length for denominator

training = True

ARGS = {
    "x": x,
    "weight_numerator": weight_numerator,
    "weight_denominator": weight_denominator,
    "training": training,
}
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 2, dtype family float, shape (2, 4) — shape (2, 4) 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

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 3 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 0 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
Rational_PYTORCH_A_F 1 other paper
1 dated earlier
1907.06732 (2019-07)
Padé Activation Units: End-to-end Learning of Flexible Activation Functions in Deep Networks
Rational_PYTORCH_B_F 1 other paper
1 dated earlier
1907.06732 (2019-07)
Padé Activation Units: End-to-end Learning of Flexible Activation Functions in Deep Networks
Rational_PYTORCH_C_F 1 other paper
1 dated earlier
1907.06732 (2019-07)
Padé Activation Units: End-to-end Learning of Flexible Activation Functions in Deep Networks

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

Latest insights from biology show that intelligence not only emerges from the connections between neurons but that individual neurons shoulder more computational responsibility than previously anticipated. This perspective should be critical in the context of constantly changing distinct reinforcement learning environments, yet current approaches still primarily employ static activation functions. In this work, we motivate why rationals are suitable for adaptable activation functions and why their inclusion into neural networks is crucial. Inspired by recurrence in residual networks, we derive a condition under which rational units are closed under residual connections and formulate a naturally regularised version: the recurrent-rational. We demonstrate that equipping popular algorithms with (recurrent-)rational activations leads to consistent improvements on Atari games, especially turning simple DQN into a solid approach, competitive to DDQN and Rainbow.

For agents

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

get_harvested_code_for_paper("2102.09407")
get_code_for_paper("2102.09407")
have("2102.09407")

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

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

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

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

Connect an agent — have() is free.