SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2023.emnlp-main.979 · EMNLP · 2023

TacoPrompt: A Collaborative Multi-Task Prompt Learning Method for Self-Supervised Taxonomy Completion

Xiangrui Cai, Xiaojie Yuan, Hongyuan Xu, Yuhang Niu, Yanlong Wen, Yunong Chen, Ciyi Liu

Code that ran

7 of 11 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 6 have no contract verdict; 0 failures of our instrument; 4 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.emnlp-main.979.json · badge: /api/ran/2023.emnlp-main.979.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
cyclexu/TacoPrompt canonical (classifier label)
classifier basis: census
7 ran · 4 no recorded run
FunctionStatusWhere it lives
BinarySelector Ran
ran on a synthesized input
cyclexu/TacoPrompt/TacoPrompt/model/model_zoo.py
code served (permissive licence) · get_code("7d1844522bfe16fa")
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 tensor for x parameter
x = torch.randn(2, 4)

# Parameter a has a default value of 1000
a = 1000

ARGS = {
    "x": x,
    "a": a
}
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
acc Ran
ran on a synthesized input
cyclexu/TacoPrompt/TacoPrompt/model/metric.py
code served (permissive licence) · get_code("345d6bb48c9b5d20")
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 float64, ndim 0, 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)

# The function acc() expects:
# - outputs: a tensor that can be .cpu().numpy().squeeze() and compared with > 0
# - targets: a tensor that can be .cpu().numpy() and compared with outputs

# Create small tensors
outputs = torch.randn(2, 1)  # batch size 2, single output value
targets = torch.randint(0, 2, (2,))  # batch size 2, binary labels

ARGS = {
    "outputs": outputs,
    "targets": targets,
}
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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
calculate_ranks_from_distance Ran
ran on a synthesized input
cyclexu/TacoPrompt/TacoPrompt/model/metric.py
code served (permissive licence) · get_code("8c2d5dcdd69ad727")
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 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 numpy as np

# Create sample data for the function
all_distances = np.array([0.5, 0.2, 0.8, 0.1, 0.9, 0.3])
positive_relations = [1, 3, 5]

ARGS = {
    "all_distances": all_distances,
    "positive_relations": positive_relations
}
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 list, ndim 1, 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
calculate_ranks_from_similarities Ran
ran on a synthesized input
cyclexu/TacoPrompt/TacoPrompt/model/metric.py
code served (permissive licence) · get_code("f431286e33860763")
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 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 numpy as np

# Create sample similarity scores
# Using a numpy array with some similarity values
all_similarities = np.array([0.9, 0.7, 0.5, 0.8, 0.3, 0.6, 0.4, 0.2])

# Create a list of indices that correspond to positive relations
# These are indices into the all_similarities array
positive_relations = [0, 2, 5]

ARGS = {
    "all_similarities": all_similarities,
    "positive_relations": positive_relations,
}
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 list, ndim 1, 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_edges Ran
ran, honoured the contract we drafted
cyclexu/TacoPrompt/TacoPrompt/data_loader/dataset.py
code served (permissive licence) · get_code("392c9d545575f06c")
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, 6) 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)

# The function expects edge_index_list: a list of lists/tuples where each item has [0] and [1] indices
# It filters out self-loops, ensures undirected edges, and returns a transposed tensor

edge_index_list = [
    [0, 1],
    [1, 2],
    [2, 3],
    [0, 0],  # self-loop, will be filtered out
]

ARGS = {
    "edge_index_list": edge_index_list
}
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 Tensor, ndim 2, dtype family int, shape (2, 6) — shape (2, 6) 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
nll_loss Ran
ran on a synthesized input
cyclexu/TacoPrompt/TacoPrompt/model/loss.py
code served (permissive licence) · get_code("8c2db3d4435816c0")
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)

# NLL loss expects log probabilities as output and target class indices
# output should be of shape (batch_size, num_classes) with log probabilities
# target should be of shape (batch_size,) with class indices

batch_size = 2
num_classes = 4

output = F.log_softmax(torch.randn(batch_size, num_classes), dim=1)
target = torch.randint(0, num_classes, (batch_size,))

