Papers › TokenLearner: What Can 8 Learned Tokens Do for Images and Videos?

TokenLearner: What Can 8 Learned Tokens Do for Images and Videos?

21 Jun 2021arXiv:2106.11297archive 2025-07-28

Michael S. Ryoo, AJ Piergiovanni, Anurag Arnab, Mostafa Dehghani, Anelia Angelova

In this paper, we introduce a novel visual representation learning which relies on a handful of adaptively learned tokens, and which is applicable to both image and video understanding tasks. Instead of relying on hand-designed splitting strategies to obtain visual tokens and processing a large number of densely sampled patches for attention, our approach learns to mine important tokens in visual data. This results in efficiently and effectively finding a few important visual tokens and enables modeling of pairwise attention between such tokens, over a longer temporal horizon for videos, or the spatial content in images. Our experiments demonstrate strong performance on several challenging benchmarks for both image and video recognition tasks. Importantly, due to our tokens being adaptive, we accomplish competitive results at significantly reduced compute amount. We obtain comparable results to the state-of-the-arts on ImageNet while being computationally more efficient. We also confirm the effectiveness of the approach on multiple video datasets, including Kinetics-400, Kinetics-600, Charades, and AViD. The code is available at: https://github.com/google-research/scenic/tree/main/scenic/projects/token_learner

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="2106.11297")

Code

Syntology Ran 3 of 3 code samples harvested from 2 repositories linked to this paper; 0 have no recorded run. Of those that ran: 3 ran with no contract checked.

By repository: official repository: 1 sample from 1 repository, 1 ran; community (archive-listed): 2 samples from 1 repository, 2 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

google-research/scenic officialmentioned in papermentioned on GitHubjax report
ariG23498/TokenLearner mentioned on GitHubtfMIT report
rish-16/tokenlearner-pytorch mentioned on GitHubpytorch report
pwc-1/Paper-9 mindspore report
pwc-1/Paper-9 mindspore 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

3 samples harvested; 3 ran; 0 honoured the contract we drafted; 0 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.

3ran

Licence: 0 of the 3 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 2 repositories linked to this paper, official or community; each sample names its own and says which. “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.

TokenLearnerModule google-research/scenic/scenic/projects/token_learner/model.py official repository ran Apache-2.0 (permissive) · d2eb784d868efe5d · report
SpatialAttention rish-16/tokenlearner-pytorch/tokenlearner_pytorch/tokenlearner_pytorch.py community (archive-listed) ran · metamorphic tier: deterministic fingerprinted MIT (permissive) · 292a82cba1f85aa3 · report
TokenLearner rish-16/tokenlearner-pytorch/tokenlearner_pytorch/tokenlearner_pytorch.py community (archive-listed) ran · metamorphic tier: invariant fingerprinted MIT (permissive) · ffbb25748372a3c7 · report

Tasks

Action ClassificationImage ClassificationRepresentation LearningVideo RecognitionVideo Understanding

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Action Classification AViD TokenLearner Accuracy 53.8 #1 of 10 Archive leaderboard report
Action Classification Charades TokenLearner MAP 66.3 #1 of 49 Archive leaderboard report
Action Classification Kinetics-400 TokenLearner 16at18 (L/10) Acc@1 85.4 #54 of 207 Archive leaderboard report
Action Classification Kinetics-600 TokenLearner 16at18 w. Fuser (L/10) Top-1 Accuracy 86.3 #27 of 65 Archive leaderboard report
Action Classification Kinetics-600 TokenLearner 16at18 w. Fuser (L/10) Top-5 Accuracy 97.0 #27 of 65 Archive leaderboard report
Image Classification ImageNet TokenLearner L/8 (24+11) Number of params 460M #28 of 1060 Archive leaderboard report
Image Classification ImageNet TokenLearner L/8 (24+11) Top 1 Accuracy 88.87% #28 of 1060 Archive leaderboard report
Image Classification ImageNet 16-TokenLearner B/16 (21) Top 1 Accuracy 87.07% #109 of 1060 Archive leaderboard report
Image Classification ImageNet ReaL TokenLearner L/8 (24+11) Accuracy 91.05% #6 of 57 Archive leaderboard report
Image Classification ImageNet ReaL TokenLearner L/8 (24+11) Params 460M #6 of 57 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.

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