SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1908.07687 · 2019

MoEL: Mixture of Empathetic Listeners

arXiv · PDF · Open in the Atlas

Code that ran

5 of 8 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; 2 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 0 failures of our instrument; 3 no recorded run), measured 2026-11-21; 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/1908.07687.json · badge: /api/ran/1908.07687.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
HLTCHKUST/MoEL canonical (classifier label)
classifier basis: census
5 ran · 3 no recorded run
FunctionStatusWhere it lives
clean_msg Ran
ran on a synthesized input
HLTCHKUST/MoEL/get_ed_data.py
code served (permissive licence) · get_code("3c93764fe69d849d")
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 re

def clean_msg(msg, msg_type):
    if 'labels' not in msg_type:
        msg = msg[3 + len(msg_type):].strip()
    else:
        msg = msg[2 + len(msg_type):-1].strip()
    msg = re.sub('"', '', msg)
    return msg

ARGS = {
    'msg': '### error_type: This is a "test" message with quotes',
    'msg_type': 'error_type'
}
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 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
position_encoding Ran
ran, honoured the contract we drafted
HLTCHKUST/MoEL/model/common_layer.py
code served (permissive licence) · get_code("e6dc8a206c0c47a8")
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 ndarray, ndim 2, dtype family float, shape (10, 8) 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 numpy as np

ARGS = {
    "sentence_size": 10,
    "embedding_dim": 8,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (10, 8) — shape (10, 8) 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
rouge_n Ran
ran, honoured the contract we drafted
HLTCHKUST/MoEL/utils/metric.py
code served (permissive licence) · get_code("ee28f00102414dc1")
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 itertools

# Define small stand-in data for the rouge_n function
evaluated_sentences = [
    "the cat sat on the mat",
    "a dog ran in the park"
]

reference_sentences = [
    "the cat is on the mat",
    "the dog ran through the park"
]

n = 2

ARGS = {
    "evaluated_sentences": evaluated_sentences,
    "reference_sentences": reference_sentences,
    "n": n
}
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 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
sequence_mask Ran
ran on a synthesized input
HLTCHKUST/MoEL/utils/beam_omt.py
code served (permissive licence) · get_code("414d6410e1b754b0")
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, 3) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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)

# sequence_mask expects:
# - sequence_length: a tensor with .data, .size(0), .is_cuda, .unsqueeze()
# - max_len: optional int or None

# Create a small batch of sequence lengths
sequence_length = torch.tensor([3, 2], dtype=torch.long)

ARGS = {
    "sequence_length": sequence_length,
    "max_len": 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 Tensor, ndim 2, dtype family float, shape (2, 3) — shape (2, 3) 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
wer Ran
ran on a synthesized input
HLTCHKUST/MoEL/utils/metric.py
code served (permissive licence) · get_code("65dff947bbcbac08")
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 numpy

# The wer function takes two parameters: r and h
# Both should be sequences (lists) of words/tokens
# r is the reference (ground truth) sequence
# h is the hypothesis (predicted) sequence
# The function implements edit distance (Levenshtein distance) to calculate WER

ARGS = {
    "r": "what is it".split(),  # reference: ["what", "is", "it"]
    "h": "what is".split(),      # hypothesis: ["what", "is"]
}
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 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
clean Not yet run
unverified (harvested, no recorded run)
HLTCHKUST/MoEL/utils/data_reader.py
code served (permissive licence) · get_code("d6bb401edf268525")
How it ran

no invocation recorded.

moses_multi_bleu Not yet run
unverified (harvested, no recorded run)
HLTCHKUST/MoEL/utils/metric.py
code served (permissive licence) · get_code("ba2c0325e50bd0b8")
How it ran

no invocation recorded.

read_langs Not yet run
unverified (harvested, no recorded run)
HLTCHKUST/MoEL/utils/data_reader.py
code served (permissive licence) · get_code("e590737dc468ae59")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 6 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 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
position_encoding 5 other papers
1 dated earlier, 4 later
1905.10033 (2019-05)
Personalizing Dialogue Agents via Meta-Learning
2003.12738 (2020-03)
Variational Transformers for Diverse Response Generation
2010.01454 (2020-10)
MIME: MIMicking Emotions for Empathetic Response Generation
and 2 more not named here
rouge_n 5 other papers
2 dated earlier, 3 later
1805.09461 (2018-05)
Deep Reinforcement Learning For Sequence to Sequence Models
1905.10033 (2019-05)
Personalizing Dialogue Agents via Meta-Learning
2020.findings-emnlp.289 (2020 (year only))
Towards Zero-Shot Conditional Summarization with Adaptive Multi-Task Fine-Tuning
and 2 more not named here
sequence_mask 3 other papers
1 dated earlier, 2 later
1905.10033 (2019-05)
Personalizing Dialogue Agents via Meta-Learning
2003.12738 (2020-03)
Variational Transformers for Diverse Response Generation
2010.01454 (2020-10)
MIME: MIMicking Emotions for Empathetic Response Generation
wer 3 other papers
3 dated earlier
1804.08217 (2018-04)
Mem2Seq: Effectively Incorporating Knowledge Bases into End-to-End Task-Oriented Dialog Systems
1901.04713 (2019-01)
Global-to-local Memory Pointer Networks for Task-Oriented Dialogue
1905.10033 (2019-05)
Personalizing Dialogue Agents via Meta-Learning
clean 1 other paper
1 later
2010.01454 (2020-10)
MIME: MIMicking Emotions for Empathetic Response Generation
moses_multi_bleu 1 other paper
1 dated earlier
1905.10033 (2019-05)
Personalizing Dialogue Agents via Meta-Learning

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

Repositories linked to this paper

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

Abstract

Previous research on empathetic dialogue systems has mostly focused on generating responses given certain emotions. However, being empathetic not only requires the ability of generating emotional responses, but more importantly, requires the understanding of user emotions and replying appropriately. In this paper, we propose a novel end-to-end approach for modeling empathy in dialogue systems: Mixture of Empathetic Listeners (MoEL). Our model first captures the user emotions and outputs an emotion distribution. Based on this, MoEL will softly combine the output states of the appropriate Listener(s), which are each optimized to react to certain emotions, and generate an empathetic response. Human evaluations on empathetic-dialogues (Rashkin et al., 2018) dataset confirm that MoEL outperforms multitask training baseline in terms of empathy, relevance, and fluency. Furthermore, the case study on generated responses of different Listeners shows high interpretability of our model.

For agents

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

get_harvested_code_for_paper("1908.07687")
get_code_for_paper("1908.07687")
have("1908.07687")

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

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

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

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

Connect an agent — have() is free.