SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2607.10548 · ICML · 2026

Beyond Looking Up, Try Looking Around: Harmonizing Global Structure and Local Consistency in Optimal Transport for Short Text Clustering

Bo Li, Yuxuan Gu, Zhihao Yao, Jixuan Yin

arXiv · PDF · Open in the Atlas

Code that ran

8 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 0 have no contract verdict; 6 failures of our instrument; 0 no recorded run), measured 2026-11-23; 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/2607.10548.json · badge: /api/ran/2607.10548.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
YZH0905/CAOT-STC canonical (classifier label)
classifier basis: census
8 ran · 0 no recorded run
FunctionStatusWhere it lives
augmentation_loader Ran
ran; our contract draft was wrong, not the code
YZH0905/CAOT-STC/dataloader/dataloader.py
code served (permissive licence) · get_code("85995653ab4aef4a")
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 DataLoader. 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 os
import pandas as pd
import numpy as np
import torch
import tempfile

# Create a temporary directory for test data
temp_dir = tempfile.mkdtemp()

# Create a small CSV file with the required columns
csv_data = {
    'text': ['sample text 1', 'sample text 2'],
    'augmentation_1': ['aug text 1a', 'aug text 2a'],
    'augmentation_2': ['aug text 1b', 'aug text 2b'],
    'label': [0, 1]
}
df = pd.DataFrame(csv_data)
csv_path = os.path.join(temp_dir, 'test_data.csv')
df.to_csv(csv_path, index=False)

# Create a mock args object
class Args:
    def __init__(self):
        self.datapath = temp_dir
        self.dataname = 'test_data'
        self.text = 'text'
        self.augmentation_1 = 'augmentation_1'
        self.augmentation_2 = 'augmentation_2'
        self.label = 'label'
        self.batch_size = 2

ARGS = {
    'args': Args()
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataLoader — a DataLoader output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataLoader 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
entropic_COT Ran
ran; our contract draft was wrong, not the code
YZH0905/CAOT-STC/plabel_allocator.py
code served (permissive licence) · get_code("8038d1de287350ab")
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 float, shape (2, 4) 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)

# Create small tensors for the function
# a: distribution over dim_a (first dimension of M)
# b: distribution over dim_b (second dimension of M)
# M: cost matrix of shape (dim_a, dim_b)

dim_a = 2
dim_b = 4

a = torch.ones(dim_a, dtype=torch.float64)
b = torch.ones(dim_b, dtype=torch.float64)

# Cost matrix - distinct dimensions to probe shapes
M = torch.randn(dim_a, dim_b, dtype=torch.float64)

# Regularization parameter
reg = 0.1

# Other parameters
numItermax = 100
stopThr = 1e-9
verbose = False
log = False

ARGS = {
    'a': a,
    'b': b,
    'M': M,
    'reg': reg,
    'numItermax': numItermax,
    'stopThr': stopThr,
    'verbose': verbose,
    'log': log
}
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 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
get_batch_token Ran
ran; our contract draft was wrong, not the code
YZH0905/CAOT-STC/utils/kmeans.py
code served (permissive licence) · get_code("6dc86e955a0d833c")
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 torch
import torch.nn as nn
from transformers import AutoTokenizer

torch.manual_seed(0)

# Create a minimal tokenizer stand-in that implements batch_encode_plus
class MinimalTokenizer:
    def __init__(self):
        self.vocab_size = 100
        self.pad_token_id = 0
        
    def batch_encode_plus(self, text, max_length=None, return_tensors=None, padding=None, truncation=None):
        # Simple mock implementation that returns token IDs as tensors
        if isinstance(text, str):
            text = [text]
        
        batch_size = len(text)
        seq_length = max_length if max_length else 10
        
        # Create dummy token IDs (small integers within vocab)
        input_ids = torch.randint(1, self.vocab_size, (batch_size, seq_length))
        
        # Create attention mask (all ones for simplicity)
        attention_mask = torch.ones((batch_size, seq_length), dtype=torch.long)
        
        result = {
            'input_ids': input_ids,
            'attention_mask': attention_mask
        }
        
        return result

# Set up arguments
tokenizer = MinimalTokenizer()
text = ["hello world", "this is a test"]
max_length = 10

