SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2022.findings-emnlp.242 · EMNLP Findings · 2022

ER-TEST: Evaluating Explanation Regularization Methods for Language Models

Hamed Firooz, Maziar Sanjabi, Aaron Chan, Shaoliang Nie, Brihi Joshi, Ziyi Liu, Xiang

Open in the Atlas

Code that ran

12 of 13 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 11 have no contract verdict; 1 failure of our instrument; 1 no recorded run), measured 2026-11-24; 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/2022.findings-emnlp.242.json · badge: /api/ran/2022.findings-emnlp.242.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
INK-USC/er-test canonical (classifier label)
classifier basis: census
12 ran · 1 no recorded run
FunctionStatusWhere it lives
MLP_factory Ran
ran on a synthesized input
INK-USC/er-test/src/model/mlp.py
code served (permissive licence) · get_code("7561394d24106b69")
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 Sequential. 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)

# Analyzing the function:
# - layer_sizes: expects an iterable of blocks, each block is [size, count]
# - dropout: can be False or a float value (dropout probability)
# - layernorm: boolean flag

# layer_sizes gets unpacked as: for each block [size, count], add size to list count times
# Example: [[64, 2], [32, 1]] becomes [64, 64, 32]
# Then creates Linear layers between consecutive sizes

ARGS = {
    "layer_sizes": [[8, 2], [16, 1], [4, 1]],  # Unpacks to [8, 8, 16, 4]
    "dropout": 0.5,  # Dropout probability (not False, so dropout is applied)
    "layernorm": True,  # Apply layer normalization
}
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 Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 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
calc_comp Ran
ran on a synthesized input
INK-USC/er-test/src/utils/metrics.py
code served (permissive licence) · get_code("d7dfa6e9d998beaf")
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 Tensor, 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
import torch.nn.functional as F

torch.manual_seed(0)

# Create small tensors with distinct dimensions
batch_size = 2
num_classes = 4

# logits: (batch_size, num_classes)
logits = torch.randn(batch_size, num_classes)

# inv_expl_logits: (batch_size, num_classes)
inv_expl_logits = torch.randn(batch_size, num_classes)

# targets: (batch_size,) with class indices
targets = torch.tensor([0, 2])

ARGS = {
    "logits": logits,
    "inv_expl_logits": inv_expl_logits,
    "targets": targets,
    "comp_target": 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 Tensor, 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
calc_expl Ran
ran on a synthesized input
INK-USC/er-test/src/utils/expl.py
code served (permissive licence) · get_code("2e614b4b5f577914")
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 Tensor, ndim 2, dtype family int, 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 tensors for the function
batch_size = 2
seq_len = 4

# attrs: tensor of shape (batch_size, seq_len) with attribution scores
attrs = torch.randn(batch_size, seq_len)

# k: percentage of tokens to highlight (0-100)
k = 25

# attn_mask: binary mask of shape (batch_size, seq_len) indicating valid tokens (1) vs padding (0)
attn_mask = torch.tensor([
    [1, 1, 1, 0],
    [1, 1, 1, 1]
], dtype=torch.float32)

# min_val: default parameter, using the default value
min_val = -10000000000.0

ARGS = {
    "attrs": attrs,
    "k": k,
    "attn_mask": attn_mask,
    "min_val": min_val
}
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 Tensor, ndim 2, dtype family int, 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
calc_neg_expl_loss Ran
ran on a synthesized input
INK-USC/er-test/src/utils/losses.py
code served (permissive licence) · get_code("a05c2d5df88ccc40")
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 Tensor, 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)

# Define parameters
batch_size = 2
num_classes = 4
max_length = 3

# attrs: shape (batch_size, num_classes, max_length)
attrs = torch.randn(batch_size, num_classes, max_length)

# attn_mask: shape (batch_size, max_length) with binary values
attn_mask = torch.ones(batch_size, max_length)

# criterion: string, either 'l1' or 'l1_incorrect'
criterion = 'l1'

# targets: shape (batch_size,) with class indices
targets = torch.tensor([0, 2])

# preds: shape (batch_size,) with predicted class indices (needed for 'l1_incorrect')
preds = torch.tensor([1, 2])

# attr_algo: can be None or 'attention' (raises NotImplementedError)
attr_algo = None

ARGS = {
    'attrs': attrs,
    'attn_mask': attn_mask,
    'criterion': criterion,
    'targets': targets,
    'preds': preds,
    'attr_algo': attr_algo,
}
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 Tensor, 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
calc_pos_expl_loss Ran
ran on a synthesized input
INK-USC/er-test/src/utils/losses.py
code served (permissive licence) · get_code("6090bcb4b774484e")
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 Tensor, 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
import torch.nn.functional as F

