SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1510.03055 · 2015

A Diversity-Promoting Objective Function for Neural Conversation Models

arXiv · PDF · Open in the Atlas

Code that ran

8 of 13 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, 2 violated it and 6 have no contract verdict; 0 failures of our instrument; 5 no recorded run), measured 2026-11-23; 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/1510.03055.json · badge: /api/ran/1510.03055.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
UladzimirBaklan/qwerty community (classifier label)
classifier basis not recorded on the link
5 ran · 1 no recorded run
kennethjones17/chatbot community (classifier label)
classifier basis not recorded on the link
2 ran · 0 no recorded run
manu-sk/rnn_chatbot community (classifier label)
classifier basis not recorded on the link
1 ran · 4 no recorded run
FunctionStatusWhere it lives
acceptable Ran
ran, violated the contract we drafted
kennethjones17/chatbot/1.py
code served (permissive licence) · get_code("4c6947bcd84b3628")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) 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.

ARGS = {
    "data": "This is a sample text with less than fifty words and under one thousand characters."
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
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 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
format_data Ran
ran on a synthesized input
kennethjones17/chatbot/1.py
code served (permissive licence) · get_code("60443b1c88d3531b")
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 str. 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

# The function takes a single parameter 'data' which is a string
# It performs string operations: replace('\n', ...), replace('\r', ...), replace('"', ...)
# So we need to provide a string with these characters

data_input = 'Hello\nWorld\r"Test"String\nwith\rspecial"chars'

ARGS = {
    'data': data_input
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
forward_text Ran
ran on a synthesized input
UladzimirBaklan/qwerty/chatbot.py
code served (permissive licence) · get_code("be8210ed15439010")
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. 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

# Create a mock RNN network with forward_model method
class MockRNN(nn.Module):
    def __init__(self):
        super().__init__()
        self.state_size = 8
        self.zero_state = torch.zeros(1, 8)
        self.linear = nn.Linear(1, 8)
    
    def forward_model(self, sess, state, char_idx):
        # Returns (output, new_state)
        output = self.linear(torch.tensor([[char_idx]]).float())
        new_state = state + output
        return output, new_state

# Create a mock session object
class MockSession:
    def run(self, tensor):
        return tensor

# Create vocab as a dict mapping characters to indices
vocab = {
    'a': 0.0,
    'b': 1.0,
    'c': 2.0,
    '\n': 3.0,
}

# Create the network and session
net = MockRNN()
sess = MockSession()

# Create initial states - list of two state tensors
states = [
    torch.zeros(1, 8),
    torch.zeros(1, 8)
]

ARGS = {
    'net': net,
    'sess': sess,
    'states': states,
    'relevance': 0.5,
    'vocab': vocab,
    'prime_text': 'ab'
}
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 list — a list 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: none by the harness; any seed is in the setup block
get_paths Ran
ran on a synthesized input
UladzimirBaklan/qwerty/chatbot.py
code served (permissive licence) · get_code("cf672035bb7ea7a3")
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 os
import tempfile
import shutil

# Create a temporary directory structure with a checkpoint
temp_dir = tempfile.mkdtemp()

# Create a subdirectory to act as the save_dir
save_dir = os.path.join(temp_dir, 'model_checkpoint')
os.makedirs(save_dir, exist_ok=True)

# Create dummy checkpoint files
model_path = os.path.join(save_dir, 'model.ckpt')
with open(model_path, 'w') as f:
    f.write('dummy model')

# Create a checkpoint state file (what TensorFlow looks for)
checkpoint_state = os.path.join(save_dir, 'checkpoint')
with open(checkpoint_state, 'w') as f:
    f.write(f'model_checkpoint_path: "{model_path}"\n')

# Create the config and vocab files that the function returns paths for
config_file = os.path.join(save_dir, 'config.pkl')
with open(config_file, 'w') as f:
    f.write('dummy config')

vocab_file = os.path.join(save_dir, 'chars_vocab.pkl')
with open(vocab_file, 'w') as f:
    f.write('dummy vocab')

# Set up ARGS with the directory path
ARGS = {
    'input_path': save_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — 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
get_paths Ran
ran on a synthesized input
manu-sk/rnn_chatbot/chatbot.py
code served (permissive licence) · get_code("d14327156e4feb9e")
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 os
import tempfile
import tensorflow as tf

# Create a temporary directory structure with a checkpoint
temp_dir = tempfile.mkdtemp()

# Create a minimal checkpoint state file
checkpoint_state_content = """
model_checkpoint_path: "model.ckpt"
all_model_checkpoint_paths: "model.ckpt"
"""

checkpoint_state_path = os.path.join(temp_dir, "checkpoint")
with open(checkpoint_state_path, "w") as f:
    f.write(checkpoint_state_content)

# Create dummy checkpoint files
model_ckpt_path = os.path.join(temp_dir, "model.ckpt")
with open(model_ckpt_path, "w") as f:
    f.write("dummy checkpoint")

# Create dummy config and vocab files
with open(os.path.join(temp_dir, "config.pkl"), "w") as f:
    f.write("dummy config")

with open(os.path.join(temp_dir, "chars_vocab.pkl"), "w") as f:
    f.write("dummy vocab")

# Define ARGS with the directory path
ARGS = {
    "input_path": temp_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — 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
initial_state Ran
ran on a synthesized input
UladzimirBaklan/qwerty/chatbot.py
code served (permissive licence) · get_code("06af0c6db9c5a42b")
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 2, dtype family float, 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
import torch.nn as nn


class MockSession:
    """Mock TensorFlow session that can run operations."""
    def run(self, operation):
        # Simulate running a TensorFlow operation
        # Return a small tensor as the zero state
        return torch.zeros(2, 4)


class MockRNN(nn.Module):
    """Mock RNN network with a zero_state attribute."""
    def __init__(self):
        super().__init__()
        # Create a mock zero_state that can be "run" by the session
        self.zero_state = torch.zeros(2, 4)


net = MockRNN()
sess = MockSession()

ARGS = {
    "net": net,
    "sess": sess,
}
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 2, dtype family float, 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
post_qualifies Ran
ran on a synthesized input
UladzimirBaklan/qwerty/reddit-parse/reddit_parse.py
code served (permissive licence) · get_code("ac4d7ea9597a1622")
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 re

# Construct test arguments for post_qualifies

# Create a valid json_object with required fields
json_object = {
    'body': 'This is a valid post that should pass the length check',
    'subreddit': 'python',
    'id': 'abc123def456'
}

# Create a subreddit blacklist (empty for this test)
subreddit_blacklist = []

# Create a subreddit whitelist (empty allows all subreddits)
subreddit_whitelist = []

# Create a substring blacklist (empty allows all substrings)
substring_blacklist = []

ARGS = {
    'json_object': json_object,
    'subreddit_blacklist': subreddit_blacklist,
    'subreddit_whitelist': subreddit_whitelist,
    'substring_blacklist': substring_blacklist
}
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 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
str2bool Ran
ran, violated the contract we drafted
UladzimirBaklan/qwerty/reddit-parse/reddit_parse.py
code served (permissive licence) · get_code("f017532fc389cbfe")
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 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 argparse

def str2bool(v):
    if v.lower() in ('yes', 'true', 't', 'y', '1'):
        return True
    elif v.lower() in ('no', 'false', 'f', 'n', '0'):
        return False
    else:
        raise argparse.ArgumentTypeError('Boolean value expected.')

# Setup code to construct valid arguments
ARGS = {
    'v': 'true'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 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
clean_up_sentence Not yet run
unverified (harvested, no recorded run)
manu-sk/rnn_chatbot/man.py
code served (permissive licence) · get_code("16f8d75f772b43ce")
How it ran

no invocation recorded.

forward_text Not yet run
unverified (harvested, no recorded run)
manu-sk/rnn_chatbot/chatbot.py
code served (permissive licence) · get_code("9859280733338cb9")
How it ran

no invocation recorded.

initial_state Not yet run
unverified (harvested, no recorded run)
manu-sk/rnn_chatbot/chatbot.py
code served (permissive licence) · get_code("ddebb05026cc81da")
How it ran

no invocation recorded.

post_qualifies Not yet run
unverified (harvested, no recorded run)
manu-sk/rnn_chatbot/reddit-parse/reddit_parse.py
code served (permissive licence) · get_code("f542de6a921ff3e7")
How it ran

no invocation recorded.

read_comments_into_cache Not yet run
unverified (harvested, no recorded run)
UladzimirBaklan/qwerty/reddit-parse/reddit_parse.py
code served (permissive licence) · get_code("23ea4680c813da5b")
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, 2 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 11 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
str2bool 82 other papers
82 later
1703.06490 (2017-03)
Generating Multi-label Discrete Patient Records using Generative Adversarial Networks
1710.10467 (2017-10)
Generalized End-to-End Loss for Speaker Verification
1802.05983 (2018-02)
Disentangling by Factorising
and 79 more not named here
acceptable 1 other paper
1 dated earlier
1506.07285 (2015-06)
Ask Me Anything: Dynamic Memory Networks for Natural Language Processing

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

Repositories linked to this paper

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

Abstract

Sequence-to-sequence neural network models for generation of conversational responses tend to generate safe, commonplace responses (e.g., "I don't know") regardless of the input. We suggest that the traditional objective function, i.e., the likelihood of output (response) given input (message) is unsuited to response generation tasks. Instead we propose using Maximum Mutual Information (MMI) as the objective function in neural models. Experimental results demonstrate that the proposed MMI models produce more diverse, interesting, and appropriate responses, yielding substantive gains in BLEU scores on two conversational datasets and in human evaluations.

For agents

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

get_harvested_code_for_paper("1510.03055")
get_code_for_paper("1510.03055")
have("1510.03055")

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

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

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

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

Connect an agent — have() is free.