SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2210.08692 · 2022

A Generative User Simulator with GPT-based Architecture and Goal State Tracking for Reinforced Multi-Domain Dialog Systems

arXiv · PDF · Open in the Atlas

Code that ran

8 of 9 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 7 have no contract verdict; 1 failure of our instrument; 1 no recorded run), measured 2026-11-22; 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/2210.08692.json · badge: /api/ran/2210.08692.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-spmi/gus canonical (classifier label)
classifier basis not recorded on the link
8 ran · 1 no recorded run
FunctionStatusWhere it lives
Loss1 Ran
ran on a synthesized input
thu-spmi/gus/utils.py
code served (permissive licence) · get_code("76660deb641b8569")
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; 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)

# Create two probability tensors
# The function expects tensors with at least 2 dimensions
# It sums over the last two dimensions
# Let's create tensors with shape (batch_size, feature_dim, prob_dim)
# so that after summing dim=-1 twice, we get a (batch_size,) result

p_proba = torch.rand(2, 4, 3)
q_proba = torch.rand(2, 4, 3)

ARGS = {
    "p_proba": p_proba,
    "q_proba": q_proba,
}
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 — no output shape is stated: observe_signature.py could not observe it (no_result)
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
act_dict_to_aspn Ran
ran on a synthesized input
thu-spmi/gus/prepare_data.py
code served (permissive licence) · get_code("dde2e39bcafe4050")
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.

# Analyzing the function: act_dict_to_aspn
# Parameters: act (a dict)
# The function expects act to be a dictionary where:
# - Keys are strings in format "domain-intent" (e.g., "hotel-inform")
# - Values are lists of tuples where each tuple is (slot_name, slot_value)

# Building a valid test argument
act = {
    'hotel-inform': [
        ('post', '12345'),
        ('addr', 'main street'),
        ('fee', '50')
    ],
    'restaurant-request': [
        ('ref', ''),
        ('dest', '')
    ],
    'general-greet': []
}

ARGS = {
    'act': act
}
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
clean_time Ran
ran; our contract draft was wrong, not the code
thu-spmi/gus/clean_dataset.py
code served (permissive licence) · get_code("4c62f23ce8135bda")
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 clean_time(utter):
    utter = re.sub('(\\d+) ([ap]\\.?m)', lambda x: x.group(1) + x.group(2), utter)
    utter = re.sub('((?<!\\d)\\d:\\d+)(am)?', '0\\1', utter)
    utter = re.sub('((?<!\\d)\\d)am', '0\\1:00', utter)
    utter = re.sub('((?<!\\d)\\d)pm', lambda x: str(int(x.group(1)) + 12) + ':00', utter)
    utter = re.sub('(\\d+)(:\\d+)pm', lambda x: str(int(x.group(1)) + 12) + x.group(2), utter)
    utter = re.sub('(\\d+)a\\.?m', '\\1', utter)
    return utter

ARGS = {
    'utter': 'The meeting is at 3 p.m. tomorrow at 2:30am'
}
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
goal_to_gpan Ran
ran on a synthesized input
thu-spmi/gus/prepare_data.py
code served (permissive licence) · get_code("e712e17d8551508b")
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.

# Setup code for goal_to_gpan function

def goal_to_gpan(goal, slot_list_goal=None):
    slot_list_goal = [] if slot_list_goal == None else slot_list_goal
    token_map = {'info': '[inform]', 'reqt': '[request]', 'fail_info': '[fail_info]', 'book': '[book]', 'fail_book': '[fail_book]'}
    goal_list = []
    for domain in goal:
        goal_list.append('[' + domain + ']')
        for intent in goal[domain]:
            if intent in ['fail_book', 'fail_info']:
                continue
            goal_list.append(token_map.get(intent, ''))
            if isinstance(goal[domain][intent], dict):
                for slot, value in goal[domain][intent].items():
                    slot = slot.lower()
                    value = value.lower() if isinstance(value, str) else value
                    if slot in ['pre_invalid', 'invalid']:
                        continue
                    else:
                        if slot == 'trainid':
                            slot = 'id'
                        if slot == 'car type':
                            slot = 'car'
                        if slot in ['entrance fee', 'fee']:
                            slot = 'price'
                        if slot == 'duration':
                            slot = 'time'
                        slot = 'arrive' if slot == 'arriveby' else slot
                        slot = 'leave' if slot == 'leaveat' else slot
                        goal_list.append(slot)
                        if value != '' and value != '?':
                            goal_list.append(str(value))
                    if slot not in slot_list_goal:
                        slot_list_goal.append(slot)
            elif isinstance(goal[domain][intent], list):
                for slot in goal[domain][intent]:
                    slot = slot.lower()
                    goal_list.append(slot)
                    if slot not in slot_list_goal:
                        slot_list_goal.append(slot)
    gpan = ' '.join(goal_list)
    return gpan


# Construct test goal structure
goal = {
    'hotel': {
        'info': {
            'name': 'Royal Hotel',
            'area': 'downtown',
            'pricerange': 'moderate'
        },
        'reqt': ['stars', 'parking'],
        'book': {
            'duration': '3 nights',
            'people': '2'
        }
    },
    'restaurant': {
        'info': {
            'food': 'Chinese',
            'trainid': 'TR123'
        },
        'reqt': ['phone', 'address']
    },
    'train': {
        'info': {
            'arriveby': '18:00',
            'leaveat': '10:00',
            'car type': 'first class'
        }
    },
    'attraction': {
        'info': {
            'entrance fee': '10',
            'fee': ''
        },
        'fail_info': {},
        'fail_book': {}
    }
}

slot_list_goal_init = []

