SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.13774 · EMNLP · 2023

Seq2seq is All You Need for Coreference Resolution

Karl Stratos, Sam Wiseman, Wenzheng Zhang

arXiv · PDF · Open in the Atlas

Code that ran

11 of 14 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; 5 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 6 failures of our instrument; 3 no recorded run), measured 2026-11-23; 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/2310.13774.json · badge: /api/ran/2310.13774.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
WenzhengZhang/Seq2seqCoref canonical (classifier label)
classifier basis: census
11 ran · 3 no recorded run
FunctionStatusWhere it lives
b_cubed Ran
ran, honoured the contract we drafted
WenzhengZhang/Seq2seqCoref/metrics.py
pointer only (licence: MIT); the stored copy get_code serves, from lengsicong/tell2design, is pointer only (licence: NONE) · get_code("2d71e2917845b6ac")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from lengsicong/tell2design, and GitHub detected no licence in that repository when it was checked. 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.

extract_clusters Ran
ran; our contract draft was wrong, not the code
WenzhengZhang/Seq2seqCoref/utils.py
code served (permissive licence) · get_code("1b30aee01d2ddc01")
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. 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.

from collections import defaultdict

# Construct valid arguments for extract_clusters function

# The function expects:
# - sentence: a string with tokens separated by spaces, including special tokens for mentions and entities
# - start_mention_token: token marking start of a mention
# - end_mention_token: token marking end of a mention
# - start_ent_token: token marking start of entity ID
# - end_ent_token: token marking end of entity ID
# - remove_singletons: boolean flag

# Example annotated sentence format:
# "word1 [ mention_word ] < 0 > word2 [ another_mention ] < 1 >"
# Where:
# [ = start_mention_token
# ] = end_mention_token
# < = start_ent_token
# > = end_ent_token
# 0, 1 = entity cluster IDs

sentence = "the [ quick brown ] < 0 > fox jumps over [ the lazy ] < 1 > dog and [ quick brown ] < 0 > cats"

start_mention_token = "["
end_mention_token = "]"
start_ent_token = "<"
end_ent_token = ">"

remove_singletons = False

ARGS = {
    "sentence": sentence,
    "start_mention_token": start_mention_token,
    "end_mention_token": end_mention_token,
    "start_ent_token": start_ent_token,
    "end_ent_token": end_ent_token,
    "remove_singletons": remove_singletons,
}
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 list — a list 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
f1 Ran
ran, honoured the contract we drafted
WenzhengZhang/Seq2seqCoref/metrics.py
pointer only (licence: MIT); the stored copy get_code serves, from sapienzanlp/bookcoref, is pointer only (licence: NONE) · get_code("5dc251a1bb16c94f")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from sapienzanlp/bookcoref, and GitHub detected no licence in that repository when it was checked. 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.

get_doc_key Ran
ran; our contract draft was wrong, not the code
WenzhengZhang/Seq2seqCoref/conll.py
code served (permissive licence) · get_code("f300a33fe05fc609")
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

def get_doc_key(doc_id, part):
    return '{}_{}'.format(doc_id, int(part))

ARGS = {
    'doc_id': 'doc_123',
    'part': 5
}
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_document_predicts Ran
ran, honoured the contract we drafted
WenzhengZhang/Seq2seqCoref/data.py
code served (permissive licence) · get_code("a44d03c78991db18")
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 3, 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 networkx as nx
from typing import List, Tuple

# The function takes doc_preds which is a List[List]
# Each inner list contains predictions for a chunk
# Based on the function body, each prediction appears to be a tuple (start, end)

# Create sample document predictions
# doc_preds is a list of lists, where each inner list contains tuples of (start, end)
doc_preds = [
    [(0, 5), (3, 8)],  # First chunk with overlapping spans
    [(10, 15), (12, 20)],  # Second chunk with overlapping spans
    [(25, 30)]  # Third chunk with single span
]

