SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2009.06504 · 2020

Filling the Gap of Utterance-aware and Speaker-aware Representation for Multi-turn Dialogue

arXiv · PDF · Open in the Atlas

Code that ran

2 of 3 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 2 have no contract verdict; 0 failures 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/2009.06504.json · badge: /api/ran/2009.06504.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
comprehensiveMap/MDFN canonical (classifier label)
classifier basis: census
2 ran · 1 no recorded run
FunctionStatusWhere it lives
convert_examples_to_features Ran
ran on a synthesized input
comprehensiveMap/MDFN/run_MDFN.py
code served (permissive licence) · get_code("5c737bd16f29328a")
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 logging
from unittest.mock import Mock

logging.basicConfig(level=logging.INFO)

class SimpleTokenizer:
    """Minimal tokenizer for testing."""
    def __init__(self):
        self.vocab = {
            '[CLS]': 101, '[SEP]': 102, '[PAD]': 0,
            'hello': 1, 'world': 2, 'how': 3, 'are': 4,
            'you': 5, 'fine': 6, 'thanks': 7, 'great': 8,
            'test': 9, 'example': 10, 'question': 11, 'answer': 12,
            'really': 13, 'good': 14
        }
        self.token_list = list(self.vocab.keys())
    
    def tokenize(self, text):
        """Simple whitespace tokenizer."""
        if not text or not text.strip():
            return []
        words = text.lower().split()
        tokens = []
        for word in words:
            if word in self.vocab:
                tokens.append(word)
            else:
                tokens.append('test')
        return tokens
    
    def convert_tokens_to_ids(self, tokens):
        """Convert tokens to their IDs."""
        ids = []
        for token in tokens:
            ids.append(self.vocab.get(token, 0))
        return ids

class Example:
    """Simple example class for testing."""
    def __init__(self, guid, text_a, text_b, label):
        self.guid = guid
        self.text_a = text_a
        self.text_b = text_b
        self.label = label

tokenizer = SimpleTokenizer()

examples = [
    Example(
        guid='example_1',
        text_a=['how are you', 'what is this'],
        text_b=[['hello world', 'fine thanks'], ['test example', 'really good']],
        label='positive'
    ),
    Example(
        guid='example_2',
        text_a=['question here', 'another one'],
        text_b=[['answer there', 'great stuff'], ['yes indeed', 'absolutely']],
        label='negative'
    ),
]

label_list = ['positive', 'negative', 'neutral']

ARGS = {
    'examples': examples,
    'label_list': label_list,
    'max_seq_length': 32,
    'max_utterance_num': 3,
    'tokenizer': tokenizer,
    'output_mode': 'classification'
}
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 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
get_p_at_n_in_m Ran
ran on a synthesized input
comprehensiveMap/MDFN/run_MDFN.py
code served (permissive licence) · get_code("5e86e78b6aff20f0")
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 int, ndim 0, dtype family int, 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 numpy as np

torch.manual_seed(0)

# Analyzing the function:
# - pred: needs to be indexable, support slicing, and sortable
# - n: integer for indexing into sorted list
# - m: integer for window size (slice length)
# - ind: integer for starting index

# Create a small prediction array
pred = torch.tensor([0.5, 0.8, 0.3, 0.9, 0.6, 0.7], dtype=torch.float32)

# Parameters:
# - ind: starting index (0-5 range for our pred of length 6)
# - m: window size (should be <= len(pred) - ind)
# - n: position to check in sorted window (1 <= n <= m)

n = 2
m = 4
ind = 1

ARGS = {
    "pred": pred,
    "n": n,
    "m": m,
    "ind": ind
}
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 int, ndim 0, dtype family int, 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
select_field Not yet run
unverified (harvested, no recorded run)
comprehensiveMap/MDFN/run_MDFN.py
pointer only (licence: MIT); the stored copy get_code serves, from yuweihao/reclor, is pointer only (licence: NONE) · get_code("0a546b305d274996")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from yuweihao/reclor, 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 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 3 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 later) and 2 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
select_field 9 other papers
3 dated earlier, 6 later
1908.05739 (2019-08)
Abductive Commonsense Reasoning
2002.04326 (2020-02)
ReClor: A Reading Comprehension Dataset Requiring Logical Reasoning
2004.04494 (2020-04)
MuTual: A Dataset for Multi-Turn Dialogue Reasoning
and 6 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-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

A multi-turn dialogue is composed of multiple utterances from two or more different speaker roles. Thus utterance- and speaker-aware clues are supposed to be well captured in models. However, in the existing retrieval-based multi-turn dialogue modeling, the pre-trained language models (PrLMs) as encoder represent the dialogues coarsely by taking the pairwise dialogue history and candidate response as a whole, the hierarchical information on either utterance interrelation or speaker roles coupled in such representations is not well addressed. In this work, we propose a novel model to fill such a gap by modeling the effective utterance-aware and speaker-aware representations entailed in a dialogue history. In detail, we decouple the contextualized word representations by masking mechanisms in Transformer-based PrLM, making each word only focus on the words in current utterance, other utterances, two speaker roles (i.e., utterances of sender and utterances of receiver), respectively. Experimental results show that our method boosts the strong ELECTRA baseline substantially in four public benchmark datasets, and achieves various new state-of-the-art performance over previous methods. A series of ablation studies are conducted to demonstrate the effectiveness of our method.

For agents

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

get_harvested_code_for_paper("2009.06504")
get_code_for_paper("2009.06504")
have("2009.06504")

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

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

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

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

Connect an agent — have() is free.