SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2506.13366 · ACL · 2025

Enhancing Goal-oriented Proactive Dialogue Systems via Consistency Reflection and Correction

Qiaoming Zhu, Peifeng Li, Yaxin Fan, Didi Zhang

arXiv · PDF · Open in the Atlas

Code that ran

10 of 13 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (3 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 1 violated it and 5 have no contract verdict; 4 failures of our instrument; 3 no recorded run), measured 2026-11-24; 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/2506.13366.json · badge: /api/ran/2506.13366.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
zhyidi/CRC community
Papers with Code archive
9 ran · 3 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
FunctionStatusWhere it lives
DecoderOutput Ran
ran on a synthesized input · constructed an object; no result was computed
zhyidi/CRC/model/Planner.py
code served (permissive licence) · get_code("de74d723ba5961b4")
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 an instance of its own class, DecoderOutput: the run constructed the object and did not call it, so no result was computed. 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 numpy as np
from dataclasses import dataclass

torch.manual_seed(0)

# DecoderOutput is a dataclass, so we need to construct it with valid arguments
# Looking at the class definition, it has these fields:
# - last_hidden_state: torch.FloatTensor = None
# - past_key_values: Optional[Tuple[Tuple[torch.FloatTensor]]] = None
# - hidden_states: Optional[Tuple[torch.FloatTensor]] = None
# - attentions: Optional[Tuple[torch.FloatTensor]] = None
# - cross_attentions: Optional[Tuple[torch.FloatTensor]] = None

# Create small tensors for testing
batch_size = 2
seq_len = 3
hidden_dim = 4
num_layers = 2

# Create last_hidden_state tensor
last_hidden_state = torch.randn(batch_size, seq_len, hidden_dim)

# Create past_key_values - tuple of tuples of tensors for each layer
# Format: (num_layers, 2, batch_size, num_heads, seq_len, head_dim)
past_key_values = tuple(
    (torch.randn(batch_size, 2, hidden_dim), torch.randn(batch_size, 2, hidden_dim))
    for _ in range(num_layers)
)

# Create hidden_states - tuple of tensors, one for each layer
hidden_states = tuple(torch.randn(batch_size, seq_len, hidden_dim) for _ in range(num_layers + 1))

# Create attentions - tuple of attention tensors for each layer
attentions = tuple(torch.randn(batch_size, 2, seq_len, seq_len) for _ in range(num_layers))

# Create cross_attentions - tuple of cross-attention tensors for each layer
cross_attentions = tuple(torch.randn(batch_size, 2, seq_len, seq_len) for _ in range(num_layers))

ARGS = {
    "last_hidden_state": last_hidden_state,
    "past_key_values": past_key_values,
    "hidden_states": hidden_states,
    "attentions": attentions,
    "cross_attentions": cross_attentions,
}
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 DecoderOutput — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a DecoderOutput 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
InformationFusion Ran
ran on a synthesized input
zhyidi/CRC/model/Planner.py
code served (permissive licence) · get_code("5248684df56de662")
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; 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 torch import nn

class InformationFusion(nn.Module):
    """
    Information Fusion Layer.
    """

    def __init__(self, d_model, init_std=0.01):
        super().__init__()
        self.init_std = init_std
        self.gate_layer1 = nn.Linear(d_model * 2, 1, bias=True)
        self.gate_layer2 = nn.Linear(d_model * 2, 1, bias=True)
        self.sigmod = nn.Sigmoid()

    def _init_all_weights(self):
        self.gate_layer1.weight.data.normal_(mean=0.0, std=self.init_std)
        if self.gate_layer1.bias is not None:
            self.gate_layer1.bias.data.zero_()
        self.gate_layer2.weight.data.normal_(mean=0.0, std=self.init_std)
        if self.gate_layer2.bias is not None:
            self.gate_layer2.bias.data.zero_()

    def forward(self, k_states, h_states, u_states):
        gate1 = self.sigmod(self.gate_layer1(torch.cat([k_states, h_states], -1)))
        states = gate1 * k_states + (1 - gate1) * h_states
        gate2 = self.sigmod(self.gate_layer2(torch.cat([u_states, states], -1)))
        f_states = gate2 * u_states + (1 - gate2) * states
        return f_states


