SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2002.04793 · ACL · 2020

ConvLab-2: An Open-Source Toolkit for Building, Evaluating, and Diagnosing Dialogue Systems

Minlie Huang, Jianfeng Gao, Qi Zhu, Zheng Zhang, Xiang Li, Baolin Peng, Yan Fang, Jinchao Li, Xiaoyan Zhu, Ryuichi Takanobu

arXiv · PDF · Open in the Atlas

Code that ran

3 of 17 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 3 have no contract verdict; 0 failures of our instrument; 14 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/2002.04793.json · badge: /api/ran/2002.04793.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/ConvLab-2 marked official in Papers with Code
Papers with Code archive
3 ran · 14 no recorded run
FunctionStatusWhere it lives
BeamSearchNode Ran
ran on a synthesized input
thu-coai/ConvLab-2/convlab2/e2e/damd/multiwoz/damd_net.py
code served (permissive licence) · get_code("7d1a0b45de1618cc")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) 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
import numpy as np
from torch import nn

# INIT_ARGS: Construct a BeamSearchNode
hidden_size = 4
batch_size = 2
num_layers = 2

# Create a dummy hidden state (num_layers, batch_size, hidden_size)
hiddenstate = torch.randn(num_layers, batch_size, hidden_size)

# Previous node (None for the root node)
previousNode = None

# Word ID (dummy value)
wordId = torch.tensor(5)

# Log probability (dummy value)
logProb = torch.tensor(-0.5)

# Length (dummy value)
length = 3

# Rank (optional, default 0)
rank = 1

INIT_ARGS = {
    'hiddenstate': hiddenstate,
    'previousNode': previousNode,
    'wordId': wordId,
    'logProb': logProb,
    'length': length,
    'rank': rank
}

# ARGS: Call eval() method (no forward/__call__ in this class)
alpha = 0.1
ARGS = {
    'alpha': alpha
}
METHOD = 'eval'
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 0, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
Copy Ran
ran on a synthesized input
thu-coai/ConvLab-2/convlab2/e2e/damd/multiwoz/damd_net.py
code served (permissive licence) · get_code("dd9b8d6b030197c9")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 3, dtype family float, shape (2, 1, 3) 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
from torch import nn

class Copy(nn.Module):

    def __init__(self, hidden_size, copy_weight=1.0):
        super().__init__()
        self.Wcopy = nn.Linear(hidden_size, hidden_size)
        self.copy_weight = copy_weight

    def forward(self, enc_out_hs, dec_hs):
        """
        get unnormalized copy score
        :param enc_out_hs: [B, Tenc,  H]
        :param dec_hs: [B, Tdec, H]   testing: Tdec=1
        :return: raw_cp_score of each position, size [B, Tdec, Tenc]
        """
        raw_cp_score = torch.tanh(self.Wcopy(enc_out_hs))
        raw_cp_score = torch.einsum('beh,bdh->bde', raw_cp_score, dec_hs)
        return raw_cp_score * self.copy_weight


INIT_ARGS = {
    'hidden_size': 4,
    'copy_weight': 2.0,
}

ARGS = {
    'enc_out_hs': torch.randn(2, 3, 4),
    'dec_hs': torch.randn(2, 1, 4),
}

