SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2303.12370 · CVPR · 2023

Weakly Supervised Video Representation Learning with Unaligned Text for Sequential Videos

Weixin Luo, Shenghua Gao, Dongze Lian, Huazhang Hu, Sixun Dong, Yicheng Qian

arXiv · PDF · Open in the Atlas

Code that ran

8 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; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 6 failures of our instrument; 2 no recorded run), measured 2026-11-23; 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/2303.12370.json · badge: /api/ran/2303.12370.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
svip-lab/WeakSVR community
Papers with Code archive
8 ran · 2 no recorded run
FunctionStatusWhere it lives
_generate_gumbel_split_gt_per_batch_image Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
svip-lab/WeakSVR/utils/loss.py
code served (permissive licence) · get_code("c17e97919912519b")
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)

# Case 1: h > w (more rows than unpadded width)
# sim_matrix shape: [h, per_w + padding] where h=5, per_w+padding=8
# unpadding_w = 3 (so h > w)
sim_matrix_case1 = torch.randn(5, 8)
unpadding_w_case1 = 3

# Case 2: h == w (equal dimensions)
# sim_matrix shape: [h, per_w + padding] where h=4, per_w+padding=4
# unpadding_w = 4 (so h == w)
sim_matrix_case2 = torch.randn(4, 4)
unpadding_w_case2 = 4

# Case 3: h < w (fewer rows than unpadded width)
# sim_matrix shape: [h, per_w + padding] where h=2, per_w+padding=6
# unpadding_w = 5 (so h < w)
sim_matrix_case3 = torch.randn(2, 6)
unpadding_w_case3 = 5

# Use case 1 as the primary test case
ARGS = {
    "sim_matrix": sim_matrix_case1,
    "unpadding_w": unpadding_w_case1
}
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
_generate_gumbel_split_gt_per_batch_text Ran
ran; our contract draft was wrong, not the code
svip-lab/WeakSVR/utils/loss.py
code served (permissive licence) · get_code("189e5b2950c81623")
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)

# Create a small similarity matrix with shape (2, 4)
# This represents a batch of 2 items with 4 features/columns
sim_matrix = torch.randn(2, 4)

# Define unpadding_h as a smaller height value
# Testing case where h < w (2 < 4)
unpadding_h = 2

ARGS = {
    "sim_matrix": sim_matrix,
    "unpadding_h": unpadding_h,
}
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
generate_gumbel_sort_gt Ran
ran, honoured the contract we drafted
svip-lab/WeakSVR/utils/loss.py
code served (permissive licence) · get_code("b4a8b06e3947019f")
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 1, dtype family int, shape (2,) 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)

# preds_label is used with:
# - torch.max(preds_label, dim=-1) which returns a tuple, we take [1] (indices)
# - torch.sort() on the result
# So preds_label should be a tensor with at least 2 dimensions
# Shape: (batch_size, num_classes) - batch=2, num_classes=4

preds_label = torch.randn(2, 4)

ARGS = {
    "preds_label": preds_label
}
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 1, dtype family int, shape (2,) — shape (2,) 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
generate_gumbel_split_gt Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
svip-lab/WeakSVR/utils/loss.py
code served (permissive licence) · get_code("2c7820311ea1a393")
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)

# Create sim_matrices with shape [batch_size, height, width]
# Using distinct dimensions: batch=2, height=4, width=5
batch_size = 2
height = 4
width = 5

sim_matrices = torch.randn(batch_size, height, width)

# Create unpadding_text_length tensor
# This should have batch_size elements, one per batch item
unpadding_text_length = torch.tensor([3, 4])  # unpadding lengths for each batch item

# sim_type can be either 'image' or 'text'
sim_type = 'image'

ARGS = {
    'sim_matrices': sim_matrices,
    'sim_type': sim_type,
    'unpadding_text_length': unpadding_text_length
}
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
generate_gumbel_viterbi_gt Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
svip-lab/WeakSVR/utils/loss.py
code served (permissive licence) · get_code("4f049da867fc7d72")
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 int, 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 numpy as np

torch.manual_seed(0)

# Create a small similarity matrix tensor
# Shape: (batch=2, time=4, num_states=3)
sim_matrices = torch.randn(2, 4, 3)

ARGS = {
    'sim_matrices': sim_matrices
}
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 Tensor, ndim 2, dtype family int, 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
generate_sent_masks Ran
ran; our contract draft was wrong, not the code
svip-lab/WeakSVR/utils/loss.py
code served (permissive licence) · get_code("477aef9087507741")
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)

