SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2024.naacl-long.326 · NAACL · 2024

LSTDial: Enhancing Dialogue Generation via Long-and Short-Term Measurement Feedback

Zixing Zhang, Zhihua Jiang, Huan Zhao, Xupeng Zha, Guanghui Ye

Code that ran

10 of 12 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 9 failures of our instrument; 2 no recorded run), measured 2026-11-24; 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/2024.naacl-long.326.json · badge: /api/ran/2024.naacl-long.326.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
LanXiu0523/RLHF_instructGPT canonical (classifier label)
classifier basis: census
10 ran · 2 no recorded run
FunctionStatusWhere it lives
gather_log_probs Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
LanXiu0523/RLHF_instructGPT/applications/train/ppo_trainer.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from zyushun/adam-mini, is pointer only (licence: NONE) · get_code("2f0a690c70d11c23")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from zyushun/adam-mini, 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. A run is recorded.

generate Ran
ran; our contract draft was wrong, not the code
LanXiu0523/RLHF_instructGPT/applications/inference/prompt_eval.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from JiancongXiao/PM_RLHF, is pointer only (licence: NONE) · get_code("451c619b9609c3c0")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from JiancongXiao/PM_RLHF, 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. A run is recorded.

generate_constrastive_search Ran
ran; our contract draft was wrong, not the code
LanXiu0523/RLHF_instructGPT/applications/inference/prompt_eval.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from JiancongXiao/PM_RLHF, is pointer only (licence: NONE) · get_code("385922750eb70702")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from JiancongXiao/PM_RLHF, 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. A run is recorded.

get_eval_ds_config Ran
ran; our contract draft was wrong, not the code
LanXiu0523/RLHF_instructGPT/applications/utils/ds_utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from lyan62/FoodieQA, is pointer only (licence: NONE) · get_code("1182381b66bc654d")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from lyan62/FoodieQA, 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. A run is recorded.

get_train_ds_config Ran
ran; our contract draft was wrong, not the code
LanXiu0523/RLHF_instructGPT/applications/utils/ds_utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from xsc1234/info-rag, is pointer only (licence: NONE) · get_code("0b7ef7574493a1eb")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from xsc1234/info-rag, 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. A run is recorded.

log_init Ran
ran, honoured the contract we drafted
LanXiu0523/RLHF_instructGPT/applications/train/rlhf_engine.py
code served (permissive licence) · get_code("429d42a3bf925da5")
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 float, 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 time
import torch
import torch.nn as nn
import torch.distributed as dist

# Mock distributed.get_rank() to return 0 so the function executes
class MockDistributed:
    @staticmethod
    def get_rank():
        return 0

# Patch torch.distributed.get_rank
torch.distributed.get_rank = MockDistributed.get_rank

ARGS = {
    'model_name': 'ResNet50',
    'stime': None,
}
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 float, 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
only_optimize_lora_parameters Ran
ran; our contract draft was wrong, not the code
LanXiu0523/RLHF_instructGPT/applications/utils/module/lora.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from esyoon7/rlhf-tlcr, is pointer only (licence: NONE) · get_code("e617041853afd002")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from esyoon7/rlhf-tlcr, 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. A run is recorded.

prepare_datapair Ran
ran; our contract draft was wrong, not the code
LanXiu0523/RLHF_instructGPT/applications/inference/RM_eval.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from JiancongXiao/PM_RLHF, is pointer only (licence: NONE) · get_code("ed8922a081978462")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from JiancongXiao/PM_RLHF, 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. A run is recorded.

prepare_singlesample Ran
ran; our contract draft was wrong, not the code
LanXiu0523/RLHF_instructGPT/applications/inference/RM_eval.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from JiancongXiao/PM_RLHF, is pointer only (licence: NONE) · get_code("779ea48e220986c3")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from JiancongXiao/PM_RLHF, 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. A run is recorded.

to_device Ran
ran; our contract draft was wrong, not the code
LanXiu0523/RLHF_instructGPT/applications/utils/utils.py
code served (permissive licence) · get_code("387b9e6c4f21dd62")
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 torch
import torch.nn as nn

torch.manual_seed(0)

# Create a batch dictionary with various tensor types and non-tensor values
batch = {
    'input_ids': torch.randint(0, 100, (2, 4)),  # 2D tensor
    'attention_mask': torch.ones((2, 4), dtype=torch.long),  # 2D tensor
    'logits': torch.randn(2, 3),  # 2D tensor with different shape
    'label': torch.tensor([0, 1]),  # 1D tensor
    'metadata': 'some_string',  # Non-tensor value
    'count': 42,  # Non-tensor value
}

device = 'cpu'

ARGS = {
    'batch': batch,
    'device': device,
}
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 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_tokenizer Not yet run
unverified (harvested, no recorded run)
LanXiu0523/RLHF_instructGPT/applications/utils/utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from YeTianJHU/AlphaLLM, is pointer only (licence: NONE) · get_code("f4d93f19b3b4e1ac")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from YeTianJHU/AlphaLLM, 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.

