SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2023.findings-emnlp.313 · EMNLP Findings · 2023

Dior-CVAE: Pre-trained Language Models and Diffusion Priors for Variational Dialog Generation

Iryna Gurevych, Tianyu Yang, Thy Thy

Open in the Atlas

Code that ran

9 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; 1 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 4 failures of our instrument; 0 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/2023.findings-emnlp.313.json · badge: /api/ran/2023.findings-emnlp.313.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
UKPLab/dior-cvae canonical (classifier label)
classifier basis: census
9 ran · 0 no recorded run
FunctionStatusWhere it lives
approx_standard_normal_cdf Ran
ran; our contract draft was wrong, not the code
UKPLab/dior-cvae/improved_diffusion/losses.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from quandao10/slct, is pointer only (licence: NONE) · get_code("cfd76fd0d89574a4")
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 quandao10/slct, 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.

bleu Ran
ran on a synthesized input
UKPLab/dior-cvae/evaluation.py
code served (permissive licence) · get_code("aee28ff9a16afe4c")
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 tuple, 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 numpy as np
from nltk.translate import bleu_score
from nltk.translate.bleu_score import SmoothingFunction

# Set random seed for reproducibility
np.random.seed(0)

# Create sample hypotheses and references
hyps = [
    "the cat sat on the mat",
    "a dog ran in the park"
]

refs = [
    "the cat is sitting on the mat",
    "the dog runs in the park"
]

