SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2106.14448 · NeurIPS · 2021

R-Drop: Regularized Dropout for Neural Networks

Lijun Wu, Tao Qin, Tie-Yan Liu, Wei Chen, Qi Meng, Yue Wang, Xiaobo Liang, Juntao Li, Min Zhang

arXiv · PDF · Open in the Atlas

Code that ran

4 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (2 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 0 failures 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.14448.json · badge: /api/ran/2106.14448.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
cosmoquester/2021-dialogue-summary-competition community
Papers with Code archive
2 ran · 0 no recorded run
zpc-666/Paddle-R-Drop community (classifier label)
classifier basis not recorded on the link
1 ran · 2 no recorded run
zbp-xxxp/R-Drop-Paddle community (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
FunctionStatusWhere it lives
LinearWarmupLR Ran
ran on a synthesized input · constructed an object; no result was computed
cosmoquester/2021-dialogue-summary-competition/summarizer/method/rdrop.py
code served (permissive licence) · get_code("0089735efb90328b")
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 an instance of its own class, LinearWarmupLR: the run constructed the object and did not call it, so no result was computed. 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.optim as optim
from torch.optim.lr_scheduler import LambdaLR

torch.manual_seed(0)

# Create a simple model with parameters
model = torch.nn.Linear(4, 3)

# Create an optimizer
optimizer = optim.SGD(model.parameters(), lr=0.1)

# Define the arguments dictionary
ARGS = {
    'optimizer': optimizer,
    'num_warmup_steps': 10,
    'num_training_steps': 100,
    'reduce_rate': 0.1,
    'last_epoch': -1,
    'verbose': False
}
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 LinearWarmupLR — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a LinearWarmupLR 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
RDropModule Ran
ran on a synthesized input · constructed an object; no result was computed
cosmoquester/2021-dialogue-summary-competition/summarizer/method/rdrop.py
code served (permissive licence) · get_code("586548b80b045cfd")
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 an instance of its own class, RDropModule: the run constructed the object and did not call it, so no result was computed. 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 transformers import BartForConditionalGeneration, BartConfig

torch.manual_seed(0)

# Create a minimal BART model
bart_config = BartConfig(
    vocab_size=1000,
    max_position_embeddings=512,
    encoder_layers=2,
    encoder_ffn_dim=256,
    encoder_attention_heads=2,
    decoder_layers=2,
    decoder_ffn_dim=256,
    decoder_attention_heads=2,
    d_model=64,
    pad_token_id=0,
    bos_token_id=1,
    eos_token_id=2,
)
model = BartForConditionalGeneration(bart_config)

ARGS = {
    'model': model,
    'total_steps': 1000,
    'max_learning_rate': 0.001,
    'min_learning_rate': 0.0001,
    'warmup_rate': 0.1,
    'model_save_dir': '/tmp/model_checkpoint',
    'rdrop_alpha': 0.7,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pytorch_lightning, torch, torchmetrics, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type RDropModule — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a RDropModule 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
to_2tuple Ran
ran on a synthesized input
zbp-xxxp/R-Drop-Paddle/models/modeling.py
code served (permissive licence) · get_code("90c67ad49626180a")
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)

# to_2tuple takes a single parameter x and returns a tuple with x repeated twice
# The function doesn't use any attributes or methods on x, just repeats it
# So x can be any value: int, float, string, tensor, etc.

x = 5

ARGS = {
    "x": x
}
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
to_2tuple Ran
ran on a synthesized input
zpc-666/Paddle-R-Drop/R_Drop/models/modeling.py
code served (permissive licence) · get_code("0d39c035f6237733")
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)

# Test case 1: integer input
x_int = 5

# Test case 2: tuple input
x_tuple = (3, 4)

# Test case 3: list input
x_list = [2, 7]

# We'll use the integer case as the main test
ARGS = {
    'x': x_int
}
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
count_parameters Not yet run
unverified (harvested, no recorded run)
zpc-666/Paddle-R-Drop/R_Drop/utils/utils.py
code served (permissive licence) · get_code("0632534b7fda246f")
How it ran

no invocation recorded.

simple_accuracy Not yet run
unverified (harvested, no recorded run)
zpc-666/Paddle-R-Drop/R_Drop/utils/utils.py
code served (permissive licence) · get_code("3c241ecfe3749a6d")
How it ran

no invocation recorded.

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 6 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 1 the same month, 1 later) and 4 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
simple_accuracy 59 other papers
29 dated earlier, 4 the same month, 26 later
1506.05865 (2015-06)
LCSTS: A Large Scale Chinese Short Text Summarization Dataset
1509.01626 (2015-09)
Character-level Convolutional Networks for Text Classification *
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
and 56 more not named here
LinearWarmupLR
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
1910.13461 (2019-10)
BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension

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

Dropout is a powerful and widely used technique to regularize the training of deep neural networks. Though effective and performing well, the randomness introduced by dropout causes unnegligible inconsistency between training and inference. In this paper, we introduce a simple consistency training strategy to regularize dropout, namely R-Drop, which forces the output distributions of different sub models generated by dropout to be consistent with each other. Specifically, for each training sample, R-Drop minimizes the bidirectional KL-divergence between the output distributions of two sub models sampled by dropout. Theoretical analysis reveals that R-Drop reduces the above inconsistency. Experiments on 5 widely used deep learning tasks (18 datasets in total), including neural machine translation, abstractive summarization, language understanding, language modeling, and image classification, show that R-Drop is universally effective. In particular, it yields substantial improvements when applied to fine-tune large-scale pre-trained models, e.g., ViT, RoBERTa-large, and BART, and achieves state-of-the-art (SOTA) performances with the vanilla Transformer model on WMT14 English→German translation (30.91 BLEU) and WMT14 English→French translation (43.95 BLEU), even surpassing models trained with extra large-scale data and expert-designed advanced variants of Transformer models. Our code is available at GitHub 2 . * Equal contribution (listed in alphabetical order).

For agents

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

get_harvested_code_for_paper("2106.14448")
get_code_for_paper("2106.14448")
have("2106.14448")

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

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

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

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

Connect an agent — have() is free.