Papers › TempCLR: Temporal Alignment Representation with Contrastive Learning

TempCLR: Temporal Alignment Representation with Contrastive Learning

28 Dec 2022arXiv:2212.13738archive 2025-07-28

Yuncong Yang, Jiawei Ma, Shiyuan Huang, Long Chen, Xudong Lin, Guangxing Han, Shih-Fu Chang

Video representation learning has been successful in video-text pre-training for zero-shot transfer, where each sentence is trained to be close to the paired video clips in a common feature space. For long videos, given a paragraph of description where the sentences describe different segments of the video, by matching all sentence-clip pairs, the paragraph and the full video are aligned implicitly. However, such unit-level comparison may ignore global temporal context, which inevitably limits the generalization ability. In this paper, we propose a contrastive learning framework TempCLR to compare the full video and the paragraph explicitly. As the video/paragraph is formulated as a sequence of clips/sentences, under the constraint of their temporal order, we use dynamic time warping to compute the minimum cumulative cost over sentence-clip pairs as the sequence-level distance. To explore the temporal dynamics, we break the consistency of temporal succession by shuffling video clips w.r.t. temporal granularity. Then, we obtain the representations for clips/sentences, which perceive the temporal information and thus facilitate the sequence alignment. In addition to pre-training on the video and paragraph, our approach can also generalize on the matching between video instances. We evaluate our approach on video retrieval, action step localization, and few-shot action recognition, and achieve consistent performance gain over all three tasks. Detailed ablation studies are provided to justify the approach design.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2212.13738")

Code

Syntology Ran 3 of 5 code samples harvested from 1 repository linked to this paper; 2 have no recorded run. Of those that ran: 1 ran · our draft was wrong; 2 ran with no contract checked.

By repository: official repository: 5 samples from 1 repository, 3 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

yyuncong/tempclr officialmentioned in papermentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

5 samples harvested; 3 ran; 0 honoured the contract we drafted; 2 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · our draft was wrong
2ran
2unverified

Licence: 0 of the 5 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from yyuncong/tempclr. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

DTW_cum_dist yyuncong/tempclr/tempclr/tasks/alignlocaltask.py official repository ran fingerprinted MIT (permissive) · 534da07b88d29467 · report
OTAM_cum_dist yyuncong/tempclr/tempclr/tasks/alignlocaltask.py official repository ran MIT (permissive) · 84c36b6639d70448 · report
cos_sim yyuncong/tempclr/tempclr/tasks/alignlocaltask.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · c13027eea5c9509f · report
AlignLocalTask yyuncong/tempclr/tempclr/tasks/alignlocaltask.py official repository unverified MIT (permissive) · 22c56c96c246ac15 · report
Task yyuncong/tempclr/tempclr/tasks/alignlocaltask.py official repository unverified MIT (permissive) · 8e1461d6cc228441 · report

Tasks

Action RecognitionContrastive LearningDynamic Time WarpingFew Shot Action RecognitionFew-Shot action recognitionLong Video Retrieval (Background Removed)Representation LearningRetrievalSentenceVideo Retrieval

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Long Video Retrieval (Background Removed) YouCook2 TempCLR Cap. Avg. R@1 74.5 #2 of 6 Archive leaderboard report
Long Video Retrieval (Background Removed) YouCook2 TempCLR Cap. Avg. R@10 97.0 #2 of 6 Archive leaderboard report
Long Video Retrieval (Background Removed) YouCook2 TempCLR Cap. Avg. R@5 94.6 #2 of 6 Archive leaderboard report
Long Video Retrieval (Background Removed) YouCook2 TempCLR DTW R@1 83.5 #2 of 6 Archive leaderboard report
Long Video Retrieval (Background Removed) YouCook2 TempCLR DTW R@10 99.3 #2 of 6 Archive leaderboard report
Long Video Retrieval (Background Removed) YouCook2 TempCLR DTW R@5 97.2 #2 of 6 Archive leaderboard report
Long Video Retrieval (Background Removed) YouCook2 TempCLR OTAM R@1 84.9 #2 of 6 Archive leaderboard report
Long Video Retrieval (Background Removed) YouCook2 TempCLR OTAM R@10 99.5 #2 of 6 Archive leaderboard report
Long Video Retrieval (Background Removed) YouCook2 TempCLR OTAM R@5 97.9 #2 of 6 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Contrastive Learning

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections