SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · aaai_25868 · AAAI · 2023

TC-DWA: Text Clustering with Dual Word-Level Augmentation

Yi Chang, Ximing Li, Bo Cheng

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 (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 7 have no contract verdict; 0 failures of our instrument; 6 no recorded run), measured 2026-11-22; 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/aaai_25868.json · badge: /api/ran/aaai_25868.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
KlugerLab/SpectralNet canonical (classifier label)
classifier basis: census
7 ran · 6 no recorded run
FunctionStatusWhere it lives
create_pairs_from_labeled_data Ran
ran on a synthesized input
KlugerLab/SpectralNet/src/core/pairs.py
code served (permissive licence) · get_code("d5f96b481cc7e0ae")
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. 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 numpy as np
import random

random.seed(0)
np.random.seed(0)

# Create sample data: 5 samples with feature dimension 4
x = np.random.randn(5, 4).astype(np.float32)

# Create digit_indices: a nested array where each row contains indices of samples for that class
# We have 3 classes (0, 1, 2)
# Class 0: samples [0, 1]
# Class 1: samples [2, 3]
# Class 2: sample [4]
digit_indices = [
    [0, 1],      # class 0
    [2, 3],      # class 1
    [4],         # class 2
]

# use_classes can be None or a list of class indices
use_classes = None

ARGS = {
    "x": x,
    "digit_indices": digit_indices,
    "use_classes": use_classes,
}
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 — a tuple 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_choices Ran
ran on a synthesized input
KlugerLab/SpectralNet/src/core/pairs.py
code served (permissive licence) · get_code("3397f51110e4a583")
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, ndim 1, dtype family int; 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 random import randint
from collections import defaultdict

# Test case 1: arr is a numpy array
arr_list = np.array([10, 20, 30, 40, 50, 60, 70, 80])
num_choices_1 = 3
valid_range_1 = [15, 75]
not_arr_1 = [20, 50]
replace_1 = False

ARGS = {
    "arr": arr_list,
    "num_choices": num_choices_1,
    "valid_range": valid_range_1,
    "not_arr": not_arr_1,
    "replace": replace_1
}
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 list, ndim 1, dtype family int — a list 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_scale Ran
ran on a synthesized input
KlugerLab/SpectralNet/src/core/util.py
code served (permissive licence) · get_code("b482d03e6f8ffec4")
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 float64, ndim 0, 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

# Create a small sample dataset for x
# The function will reshape it to (batch_size, flattened_features)
# Using shape (10, 4) to have 10 points with 4 features each
x = np.random.randn(10, 4).astype(np.float32)

batch_size = 3
n_nbrs = 2

