SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2112.01402 · 2021

Iterative Contrast-Classify For Semi-supervised Temporal Action Segmentation

arXiv · PDF · Open in the Atlas

Code that ran

6 of 10 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 6 have no contract verdict; 0 failures of our instrument; 4 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/2112.01402.json · badge: /api/ran/2112.01402.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
dipika-singhania/ICC-Semi-Supervised-TAS canonical (classifier label)
classifier basis not recorded on the link
6 ran · 4 no recorded run
FunctionStatusWhere it lives
collate_fn_override Ran
ran on a synthesized input
dipika-singhania/ICC-Semi-Supervised-TAS/dataset.py
code served (permissive licence) · get_code("c53d1309e077e09e")
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 torch

torch.manual_seed(0)

# The function expects data to be an iterable of tuples with 9 elements each
# Create sample data items matching the unpacking: data_arr, count, labels, clip_length, start, video_id, labels_present_arr, aug_chunk_size, targets

data_item_1 = (
    torch.randn(4, 3),  # data_arr: tensor
    5,  # count: int
    torch.randn(4, 2),  # labels: tensor
    10,  # clip_length: int
    0,  # start: int
    "video_001",  # video_id: str
    torch.randn(4, 1),  # labels_present_arr: tensor
    2,  # aug_chunk_size: int
    torch.tensor([1, 0, 1, 1])  # targets: tensor
)

data_item_2 = (
    torch.randn(4, 3),  # data_arr: tensor
    7,  # count: int
    torch.randn(4, 2),  # labels: tensor
    12,  # clip_length: int
    5,  # start: int
    "video_002",  # video_id: str
    torch.randn(4, 1),  # labels_present_arr: tensor
    3,  # aug_chunk_size: int
    torch.tensor([0, 1, 0, 1])  # targets: tensor
)

# Create the data list (what would come from a DataLoader)
data = [data_item_1, data_item_2]

ARGS = {
    "data": data
}
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 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_label_idcsv Ran
ran on a synthesized input
dipika-singhania/ICC-Semi-Supervised-TAS/runcodes/iterative_semi_supervised.py
code served (permissive licence) · get_code("089a3b6d819448d5")
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 pandas as pd
import tempfile
import os

# Create a temporary CSV file with label data
temp_dir = tempfile.mkdtemp()
csv_path = os.path.join(temp_dir, "label_id.csv")

# Create sample CSV data
csv_data = {
    'label_id': [0, 1, 2],
    'label_name': ['cat', 'dog', 'bird']
}
df = pd.DataFrame(csv_data)
df.to_csv(csv_path, index=False)

# Create a simple args object with the label_id_csv attribute
class Args:
    def __init__(self, label_id_csv):
        self.label_id_csv = label_id_csv