# Define ARGS dict with all parameters
ARGS = {
    "hyps": hyps,
    "refs": refs,
    "ignore_indices": None,
    "output_path": None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
nltk, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple 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
discretized_gaussian_log_likelihood Ran
ran; our contract draft was wrong, not the code
UKPLab/dior-cvae/improved_diffusion/losses.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from quandao10/slct, is pointer only (licence: NONE) · get_code("cd33283d615fb3d7")
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 quandao10/slct, 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.

distinct Ran
ran on a synthesized input
UKPLab/dior-cvae/evaluation.py
code served (permissive licence) · get_code("2e22c39205e806c6")
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 tuple, 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.

from collections import Counter
import numpy as np
import tempfile
import os

ARGS = {
    "hyps": [
        "the quick brown fox jumps over the lazy dog",
        "a fast brown fox leaps over a sleepy dog",
        "the slow red fox crawls under the sleeping cat"
    ],
    "output_path": None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple 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
init_temb_fun Ran
ran on a synthesized input
UKPLab/dior-cvae/diffusion/diff_net.py
code served (permissive licence) · get_code("9cd33c6e28183817")
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 PositionalEmbedding. 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 math

torch.manual_seed(0)

ARGS = {
    'embedding_type': 'positional',
    'embedding_scale': 1.0,
    'embedding_dim': 8
}
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 PositionalEmbedding — a PositionalEmbedding output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PositionalEmbedding 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
normal_kl Ran
ran, honoured the contract we drafted
UKPLab/dior-cvae/improved_diffusion/losses.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from facebookresearch/agrol, is pointer only (licence: NOASSERTION) · get_code("cf2798b666b231ca")
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 facebookresearch/agrol, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

shift_tokens_right Ran
ran; our contract draft was wrong, not the code
UKPLab/dior-cvae/modeling_bart.py
code served (permissive licence) · get_code("a315b8fc32a18efe")
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 2, dtype family int, shape (2, 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 batch of input_ids
# Shape: (batch_size=2, sequence_length=4)
input_ids = torch.tensor([
    [101, 2054, 2003, 102],
    [101, 1045, 2572, 102]
], dtype=torch.long)

# Define pad_token_id
pad_token_id = 0

# Define decoder_start_token_id
decoder_start_token_id = 2

ARGS = {
    "input_ids": input_ids,
    "pad_token_id": pad_token_id,
    "decoder_start_token_id": decoder_start_token_id,
}
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 2, dtype family int, shape (2, 4) — shape (2, 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
soft_clamp5 Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
UKPLab/dior-cvae/dist.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from trustedllm/regavae, is pointer only (licence: NONE) · get_code("cd334034d398bfaa")
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 trustedllm/regavae, 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.

sort_result Ran
ran on a synthesized input
UKPLab/dior-cvae/evaluation.py
code served (permissive licence) · get_code("bd2db2191c52462b")
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 torch

torch.manual_seed(0)

# The function expects a dict with keys: 'inter_dist1', 'inter_dist2', 'bleu_1', 'bleu_2'
# All values should be numeric (int or float) since they're being added together

ex = {
    'inter_dist1': 0.15,
    'inter_dist2': 0.22,
    'bleu_1': 0.45,
    'bleu_2': 0.38
}

ARGS = {
    'ex': ex
}
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

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, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 4 later) and 4 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
normal_kl 160 other papers
25 dated earlier, 85 later, 50 same year, order not determinable · 19 only as an assembly brick
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2105.05233 (2021-05)
Diffusion Models Beat GANs on Image Synthesis
2111.11672 (2021-11)
Few-shot Image Generation with Mixup-based Distance Learning
and 157 more not named here
approx_standard_normal_cdf 154 other papers
25 dated earlier, 81 later, 48 same year, order not determinable · 17 only as an assembly brick
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2105.05233 (2021-05)
Diffusion Models Beat GANs on Image Synthesis
2111.11672 (2021-11)
Few-shot Image Generation with Mixup-based Distance Learning
and 151 more not named here
discretized_gaussian_log_likelihood 128 other papers
25 dated earlier, 56 later, 47 same year, order not determinable · 16 only as an assembly brick
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2105.05233 (2021-05)
Diffusion Models Beat GANs on Image Synthesis
2111.11672 (2021-11)
Few-shot Image Generation with Mixup-based Distance Learning
and 125 more not named here
shift_tokens_right 7 other papers
5 dated earlier, 2 later
2109.04096 (2021-09)
A Three-Stage Learning Framework for Low-Resource Knowledge-Grounded Dialogue Generation
2201.05966 (2022-01)
UNIFIEDSKG: Unifying and Multi-Tasking Structured Knowledge Grounding with Text-to-Text Language Models
2203.07836 (2022-03)
Graph Pre-training for AMR Parsing and Generation
and 4 more not named here
soft_clamp5 3 other papers
2 dated earlier, 1 same year, order not determinable
2106.06819 (2021-06)
D2C: Diffusion-Denoising Models for Few-shot Conditional Generation
2207.06130 (2022-07)
Fuse It More Deeply! A Variational Transformer with Layer-Wise Latent Variable Inference for Text Generation
2310.10567 (2023-10)
RegaVAE: A Retrieval-Augmented Gaussian Mixture Variational Auto-Encoder for Language Modeling

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

Current variational dialog models have employed pre-trained language models (PLMs) to parameterize the likelihood and posterior distributions. However, the Gaussian assumption made on the prior distribution is incompatible with these distributions, thus restricting the diversity of generated responses. These models also suffer from posterior collapse, i.e., the decoder tends to ignore latent variables and directly access information captured in the encoder through the cross-attention mechanism. In this work, we propose Dior-CVAE, a hierarchical conditional variational autoencoder (CVAE) with diffusion priors to address these challenges. We employ a diffusion model to increase the complexity of the prior distribution and its compatibility with the distributions produced by a PLM. Also, we propose memory dropout to the cross-attention mechanism, which actively encourages the use of latent variables for response generation. Our method requires parameters that are comparable to those of previous studies while maintaining comparable inference time, despite the integration of the diffusion model. Overall, experiments across two commonly used open-domain dialog datasets show that our method can generate more diverse responses even without largescale dialog pre-training. Code is available at https://github.com/UKPLab/dior-cvae.

For agents

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

get_harvested_code_for_paper("2023.findings-emnlp.313")
get_code_for_paper("2023.findings-emnlp.313")
have("2023.findings-emnlp.313")

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

curl https://syntology.ai/api/ran/2023.findings-emnlp.313.json

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

[![Syntology run record](https://syntology.ai/api/ran/2023.findings-emnlp.313.svg)](https://syntology.ai/paper/2023.findings-emnlp.313)

Connect an agent — have() is free.