ARGS = {
    "output": output,
    "target": target,
}
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
square_exp_loss Ran
ran on a synthesized input
cyclexu/TacoPrompt/TacoPrompt/model/loss.py
code served (permissive licence) · get_code("9635cf70801345d5")
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)

# Create output tensor: (batch_size, 1) with positive values
output = torch.rand(2, 1) + 0.5  # positive values between 0.5 and 1.5

# Create target tensor: (batch_size, ) with int values (0 or 1)
target = torch.tensor([1, 0], dtype=torch.int64)

# Define beta as a float weight
beta = 1.0

ARGS = {
    "output": output,
    "target": target,
    "beta": beta
}
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
bce_loss Not yet run
unverified (harvested, no recorded run)
cyclexu/TacoPrompt/TacoPrompt/model/loss.py
code served (permissive licence) · get_code("ffbcba4ac32237bf")
How it ran

no invocation recorded.

get_k_sim Not yet run
unverified (harvested, no recorded run)
cyclexu/TacoPrompt/TacoPrompt/Few-shot-Prompting-Llama/infer.py
code served (permissive licence) · get_code("8e6b817b4023feb8")
How it ran

no invocation recorded.

get_k_sim_double Not yet run
unverified (harvested, no recorded run)
cyclexu/TacoPrompt/TacoPrompt/Few-shot-Prompting-Llama/infer.py
code served (permissive licence) · get_code("76111ef635f057a5")
How it ran

no invocation recorded.

get_samples Not yet run
unverified (harvested, no recorded run)
cyclexu/TacoPrompt/TacoPrompt/Few-shot-Prompting-Llama/infer.py
code served (permissive licence) · get_code("3b21b0ac2590ea20")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 5 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 4 later) and 6 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
nll_loss 7 other papers
6 dated earlier, 1 same year, order not determinable
2104.00650 (2021-04)
Frozen in Time: A Joint Video and Image Encoder for End-to-End Retrieval
2109.04912 (2021-09)
ReasonBERT: Pre-trained to Reason with Distant Supervision
2022.findings-acl.116 (2022 (year only))
Thai Nested Named Entity Recognition Corpus
and 4 more not named here
acc 1 other paper
1 later
ijcai2024_0712 (2024 (year only))
Contrastive Representation Learning for Self-Supervised Taxonomy Completion
calculate_ranks_from_distance 1 other paper
1 later
ijcai2024_0712 (2024 (year only))
Contrastive Representation Learning for Self-Supervised Taxonomy Completion
calculate_ranks_from_similarities 1 other paper
1 later
ijcai2024_0712 (2024 (year only))
Contrastive Representation Learning for Self-Supervised Taxonomy Completion
get_edges 1 other paper
1 later
ijcai2024_0712 (2024 (year only))
Contrastive Representation Learning for Self-Supervised Taxonomy Completion

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

Automatic taxonomy completion aims to attach the emerging concept to an appropriate pair of hypernym and hyponym in the existing taxonomy. Existing methods suffer from the overfitting to leaf-only problem caused by imbalanced leaf and non-leaf samples when training the newly initialized classification head. Besides, they only leverage subtasks, namely attaching the concept to its hypernym or hyponym, as auxiliary supervision for representation learning yet neglect the effects of subtask results on the final prediction. To address the aforementioned limitations, we propose TacoPrompt, a Collaborative Multi-Task Prompt Learning Method for Self-Supervised Taxonomy Completion. First, we perform triplet semantic matching using the prompt learning paradigm to effectively learn non-leaf attachment ability from imbalanced training samples. Second, we design the result context to relate the final prediction to the subtask results by a contextual approach, enhancing prompt-based multi-task learning. Third, we leverage a two-stage retrieval and re-ranking approach to improve the inference efficiency. Experimental results on three datasets show that TacoPrompt achieves state-of-the-art taxonomy completion performance. Codes are available at https://github.com/cyclexu/TacoPrompt.

For agents

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

get_harvested_code_for_paper("2023.emnlp-main.979")
get_code_for_paper("2023.emnlp-main.979")
have("2023.emnlp-main.979")

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

curl https://syntology.ai/api/ran/2023.emnlp-main.979.json

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

[![Syntology run record](https://syntology.ai/api/ran/2023.emnlp-main.979.svg)](https://syntology.ai/paper/2023.emnlp-main.979)

Connect an agent — have() is free.