SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · aaai_16280 · AAAI · 2021

Weakly-supervised Temporal Action Localization by Uncertainty Modeling

Yan Lu, Jinglu Wang, Pilhyeon Lee, Hyeran Byun

Open in the Atlas

Code that ran

6 of 9 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 3 have no contract verdict; 1 failure of our instrument; 3 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_16280.json · badge: /api/ran/aaai_16280.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
Pilhyeon/WTAL-Uncertainty-Modeling canonical (classifier label)
classifier basis: census
6 ran · 3 no recorded run
FunctionStatusWhere it lives
compute_video_hit_at_k Ran
ran, honoured the contract we drafted
Pilhyeon/WTAL-Uncertainty-Modeling/eval/eval_classification.py
code served (permissive licence) · get_code("f914fa3c4de0cf80")
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 float, ndim 0, dtype family float, 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 pandas as pd
import numpy as np

# Create ground truth dataframe
ground_truth_data = {
    'video-id': ['vid_1', 'vid_1', 'vid_2', 'vid_2', 'vid_3'],
    'label': ['cat', 'dog', 'bird', 'cat', 'dog']
}
ground_truth = pd.DataFrame(ground_truth_data)

# Create prediction dataframe
prediction_data = {
    'video-id': ['vid_1', 'vid_1', 'vid_1', 'vid_2', 'vid_2', 'vid_3'],
    'label': ['cat', 'dog', 'bird', 'cat', 'dog', 'cat'],
    'score': [0.9, 0.7, 0.5, 0.8, 0.6, 0.75]
}
prediction = pd.DataFrame(prediction_data)