ARGS = {
    "x": x,
    "batch_size": batch_size,
    "n_nbrs": n_nbrs,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
load_data Ran
ran on a synthesized input
KlugerLab/SpectralNet/src/core/data.py
code served (permissive licence) · get_code("c4b2990ab9c5ad43")
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. 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 numpy as np

ARGS = {
    'params': {
        'dset': 'cc',
        'n': 100,
        'noise_sig': 0.1,
        'train_set_fraction': 0.8,
        'standardize': True
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
h5py, keras, numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple 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
make_batches Ran
ran on a synthesized input
KlugerLab/SpectralNet/src/core/util.py
code served (permissive licence) · get_code("e135919e9b27c8de")
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, ndim 2, dtype family int; 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 torch

torch.manual_seed(0)

# Define arguments for make_batches function
ARGS = {
    "size": 100,
    "batch_size": 32
}
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, ndim 2, dtype family int — a list 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
make_layer_list Ran
ran on a synthesized input
KlugerLab/SpectralNet/src/core/util.py
code served (permissive licence) · get_code("a3f6d9141e555686")
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, 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 torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'arch': [
        {
            'type': 'Dense',
            'size': 64,
            'activation': 'relu'
        },
        {
            'type': 'Dense',
            'size': 32,
            'activation': 'relu'
        },
        {
            'type': 'Flatten'
        },
        {
            'type': 'Dense',
            'size': 10,
            'activation': 'softmax'
        }
    ],
    'network_type': 'siamese',
    'reg': 0.001,
    'dropout': 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 list, ndim 1, dtype family float — a list 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
stack_layers Ran
ran on a synthesized input
KlugerLab/SpectralNet/src/core/layer.py
code served (permissive licence) · get_code("024a228c040265fc")
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 numpy as np
import tensorflow as tf
from keras import backend as K
from keras.layers import Input

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

# Create small input tensors
batch_size = 2
input_dim = 4

# Create a simple input tensor for 'Unlabeled' type
unlabeled_input = Input(shape=(input_dim,), name='unlabeled_input')

# Create a simple input tensor for 'Orthonorm' type
orthonorm_input = Input(shape=(input_dim,), name='orthonorm_input')

# Build the inputs dict as expected by stack_layers
inputs = {
    'Unlabeled': unlabeled_input,
    'Orthonorm': orthonorm_input
}

# Define a list of layers to apply
layers = [
    {
        'type': 'relu',
        'size': 8,
        'name': 'dense_1'
    },
    {
        'type': 'softplus',
        'size': 6,
        'l2_reg': 0.001,
        'name': 'dense_2'
    },
    {
        'type': 'tanh',
        'size': 4,
        'name': 'dense_3'
    }
]

# Define kernel initializer
kernel_initializer = 'glorot_uniform'

# Construct the ARGS dictionary
ARGS = {
    'inputs': inputs,
    'layers': layers,
    'kernel_initializer': kernel_initializer
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
keras, numpy, tensorflow — 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
Orthonorm Not yet run
unverified (harvested, no recorded run)
KlugerLab/SpectralNet/src/core/layer.py
code served (permissive licence) · get_code("99ebaef638c3913e")
How it ran

no invocation recorded.

embed_data Not yet run
unverified (harvested, no recorded run)
KlugerLab/SpectralNet/src/core/data.py
code served (permissive licence) · get_code("b9275b10d35a5397")
How it ran

no invocation recorded.

full_affinity Not yet run
unverified (harvested, no recorded run)
KlugerLab/SpectralNet/src/core/costs.py
code served (permissive licence) · get_code("3847457d45802ae3")
How it ran

no invocation recorded.

knn_affinity Not yet run
unverified (harvested, no recorded run)
KlugerLab/SpectralNet/src/core/costs.py
code served (permissive licence) · get_code("7af6527a017a74c2")
How it ran

no invocation recorded.

orthonorm_op Not yet run
unverified (harvested, no recorded run)
KlugerLab/SpectralNet/src/core/layer.py
code served (permissive licence) · get_code("83305d58a471435d")
How it ran

no invocation recorded.

squared_distance Not yet run
unverified (harvested, no recorded run)
KlugerLab/SpectralNet/src/core/costs.py
code served (permissive licence) · get_code("eeab17c83f3d81f1")
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, 11 are also present in other papers whose code we hold (11 with at least one paper dated earlier, 0 the same month, 0 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
get_scale 2 other papers
2 dated earlier
1902.02693 (2019-02)
StampNet: unsupervised multi-class object discovery
1905.12724 (2019-05)
Variational Diffusion Autoencoders with Random Walk Sampling
make_layer_list 2 other papers
2 dated earlier
1902.02693 (2019-02)
StampNet: unsupervised multi-class object discovery
1905.12724 (2019-05)
Variational Diffusion Autoencoders with Random Walk Sampling
create_pairs_from_labeled_data 1 other paper
1 dated earlier
1905.12724 (2019-05)
Variational Diffusion Autoencoders with Random Walk Sampling
embed_data 1 other paper
1 dated earlier
1905.12724 (2019-05)
Variational Diffusion Autoencoders with Random Walk Sampling
full_affinity 1 other paper
1 dated earlier
1905.12724 (2019-05)
Variational Diffusion Autoencoders with Random Walk Sampling
get_choices 1 other paper
1 dated earlier
1905.12724 (2019-05)
Variational Diffusion Autoencoders with Random Walk Sampling
knn_affinity 1 other paper
1 dated earlier
1905.12724 (2019-05)
Variational Diffusion Autoencoders with Random Walk Sampling
load_data 1 other paper
1 dated earlier
1905.12724 (2019-05)
Variational Diffusion Autoencoders with Random Walk Sampling
make_batches 1 other paper
1 dated earlier
1905.12724 (2019-05)
Variational Diffusion Autoencoders with Random Walk Sampling
orthonorm_op 1 other paper
1 dated earlier
1905.12724 (2019-05)
Variational Diffusion Autoencoders with Random Walk Sampling
squared_distance 1 other paper
1 dated earlier
1905.12724 (2019-05)
Variational Diffusion Autoencoders with Random Walk Sampling

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

The pre-trained language models, e.g., ELMo and BERT, have recently achieved promising performance improvement in a wide range of NLP tasks, because they can output strong contextualized embedded features of words. Inspired by their great success, in this paper we aim to fine-tune them to effectively handle the text clustering task, i.e., a classic and fundamental challenge in machine learning. Accordingly, we propose a novel BERT-based method, namely Text Clustering with Dual Word-level Augmentation (TC-DWA). To be specific, we formulate a self-training objective and enhance it with a dual word-level augmentation technique. First, we suppose that each text contains several most informative words, called anchor words, supporting the full text semantics. We use the embedded features of anchor words as augmented features, which are selected by ranking the norm-based attention weights of words. Second, we formulate an expectation form of word augmentation, which is equivalent to generating infinite augmented features, and further suggest a tractable approximation of Taylor expansion for efficient optimization. To evaluate the effectiveness of TC-DWA, we conduct extensive experiments on several benchmark text datasets. The results demonstrate that TC-DWA consistently outperforms the state-of-the-art baseline methods. Code available: https://github.com/BoCheng-96/TC-DWA.

For agents

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

get_harvested_code_for_paper("aaai_25868")
get_code_for_paper("aaai_25868")
have("aaai_25868")

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

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

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

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

Connect an agent — have() is free.