ARGS = {
    "doc_preds": doc_preds
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 3, dtype family int — 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
get_mention_to_clusters Ran
ran; our contract draft was wrong, not the code
WenzhengZhang/Seq2seqCoref/utils.py
code served (permissive licence) · get_code("a757f2a0602e2db4")
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 numpy as np

# The function get_mention_to_clusters expects a list of clusters
# Each cluster is an iterable of mentions
# Each mention is something that can be converted to a tuple (like a list or tuple)

clusters = [
    [[0, 1], [2, 3]],  # First cluster with two mentions
    [[4, 5], [6, 7], [8, 9]],  # Second cluster with three mentions
]

ARGS = {
    "clusters": clusters
}
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 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
global_align Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
WenzhengZhang/Seq2seqCoref/alignment.py
code served (permissive licence) · get_code("b39bade2b5608136")
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 numpy as np

# Analyzing the function:
# - input_ids: a sequence that supports len() and indexing with integers
# - rec_ids: a sequence that supports len() and indexing with integers
# Both are used for equality comparison (input_ids[i-1] == rec_ids[j-1])
# This suggests they are lists or arrays of comparable elements (likely integers or strings)

# Create small distinct-sized sequences for testing
input_ids = [1, 2, 3, 4, 5]  # length 5
rec_ids = [1, 2, 4, 6]       # length 4 (distinct from 5)

ARGS = {
    "input_ids": input_ids,
    "rec_ids": rec_ids
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
load_data Ran
ran; our contract draft was wrong, not the code
WenzhengZhang/Seq2seqCoref/check_align.py
code served (permissive licence) · get_code("5266adb6d2ffdcfc")
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 os
import json
import re
import tempfile
import shutil

# Create a temporary directory structure with mock data files
temp_dir = tempfile.mkdtemp()

# Create mock tokenizer
class MockTokenizer:
    def convert_tokens_to_ids(self, tokens):
        # Simple mock: convert tokens to small integers
        if isinstance(tokens, list):
            return [i % 100 for i in range(len(tokens))]
        return [1, 2, 3]

# Create mock JSONLINES data files
def create_mock_data_file(filepath):
    os.makedirs(os.path.dirname(filepath), exist_ok=True)
    with open(filepath, 'w') as f:
        # Write a few sample lines
        for i in range(2):
            sample = {
                'doc_key': f'doc_abc_{i}',
                'sentence': ['The', 'quick', 'brown', 'fox'],
                'target_short_sentence': ['quick', 'brown'],
                'subtoken_map': [0, 1, 2, 3],
                'seg_clusters': [[[0, 1], [2, 3]]],
                'gold_clusters': [[[0, 1], [2, 3]], [[1, 2]]],
                'offset': 0
            }
            f.write(json.dumps(sample) + '\n')

# Create dev and test split files
create_mock_data_file(os.path.join(temp_dir, 'dev.t5-small.english.4096.jsonlines'))
create_mock_data_file(os.path.join(temp_dir, 'test.t5-small.english.4096.jsonlines'))

# Create the tokenizer instance
tokenizer = MockTokenizer()

ARGS = {
    'data_dir': temp_dir,
    'tokenizer': tokenizer
}
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 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
match_score Ran
ran, honoured the contract we drafted
WenzhengZhang/Seq2seqCoref/alignment.py
code served (permissive licence) · get_code("2f6a512c201dda17")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

match = 1
mismatch = -1

def match_score(a, b):
    if a == b:
        return match
    else:
        return mismatch

# The function compares two values for equality
# a and b can be any comparable Python objects
# We'll test with simple values that can be compared

ARGS = {
    "a": 5,
    "b": 5
}
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 int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
max_track Ran
ran, honoured the contract we drafted
WenzhengZhang/Seq2seqCoref/alignment.py
code served (permissive licence) · get_code("4fe53dfaad013950")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function compares three numeric values (m, x, y) and tracks which is max
# It requires:
# - m: a numeric value (int or float)
# - x: a numeric value (int or float)
# - y: a numeric value (int or float)
# - mode: a string, either 'h' or 'l'

m = 5
x = 10
y = 7
mode = 'h'

ARGS = {
    'm': m,
    'x': x,
    'y': y,
    'mode': mode
}
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
normalize_word Ran
ran; our contract draft was wrong, not the code
WenzhengZhang/Seq2seqCoref/data.py
code served (permissive licence) · get_code("1dfbebba563fe3db")
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

ARGS = {
    'word': '{hello}',
    'use_br_dict': 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 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
evaluate_conll Not yet run
unverified (harvested, no recorded run)
WenzhengZhang/Seq2seqCoref/conll.py
code served (permissive licence) · get_code("17c2f60d7aa60c4e")
How it ran

no invocation recorded.

evaluate_documents Not yet run
unverified (harvested, no recorded run)
WenzhengZhang/Seq2seqCoref/metrics.py
pointer only (licence: MIT); the stored copy get_code serves, from lengsicong/tell2design, is pointer only (licence: NONE) · get_code("44ea1242eeeb38ac")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from lengsicong/tell2design, and GitHub detected no licence in that repository when it was checked. 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. No invocation recorded.

official_conll_eval Not yet run
unverified (harvested, no recorded run)
WenzhengZhang/Seq2seqCoref/conll.py
code served (permissive licence) · get_code("623bb0c122976d14")
How it ran

no invocation recorded.

Also present in other papers' code

Of 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 14 distinct functions with an identity, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 4 later) and 10 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
f1 12 other papers
7 dated earlier, 5 later
1804.05392 (2018-04)
Higher-order Coreference Resolution with Coarse-to-fine Inference
1907.10529 (2019-07)
SpanBERT: Improving Pre-training by Representing and Predicting Spans
2021.naacl-main.125 (2021 (year only))
Incorporating Syntax and Semantics in Coreference Resolution with Heterogeneous Graph Attention Network
and 9 more not named here
get_doc_key 8 other papers
6 dated earlier, 2 later
1804.05392 (2018-04)
Higher-order Coreference Resolution with Coarse-to-fine Inference
1907.10529 (2019-07)
SpanBERT: Improving Pre-training by Representing and Predicting Spans
2021.naacl-main.125 (2021 (year only))
Incorporating Syntax and Semantics in Coreference Resolution with Heterogeneous Graph Attention Network
and 5 more not named here
evaluate_documents 4 other papers
2 dated earlier, 2 later
1804.05392 (2018-04)
Higher-order Coreference Resolution with Coarse-to-fine Inference
2205.10475 (2022-05)
DEEPSTRUCT: Pretraining of Language Models for Structure Prediction
2311.03748 (2023-11)
Unified Low-Resource Sequence Labeling by Sample-Aware Dynamic Sparse Finetuning
and 1 more not named here
b_cubed 3 other papers
1 dated earlier, 2 later
2205.10475 (2022-05)
DEEPSTRUCT: Pretraining of Language Models for Structure Prediction
2311.03748 (2023-11)
Unified Low-Resource Sequence Labeling by Sample-Aware Dynamic Sparse Finetuning
2311.15941 (2023-11)
Tell2Design: A Dataset for Language-Guided Floor Plan Generation

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

Repositories linked to this paper

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

Abstract

Existing works on coreference resolution suggest that task-specific models are necessary to achieve state-of-the-art performance. In this work, we present compelling evidence that such models are not necessary. We finetune a pretrained seq2seq transformer to map an input document to a tagged sequence encoding the coreference annotation. Despite the extreme simplicity, our model outperforms or closely matches the best coreference systems in the literature on an array of datasets. We also propose an especially simple seq2seq approach that generates only tagged spans rather than the spans interleaved with the original text. Our analysis shows that the model size, the amount of supervision, and the choice of sequence representations are key factors in performance.

For agents

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

get_harvested_code_for_paper("2310.13774")
get_code_for_paper("2310.13774")
have("2310.13774")

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

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

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

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

Connect an agent — have() is free.