ARGS = {
    "tokenizer": tokenizer,
    "text": text,
    "max_length": max_length
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — 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
get_mean_embeddings Ran
ran; our contract draft was wrong, not the code
YZH0905/CAOT-STC/utils/kmeans.py
code served (permissive licence) · get_code("d0b92efdfe8cbc44")
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

torch.manual_seed(0)

class MockBert(nn.Module):
    def __init__(self, hidden_size=4):
        super().__init__()
        self.hidden_size = hidden_size
        self.linear = nn.Linear(hidden_size, hidden_size)
    
    def forward(self, input_ids, attention_mask):
        # Simulate BERT output: returns tuple where first element is last_hidden_state
        # Shape: (batch_size, seq_length, hidden_size)
        batch_size = input_ids.shape[0]
        seq_length = input_ids.shape[1]
        hidden_states = torch.randn(batch_size, seq_length, self.hidden_size)
        return (hidden_states,)

# Create BERT model
bert = MockBert(hidden_size=4)

# Create input tensors
batch_size = 2
seq_length = 3
input_ids = torch.randint(0, 100, (batch_size, seq_length))
attention_mask = torch.ones(batch_size, seq_length)

ARGS = {
    "bert": bert,
    "input_ids": input_ids,
    "attention_mask": attention_mask
}
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
len_def Ran
ran, honoured the contract we drafted
YZH0905/CAOT-STC/dataloader/summary.py
code served (permissive licence) · get_code("f95502827240e1a5")
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 int, ndim 0, dtype family int, 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
import numpy as np

torch.manual_seed(0)

# Analyze the function: len_def(text)
# - Takes a parameter 'text'
# - Calls text.split() which returns a list of words
# - Calls len() on that list
# - So 'text' must be a string

text = "hello world this is a test"

ARGS = {
    "text": text
}
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 int, ndim 0, dtype family int, 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
len_def1 Ran
ran, honoured the contract we drafted
YZH0905/CAOT-STC/dataloader/summary.py
code served (permissive licence) · get_code("6a8c8914c433af88")
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 int, ndim 0, dtype family int, 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
import numpy as np

torch.manual_seed(0)

# The function takes a 'text' parameter and:
# 1. Calls text.split() - so text must be a string
# 2. Calls len() on the result
# 3. Returns the minimum of that length and 32

text = "hello world this is a test string"

ARGS = {
    "text": text
}
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 int, ndim 0, dtype family int, 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
target_distribution Ran
ran; our contract draft was wrong, not the code
YZH0905/CAOT-STC/learner/cluster_utils.py
code served (permissive licence) · get_code("c36909e5f178aebf")
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)

# Create a small batch tensor
# The function expects a 2D tensor where:
# - Operations like batch ** 2 are element-wise
# - torch.sum(batch, 0) sums over dimension 0
# - batch.t() transposes the tensor
# - torch.sum(weight, 1) sums over dimension 1
# Shape: (2, 4) - 2 samples, 4 features

batch = torch.rand(2, 4)

ARGS = {
    "batch": batch
}
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
unshuffle_loader Ran
ran; our contract draft was wrong, not the code
YZH0905/CAOT-STC/dataloader/dataloader.py
code served (permissive licence) · get_code("4e7b4e59d5d3dfc9")
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 DataLoader. 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 os
import pandas as pd
import torch
import torch.utils.data as util_data
from torch.utils.data import Dataset
import tempfile

torch.manual_seed(0)

# Create a temporary directory for the CSV file
temp_dir = tempfile.mkdtemp()

# Create sample CSV data
csv_data = pd.DataFrame({
    'text_column': ['hello world', 'sample text', 'another example', 'test data'],
    'label_column': [0, 1, 0, 1]
})

# Write CSV to temp directory
csv_path = os.path.join(temp_dir, 'sample_data.csv')
csv_data.to_csv(csv_path, index=False)

# Create a minimal args object with required attributes
class Args:
    def __init__(self):
        self.datapath = temp_dir
        self.dataname = 'sample_data'
        self.text = 'text_column'
        self.label = 'label_column'
        self.batch_size = 2

ARGS = {
    'args': Args()
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataLoader — a DataLoader output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataLoader 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

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, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 later) and 7 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
entropic_COT 1 other paper
1 dated earlier
2312.06221 (2023-12)
CSOT: Curriculum and Structure-Aware Optimal Transport for Learning with Noisy Labels

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

Pseudo-labeling based on Optimal Transport (OT) has become an effective mechanism for enhancing short text clustering. Existing OT methods are short in modeling semantic consistencies between samples, which may assign different pseudo-labels to semantically similar samples. These erroneous pseudo-labels can cause the model to produce inferior clusters. This paper proposes a novel short text clustering framework, which remedies the neglect of semantic consistency in existing OT methods, generating reliable pseudo-labels to facilitate clustering. Specifically, the proposed approach first designs an instancelevel attention mechanism to capture semantic relationships between samples, which are then integrated into the OT formulation to endow the transport process with neighborhood semantic awareness. By solving the proposed OT formulation, reliable pseudo-labels are obtained that simultaneously account for sample-to-sample semantic consistency and sample-to-cluster global structure information. These pseudo-labels are then used as supervisory signals to guide the model to achieve accurate clustering. Extensive experiments demonstrate that the proposed approach outperforms state-of-the-art methods. The code is available at: https://github.com/YZH0905/CAOT-STC.

For agents

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

get_harvested_code_for_paper("2607.10548")
get_code_for_paper("2607.10548")
have("2607.10548")

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

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

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

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

Connect an agent — have() is free.