SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2104.08737 · EMNLP · 2021

Low-Rank Subspaces for Unsupervised Entity Linking

Robert West, Akhil Arora, Alberto García-Durán

arXiv · PDF · Open in the Atlas

Code that ran

6 of 8 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, 2 violated it and 0 have no contract verdict; 3 failures of our instrument; 2 no recorded run), measured 2026-11-22; 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/2104.08737.json · badge: /api/ran/2104.08737.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
lephong/dl4el canonical (classifier label)
classifier basis: census
6 ran · 2 no recorded run
FunctionStatusWhere it lives
clean_str Ran
ran; our contract draft was wrong, not the code
lephong/dl4el/jrk/el_extract_type_instance.py
code served (permissive licence) · get_code("c43754de11f09c77")
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

PREFIX = 'http://rdf.freebase.com/ns/'

def clean_str(s):
    if s[0] == '<':
        s = s[1:-1]
    if not s.startswith(PREFIX):
        return None
    else:
        return s[len(PREFIX):]

# Test with a valid Freebase RDF string
ARGS = {
    's': '<http://rdf.freebase.com/ns/m.02mjmr>'
}
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
compute_f1 Ran
ran, honoured the contract we drafted
lephong/dl4el/jrk/el_statstest.py
code served (permissive licence) · get_code("8bad2058cd892964")
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

torch.manual_seed(0)

# Analyze the function:
# - It takes 'decisions' as input
# - It iterates over decisions with 'for d in decisions'
# - It checks d[-1] (last character) for '*'
# - It checks d[0] (first character) for '-' and '1'
# - So 'decisions' should be a list of strings

# Create sample decision strings:
# Format: first char is '0', '-', or '1' (prediction indicator)
#         last char is '*' or not (indicator for special category)
decisions = [
    "1*",      # correct prediction, in special category
    "1",       # correct prediction, not in special category
    "-0",      # skipped (starts with '-')
    "0*",      # incorrect prediction, in special category
    "1*",      # correct prediction, in special category
    "0",       # incorrect prediction, not in special category
]

ARGS = {
    "decisions": decisions
}
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 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
fix_unicode Ran
ran; our contract draft was wrong, not the code
lephong/dl4el/jrk/el_wiki2fb.py
code served (permissive licence) · get_code("6ce599c950b1d58e")
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 re

def fix_unicode(string):
    j = 0
    ret = ''
    while True:
        string = string[j:]
        try:
            i, j = re.search('\\$[0-9A-Fa-f]{4}', string).span()
            ret += (string[:i] if i > 0 else '') + chr(int(string[i + 1:j], 16))
        except:
            ret += string
            break
    return ret

ARGS = {
    'string': 'Hello $0041 World $0042 Test'
}
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
is_important_word Ran
ran, violated the contract we drafted
lephong/dl4el/jrk/utils.py
code served (permissive licence) · get_code("879e718c1b9afde7")
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.

# Analyze the function to understand its parameters
# The function is_important_word takes a single parameter 's' (a string)
# It checks if the string is "important" by:
# 1. Checking if length <= 1
# 2. Checking if it's in STOPWORDS (case-insensitive)
# 3. Attempting to convert to float (if successful, it's a number, so not important)
# 4. If none of above, it's important

# Test with a valid important word
ARGS = {
    's': 'python'
}
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 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
is_stopword Ran
ran, violated the contract we drafted
lephong/dl4el/jrk/utils.py
code served (permissive licence) · get_code("beab35cd876a3032")
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

ARGS = {
    "s": "hello"
}
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 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
tokgreen Ran
ran; our contract draft was wrong, not the code
lephong/dl4el/jrk/utils.py
code served (permissive licence) · get_code("4cf4a6af277ff4f5")
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
import torch.nn as nn

torch.manual_seed(0)

# tokgreen takes a single string parameter `s` and returns it wrapped with green color codes
# The function uses string concatenation with bcolors.OKGREEN and bcolors.ENDC

ARGS = {
    "s": "Hello, World!"
}
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
process_sent Not yet run
unverified (harvested, no recorded run)
lephong/dl4el/jrk/el_annotation.py
code served (permissive licence) · get_code("c5130d1b4c4db917")
How it ran

no invocation recorded.

run Not yet run
unverified (harvested, no recorded run)
lephong/dl4el/jrk/el_annotation.py
code served (permissive licence) · get_code("27e42939e5ed59a4")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 0 later) and 5 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
is_important_word 1 other paper
1 dated earlier
1804.10637 (2018-04)
Improving Entity Linking by Modeling Latent Relations between Mentions
is_stopword 1 other paper
1 dated earlier
1804.10637 (2018-04)
Improving Entity Linking by Modeling Latent Relations between Mentions
tokgreen 1 other paper
1 dated earlier
1804.10637 (2018-04)
Improving Entity Linking by Modeling Latent Relations between Mentions

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

Entity linking is an important problem with many applications. Most previous solutions were designed for settings where annotated training data is available, which is, however, not the case in numerous domains. We propose a light-weight and scalable entity linking method, EIGENTHEMES, that relies solely on the availability of entity names and a referent knowledge base. EIGENTHEMES exploits the fact that the entities that are truly mentioned in a document (the "gold entities") tend to form a semantically dense subset of the set of all candidate entities in the document. Geometrically speaking, when representing entities as vectors via some given embedding, the gold entities tend to lie in a low-rank subspace of the full embedding space. EIGENTHEMES identifies this subspace using the singular value decomposition and scores candidate entities according to their proximity to the subspace. On the empirical front, we introduce multiple strong baselines that compare favorably to (and sometimes even outperform) the existing state of the art. Extensive experiments on benchmark datasets from a variety of real-world domains showcase the effectiveness of our approach. * Research done while at EPFL. 𝐶 !! = Michael_Jordan_(basketball_player) 𝐶 !" = Michael_Jordan_(computer_scientist) 𝐶 !# = Mike_Jordan_(racing_driver) 𝐶 !$ = Michael-Hakim_Jordan 𝐶 "! = Natural_Science 𝐶 "" = Applied_Science 𝐶 "# = Science_(album) 𝐶 "$ = Life_Science 𝐶 "% = Science_(journal)

For agents

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

get_harvested_code_for_paper("2104.08737")
get_code_for_paper("2104.08737")
have("2104.08737")

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

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

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

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

Connect an agent — have() is free.