ARGS = {
    'ground_truth': ground_truth,
    'prediction': prediction,
    'top_k': 3,
    'avg': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, 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
get_proposal_oic Ran
ran on a synthesized input
Pilhyeon/WTAL-Uncertainty-Modeling/utils.py
code served (permissive licence) · get_code("20b0e281539eebd0")
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. 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

# Construct minimal valid arguments for get_proposal_oic

# tList: list of lists containing arrays of indices
# Should be a list where each element corresponds to a class
# Each element is a list with one array of temporal indices
tList = [
    [np.array([0, 1, 2, 5, 6])],  # class 0: two groups [0,1,2] and [5,6]
    [np.array([1, 2, 3, 4])],      # class 1: one group [1,2,3,4]
]

# wtcam: shape (num_frames, num_classes, 1)
# Used as wtcam[indices, class_idx, 0]
num_frames = 10
num_classes = 2
wtcam = np.random.rand(num_frames, num_classes, 1).astype(np.float32)

# final_score: array indexed by c_pred[i]
# Should have at least num_classes elements
final_score = np.array([0.8, 0.7])

# c_pred: class predictions, one per element in tList
# Should map to indices in final_score
c_pred = np.array([0, 1])

# scale: scaling factor for time conversion
scale = 4

# v_len: video length in frames
v_len = 160

# sampling_frames: number of frames sampled
sampling_frames = 8

# num_segments: number of temporal segments
num_segments = 16

# _lambda: temporal expansion factor (default 0.25)
_lambda = 0.25

# gamma: weighting factor (default 0.2)
gamma = 0.2

ARGS = {
    'tList': tList,
    'wtcam': wtcam,
    'final_score': final_score,
    'c_pred': c_pred,
    'scale': scale,
    'v_len': v_len,
    'sampling_frames': sampling_frames,
    'num_segments': num_segments,
    '_lambda': _lambda,
    'gamma': gamma,
}
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 — a list 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
init_args Ran
ran on a synthesized input
Pilhyeon/WTAL-Uncertainty-Modeling/options.py
code served (permissive licence) · get_code("0e6118fe56644429")
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 SimpleNamespace. 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 tempfile
from types import SimpleNamespace

# Create temporary directories for the test
temp_base = tempfile.mkdtemp()
model_path = os.path.join(temp_base, "models")
log_path = os.path.join(temp_base, "logs")
output_path = os.path.join(temp_base, "outputs")

# Create a SimpleNamespace object with the required attributes
args = SimpleNamespace(
    model_path=model_path,
    log_path=log_path,
    output_path=output_path
)

ARGS = {"args": args}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SimpleNamespace — a SimpleNamespace output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleNamespace 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
interpolated_prec_rec Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Pilhyeon/WTAL-Uncertainty-Modeling/eval/utils_eval.py
pointer only (licence: MIT); the stored copy get_code serves, from Ontheway361/BSN_pytorch, is pointer only (licence: NONE) · get_code("81aab88321de62c2")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from Ontheway361/BSN_pytorch, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

segment_iou Ran
ran, honoured the contract we drafted
Pilhyeon/WTAL-Uncertainty-Modeling/eval/utils_eval.py
pointer only (licence: MIT); the stored copy get_code serves, from Ontheway361/BSN_pytorch, is pointer only (licence: NONE) · get_code("d0744a2fe3151508")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from Ontheway361/BSN_pytorch, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

upgrade_resolution Ran
ran on a synthesized input
Pilhyeon/WTAL-Uncertainty-Modeling/utils.py
code served (permissive licence) · get_code("a6b6f459b6b264bb")
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 float, shape (10,) 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 numpy as np
from scipy.interpolate import interp1d

# Construct test data for upgrade_resolution function
# The function takes:
# - arr: a numpy array (used with .shape[0] and passed to interp1d)
# - scale: a numeric scale factor (used in division 1/scale)

# Create a small 1D array as input
arr = np.array([1.0, 2.0, 3.0, 4.0, 5.0])

# Create a scale factor
scale = 2

ARGS = {
    'arr': arr,
    'scale': scale
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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 float, shape (10,) — shape (10,) 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
compute_average_precision_classification Not yet run
unverified (harvested, no recorded run)
Pilhyeon/WTAL-Uncertainty-Modeling/eval/eval_classification.py
code served (permissive licence) · get_code("e1dfe4eceb3ff676")
How it ran

no invocation recorded.

compute_average_precision_detection Not yet run
unverified (harvested, no recorded run)
Pilhyeon/WTAL-Uncertainty-Modeling/eval/eval_detection.py
code served (permissive licence) · get_code("7be4ca6a451d8384")
How it ran

no invocation recorded.

get_blocked_videos Not yet run
unverified (harvested, no recorded run)
Pilhyeon/WTAL-Uncertainty-Modeling/eval/utils_eval.py
code served (permissive licence) · get_code("a01a64a508273392")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 8 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 0 the same month, 6 later) and 1 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
interpolated_prec_rec 13 other papers
5 dated earlier, 7 later, 1 same year, order not determinable
1804.05113 (2018-04)
Multilevel Language and Vision Integration for Text-to-Clip Retrieval
1806.02964 (2018-06)
BSN: Boundary Sensitive Network for Temporal Action Proposal Generation
1907.09702 (2019-07)
BMN: Boundary-Matching Network for Temporal Action Proposal Generation
and 10 more not named here
segment_iou 13 other papers
5 dated earlier, 7 later, 1 same year, order not determinable
1804.05113 (2018-04)
Multilevel Language and Vision Integration for Text-to-Clip Retrieval
1806.02964 (2018-06)
BSN: Boundary Sensitive Network for Temporal Action Proposal Generation
1907.09702 (2019-07)
BMN: Boundary-Matching Network for Temporal Action Proposal Generation
and 10 more not named here
compute_average_precision_detection 4 other papers
2 dated earlier, 2 later
1911.11462 (2019-11)
G-TAD: Sub-Graph Localization for Temporal Action Detection
aaai_6793 (2020 (year only))
Background Suppression Network for Weakly-Supervised Temporal Action Localization
aaai_19900 (2022 (year only))
DCAN: Improving Temporal Action Detection via Dual Context Aggregation
and 1 more not named here
get_blocked_videos 4 other papers
2 dated earlier, 2 later
1911.11462 (2019-11)
G-TAD: Sub-Graph Localization for Temporal Action Detection
aaai_6793 (2020 (year only))
Background Suppression Network for Weakly-Supervised Temporal Action Localization
136640190 (2022 (year only))
Dual-Evidential Learning for Weakly-supervised Temporal Action Localization
and 1 more not named here
compute_video_hit_at_k 2 other papers
2 later
aaai_19900 (2022 (year only))
DCAN: Improving Temporal Action Detection via Dual Context Aggregation
aaai_28539 (2024 (year only))
HR-Pro: Point-Supervised Temporal Action Localization via Hierarchical Reliability Propagation
compute_average_precision_classification 1 other paper
1 later
aaai_28539 (2024 (year only))
HR-Pro: Point-Supervised Temporal Action Localization via Hierarchical Reliability Propagation
init_args 1 other paper
1 dated earlier
aaai_6793 (2020 (year only))
Background Suppression Network for Weakly-Supervised Temporal Action Localization
upgrade_resolution 1 other paper
1 dated earlier
aaai_6793 (2020 (year only))
Background Suppression Network for Weakly-Supervised Temporal Action Localization

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

Weakly-supervised temporal action localization aims to learn detecting temporal intervals of action classes with only videolevel labels. To this end, it is crucial to separate frames of action classes from the background frames (i.e., frames not belonging to any action classes). In this paper, we present a new perspective on background frames where they are modeled as out-of-distribution samples regarding their inconsistency. Then, background frames can be detected by estimating the probability of each frame being out-of-distribution, known as uncertainty, but it is infeasible to directly learn uncertainty without frame-level labels. To realize the uncertainty learning in the weakly-supervised setting, we leverage the multiple instance learning formulation. Moreover, we further introduce a background entropy loss to better discriminate background frames by encouraging their in-distribution (action) probabilities to be uniformly distributed over all action classes. Experimental results show that our uncertainty modeling is effective at alleviating the interference of background frames and brings a large performance gain without bells and whistles. We demonstrate that our model significantly outperforms state-of-the-art methods on the benchmarks, THU-MOS'14 and ActivityNet (1.2 & 1.3). Our code is available at https://github.com/Pilhyeon/WTAL-Uncertainty-Modeling.

For agents

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

get_harvested_code_for_paper("aaai_16280")
get_code_for_paper("aaai_16280")
have("aaai_16280")

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

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

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

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

Connect an agent — have() is free.