SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2203.06654 · ACL · 2022

Continual Prompt Tuning for Dialog State Tracking

Minlie Huang, Qi Zhu, Bing Li, Fei Mi, Xiaoyan Zhu

arXiv · PDF · Open in the Atlas

Code that ran

4 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 4 have no contract verdict; 0 failures of our instrument; 1 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/2203.06654.json · badge: /api/ran/2203.06654.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
thu-coai/CPT4DST canonical (classifier label)
classifier basis not recorded on the link
4 ran · 1 no recorded run
FunctionStatusWhere it lives
evaluate_INTENT Ran
ran on a synthesized input
thu-coai/CPT4DST/scorer.py
code served (permissive licence) · get_code("21dc674370b004cf")
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

# Analyze the function:
# - pred: list/iterable of strings, each containing '  ' as separator
# - gold: list/iterable of strings, each potentially containing '[eos]'
# - domain: parameter that is not used in the function body
# 
# The function splits pred strings on '  ', takes first element, strips whitespace
# and compares with gold after removing '[eos]' and stripping whitespace

# Create sample data
pred = [
    "intent1  other_info",
    "intent2  more_data"
]

gold = [
    "intent1[eos]",
    "intent2[eos]"
]

domain = "sample_domain"

ARGS = {
    'pred': pred,
    'gold': gold,
    'domain': domain
}
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
get_checkpoint Ran
ran on a synthesized input
thu-coai/CPT4DST/mytrain.py
code served (permissive licence) · get_code("0904626158c65804")
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 os
import tempfile
import shutil

# Create a temporary directory structure that matches what get_checkpoint expects
temp_dir = tempfile.mkdtemp()

# Create the nested directory structure
log_subdir = os.path.join(temp_dir, "experiment_42")
os.makedirs(log_subdir)

lightning_logs_dir = os.path.join(log_subdir, "lightning_logs")
os.makedirs(lightning_logs_dir)

version_dir = os.path.join(lightning_logs_dir, "version_0")
os.makedirs(version_dir)

checkpoints_dir = os.path.join(version_dir, "checkpoints")
os.makedirs(checkpoints_dir)

# Create a dummy checkpoint file
checkpoint_file = os.path.join(checkpoints_dir, "epoch=0-step=100.ckpt")
with open(checkpoint_file, 'w') as f:
    f.write("dummy checkpoint")

ARGS = {
    "log_dir": temp_dir,
    "index_to_load": 42
}
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
get_dataset_order Ran
ran on a synthesized input
thu-coai/CPT4DST/gather_res_prompt_fwt.py
code served (permissive licence) · get_code("f0f2e011b26a2bf7")
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
import torch.nn as nn

# Construct arguments for get_dataset_order
# The function takes one parameter: output_dir (a string)
# It checks for substrings like 'order1_', 'order2_', etc. in the output_dir
# and returns a dataset_order list based on which substring is found

ARGS = {
    "output_dir": "order1_experiment_run"
}
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
parse_API Ran
ran on a synthesized input
thu-coai/CPT4DST/scorer.py
code served (permissive licence) · get_code("8cbc64c89662f22f")
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 defaultdict. 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 collections import defaultdict

# The function parse_API takes a single parameter: text (a string)
# Looking at the function body:
# - It splits text by ') '
# - For each function string, it checks if '(' exists
# - It extracts and processes parameters using string operations
# - It builds a nested defaultdict structure
# The function only uses string methods, so we need a valid text input

text = 'func1(param1="value1", param2="value2") func2(param3="value3")'

ARGS = {
    'text': text
}
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 defaultdict — a defaultdict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a defaultdict 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_dataset_order Not yet run
unverified (harvested, no recorded run)
thu-coai/CPT4DST/gather_res_prompt.py
code served (permissive licence) · get_code("88fc52086160468a")
How it ran

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, 0 are also present in other papers whose code we hold (0 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.

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

A desirable dialog system should be able to continually learn new skills without forgetting old ones, and thereby adapt to new domains or tasks in its life cycle. However, continually training a model often leads to a well-known catastrophic forgetting issue. In this paper, we present Continual Prompt Tuning, a parameterefficient framework that not only avoids forgetting but also enables knowledge transfer between tasks. To avoid forgetting, we only learn and store a few prompt tokens' embeddings for each task while freezing the backbone pre-trained model. To achieve bi-directional knowledge transfer among tasks, we propose several techniques (continual prompt initialization, query fusion, and memory replay) to transfer knowledge from preceding tasks and a memory-guided technique to transfer knowledge from subsequent tasks. Extensive experiments demonstrate the effectiveness and efficiency of our proposed method on continual learning for dialog state tracking, compared with state-of-the-art baselines. * Corresponding author. USER: I'd like to find a place to eat. SYSTEM: In which city are you looking for the restaurant and do you have any preferred cuisine? USER: Find me Ethiopian cuisine in Berkeley.

For agents

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

get_harvested_code_for_paper("2203.06654")
get_code_for_paper("2203.06654")
have("2203.06654")

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

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

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

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

Connect an agent — have() is free.