ARGS = {
    'args': Args(label_id_csv=csv_path)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — 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
load_avgbest_model Ran
ran on a synthesized input
dipika-singhania/ICC-Semi-Supervised-TAS/runcodes/main_full_supervised.py
code served (permissive licence) · get_code("7f72150e0811ffbc")
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 (4, 3) 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 argparse
import tempfile
import os

torch.manual_seed(0)

# Create a temporary directory to act as output_dir
temp_dir = tempfile.mkdtemp()

# Create a dummy model weight file
dataset_name = "test_dataset"
output_path = os.path.join(temp_dir, f'avgbest_{dataset_name}_unet.wt')

# Create a simple tensor and save it as the model weights
dummy_weights = torch.randn(4, 3)
torch.save(dummy_weights, output_path)

# Create argparse Namespace with required arguments
args_namespace = argparse.Namespace(
    output_dir=temp_dir,
    dataset_name=dataset_name
)

ARGS = {
    'args': args_namespace
}
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 (4, 3) — shape (4, 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
load_best_model Ran
ran on a synthesized input
dipika-singhania/ICC-Semi-Supervised-TAS/runcodes/iterative_semi_supervised.py
code served (permissive licence) · get_code("025506a3255d4022")
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 argparse
import torch
import tempfile
import os

torch.manual_seed(0)

# Create a temporary directory to serve as output_dir
temp_dir = tempfile.mkdtemp()

# Create a minimal model file for testing
dummy_model_path = os.path.join(temp_dir, 'best_mnist_c2ftcn.wt')
torch.save({'state_dict': torch.randn(2, 4)}, dummy_model_path)

# Create args object with necessary attributes
class Args:
    def __init__(self):
        self.output_dir = temp_dir
        self.dataset_name = 'mnist'

args_obj = Args()

ARGS = {
    'args': args_obj
}
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 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
load_best_model Ran
ran on a synthesized input
dipika-singhania/ICC-Semi-Supervised-TAS/runcodes/iterative_semi_supervised_eval.py
code served (permissive licence) · get_code("963b1594c6c815db")
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 argparse
import tempfile
import os

torch.manual_seed(0)

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

# Create a dummy model file to load
dummy_model = {'weights': torch.randn(4, 3), 'bias': torch.randn(4)}
model_path = os.path.join(temp_dir, 'best_dummy_dataset_c2ftcn.wt')
torch.save(dummy_model, model_path)

# Construct args object
my_parser = argparse.ArgumentParser()
my_parser.add_argument('--output_dir', type=str, default=temp_dir)
my_parser.add_argument('--dataset_name', type=str, default='dummy_dataset')

args = my_parser.parse_args([])

ARGS = {
    'args': args
}
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 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
load_best_model Ran
ran on a synthesized input
dipika-singhania/ICC-Semi-Supervised-TAS/runcodes/main_full_supervised.py
code served (permissive licence) · get_code("39c15c7608aa76e8")
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 argparse
import torch
import tempfile
import os

torch.manual_seed(0)

# Create a temporary directory to serve as output_dir
temp_dir = tempfile.mkdtemp()

# Create a dummy model file
dummy_model = {"weights": torch.randn(4, 3)}
model_path = os.path.join(temp_dir, 'best_cifar10_unet.wt')
torch.save(dummy_model, model_path)

# Create an argparse Namespace with required attributes
args_namespace = argparse.Namespace()
args_namespace.output_dir = temp_dir
args_namespace.dataset_name = 'cifar10'

ARGS = {
    'args': args_namespace
}
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 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
edit_score Not yet run
unverified (harvested, no recorded run)
dipika-singhania/ICC-Semi-Supervised-TAS/utils.py
code served (permissive licence) · get_code("98ba624747e6d414")
How it ran

no invocation recorded.

get_labels_start_end_time Not yet run
unverified (harvested, no recorded run)
dipika-singhania/ICC-Semi-Supervised-TAS/utils.py
code served (permissive licence) · get_code("fe10754a3f583f73")
How it ran

no invocation recorded.

get_out_dir Not yet run
unverified (harvested, no recorded run)
dipika-singhania/ICC-Semi-Supervised-TAS/runcodes/iterative_semi_supervised.py
code served (permissive licence) · get_code("5a733c7e56b8c454")
How it ran

no invocation recorded.

levenstein Not yet run
unverified (harvested, no recorded run)
dipika-singhania/ICC-Semi-Supervised-TAS/utils.py
code served (permissive licence) · get_code("49f29c676ac31517")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 10 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.

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

Temporal action segmentation classifies the action of each frame in (long) video sequences. Due to the high cost of frame-wise labeling, we propose the first semi-supervised method for temporal action segmentation. Our method hinges on unsupervised representation learning, which, for temporal action segmentation, poses unique challenges. Actions in untrimmed videos vary in length and have unknown labels and start/end times. Ordering of actions across videos may also vary. We propose a novel way to learn frame-wise representations from temporal convolutional networks (TCNs) by clustering input features with added time-proximity condition and multi-resolution similarity. By merging representation learning with conventional supervised learning, we develop an "Iterative-Contrast-Classify (ICC)" semi-supervised learning scheme. With more labelled data, ICC progressively improves in performance; ICC semi-supervised learning, with 40% labelled videos, performs similar to fully-supervised counterparts. Our ICC improves MoF by {+1.8, +5.6, +2.5}% on Breakfast, 50Salads and GTEA respectively for 100% labelled videos.

For agents

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

get_harvested_code_for_paper("2112.01402")
get_code_for_paper("2112.01402")
have("2112.01402")

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

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

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

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

Connect an agent — have() is free.