load_hf_tokenizer Not yet run
unverified (harvested, no recorded run)
LanXiu0523/RLHF_instructGPT/applications/utils/utils.py
code served (permissive licence) · get_code("f9168a26bd28498e")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 11 are also present in other papers whose code we hold (9 with at least one paper dated earlier, 0 the same month, 1 later) and 1 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
gather_log_probs 9 other papers
2 dated earlier, 7 same year, order not determinable
2308.02223 (2023-08)
ESRL: Efficient Sampling-based Reinforcement Learning for Sequence Generation
2310.10505 (2023-10)
ReMax: A Simple, Effective, and Efficient Reinforcement Learning Method for Aligning Large Language Models
2401.13275 (2024-01)
Can AI Assistants Know What They Don't Know?
and 6 more not named here
log_init 9 other papers
2 dated earlier, 1 later, 6 same year, order not determinable
2308.02223 (2023-08)
ESRL: Efficient Sampling-based Reinforcement Learning for Sequence Generation
2310.10505 (2023-10)
ReMax: A Simple, Effective, and Efficient Reinforcement Learning Method for Aligning Large Language Models
2401.13275 (2024-01)
Can AI Assistants Know What They Don't Know?
and 6 more not named here
only_optimize_lora_parameters 6 other papers
2 dated earlier, 4 same year, order not determinable
2310.10505 (2023-10)
ReMax: A Simple, Effective, and Efficient Reinforcement Learning Method for Aligning Large Language Models
2310.20246 (2023-10)
Breaking Language Barriers in Multilingual Mathematical Reasoning: Insights and Observations
2402.14700 (2024-02)
Unveiling Linguistic Regions in Large Language Models
and 3 more not named here
to_device 6 other papers
1 dated earlier, 5 same year, order not determinable
2310.20246 (2023-10)
Breaking Language Barriers in Multilingual Mathematical Reasoning: Insights and Observations
2402.05808 (2024-02)
Training Large Language Models for Reasoning through Reverse Curriculum Reinforcement Learning
2402.18150 (2024-02)
Unsupervised Information Refinement Training of Large Language Models for Retrieval-Augmented Generation
and 3 more not named here
generate_constrastive_search 4 other papers
3 dated earlier, 1 same year, order not determinable
2308.02223 (2023-08)
ESRL: Efficient Sampling-based Reinforcement Learning for Sequence Generation
2310.10505 (2023-10)
ReMax: A Simple, Effective, and Efficient Reinforcement Learning Method for Aligning Large Language Models
2310.20246 (2023-10)
Breaking Language Barriers in Multilingual Mathematical Reasoning: Insights and Observations
and 1 more not named here
get_eval_ds_config 4 other papers
4 same year, order not determinable
2402.18150 (2024-02)
Unsupervised Information Refinement Training of Large Language Models for Retrieval-Augmented Generation
2403.14112 (2024-03)
Benchmarking Chinese Commonsense Reasoning of LLMs: From Chinese-Specifics to Reasoning-Memorization Correlations
2406.08434 (2024-06)
TASTE: Teaching Large Language Models to Translate through Self-Reflection
and 1 more not named here
generate 3 other papers
2 dated earlier, 1 same year, order not determinable
2308.02223 (2023-08)
ESRL: Efficient Sampling-based Reinforcement Learning for Sequence Generation
2310.20246 (2023-10)
Breaking Language Barriers in Multilingual Mathematical Reasoning: Insights and Observations
2405.16455 (2024-05)
On the Algorithmic Bias of Aligning Large Language Models with RLHF: Preference Collapse and Matching Regularization
prepare_datapair 3 other papers
1 dated earlier, 2 same year, order not determinable
2310.10505 (2023-10)
ReMax: A Simple, Effective, and Efficient Reinforcement Learning Method for Aligning Large Language Models
2404.17287 (2024-04)
When to Trust LLMs: Aligning Confidence with Response Quality
2405.16455 (2024-05)
On the Algorithmic Bias of Aligning Large Language Models with RLHF: Preference Collapse and Matching Regularization
prepare_singlesample 3 other papers
1 dated earlier, 2 same year, order not determinable
2310.10505 (2023-10)
ReMax: A Simple, Effective, and Efficient Reinforcement Learning Method for Aligning Large Language Models
2404.17287 (2024-04)
When to Trust LLMs: Aligning Confidence with Response Quality
2405.16455 (2024-05)
On the Algorithmic Bias of Aligning Large Language Models with RLHF: Preference Collapse and Matching Regularization
get_tokenizer 2 other papers
1 dated earlier, 1 same year, order not determinable
2310.20246 (2023-10)
Breaking Language Barriers in Multilingual Mathematical Reasoning: Insights and Observations
2404.12253 (2024-04)
Toward Self-Improvement of LLMs via Imagination, Searching, and Criticizing
get_train_ds_config 1 other paper
1 same year, order not determinable
2402.18150 (2024-02)
Unsupervised Information Refinement Training of Large Language Models for Retrieval-Augmented Generation

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

Generating high-quality responses is a key challenge for any open domain dialogue systems. However, even though there exist a variety of quality dimensions especially designed for dialogue evaluation (e.g., coherence and diversity scores), current dialogue systems rarely utilize them to guide the response generation during training. To alleviate this issue, we propose LSTDial (Long-and Short-Term Dialogue), a novel two-stage framework which generates and utilizes conversation evaluation as explicit feedback during training. Specifically, we fine-tune pre-trained dialogue systems through using turn-level quality feedback in the first stage and further train ever-improving dialogue agents through using dialogue-level quality feedback in the second stage. By using our approach on dialogue systems, capable of enabling dialogue generation with both short-term capabilities (generating more fluent, relevant and varied responses at the turn-level) and long-term capabilities (generating more coherent, engaging and informative responses at the dialogue-level). We implement LSTDial on four strong baseline models and experiment with two open-domain dialogue datasets. Experimental results show that LSTDial achieves significant improvement, enabling to generate better dialogue responses in terms of both human and automatic evaluation.

For agents

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

get_harvested_code_for_paper("2024.naacl-long.326")
get_code_for_paper("2024.naacl-long.326")
have("2024.naacl-long.326")

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

curl https://syntology.ai/api/ran/2024.naacl-long.326.json

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

[![Syntology run record](https://syntology.ai/api/ran/2024.naacl-long.326.svg)](https://syntology.ai/paper/2024.naacl-long.326)

Connect an agent — have() is free.