SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2201.05966 · EMNLP · 2022

UNIFIEDSKG: Unifying and Multi-Tasking Structured Knowledge Grounding with Text-to-Text Language Models

Chien-Sheng Wu, Michihiro Yasunaga, Caiming Xiong, Luke Zettlemoyer, Tao Yu, Bailin Wang, Ziyu Yao, Pengcheng Yin, Lingpeng Kong, Rui Zhang, Victor Zhong, Torsten Scholak, and 11 more

arXiv · PDF · Open in the Atlas

Code that ran

2 of 5 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 1 failure of our instrument; 3 no recorded run), measured 2026-11-21; 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/2201.05966.json · badge: /api/ran/2201.05966.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
hkunlp/unifiedskg canonical (classifier label)
classifier basis not recorded on the link
2 ran · 3 no recorded run
FunctionStatusWhere it lives
aggregate_prompt Ran
ran on a synthesized input
hkunlp/unifiedskg/models/unified/combined_prefixtuning.py
code served (permissive licence) · get_code("ff9289c16a83589c")
How it ran

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

import torch
from collections import OrderedDict

torch.manual_seed(0)

# Helper function to create a single prompt layer structure
def create_prompt_layer(batch_size=2, seq_len=3, hidden_dim=4):
    """Create a single layer prompt with decoder, cross_attention, and encoder prompts"""
    prompt_layer = {
        'decoder_prompt': {
            'prev_key': torch.randn(batch_size, seq_len, hidden_dim),
            'prev_value': torch.randn(batch_size, seq_len, hidden_dim),
            'prev_key_padding_mask': torch.zeros(batch_size, seq_len, dtype=torch.bool)
        },
        'cross_attention_prompt': {
            'prev_key': torch.randn(batch_size, seq_len, hidden_dim),
            'prev_value': torch.randn(batch_size, seq_len, hidden_dim),
            'prev_key_padding_mask': torch.zeros(batch_size, seq_len, dtype=torch.bool)
        },
        'encoder_prompt': {
            'prev_key': torch.randn(batch_size, seq_len, hidden_dim),
            'prev_value': torch.randn(batch_size, seq_len, hidden_dim),
            'prev_key_padding_mask': torch.zeros(batch_size, seq_len, dtype=torch.bool)
        }
    }
    return prompt_layer

# Create prompt structures for multiple tasks (2 layers deep)
num_layers = 2
batch_size = 2
seq_len = 3
hidden_dim = 4

# Create past_prompt for task1
task1_prompt = [
    create_prompt_layer(batch_size, seq_len, hidden_dim),
    create_prompt_layer(batch_size, seq_len, hidden_dim)
]

# Create past_prompt for task2
task2_prompt = [
    create_prompt_layer(batch_size, seq_len, hidden_dim),
    create_prompt_layer(batch_size, seq_len, hidden_dim)
]

# Create new_prefix
new_prefix_prompt = [
    create_prompt_layer(1, seq_len, hidden_dim),  # Smaller batch for prefix
    create_prompt_layer(1, seq_len, hidden_dim)
]

# Build the past_prompt_dict
past_prompt_dict = OrderedDict([
    ('task1', task1_prompt),
    ('task2', task2_prompt),
    ('new_prefix', new_prefix_prompt)
])

# Create task_names_list
task_names_list = ['task1', 'task2']

# Define arguments for different strategies
ARGS = {
    'past_prompt_dict': past_prompt_dict,
    'task_names_list': task_names_list,
    'strategy': 'simple_concat'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
shift_tokens_right Ran
ran; our contract draft was wrong, not the code
hkunlp/unifiedskg/models/prompt/modeling_bart.py
code served (permissive licence) · get_code("a315b8fc32a18efe")
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 int, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create a small batch of input_ids
# Shape: (batch_size=2, sequence_length=4)
input_ids = torch.tensor([
    [101, 2054, 2003, 102],
    [101, 1045, 2572, 102]
], dtype=torch.long)

# Define pad_token_id
pad_token_id = 0

# Define decoder_start_token_id
decoder_start_token_id = 2

ARGS = {
    "input_ids": input_ids,
    "pad_token_id": pad_token_id,
    "decoder_start_token_id": decoder_start_token_id,
}
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 int, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
compute_interaction_metric Not yet run
unverified (harvested, no recorded run)
hkunlp/unifiedskg/metrics/sparc/interaction_scores.py
code served (permissive licence) · get_code("eb8d0541d7792310")
How it ran

no invocation recorded.

evaluate Not yet run
unverified (harvested, no recorded run)
hkunlp/unifiedskg/metrics/sparc/interaction_scores.py
code served (permissive licence) · get_code("e8a3b4f10de70271")
How it ran

no invocation recorded.

load_tf_weights_in_t5 Not yet run
unverified (harvested, no recorded run)
hkunlp/unifiedskg/models/adapter/modeling_t5.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from suntea233/DualLoRA, is pointer only (licence: NONE) · get_code("136abfa3e8ce028d")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from suntea233/DualLoRA, 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.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 2 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 2 later) and 3 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
load_tf_weights_in_t5 20 other papers
20 later
2204.07705 (2022-04)
SUPER-NATURALINSTRUCTIONS: Generalization via Declarative Instructions on 1600+ NLP Tasks
2205.06983 (2022-05)
RASAT: Integrating Relational Structures into Pretrained Seq2Seq Model for Text-to-SQL
2209.14627 (2022-09)
An Equal-Size Hard EM Algorithm for Diverse Dialogue Generation
and 17 more not named here
shift_tokens_right 7 other papers
1 dated earlier, 6 later
2109.04096 (2021-09)
A Three-Stage Learning Framework for Low-Resource Knowledge-Grounded Dialogue Generation
2203.07836 (2022-03)
Graph Pre-training for AMR Parsing and Generation
2207.03509 (2022-07)
Meta-Learning the Difference: Preparing Large Language Models for Efficient Adaptation
and 4 more not named here

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

Repositories linked to this paper

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

Abstract

Structured knowledge grounding (SKG) leverages structured knowledge to complete user requests, such as semantic parsing over databases and question answering over knowledge bases. Since the inputs and outputs of SKG tasks are heterogeneous, they have been studied separately by different communities, which limits systematic and compatible research on SKG. In this paper, we overcome this limitation by proposing the UNIFIEDSKG framework, which unifies 21 SKG tasks into a text-to-text format, aiming to promote systematic SKG research, instead of being exclusive to a single task, domain, or dataset. We use UNIFIEDSKG to benchmark T5 with different sizes and show that T5, with simple modifications when necessary, achieves stateof-the-art performance on almost all of the 21 tasks. We further demonstrate that multi-task prefix-tuning improves the performance on most tasks, largely improving the overall performance. UNIFIEDSKG also facilitates the investigation of zero-shot and few-shot learning, and we show that T0, GPT-3, and Codex struggle in zero-shot and few-shot learning for SKG. We also use UNIFIEDSKG to conduct a series of controlled experiments on structured knowledge encoding variants across SKG tasks. UNIFIEDSKG is easily extensible to more tasks, and it is open-sourced at https: //github.com/hkunlp/unifiedskg. 1 * Equal contributions. Author contributions in App. A. 1 Latest collections at https://unifiedskg.com.

For agents

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

get_harvested_code_for_paper("2201.05966")
get_code_for_paper("2201.05966")
have("2201.05966")

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

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

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

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

Connect an agent — have() is free.