INIT_ARGS = {
    "d_model": 4,
    "init_std": 0.01,
}

ARGS = {
    "k_states": torch.randn(2, 3, 4),
    "h_states": torch.randn(2, 3, 4),
    "u_states": torch.randn(2, 3, 4),
}

if __name__ == "__main__":
    model = InformationFusion(**INIT_ARGS)
    model._init_all_weights()
    output = model(**ARGS)
    print("Output shape:", output.shape)
    print("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 — 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)
ModelOutput Ran
ran on a synthesized input · constructed an object; no result was computed
zhyidi/CRC/model/Planner.py
code served (permissive licence) · get_code("fd1d3755e28d7813")
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 an instance of its own class, ModelOutput: the run constructed the object and did not call it, so no result was computed. 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 numpy as np
from dataclasses import dataclass, field
from typing import Optional

torch.manual_seed(0)

@dataclass
class TestModelOutput:
    """Concrete implementation of ModelOutput for testing"""
    logits: torch.Tensor = None
    hidden_state: Optional[torch.Tensor] = None
    loss: Optional[torch.Tensor] = None

ARGS = {
    "self": None  # This is a class, not a function with self parameter
}
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 ModelOutput — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ModelOutput 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
MultiHeadAttention Ran
ran on a synthesized input
zhyidi/CRC/model/Planner.py
code served (permissive licence) · get_code("b05865273b70e31c")
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 numpy as np

# INIT_ARGS for MultiHeadAttention.__init__
INIT_ARGS = {
    'embed_dim': 8,
    'num_heads': 2,
    'dropout': 0.1,
    'init_std': 0.01,
    'is_decoder': False,
    'bias': True
}

# ARGS for MultiHeadAttention.forward
# Self-attention case (no cross-attention)
batch_size = 2
seq_len = 5
embed_dim = 8

hidden_states = torch.randn(batch_size, seq_len, embed_dim)

ARGS = {
    'hidden_states': hidden_states,
    'key_value_states': None,
    'past_key_value': None,
    'attention_mask': None,
    'layer_head_mask': None,
    'output_attentions': False
}
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 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)
PlanPositionalEmbedding Ran
ran on a synthesized input · constructed an object; no result was computed
zhyidi/CRC/model/Planner.py
code served (permissive licence) · get_code("abca31cf48e089f3")
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 an instance of its own class, PlanPositionalEmbedding: the run constructed the object and did not call it, so no result was computed. 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 torch import nn

torch.manual_seed(0)