batch_size = 2
max_seq_length = 4
source_lengths = torch.tensor([2, 3], dtype=torch.float)

ARGS = {
    "batch_size": batch_size,
    "max_seq_length": max_seq_length,
    "source_lengths": source_lengths,
}
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
get_viterbi_gt Ran
ran, honoured the contract we drafted
svip-lab/WeakSVR/utils/loss.py
code served (permissive licence) · get_code("714c72578479a3e9")
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 ndarray, ndim 1, dtype family int, shape (2,) 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)

# Create a small similarity matrix
# sim_matrix needs to be a torch tensor that supports .t() and .detach().cpu().numpy()
# Shape: (2, 4) - 2 states, 4 observations
sim_matrix = torch.randn(2, 4)

ARGS = {
    "sim_matrix": sim_matrix
}
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 ndarray, ndim 1, dtype family int, shape (2,) — shape (2,) 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
viterbi Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
svip-lab/WeakSVR/utils/loss.py
code served (permissive licence) · get_code("b60129c87f00c33d")
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

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

# Define parameters for the viterbi function
K = 4  # Number of hidden states
M = 3  # Number of observation symbols
T = 5  # Length of observation sequence

# Create observation sequence (integers from 0 to M-1)
y = np.array([0, 1, 2, 1, 0], dtype=int)

# Create state transition matrix A (K x K)
# Each row sums to 1 (valid probability distribution)
A = np.array([
    [0.7, 0.2, 0.05, 0.05],
    [0.1, 0.6, 0.2, 0.1],
    [0.05, 0.15, 0.7, 0.1],
    [0.2, 0.2, 0.2, 0.4]
], dtype=float)

# Create emission matrix B (K x M)
# Each row sums to 1 (valid probability distribution)
B = np.array([
    [0.5, 0.3, 0.2],
    [0.2, 0.5, 0.3],
    [0.3, 0.2, 0.5],
    [0.4, 0.4, 0.2]
], dtype=float)

# Create initial state probabilities Pi (K,)
# Sums to 1 (valid probability distribution)
Pi = np.array([0.25, 0.25, 0.25, 0.25], dtype=float)

ARGS = {
    'y': y,
    'A': A,
    'B': B,
    'Pi': Pi
}
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
compute_gumbel_loss Not yet run
unverified (harvested, no recorded run)
svip-lab/WeakSVR/utils/loss.py
code served (permissive licence) · get_code("9f41b5986c3a544a")
How it ran

no invocation recorded.

generate_gumbel_gt Not yet run
unverified (harvested, no recorded run)
svip-lab/WeakSVR/utils/loss.py
code served (permissive licence) · get_code("c401d4e6629a75e3")
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, 2 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 2 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
generate_sent_masks
brick of this paper's assembly: helper
1 other paper
1 later
2406.08877 (2024-06)
EgoExo-Fitness: Towards Egocentric and Exocentric Full-Body Action Understanding
viterbi
brick of this paper's assembly: helper
1 other paper
1 later
2406.08877 (2024-06)
EgoExo-Fitness: Towards Egocentric and Exocentric Full-Body Action Understanding

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

Sequential video understanding, as an emerging video understanding task, has driven lots of researchers' attention because of its goal-oriented nature. This paper studies weakly supervised sequential video understanding where the accurate time-stamp level text-video alignment is not provided. We solve this task by borrowing ideas from CLIP. Specifically, we use a transformer to aggregate frame-level features for video representation and use a pre-trained text encoder to encode the texts corresponding to each action and the whole video, respectively. To model the correspondence between text and video, we propose a multiple granularity loss, where the video-paragraph contrastive loss enforces matching between the whole video and the complete script, and a fine-grained frame-sentence contrastive loss enforces the matching between each action and its description. As the frame-sentence correspondence is not available, we propose to use the fact that video actions happen sequentially in the temporal domain to generate pseudo frame-sentence correspondence and supervise the network training with the pseudo labels. Extensive experiments on video sequence verification and textto-video matching show that our method outperforms baselines by a large margin, which validates the effectiveness of our proposed approach. Code is available at https: //github.com/svip-lab/WeakSVR.

For agents

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

get_harvested_code_for_paper("2303.12370")
get_code_for_paper("2303.12370")
have("2303.12370")

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

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

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

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

Connect an agent — have() is free.