SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2023.findings-acl.765 · ACL Findings · 2023

Explanation Regeneration via Information Bottleneck

Lingpeng Kong, Zhiyong Wu, Wei Bi, Qintong Li

Open in the Atlas

Code that ran

14 of 21 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; 1 honoured the contract we drafted, 0 violated it and 11 have no contract verdict; 2 failures of our instrument; 7 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/2023.findings-acl.765.json · badge: /api/ran/2023.findings-acl.765.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
qtli/EIB canonical (classifier label)
classifier basis: census
14 ran · 7 no recorded run
FunctionStatusWhere it lives
accuracy Ran
ran, honoured the contract we drafted
qtli/EIB/code/BottleSum/finetune_BottleSelf.py
code served (permissive licence) · get_code("eb725d5794b15f6b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned int64, 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 numpy as np

# Create sample outputs from a model (e.g., logits for 2 samples, 5 classes)
out = np.array([
    [0.1, 0.3, 0.8, 0.2, 0.1],  # argmax = 2
    [0.9, 0.1, 0.2, 0.3, 0.05]  # argmax = 0
])

# Create corresponding labels
labels = np.array([2, 0])

ARGS = {
    'out': out,
    'labels': labels
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int64, 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
cal_dist Ran
ran on a synthesized input
qtli/EIB/code/EIB_model/metric_func.py
code served (permissive licence) · get_code("97a3e262fae1cbf3")
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 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 numpy as np

torch.manual_seed(0)

# Analyze the function cal_dist:
# - It takes gen_seqs as parameter
# - It converts each element to string, strips whitespace, splits by space
# - Filters out empty strings
# - Passes the result to _get_dist which expects a list of lists of tokens

# Create sample generated sequences
gen_seqs = [
    "the quick brown fox",
    "the lazy dog jumps",
    "a quick fox jumps"
]

ARGS = {
    "gen_seqs": gen_seqs
}
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 tuple, ndim 1, dtype family float — 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
encode_old Ran
ran on a synthesized input
qtli/EIB/code/BottleSum/gpt2_token_mod.py
code served (permissive licence) · get_code("a87a1026ae955fbe")
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. 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 regex as re
import torch
import torch.nn as nn

torch.manual_seed(0)

class StandInEncoder:
    def __init__(self):
        # byte_encoder: maps byte values (0-255) to string representations
        self.byte_encoder = {i: chr(i) for i in range(256)}
        
        # encoder: maps BPE tokens to indices
        self.encoder = {
            'h': 0,
            'e': 1,
            'l': 2,
            'o': 3,
            'w': 4,
            'r': 5,
            'd': 6,
            ' ': 7,
        }
        
        # Pattern to split text into tokens
        self.pat = r"""'s|'t|'re|'ve|'m|'ll|'d| ?\p{L}+| ?\p{N}+| ?[^\s\p{L}\p{N}]+|\s+(?!\S)|\s+"""
        
        # max_len constraint
        self.max_len = 1000
    
    def bpe(self, token):
        # Simple stand-in BPE function that returns space-separated characters
        return ' '.join(list(token))

# Create the stand-in encoder instance
encoder_obj = StandInEncoder()

# Test text - short to avoid exceeding max_len
test_text = "hello"

ARGS = {
    'self': encoder_obj,
    'text': test_text,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
regex, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
encode_words Ran
ran on a synthesized input
qtli/EIB/code/BottleSum/gpt2_token_mod.py
code served (permissive licence) · get_code("c590791ccac5ec26")
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. 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 sys
import regex as re

class ByteEncoder:
    """Minimal byte encoder for testing"""
    def __init__(self):
        self.byte_map = {}
        for i in range(256):
            self.byte_map[i] = chr(i)
    
    def __getitem__(self, key):
        return self.byte_map.get(key, '?')

class MinimalTokenizer:
    """Minimal tokenizer class with required methods and attributes"""
    
    def __init__(self):
        self.pat = re.compile(r"""'s|'t|'re|'ve|'m|'ll|'d| ?\p{L}+| ?\p{N}+| ?[^\s\p{L}\p{N}]+|\s+(?!\S)|\s+""")
        self.byte_encoder = ByteEncoder()
        self.token_to_id = {}
        self.id_counter = 0
        
    def bpe(self, token):
        """Minimal BPE that just returns space-separated characters"""
        return ' '.join(list(token))
    
    def convert_tokens_to_ids(self, tokens):
        """Convert tokens to IDs, creating new IDs as needed"""
        ids = []
        for token in tokens:
            if token not in self.token_to_id:
                self.token_to_id[token] = self.id_counter
                self.id_counter += 1
            ids.append(self.token_to_id[token])
        return ids
    
    def tokenize_words(self, text):
        """Tokenize a string."""
        bpe_tokens = []
        bpe_words = []
        for token in re.findall(self.pat, text):
            if sys.version_info[0] == 2:
                token = ''.join((self.byte_encoder[ord(b)] for b in token))
            else:
                token = ''.join((self.byte_encoder[b] for b in token.encode('utf-8')))
            bpe_tokens.extend((bpe_token for bpe_token in self.bpe(token).split(' ')))
            bpe_words.append(list((bpe_token for bpe_token in self.bpe(token).split(' '))))
        return (bpe_tokens, bpe_words)
    
    def encode_words(self, text):
        """Encode words to token IDs"""
        tokens, words = self.tokenize_words(text)
        return (self.convert_tokens_to_ids(tokens), [self.convert_tokens_to_ids(word) for word in words])

tokenizer = MinimalTokenizer()
text = "Hello world"

ARGS = {
    'self': tokenizer,
    'text': text
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
regex — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
eval_model Ran
ran on a synthesized input
qtli/EIB/code/BottleSum/finetune_BottleSelf.py
code served (permissive licence) · get_code("3f8c02eb208fc9e7")
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 float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 as nn
from torch.nn import CrossEntropyLoss

torch.manual_seed(0)

# Build a minimal model that returns (lm_logits, _)
class MinimalLM(nn.Module):
    def __init__(self, vocab_size=10, hidden_size=4):
        super().__init__()
        self.embedding = nn.Embedding(vocab_size, hidden_size)
        self.lm_head = nn.Linear(hidden_size, vocab_size)
    
    def forward(self, input_ids):
        # input_ids shape: (batch_size, seq_len)
        hidden = self.embedding(input_ids)  # (batch_size, seq_len, hidden_size)
        logits = self.lm_head(hidden)  # (batch_size, seq_len, vocab_size)
        return logits, None

model = MinimalLM(vocab_size=10, hidden_size=4)

# Create small batches: batch_size=2, seq_len=5
batch_size = 2
seq_len = 5
vocab_size = 10
nbatch_eval = 3

# Create batches_eval: list of tensors with token ids
batches_eval = [
    torch.randint(0, vocab_size, (batch_size, seq_len)),
    torch.randint(0, vocab_size, (batch_size, seq_len)),
    torch.randint(0, vocab_size, (batch_size, seq_len)),
]

# Create labels_eval: list of tensors, use -1 for padding/ignore tokens
labels_eval = [
    torch.randint(-1, 2, (batch_size, seq_len)),
    torch.randint(-1, 2, (batch_size, seq_len)),
    torch.randint(-1, 2, (batch_size, seq_len)),
]

bsz = batch_size

ARGS = {
    "model": model,
    "nbatch_eval": nbatch_eval,
    "batches_eval": batches_eval,
    "labels_eval": labels_eval,
    "bsz": bsz,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
find_pruneable_heads_and_indices Ran
ran; our contract draft was wrong, not the code
qtli/EIB/code/EIB_model/modeling_gpt2.py
code served (permissive licence) · get_code("510183a9fa81eacb")
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. 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

torch.manual_seed(0)

ARGS = {
    "heads": [0, 2, 4],
    "n_heads": 8,
    "head_size": 64,
    "already_pruned_heads": {1, 3}
}
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 — a tuple output has no array shape of its own; none is 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
gelu Ran
ran; our contract draft was wrong, not the code
qtli/EIB/code/EIB_model/modeling_gpt2.py
code served (permissive licence) · get_code("8d23fbe2b99b840b")
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
import math

torch.manual_seed(0)

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

ARGS = {
    "x": x
}
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
load_dataset_0 Ran
ran on a synthesized input
qtli/EIB/code/BottleSum/finetune_BottleSelf.py
code served (permissive licence) · get_code("5b170c0d2f642fa9")
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. 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
from unittest.mock import Mock

torch.manual_seed(0)

class SimpleTokenizer:
    def encode(self, text):
        # Simple encoding: return list of small integers based on text length
        # Ensure sequences are less than 200 tokens for valid data
        tokens = [ord(c) % 10 for c in text[:50]]
        return tokens if tokens else [1]

class MockFile:
    def __init__(self, lines):
        self.lines = lines
    
    def __enter__(self):
        return self
    
    def __exit__(self, *args):
        pass
    
    def readlines(self):
        return self.lines

# Create a temporary file-like setup
import tempfile
import os

# Create a real temp file with test data
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_file.write("hello world\n")
temp_file.write("this is a test\n")
temp_file.write("another line here\n")
temp_file.write("short\n")
temp_file.write("one more sample\n")
temp_file.write("content TL;DR: summary^\n")
temp_file.write("longer content TL;DR: shorter summary^\n")
temp_file.write("yet another TL;DR: result^\n")
temp_file.write("more data TL;DR: brief^\n")
temp_file.write("final entry TL;DR: end^\n")
temp_file.close()

file_name = temp_file.name

tokenizer = SimpleTokenizer()

ARGS = {
    'file_name': file_name,
    'tokenizer': tokenizer,
    'bptt': 35,
    'bsz': 2,
    'label_s1': True,
    'delim': ' TL;DR: ',
    'end_tok': '^'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
normalize_case Ran
ran on a synthesized input
qtli/EIB/code/EIB_model/dataset.py
code served (permissive licence) · get_code("25924cf49df636e7")
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 str. 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.

# Setup code for normalize_case function

ARGS = {
    "text": "hello world"
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
put_model_to_device Ran
ran on a synthesized input
qtli/EIB/code/EIB_model/util.py
code served (permissive licence) · get_code("6214a1ccaf956968")
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 MinimalModel. 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
import logging

logger = logging.getLogger()

torch.manual_seed(0)

# Create a minimal model that supports the methods called in put_model_to_device
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def parallelize(self, device_map_sample=None, device_map_explanation=None):
        # Stand-in implementation for parallelize method
        pass
    
    def to(self, device):
        # Call parent to method
        return super().to(device)

# Create a minimal args object with required attributes
class Args:
    def __init__(self, model_parallelize=False, device='cpu'):
        self.model_parallelize = model_parallelize
        self.device = device

# Define ARGS dict with all parameters for put_model_to_device
ARGS = {
    'model': MinimalModel(),
    'args': Args(model_parallelize=False, device='cpu')
}
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 MinimalModel — a MinimalModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MinimalModel 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
tokenize_words Ran
ran on a synthesized input
qtli/EIB/code/BottleSum/gpt2_token_mod.py
code served (permissive licence) · get_code("ed4f5a97389b95c0")
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. 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 sys
import regex as re

# Create a minimal stand-in class for the tokenizer object
class MinimalTokenizer:
    def __init__(self):
        # byte_encoder: maps bytes to strings
        self.byte_encoder = {i: chr(i) for i in range(256)}
        
        # pat: regex pattern for findall
        self.pat = r"\S+"
        
    def bpe(self, token):
        # Minimal BPE implementation: just return space-separated characters
        return ' '.join(list(token))

# Instantiate the tokenizer
tokenizer = MinimalTokenizer()

# The text to tokenize
text = "hello world"

ARGS = {
    "self": tokenizer,
    "text": text
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
regex — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
top_k_logits Ran
ran on a synthesized input
qtli/EIB/code/BottleSum/bottleSelf_summarize.py
code served (permissive licence) · get_code("3c40291da6e3944c")
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 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 a small batch of logits
# Shape: (batch_size=2, vocab_size=4)
logits = torch.randn(2, 4)

# Set k to a reasonable value for top-k filtering
k = 2

ARGS = {
    "logits": logits,
    "k": k,
}
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 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
top_p_logits Ran
ran on a synthesized input
qtli/EIB/code/BottleSum/bottleSelf_summarize.py
code served (permissive licence) · get_code("3b9dbc9cbc681120")
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 float, shape (1, 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 a small logits tensor
# The function flattens it to 1D, applies softmax, sorts, and masks
# Using a small tensor with shape (1, 4) which will be flattened to (4,)
logits = torch.randn(1, 4)

# p is the probability threshold (0 < p <= 1)
# Using 0.5 means we keep logits covering top 50% of probability mass
p = 0.5

ARGS = {
    "logits": logits,
    "p": p,
}
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 float, shape (1, 4) — shape (1, 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
trim_text Ran
ran on a synthesized input
qtli/EIB/code/BottleSum/bottleSelf_summarize.py
code served (permissive licence) · get_code("ba0a8cb07439774b")
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 str. 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

torch.manual_seed(0)

# Analyze the function:
# - text: string, needs .find() method and slicing
# - end_tok: string, needs len() and slicing
# - len_s_in: integer, used for length comparison

ARGS = {
    "text": "Hello world this is a test string with end marker",
    "end_tok": "end",
    "len_s_in": 30
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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_model Not yet run
unverified (harvested, no recorded run)
qtli/EIB/code/EIB_model/util.py
code served (permissive licence) · get_code("9baabb3fbfd4ff44")
How it ran

no invocation recorded.

get_scores Not yet run
unverified (harvested, no recorded run)
qtli/EIB/code/Prompting-Filter/csqa_demo.py
code served (permissive licence) · get_code("335d193e8f3c624e")
How it ran

no invocation recorded.

get_tokenier Not yet run
unverified (harvested, no recorded run)
qtli/EIB/code/EIB_model/util.py
code served (permissive licence) · get_code("128c4517805f86f7")
How it ran

no invocation recorded.

get_tokenizer Not yet run
unverified (harvested, no recorded run)
qtli/EIB/code/Prompting-Filter/csqa_demo.py
code served (permissive licence) · get_code("2680064b67d1c990")
How it ran

no invocation recorded.

load_tf_weights_in_gpt2 Not yet run
unverified (harvested, no recorded run)
qtli/EIB/code/EIB_model/modeling_gpt2.py
code served (permissive licence) · get_code("59e7bfe60606f53b")
How it ran

no invocation recorded.

scatter Not yet run
unverified (harvested, no recorded run)
qtli/EIB/code/EIB_model/optimization.py
code served (permissive licence) · get_code("e44e6e20f6209f87")
How it ran

no invocation recorded.

scatter_kwargs Not yet run
unverified (harvested, no recorded run)
qtli/EIB/code/EIB_model/optimization.py
code served (permissive licence) · get_code("ca2a9ebf352702e2")
How it ran

no invocation recorded.

Also present in other papers' code

Of 21 samples lifted from this paper's linked repositories, 21 carry a function identity and 0 do not. Of the 21 distinct functions with an identity, 6 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 5 later) and 15 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
gelu 51 other papers
38 dated earlier, 6 later, 7 same year, order not determinable · 8 only as an assembly brick
1706.03762 (2017-06)
Attention Is All You Need
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1901.02860 (2019-01)
Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context
and 48 more not named here
accuracy 21 other papers
20 dated earlier, 1 same year, order not determinable
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1901.08746 (2019-01)
BioBERT: a pre-trained biomedical language representation model for biomedical text mining
1904.03323 (2019-04)
Publicly Available Clinical BERT Embeddings
and 18 more not named here
find_pruneable_heads_and_indices 11 other papers
7 dated earlier, 3 later, 1 same year, order not determinable
2004.10964 (2020-04)
Don't Stop Pretraining: Adapt Language Models to Domains and Tasks
2021.emnlp-main.154 (2021 (year only))
Reconstruction Attack on Instance Encoding for Language Understanding
2104.08066 (2021-04)
Effect of Visual Extensions on Natural Language Understanding in Vision-and-Language Models
and 8 more not named here
load_tf_weights_in_gpt2 11 other papers
4 dated earlier, 4 later, 3 same year, order not determinable
2206.11871 (2022-06)
Offline RL for Natural Language Generation with Implicit Language Q Learning
2211.09817 (2022-11)
On the Effect of Pre-training for Transformer in Different Modality on Offline Reinforcement Learning
2211.11694 (2022-11)
Exploring Discrete Diffusion Models for Image Captioning
and 8 more not named here
scatter_kwargs 11 other papers
5 dated earlier, 3 later, 3 same year, order not determinable
1901.02860 (2019-01)
Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context
2106.06295 (2021-06)
Going Beyond Linear Transformers with Recurrent Fast Weight Programmers
2204.03883 (2022-04)
Vision Transformers for Single Image Dehazing
and 8 more not named here
scatter 2 other papers
1 later, 1 same year, order not determinable
2303.15043 (2023-03)
Joint Video Multi-Frame Interpolation and Deblurring under Unknown Exposure Time
2406.09326 (2024-06)
PianoMotion10M: Dataset and Benchmark for Hand Motion Generation in Piano Performance

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

Explaining the black-box predictions of NLP models naturally and accurately is an important open problem in natural language generation. These free-text explanations are expected to contain sufficient and carefully-selected evidence to form supportive arguments for predictions. Thanks to the superior generative capacity of large pretrained language models (PLM), recent work built on prompt engineering enables explanations generated without specific training. However, explanations generated through single-pass prompting often lack sufficiency and conciseness, due to the prompt complexity and hallucination issues. To discard the dross and take the essence of current PLM's results, we propose to produce sufficient and concise explanations via the information bottleneck (EIB) theory. EIB regenerates explanations by polishing the single-pass output of PLM but retaining the information that supports the contents being explained by balancing two information bottleneck objectives. Experiments on two different tasks verify the effectiveness of EIB through automatic evaluation and thoroughly-conducted human evaluation.

For agents

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

get_harvested_code_for_paper("2023.findings-acl.765")
get_code_for_paper("2023.findings-acl.765")
have("2023.findings-acl.765")

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

curl https://syntology.ai/api/ran/2023.findings-acl.765.json

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

[![Syntology run record](https://syntology.ai/api/ran/2023.findings-acl.765.svg)](https://syntology.ai/paper/2023.findings-acl.765)

Connect an agent — have() is free.