ARGS = {
    "num_embeddings": 10,
    "embedding_dim": 4,
}
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 PlanPositionalEmbedding — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a PlanPositionalEmbedding 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
_expand_mask Ran
ran; our contract draft was wrong, not the code
zhyidi/CRC/model/Planner.py
code served (permissive licence) · get_code("9feb0283a043b65c")
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 4, dtype family float, shape (2, 1, 4, 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 attention mask tensor of shape [bsz, seq_len]
# bsz=2, seq_len=4
mask = torch.randint(0, 2, (2, 4), dtype=torch.float32)

# dtype for expansion
dtype = torch.float32

# Optional tgt_len parameter - we'll test with None to use src_len as default
tgt_len = None

ARGS = {
    "mask": mask,
    "dtype": dtype,
    "tgt_len": tgt_len,
}
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 4, dtype family float, shape (2, 1, 4, 4) — shape (2, 1, 4, 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
_expand_mask_v2 Ran
ran; our contract draft was wrong, not the code
zhyidi/CRC/model/Planner.py
code served (permissive licence) · get_code("bba54554e3e7e975")
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 4, dtype family float, shape (2, 1, 3, 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 attention mask tensor of shape [bsz, seq_len]
# bsz = 2 (batch size), seq_len = 4 (source sequence length)
mask = torch.tensor([
    [1, 1, 1, 0],
    [1, 1, 0, 0]
], dtype=torch.float32)

# dtype for output tensor
dtype = torch.float32

# Optional target length (if None, will default to src_len)
tgt_len = 3

ARGS = {
    "mask": mask,
    "dtype": dtype,
    "tgt_len": tgt_len,
}
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 4, dtype family float, shape (2, 1, 3, 4) — shape (2, 1, 3, 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
_make_causal_mask Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zhyidi/CRC/model/Planner.py
code served (permissive licence) · get_code("1251c9ca621f80d2")
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 4, dtype family float, shape (2, 1, 4, 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)

# The function expects:
# - input_ids_shape: torch.Size (a tuple-like of ints representing shape)
# - dtype: torch.dtype (a torch data type)
# - past_key_values_length: int (optional, defaults to 0)

ARGS = {
    "input_ids_shape": torch.Size([2, 4]),
    "dtype": torch.float32,
    "past_key_values_length": 0,
}
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 4, dtype family float, shape (2, 1, 4, 4) — shape (2, 1, 4, 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
gelu Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from UCDvision/NOLA
pointer only · get_code("8d23fbe2b99b840b")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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. A run is recorded.

is_tensor Ran
ran, violated the contract we drafted
zhyidi/CRC/model/Planner.py
code served (permissive licence) · get_code("d53bcfa3d5abcf4d")
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 bool, 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
import numpy as np

torch.manual_seed(0)

ARGS = {
    "x": torch.tensor([[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0]])
}
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 bool, 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
DecoderLayer Not yet run
unverified (harvested, no recorded run)
zhyidi/CRC/model/Planner.py
code served (permissive licence) · get_code("15ca36d0097c18b2")
How it ran

no invocation recorded.

KTMutualAttention Not yet run
unverified (harvested, no recorded run)
zhyidi/CRC/model/Planner.py
code served (permissive licence) · get_code("3905e0a24719107f")
How it ran

no invocation recorded.

Planner Not yet run
unverified (harvested, no recorded run)
zhyidi/CRC/model/Planner.py
code served (permissive licence) · get_code("46145beb10b52410")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 0 later) and 10 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
gelu
brick of this paper's assembly: helper
51 other papers
51 dated earlier · 8 only as an assembly brick
1706.03762 (2017-06)
Attention Is All You Need
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1901.02860 (2019-01)
Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context
and 48 more not named here
_expand_mask
brick of this paper's assembly: helper
3 other papers
3 dated earlier
1910.13461 (2019-10)
BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension
2210.00312 (2022-10)
Multimodal Analogical Reasoning over Knowledge Graphs
2308.07648 (2023-08)
Prompt Switch: Efficient CLIP Adaptation for Text-Video Retrieval
is_tensor
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2308.06160 (2023-08)
DatasetDM: Synthesizing Data with Perception Annotations Using Diffusion Models

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

Repositories linked to this paper

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

Abstract

Goal-oriented proactive dialogue systems are designed to guide user conversations seamlessly towards specific objectives by planning a goal-oriented path. However, previous research has focused predominantly on optimizing these paths while neglecting the inconsistencies that may arise between generated responses and dialogue contexts, including user profiles, dialogue history, domain knowledge, and subgoals. To address this issue, we introduce a model-agnostic two-stage Consistency Reflection and Correction (CRC) framework. Specifically, in the consistency reflection stage, the model is prompted to reflect on the discrepancies between generated responses and dialogue contexts, identifying inconsistencies and suggesting possible corrections. In the consistency correction stage, the model generates responses that are more consistent with the dialogue context based on these reflection results. We conducted experiments on various model architectures with different parameter sizes, including encoder-decoder models (BART, T5) and decoder-only models (GPT-2, DialoGPT, Phi3, Mistral and LLaMA3), and the experimental results on three datasets demonstrate that our CRC framework significantly improves the consistency between generated responses and dialogue contexts. Our code is publicly available at: https://github.com/zhyidi/CRC.

For agents

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

get_harvested_code_for_paper("2506.13366")
get_code_for_paper("2506.13366")
have("2506.13366")

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

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

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

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

Connect an agent — have() is free.