torch.manual_seed(0)

# Create small tensors for testing
batch_size = 2
seq_length = 4
attr_dim = 4

# attrs: shape (batch_size, seq_length) - attribution scores
attrs = torch.randn(batch_size, seq_length)

# rationale: shape (batch_size, seq_length) - binary rationale mask
rationale = torch.randint(0, 2, (batch_size, seq_length)).float()

# attn_mask: shape (batch_size, seq_length) - attention mask
attn_mask = torch.ones(batch_size, seq_length)
attn_mask[0, 3] = 0  # mask out last token in first sample

# has_rationale: shape (batch_size,) - binary flag indicating if sample has rationale
has_rationale = torch.tensor([1.0, 1.0])

# criterion: one of the supported loss criteria
criterion = 'mse'

# margin: optional, for margin criterion
margin = None

# attr_scaling: scaling factor for attributes
attr_scaling = 1.0

# attr_algo: attribution algorithm name
attr_algo = None

ARGS = {
    'attrs': attrs,
    'rationale': rationale,
    'attn_mask': attn_mask,
    'criterion': criterion,
    'margin': margin,
    'has_rationale': has_rationale,
    'attr_scaling': attr_scaling,
    'attr_algo': attr_algo,
}
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 Tensor, 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
calc_preds Ran
ran on a synthesized input
INK-USC/er-test/src/utils/metrics.py
code served (permissive licence) · get_code("5545d796a539a4b2")
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 Tensor, ndim 1, dtype family int, shape (2,) 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)

logits = torch.randn(2, 4)

ARGS = {
    "logits": logits
}
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 Tensor, ndim 1, dtype family int, shape (2,) — shape (2,) 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
calc_task_loss Ran
ran on a synthesized input
INK-USC/er-test/src/utils/losses.py
code served (permissive licence) · get_code("92778122c17c0b74")
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 Tensor, 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
import torch.nn.functional as F

torch.manual_seed(0)

# Create small batch of logits (batch_size=2, num_classes=4)
logits = torch.randn(2, 4)

# Create small batch of target labels (batch_size=2)
targets = torch.tensor([0, 2], dtype=torch.long)

# Create class weights (one weight per class)
class_weights = torch.tensor([0.5, 1.0, 1.5, 2.0])

ARGS = {
    'logits': logits,
    'targets': targets,
    'reduction': 'mean',
    'class_weights': class_weights
}
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 Tensor, 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
flatten_cfg Ran
ran on a synthesized input
INK-USC/er-test/src/utils/logging.py
code served (permissive licence) · get_code("2036a8489d9ca965")
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)

# Test case 1: Simple dict with scalar values
cfg_simple = {
    'model': 'resnet50',
    'lr': 0.001,
    'batch_size': 32
}

# Test case 2: Nested dict with multiple levels
cfg_nested = {
    'optimizer': {
        'type': 'adam',
        'lr': 0.001,
        'betas': (0.9, 0.999)
    },
    'model': {
        'backbone': {
            'depth': 50,
            'pretrained': True
        },
        'head': 'classification'
    },
    'training': {
        'epochs': 100,
        'warmup': 10
    }
}

# Test case 3: Mixed types - dict, list, scalar
cfg_mixed = {
    'data': {
        'path': '/data/train',
        'augmentation': ['flip', 'rotate', 'crop']
    },
    'seed': 42,
    'debug': False
}

ARGS = {
    'cfg': cfg_nested
}
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
get_logger Ran
ran; our contract draft was wrong, not the code
INK-USC/er-test/src/utils/logging.py
code served (permissive licence) · get_code("3ca61f6f5c5ae515")
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 Logger. 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 logging

ARGS = {
    "name": "test_logger",
    "level": logging.DEBUG
}
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 Logger — a Logger output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Logger 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
is_subsequence Ran
ran on a synthesized input
INK-USC/er-test/src/utils/misc.py
code served (permissive licence) · get_code("85bd5c0578540349")
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 bool, 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
import numpy as np

torch.manual_seed(0)

# Analyze the function:
# is_subsequence(a, b) checks if 'a' is a subsequence of 'b'
# It uses:
# - len(a), len(b) - both need to support len()
# - a == b[i:i + len(a)] - both need to support equality comparison and slicing
# - The function iterates through range(len(b) - len(a) + 1)
# This works with lists, numpy arrays, or torch tensors