ARGS = {
    'goal': goal,
    'slot_list_goal': slot_list_goal_init
}
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
kl_loss Ran
ran on a synthesized input
thu-spmi/gus/utils.py
code served (permissive licence) · get_code("ec89dac0427706f5")
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 two probability distributions as tensors
# The function expects tensors that support:
# - .dim() method
# - element-wise operations
# - torch.log()
# - torch.sum() with dim parameter

# Create p_proba and q_proba with distinct shapes for clarity
# Using shape (2, 4, 3) to have multiple dimensions
# dim=2 case: (2, 4)
# dim>2 case: (2, 4, 3)

# Test with dim > 2 to exercise the mean() branch
p_proba = torch.tensor([
    [[0.2, 0.3, 0.5],
     [0.1, 0.4, 0.5],
     [0.6, 0.2, 0.2],
     [0.25, 0.25, 0.5]],
    [[0.3, 0.3, 0.4],
     [0.2, 0.3, 0.5],
     [0.1, 0.8, 0.1],
     [0.33, 0.33, 0.34]]
], dtype=torch.float32)

q_proba = torch.tensor([
    [[0.25, 0.25, 0.5],
     [0.15, 0.35, 0.5],
     [0.5, 0.3, 0.2],
     [0.2, 0.3, 0.5]],
    [[0.25, 0.35, 0.4],
     [0.25, 0.25, 0.5],
     [0.2, 0.7, 0.1],
     [0.3, 0.35, 0.35]]
], dtype=torch.float32)

ARGS = {
    'p_proba': p_proba,
    'q_proba': q_proba
}
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
modified_encode Ran
ran on a synthesized input
thu-spmi/gus/utils.py
code served (permissive licence) · get_code("f971aae9c2c20b06")
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 transformers
from unittest.mock import Mock

# Create a mock tokenizer that has the necessary methods and attributes
tokenizer = Mock()

# Set up the encode method to return token IDs
tokenizer.encode = Mock(side_effect=lambda text: [101, 2054, 102])

# Set up additional_special_tokens
tokenizer.additional_special_tokens = ['<SPECIAL1>', '<SPECIAL2>']

# Define text input - can be string or list
text = "hello world <SPECIAL1> foo bar"

ARGS = {
    "tokenizer": tokenizer,
    "text": text,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
transformers — 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
my_clean_text Ran
ran on a synthesized input
thu-spmi/gus/clean_dataset.py
code served (permissive licence) · get_code("7f5a7dafc8e4429c")
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 my_clean_text(text):
    text = re.sub('([a-zT]+)\\.([a-z])', '\\1 . \\2', text)
    text = re.sub('(\\w+)\\.\\.? ', '\\1 . ', text)
    return text

ARGS = {
    'text': 'Hello.world. This is a test.. More text.T.here'
}
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
test_collate_fn Ran
ran on a synthesized input
thu-spmi/gus/reader.py
code served (permissive licence) · get_code("53bb02651160435f")
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.

import torch

torch.manual_seed(0)

# Analyze the function:
# - batch is a list of items
# - Each item is a tuple/list with at least 2 elements: item[0] and item[1]
# - item[0] is a list that gets concatenated with [sos_id]
# - item[1] is indexed with [0] to get sos_id, and item[1] itself is collected as label
# - So item[1] must be a list/tensor where [0] gives a scalar (sos_id)

# Construct a batch: list of (data, label) tuples
batch = [
    ([1, 2, 3], [10, 20, 30]),
    ([4, 5, 6], [40, 50, 60])
]

ARGS = {
    "batch": batch
}
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 — 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
clean_text Not yet run
unverified (harvested, no recorded run)
thu-spmi/gus/clean_dataset.py
code served (permissive licence) · get_code("c20b24a9790d8f15")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 2 later) and 7 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
clean_time 7 other papers
4 dated earlier, 3 later
2009.12005 (2020-09)
MinTL: Minimalist Transfer Learning for Task-Oriented Dialogue Systems
2021.findings-emnlp.112 (2021 (year only))
Improving End-to-End Task-Oriented Dialogue System with A Simple Auxiliary Task
2109.14739 (2021-09)
Multi-Task Pre-Training for Plug-and-Play Task-Oriented Dialogue System
and 4 more not named here
my_clean_text 3 other papers
1 dated earlier, 2 later
2109.14739 (2021-09)
Multi-Task Pre-Training for Plug-and-Play Task-Oriented Dialogue System
2302.11520 (2023-02)
Guiding Large Language Models via Directional Stimulus Prompting
2305.02468 (2023-05)
Task-Optimized Adapters for an End-to-End Task-Oriented Dialogue System

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

Building user simulators (USs) for reinforcement learning (RL) of task-oriented dialog systems (DSs) has gained more and more attention, which, however, still faces several fundamental challenges. First, it is unclear whether we can leverage pretrained language models to design, for example, GPT-2 based USs, to catch up and interact with the recently advanced GPT-2 based DSs. Second, an important ingredient in a US is that the user goal can be effectively incorporated and tracked; but how to flexibly integrate goal state tracking and develop an end-to-end trainable US for multi-domains has remained to be a challenge. In this work, we propose a generative user simulator (GUS) with GPT-2 based architecture and goal state tracking towards addressing the above two challenges. Extensive experiments are conducted on MultiWOZ2.1. Different DSs are trained via RL with GUS, the classic agenda-based user simulator (ABUS) and other ablation simulators respectively, and are compared for cross-model evaluation, corpus-based evaluation and human evaluation. The GUS achieves superior results in all three evaluation tasks.

For agents

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

get_harvested_code_for_paper("2210.08692")
get_code_for_paper("2210.08692")
have("2210.08692")

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

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

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

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

Connect an agent — have() is free.