if __name__ == '__main__':
    model = Copy(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output: {output}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 3, dtype family float, shape (2, 1, 3) — shape (2, 1, 3) 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
MultiLayerGRUwithLN Ran
ran on a synthesized input
thu-coai/ConvLab-2/convlab2/e2e/damd/multiwoz/damd_net.py
code served (permissive licence) · get_code("74066f3caa545fa8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned tuple. 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
import torch.nn.functional as F

class MultiLayerGRUwithLN(nn.Module):
    """multi-layer GRU with layer normalization """

    def __init__(self, input_size, hidden_size, layer_num=1, bidirec=False, layer_norm=False, skip_connect=False, dropout=0.0):
        super().__init__()
        self.input_size = input_size
        self.hidden_size = hidden_size
        self.layer_num = layer_num
        self.bidirec = bidirec
        self.layer_norm = layer_norm
        self.skip_connect = skip_connect
        self.dropout = dropout
        self.model_layers = nn.ModuleDict()
        self.all_weights = []
        for l in range(self.layer_num):
            if l == 0:
                gru = nn.GRU(self.input_size, self.hidden_size, num_layers=1, dropout=self.dropout, bidirectional=self.bidirec, batch_first=True)
            else:
                input_size = self.hidden_size if not self.bidirec else 2 * self.hidden_size
                gru = nn.GRU(input_size, self.hidden_size, num_layers=1, dropout=self.dropout, bidirectional=self.bidirec, batch_first=True)
            self.model_layers['gru_' + str(l)] = gru
            self.all_weights.extend(gru.all_weights)
            if self.layer_norm:
                output_size = self.hidden_size if not self.bidirec else 2 * self.hidden_size
                ln = nn.LayerNorm(output_size)
                self.model_layers['ln_' + str(l)] = ln

    def forward(self, inputs, hidden=None):
        """[summary]

        :param inputs: tensor of size [B, T, H]
        :param hidden: tensor of size [n_layer*bi-direc,B,H]
        :returns: in_l: tensor of size [B, T, H * bi-direc]
                      hs: tensor of size [n_layer * bi-direc,B,H]
        """
        batch_size = inputs.size()[0]
        in_l, last_input = (inputs, None)
        hs = []
        if hidden:
            hiddens = hidden.view(self.layer_num, self.bidirec, batch_size, self.hidden_size)
        for l in range(self.layer_num):
            init_hs = hiddens[l] if hidden else None
            in_l, hs_l = self.model_layers['gru_' + str(l)](in_l, init_hs)
            hs.append(hs_l)
            if self.layer_norm:
                in_l = self.model_layers['ln_' + str(l)](in_l)
            if self.dropout > 0 and l < self.layer_num - 1:
                in_l = F.dropout(in_l)
            if self.skip_connect and last_input is not None:
                in_l = in_l + last_input
            last_input = in_l
        hs = torch.cat(hs, 0)
        return (in_l, hs)


INIT_ARGS = {
    'input_size': 4,
    'hidden_size': 8,
    'layer_num': 2,
    'bidirec': False,
    'layer_norm': True,
    'skip_connect': False,
    'dropout': 0.0,
}

ARGS = {
    'inputs': torch.randn(2, 3, 4),
    'hidden': None,
}

if __name__ == '__main__':
    model = MultiLayerGRUwithLN(**INIT_ARGS)
    output, hidden_state = model(**ARGS)
    print("Output shape:", output.shape)
    print("Hidden state shape:", hidden_state.shape)
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
ActSelectionModel Not yet run
unverified (harvested, no recorded run)
thu-coai/ConvLab-2/convlab2/e2e/damd/multiwoz/damd_net.py
code served (permissive licence) · get_code("821598c3a40ac4ce")
How it ran

no invocation recorded.

ActSpanDecoder Not yet run
unverified (harvested, no recorded run)
thu-coai/ConvLab-2/convlab2/e2e/damd/multiwoz/damd_net.py
code served (permissive licence) · get_code("984cbcea9ecd3b92")
How it ran

no invocation recorded.

Attn Not yet run
unverified (harvested, no recorded run)
thu-coai/ConvLab-2/convlab2/e2e/damd/multiwoz/damd_net.py
code served (permissive licence) · get_code("d2f2e98a00d15268")
How it ran

no invocation recorded.

BeliefSpanDecoder Not yet run
unverified (harvested, no recorded run)
thu-coai/ConvLab-2/convlab2/e2e/damd/multiwoz/damd_net.py
code served (permissive licence) · get_code("a73f44f91302b0e1")
How it ran

no invocation recorded.

DAMD Not yet run
unverified (harvested, no recorded run)
thu-coai/ConvLab-2/convlab2/e2e/damd/multiwoz/damd_net.py
code served (permissive licence) · get_code("4360dfd7931f302c")
How it ran

no invocation recorded.

DomainSpanDecoder Not yet run
unverified (harvested, no recorded run)
thu-coai/ConvLab-2/convlab2/e2e/damd/multiwoz/damd_net.py
code served (permissive licence) · get_code("9face4b0ca5e076a")
How it ran

no invocation recorded.

ResponseDecoder Not yet run
unverified (harvested, no recorded run)
thu-coai/ConvLab-2/convlab2/e2e/damd/multiwoz/damd_net.py
code served (permissive licence) · get_code("29c60036092a8630")
How it ran

no invocation recorded.

_Config Not yet run
unverified (harvested, no recorded run)
thu-coai/ConvLab-2/convlab2/e2e/damd/multiwoz/damd_net.py
code served (permissive licence) · get_code("38d06dcd71f175d4")
How it ran

no invocation recorded.

biGRUencoder Not yet run
unverified (harvested, no recorded run)
thu-coai/ConvLab-2/convlab2/e2e/damd/multiwoz/damd_net.py
code served (permissive licence) · get_code("234fcbef27246471")
How it ran

no invocation recorded.

cuda_ Not yet run
unverified (harvested, no recorded run)
thu-coai/ConvLab-2/convlab2/e2e/damd/multiwoz/damd_net.py
code served (permissive licence) · get_code("dd2ac2aaa9b0505d")
How it ran

no invocation recorded.

get_final_scores Not yet run
unverified (harvested, no recorded run)
thu-coai/ConvLab-2/convlab2/e2e/damd/multiwoz/damd_net.py
code served (permissive licence) · get_code("27866d42f8822564")
How it ran

no invocation recorded.

get_one_hot_input Not yet run
unverified (harvested, no recorded run)
thu-coai/ConvLab-2/convlab2/e2e/damd/multiwoz/damd_net.py
code served (permissive licence) · get_code("8e464195b37f432b")
How it ran

no invocation recorded.

label_smoothing Not yet run
unverified (harvested, no recorded run)
thu-coai/ConvLab-2/convlab2/e2e/damd/multiwoz/damd_net.py
code served (permissive licence) · get_code("581ad6f9369f50f6")
How it ran

no invocation recorded.

update_input Not yet run
unverified (harvested, no recorded run)
thu-coai/ConvLab-2/convlab2/e2e/damd/multiwoz/damd_net.py
code served (permissive licence) · get_code("ec5a6a8fe29173c7")
How it ran

no invocation recorded.

Also present in other papers' code

Of 17 samples lifted from this paper's linked repositories, 17 carry a function identity and 0 do not. Of the 17 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 17 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-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

We present ConvLab-2, an open-source toolkit that enables researchers to build task-oriented dialogue systems with state-of-the-art models, perform an end-to-end evaluation, and diagnose the weakness of systems. As the successor of ConvLab (Lee et al., 2019b), ConvLab-2 inherits ConvLab's framework but integrates more powerful dialogue models and supports more datasets. Besides, we have developed an analysis tool and an interactive tool to assist researchers in diagnosing dialogue systems. The analysis tool presents rich statistics and summarizes common mistakes from simulated dialogues, which facilitates error analysis and system improvement. The interactive tool provides a user interface that allows developers to diagnose an assembled dialogue system by interacting with the system and modifying the output of each system component.

For agents

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

get_harvested_code_for_paper("2002.04793")
get_code_for_paper("2002.04793")
have("2002.04793")

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

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

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

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

Connect an agent — have() is free.