SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2109.04080 · EMNLP · 2021

Low-Resource Dialogue Summarization with Domain-Agnostic Multi-Source Pretraining

Qi Zhang, Tao Gui, Yicheng Zou, Xingwu Hu, Bolin Zhu

arXiv · PDF · Open in the Atlas

Code that ran

7 of 13 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (5 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 2 failures of our instrument; 6 no recorded run), measured 2026-11-22; 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/2109.04080.json · badge: /api/ran/2109.04080.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
RowitZou/DAMS community
Papers with Code archive
7 ran · 6 no recorded run
FunctionStatusWhere it lives
Generator Ran
ran on a synthesized input · constructed an object; no result was computed
RowitZou/DAMS/src/models/dams.py
code served (permissive licence) · get_code("90ddea3ab96085b0")
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, Generator: 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 torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "vocab_size": 10,
    "dec_hidden_size": 8,
    "pad_idx": 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 Generator — 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 Generator 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
GradientReversal Ran
ran on a synthesized input · constructed an object; no result was computed
RowitZou/DAMS/src/models/dams.py
code served (permissive licence) · get_code("2e142e742c55c297")
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, GradientReversal: 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 torch.nn as nn
from torch.autograd import Function

torch.manual_seed(0)

class GradientReversalFunction(Function):
    """
    Gradient Reversal Layer from:
    Unsupervised Domain Adaptation by Backpropagation (Ganin & Lempitsky, 2015)
    Forward pass is the identity function. In the backward pass,
    the upstream gradients are multiplied by -lambda (i.e. gradient is reversed)
    """

    @staticmethod
    def forward(ctx, x, lambda_):
        ctx.lambda_ = lambda_
        return x.clone()

    @staticmethod
    def backward(ctx, grads):
        lambda_ = ctx.lambda_
        lambda_ = grads.new_tensor(lambda_)
        dx = -lambda_ * grads
        return (dx, None)

class GradientReversal(torch.nn.Module):

    def __init__(self, lambda_=1):
        super(GradientReversal, self).__init__()
        self.lambda_ = lambda_

    def forward(self, x):
        return GradientReversalFunction.apply(x, self.lambda_)

ARGS = {
    'lambda_': 0.5
}
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 GradientReversal — 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 GradientReversal 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
MultiHeadedAttention Ran
ran on a synthesized input · constructed an object; no result was computed
RowitZou/DAMS/src/models/dams.py
code served (permissive licence) · get_code("01f7839e605de391")
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, MultiHeadedAttention: 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 torch.nn as nn
import math

torch.manual_seed(0)

# Construct arguments for MultiHeadedAttention.forward()

# Create the module
head_count = 2
model_dim = 4
dropout = 0.1
use_final_linear = True

attention_module = nn.MultiheadAttention(
    embed_dim=model_dim,
    num_heads=head_count,
    dropout=dropout,
    batch_first=False
)