# Create two simple list arguments where a is a subsequence of b
a = [1, 3]
b = [1, 2, 3, 4]

ARGS = {
    "a": a,
    "b": b
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, 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
setup_optimizer_params Ran
ran on a synthesized input
INK-USC/er-test/src/utils/optim.py
code served (permissive licence) · get_code("9f156c42ba2c5cb9")
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 list, ndim 1, dtype family float; 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
import torch.nn as nn

torch.manual_seed(0)

# Create a simple task encoder module
class TaskEncoder(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 8)
        self.norm = nn.LayerNorm(8)
        self.linear2 = nn.Linear(8, 4)
    
    def forward(self, x):
        return self.linear2(self.norm(self.linear1(x)))

# Create a simple task head module
class TaskHead(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 2)
        self.norm = nn.LayerNorm(2)
    
    def forward(self, x):
        return self.norm(self.linear(x))

# Create model dict with both components
task_encoder = TaskEncoder()
task_head = TaskHead()

model_dict = {
    'task_encoder': task_encoder,
    'task_head': task_head
}

# Create a simple optimizer config object
class OptimizerConfig:
    def __init__(self, weight_decay=0.01):
        self.weight_decay = weight_decay

optimizer = OptimizerConfig(weight_decay=0.01)

ARGS = {
    'model_dict': model_dict,
    'optimizer': optimizer
}
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 list, ndim 1, dtype family float — a list 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
setup_scheduler Ran
ran on a synthesized input
INK-USC/er-test/src/utils/optim.py
code served (permissive licence) · get_code("2aa1401f431ebb79")
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 transformers import get_scheduler

torch.manual_seed(0)

# Create a minimal optimizer
model = nn.Linear(4, 3)
optimizer = torch.optim.SGD(model.parameters(), lr=0.01)

# Create a scheduler config object with warmup_updates attribute
class SchedulerConfig:
    def __init__(self, warmup_updates):
        self.warmup_updates = warmup_updates

# Test with warmup_updates as a fraction (< 1.0)
scheduler_config = SchedulerConfig(warmup_updates=0.1)

total_steps = 1000

ARGS = {
    'scheduler': scheduler_config,
    'total_steps': total_steps,
    'optimizer': optimizer
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — 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
init_perf_metrics Not yet run
unverified (harvested, no recorded run)
INK-USC/er-test/src/utils/metrics.py
code served (permissive licence) · get_code("c395390dabe66b1a")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 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 12 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
get_logger 3 other papers
1 dated earlier, 1 later, 1 same year, order not determinable · 1 only as an assembly brick
1312.5602 (2013-12)
Playing Atari with Deep Reinforcement Learning
2210.09337 (2022-10)
Robust Imitation of a Few Demonstrations with a Backwards Model
2407.08751 (2024-07)
Latent Diffusion for Neural Spiking Data

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

By explaining how humans would solve a given task, human rationales can provide strong learning signal for neural language models (NLMs). Explanation regularization (ER) aims to improve NLM generalization by pushing the NLM's machine rationales (Which input tokens did the NLM focus on?) to align with human rationales (Which input tokens would humans focus on?). Though prior works primarily study ER via in-distribution (ID) evaluation, out-ofdistribution (OOD) generalization is often more critical in real-world scenarios, yet ER's effect on OOD generalization has been underexplored. In this paper, we introduce ER-TEST, a framework for evaluating ER models' OOD generalization along three dimensions: unseen datasets, contrast set tests, and functional tests. Using ER-TEST, we comprehensively analyze how ER models' OOD generalization varies with the rationale alignment criterion (loss function), human rationale type (instance-level vs. task-level), number and choice of rationaleannotated instances, and time budget for rationale annotation. Across two tasks and six datasets, we show that ER has little impact on ID performance but yields large OOD performance gains, with the best ER criterion being task-dependent. Also, ER can improve OOD performance even with task-level or few human rationales. Finally, we find that rationale annotation is more time-efficient than label annotation for improving OOD performance. Our results with ER-TEST help demonstrate ER's utility and establish best practices for using ER effectively.

For agents

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

get_harvested_code_for_paper("2022.findings-emnlp.242")
get_code_for_paper("2022.findings-emnlp.242")
have("2022.findings-emnlp.242")

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

curl https://syntology.ai/api/ran/2022.findings-emnlp.242.json

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

[![Syntology run record](https://syntology.ai/api/ran/2022.findings-emnlp.242.svg)](https://syntology.ai/paper/2022.findings-emnlp.242)

Connect an agent — have() is free.