# For the actual MultiHeadedAttention class from the code:
attention_module = type('MultiHeadedAttention', (), {
    '__init__': lambda self: None,
    'head_count': head_count,
    'model_dim': model_dim,
    'dim_per_head': model_dim // head_count,
    'linear_keys': nn.Linear(model_dim, head_count * (model_dim // head_count)),
    'linear_values': nn.Linear(model_dim, head_count * (model_dim // head_count)),
    'linear_query': nn.Linear(model_dim, head_count * (model_dim // head_count)),
    'softmax': nn.Softmax(dim=-1),
    'dropout': nn.Dropout(dropout),
    'use_final_linear': use_final_linear,
    'final_linear': nn.Linear(model_dim, model_dim) if use_final_linear else None,
})()

# Create input tensors
batch_size = 2
key_len = 3
query_len = 3

key = torch.randn(batch_size, key_len, model_dim)
value = torch.randn(batch_size, key_len, model_dim)
query = torch.randn(batch_size, query_len, model_dim)

# Create a mask (optional)
mask = torch.ones(batch_size, query_len, key_len, dtype=torch.bool)

# Create layer_cache (optional)
layer_cache = {
    'self_keys': None,
    'self_values': None,
    'memory_keys': None,
    'memory_values': None,
}

ARGS = {
    'head_count': head_count,
    'model_dim': model_dim,
    'dropout': dropout,
    'use_final_linear': use_final_linear,
}

# For forward() call arguments:
FORWARD_ARGS = {
    'key': key,
    'value': value,
    'query': query,
    'mask': mask,
    'layer_cache': layer_cache,
    'type': 'self',
    'requires_att': False,
}
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 MultiHeadedAttention — 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 MultiHeadedAttention 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
PositionalEncoding Ran
ran on a synthesized input · constructed an object; no result was computed
RowitZou/DAMS/src/models/dams.py
code served (permissive licence) · get_code("7438f3e2d81eeb38")
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, PositionalEncoding: 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 torch.nn as nn
import math

torch.manual_seed(0)

ARGS = {
    'dropout': 0.1,
    'dim': 4,
    'max_len': 5000
}
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 PositionalEncoding — 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 PositionalEncoding 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
TransformerDecoderState Ran
ran on a synthesized input · constructed an object; no result was computed
RowitZou/DAMS/src/models/dams.py
code served (permissive licence) · get_code("2a01117c2df662d0")
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, TransformerDecoderState: 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 torch.nn as nn

torch.manual_seed(0)

# The TransformerDecoderState.__init__ takes 'src' parameter
# which is a FloatTensor of size (len x batch)
# Based on the code, it's used in:
# - detach(): calls .detach() on it
# - _all property: returns it as a tuple element
# - repeat_beam_size_times(): calls .data.repeat(1, beam_size, 1) on it
#   This suggests shape (len, batch, features)
# - map_batch_fn(): calls fn(self.src, 0) where fn operates on tensors

# Create a small source tensor with shape (seq_len=5, batch=2, features=4)
src = torch.randn(5, 2, 4)

ARGS = {
    "src": src
}
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 TransformerDecoderState — the run constructed an instance of its own class and did not call it; no shape 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
gumbel_softmax Ran
ran; our contract draft was wrong, not the code
RowitZou/DAMS/src/models/dams.py
code served (permissive licence) · get_code("e6d0d3fd5a52390a")
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

torch.manual_seed(0)

ARGS = {
    "logits": torch.randn(2, 4),
    "tau": 1.0,
    "hard": False,
    "log_mode": True,
    "dim": -1,
}
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
tile Ran
ran; our contract draft was wrong, not the code
RowitZou/DAMS/src/models/dams.py
code served (permissive licence) · get_code("790214d3dbdf7f4f")
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, 12, 3, 5) 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 tensor to tile
# Shape: (batch=2, feature=4, height=3, width=5)
x = torch.randn(2, 4, 3, 5)

# Count: how many times to tile
count = 3

# Dimension to tile along
dim = 1

ARGS = {
    "x": x,
    "count": count,
    "dim": dim,
}
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, 12, 3, 5) — shape (2, 12, 3, 5) 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
Bert Not yet run
unverified (harvested, no recorded run)
RowitZou/DAMS/src/models/dams.py
code served (permissive licence) · get_code("2c3f54e38ff89e76")
How it ran

no invocation recorded.

Model Not yet run
unverified (harvested, no recorded run)
RowitZou/DAMS/src/models/dams.py
code served (permissive licence) · get_code("cf13f6a2eebb4be2")
How it ran

no invocation recorded.

TransformerDecoder Not yet run
unverified (harvested, no recorded run)
RowitZou/DAMS/src/models/dams.py
code served (permissive licence) · get_code("d9c3d93e8c175d71")
How it ran

no invocation recorded.

TransformerDecoderLayer Not yet run
unverified (harvested, no recorded run)
RowitZou/DAMS/src/models/dams.py
code served (permissive licence) · get_code("c867af54f1f200c8")
How it ran

no invocation recorded.

TransformerEncoder Not yet run
unverified (harvested, no recorded run)
RowitZou/DAMS/src/models/dams.py
code served (permissive licence) · get_code("4039fa46dfb73dca")
How it ran

no invocation recorded.

TransformerEncoderLayer Not yet run
unverified (harvested, no recorded run)
RowitZou/DAMS/src/models/dams.py
code served (permissive licence) · get_code("f11d3b7655768e5b")
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, 5 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 3 the same month, 1 later) and 8 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
GradientReversal
brick of this paper's assembly: model
1 other paper
1 dated earlier
1409.7495 (2014-09)
Unsupervised Domain Adaptation by Backpropagation
MultiHeadedAttention
brick of this paper's assembly: model
1 other paper
1 the same month · 1 only as an assembly brick
2109.04084 (2021-09)
Thinking Clearly, Talking Fast: Concept-Guided Non-Autoregressive Generation for Open-Domain Dialogue Systems
PositionalEncoding
brick of this paper's assembly: helper
1 other paper
1 the same month · 1 only as an assembly brick
2109.04084 (2021-09)
Thinking Clearly, Talking Fast: Concept-Guided Non-Autoregressive Generation for Open-Domain Dialogue Systems
TransformerDecoderState
brick of this paper's assembly: helper
1 other paper
1 the same month · 1 only as an assembly brick
2109.04084 (2021-09)
Thinking Clearly, Talking Fast: Concept-Guided Non-Autoregressive Generation for Open-Domain Dialogue Systems
gumbel_softmax
brick of this paper's assembly: helper
1 other paper
1 later
2111.02194 (2021-11)
Learning Implicit Sentiment in Aspect-based Sentiment Analysis with Supervised Contrastive Pre-Training

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

Repositories linked to this paper

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

Abstract

With the rapid increase in the volume of dialogue data from daily life, there is a growing demand for dialogue summarization. Unfortunately, training a large summarization model is generally infeasible due to the inadequacy of dialogue data with annotated summaries. Most existing works for low-resource dialogue summarization directly pretrain models in other domains, e.g., the news domain, but they generally neglect the huge difference between dialogues and conventional articles. To bridge the gap between out-of-domain pretraining and indomain fine-tuning, in this work, we propose a multi-source pretraining paradigm to better leverage the external summary data. Specifically, we exploit large-scale in-domain nonsummary data to separately pretrain the dialogue encoder and the summary decoder. The combined encoder-decoder model is then pretrained on the out-of-domain summary data using adversarial critics, aiming to facilitate domain-agnostic summarization. The experimental results on two public datasets show that with only limited training data, our approach achieves competitive performance and generalizes well in different dialogue scenarios.

For agents

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

get_harvested_code_for_paper("2109.04080")
get_code_for_paper("2109.04080")
have("2109.04080")

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

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

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

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

Connect an agent — have() is free.