Papers › Representation Learning with Contrastive Predictive Coding
Representation Learning with Contrastive Predictive Coding
Aaron van den Oord, Yazhe Li, Oriol Vinyals
While supervised learning has enabled great progress in many applications, unsupervised learning has not seen such widespread adoption, and remains an important and challenging endeavor for artificial intelligence. In this work, we propose a universal unsupervised learning approach to extract useful representations from high-dimensional data, which we call Contrastive Predictive Coding. The key insight of our model is to learn such representations by predicting the future in latent space by using powerful autoregressive models. We use a probabilistic contrastive loss which induces the latent space to capture information that is maximally useful to predict future samples. It also makes the model tractable by using negative sampling. While most prior work has focused on evaluating representations for a particular modality, we demonstrate that our approach is able to learn useful representations achieving strong performance on four distinct domains: speech, images, text and reinforcement learning in 3D environments.
In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.
Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.
For agents, on Syntology's MCP service (how to connect):
get_harvested_code_for_paper(arxiv_id="1807.03748")get_code(code_sha256="…")with a sample'scode_sha256from the list belowget_citation_path(paper_1="1807.03748", paper_2="…")with another paper's arXiv id or titleget_concepts_for_paper(arxiv_id="1807.03748")
Code
Syntology 45 code samples harvested from 19 repositories linked to this paper: 35 ran (of which 21 constructed an object rather than computing a result; 30 with no instrument failure: 1 honoured, 0 violated, 29 with no contract checked; 5 where Syntology's instrument failed) · 10 unverified. Where Syntology's instrument failed: 3 where our contract draft was wrong; 2 where the contract check could not run; failures of Syntology's instrument, not of the code.
By repository: community (archive-listed): 45 samples from 19 repositories, 35 ran (30 with no instrument failure; 5 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.
No sample is linked to this paper from 4 of its repositories that Syntology harvested for other papers:
- andi611/Mockingjay-Speech-Representation, community (archive-listed): harvested for 2 other papers, listed under the repository
- cbg-ethz/bmi, community (archive-listed): harvested for another paper, listed under the repository
- loeweX/Greedy_InfoMax, community (archive-listed): harvested for another paper, listed under the repository
- mboudiaf/Mutual-Information-Variational-Bounds, community (archive-listed): harvested for another paper, listed under the repository
Levels written between 2026-09-22 and 2026-09-26 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.
28 repositories listed; official and paper-mentioned ones first.
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.
A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.
Code Syntology ran Syntology
45 samples harvested: 35 ran (of which 21 constructed an object rather than computing a result; 30 with no instrument failure: 1 honoured, 0 violated, 29 with no contract checked; 5 where Syntology's instrument failed) · 10 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.
Licence: 22 of the 45 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 19 repositories linked to this paper, official or community; the list below is grouped by repository, each group headed by its name and what it is to the paper. “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. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. For 5 samples that ran, the graph records a signature this page does not show: for a class the fixture built without calling, the harness called the object with inputs it made up itself, so the recorded signature is the harness's probe, not the fixture's arguments. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.
Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (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 are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. 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 six 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; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. 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.
A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.
ef63ae1da9a9ed0b · report
fixture: returned InfoNCE · level recorded 2026-09-22 0c6aa70299e39fb2 · report
fixture: returned CPCModel · level recorded 2026-09-22 06beece7949a622a · report
fixture: returned Resblock · level recorded 2026-09-22 4f22c55f43f447da · report
fixture: returned encoder · level recorded 2026-09-22 1c9942b4ab282406 · report
fixture: signature X:Tensor/2/float · returned Tensor · level recorded 2026-09-22 8a0edf707add84b8 · report
fixture: returned CPCLoss · level recorded 2026-09-22 c77e423112015a3b · report
fixture: returned CPCModel · level recorded 2026-09-22 65037d99b31b9ae7 · report
fixture: signature x:ndarray/3/float · returned EagerTensor · level recorded 2026-09-22 6561bbee1ff09943 · report
9fe706cb1512ff06 · report
4e5d092bb8222498 · report
f1e8c76f248d416b · report
fixture: returned Algorithm · level recorded 2026-09-22 ed486b5fa192c61f · report
fixture: returned cpc · level recorded 2026-09-22 45983305e1fcaaef · report
fixture: signature input:Tensor/2/float, target:Tensor/2/float, raw:bool/0/bool · returned Tensor · level recorded 2026-09-26 9ea8495cf4597e1e · report
fixture: signature probs:ndarray/2/float, expected_classes_per_sample:float/0/float · returned float64 · level recorded 2026-09-26 census: 6 implementations from 13 papers, 4 distinct outputs across 3 buckets, one shared input per bucket networks/losses.py ran fingerprinted Apache-2.0 (permissive) ·
25b22350f74af590 · report
fixture: signature input:Tensor/2/float, target:Tensor/2/float, focus:float/0/float, raw:bool/0/bool · returned Tensor · level recorded 2026-09-26 69d65c023623a577 · report
fixture: signature experiment:str/0/str · returned DataFrame · level recorded 2026-09-26 6a0ad9f55e1c06f2 · report
fixture: signature input:Tensor/2/float, target:Tensor/2/float, average:bool/0/bool · returned Tensor · level recorded 2026-09-26 7ca3643dc4275445 · report
fixture: signature x:ndarray/1/int · returned ndarray · level recorded 2026-09-26 98a0dd46a20ece2a · report
fixture: returned BaseCriterion · level recorded 2026-09-22 2ffe2c33220475ca · report
fixture: returned ConstrainedLayer · level recorded 2026-09-22 a31d5f299fb67dc8 · report
fixture: returned EqualizedConv1d · level recorded 2026-09-22 20bd3807784699b5 · report
fixture: returned EqualizedLinear · level recorded 2026-09-22 a1fa550706a4d645 · report
fixture: returned FFNetwork · level recorded 2026-09-22 1d652b465739caed · report
fixture: returned PredictionNetwork · level recorded 2026-09-22 0608dabb9a52bed6 · report
fixture: returned ShiftedConv · level recorded 2026-09-22 8dd3d0253826c3e4 · report
fixture: signature x:callable/0/? · returned float · level recorded 2026-09-22 4c96c9c7dcdc4ecf · report
6d4dd79504cddf0f · report
fixture: signature C:Tensor/3/float, X:Tensor/3/float · returned Tensor · level recorded 2026-09-22 bacdbc0bbfe53598 · report
census: 6 implementations from 5 papers, 3 distinct outputs across 2 buckets, one shared input per bucket src/models/losses.py ran · our draft was wrong Apache-2.0 (permissive) ·
4bd8a922e4fd21df · report
fixture: signature history:Tensor/2/float, future:Tensor/2/float, temperature:float/0/float, reduction:str/0/str · returned tuple · level recorded 2026-09-22 1fb147a76c863ded · report
fixture: returned ContextPredictionModel · level recorded 2026-09-22 90540cd2dfd95c3c · report
fixture: returned CPCEncoder · level recorded 2026-09-22 274596d912e6af16 · report
fdb79f7c30db5b04 · report
fixture: returned Autoregressive · level recorded 2026-09-22 d553f5e8f537a269 · report
fixture: returned CPCModel · level recorded 2026-09-22 61e69ae0f2b2b9d6 · report
fixture: returned Predictor · level recorded 2026-09-22 bf44986039feb903 · report
fixture: signature nb_timesteps_to_predict:int/0/int, predictions:EagerTensor/3/float, Z_future:EagerTensor/3/float · returned tuple · level recorded 2026-09-22 88f5e149a4a5701e · report
fixture: returned CPCModel · level recorded 2026-09-22 3fd9a785ec6e3e12 · report
fixture: returned Tensor · level recorded 2026-09-22 Method as code Syntology
What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it. Siblings are assemblies lifted from this paper in the same batch for the same method: alternative readings kept side by side; none replaces or supersedes another.
18 assemblies on this paper: 18 harvested, 0 generated, listed in 1 groups (siblings lifted in one batch form one group).
18 sibling assemblies for Contrastive Predictive Coding (harvested), lifted in the same batch on 2026-09-09: alternative readings kept side by side; none replaces or supersedes another. Bricks printed for 12 of 18 sibling assemblies; the other 6 are listed with their counts; every brick is in this page's JSON twin.
harvested Assembly for Contrastive Predictive Coding (graph method: Contrastive Predictive Coding). 2 bricks; individually on a fixture: 2 ran (of which 2 constructed an object rather than computing a result; 2 with no instrument failure: 0 honoured, 0 violated, 2 with no contract checked; 0 where Syntology's instrument failed) · 0 unverified; every one of the 2 samples that ran constructed an object rather than computing a result. The assembly has not been run end-to-end.
one of 18 siblings
- cpc entry · level 1 · ran ·
ed486b5fa192c61f - Algorithm helper · level 1 · ran ·
f1e8c76f248d416b
harvested Assembly for Contrastive Predictive Coding (graph method: Contrastive Predictive Coding). 1 brick; individually on a fixture: 0 ran · 1 unverified. The assembly has not been run end-to-end.
one of 18 siblings
- CPCModel entry · level 0 · unverified ·
591507cec9d8ebf7
harvested Assembly for Contrastive Predictive Coding (graph method: Contrastive Predictive Coding). 9 bricks; individually on a fixture: 8 ran (of which 7 constructed an object rather than computing a result; 8 with no instrument failure: 1 honoured, 0 violated, 7 with no contract checked; 0 where Syntology's instrument failed) · 1 unverified. The assembly has not been run end-to-end.
one of 18 siblings
- CPCUnsupersivedCriterion entry · level 0 · unverified ·
4c96c9c7dcdc4ecf - BaseCriterion helper · level 1 · ran ·
98a0dd46a20ece2a - PredictionNetwork model · level 1 · ran ·
1d652b465739caed - EqualizedConv1d helper · level 1 · ran ·
a31d5f299fb67dc8 - FFNetwork helper · level 1 · ran ·
a1fa550706a4d645 - ShiftedConv helper · level 1 · ran ·
0608dabb9a52bed6 - ConstrainedLayer helper · level 1 · ran ·
2ffe2c33220475ca - EqualizedLinear helper · level 1 · ran ·
20bd3807784699b5 - getLayerNormalizationFactor helper · level 1 · ran · honoured contract ·
8dd3d0253826c3e4
harvested Assembly for Contrastive Predictive Coding (graph method: Contrastive Predictive Coding). 2 bricks; individually on a fixture: 2 ran (of which 1 constructed an object rather than computing a result; 1 with no instrument failure: 0 honoured, 0 violated, 1 with no contract checked; 1 where Syntology's instrument failed) · 0 unverified. The assembly has not been run end-to-end.
one of 18 siblings
- CPCModel entry · level 1 · ran ·
88f5e149a4a5701e - get_context helper · level 1 · ran · our draft was wrong ·
3fd9a785ec6e3e12
harvested Assembly for Contrastive Predictive Coding (graph method: Contrastive Predictive Coding). 1 brick; individually on a fixture: 1 ran (of which 1 constructed an object rather than computing a result; 1 with no instrument failure: 0 honoured, 0 violated, 1 with no contract checked; 0 where Syntology's instrument failed) · 0 unverified; the one sample that ran constructed an object rather than computing a result. The assembly has not been run end-to-end.
one of 18 siblings
- CPCLoss entry · level 1 · ran ·
8a0edf707add84b8
harvested Assembly for Contrastive Predictive Coding (graph method: Contrastive Predictive Coding). 4 bricks; individually on a fixture: 4 ran (of which 3 constructed an object rather than computing a result; 3 with no instrument failure: 0 honoured, 0 violated, 3 with no contract checked; 1 where Syntology's instrument failed) · 0 unverified. The assembly has not been run end-to-end.
one of 18 siblings
- CPCModel entry · level 1 · ran ·
d553f5e8f537a269 - Autoregressive model · level 1 · ran ·
fdb79f7c30db5b04 - Predictor model · level 1 · ran ·
61e69ae0f2b2b9d6 - cpc_loss loss · level 1 · ran; the contract check could not run (RAISES) ·
bf44986039feb903
harvested Assembly for Contrastive Predictive Coding (graph method: Contrastive Predictive Coding). 1 brick; individually on a fixture: 1 ran (of which 1 constructed an object rather than computing a result; 1 with no instrument failure: 0 honoured, 0 violated, 1 with no contract checked; 0 where Syntology's instrument failed) · 0 unverified; the one sample that ran constructed an object rather than computing a result. The assembly has not been run end-to-end.
one of 18 siblings
- CPCModel entry · level 1 · ran ·
c77e423112015a3b
harvested Assembly for Contrastive Predictive Coding (graph method: Contrastive Predictive Coding). 1 brick; individually on a fixture: 1 ran (of which 0 constructed an object rather than computing a result; 0 with no instrument failure: 0 honoured, 0 violated, 0 with no contract checked; 1 where Syntology's instrument failed) · 0 unverified. The assembly has not been run end-to-end.
one of 18 siblings
- au_infonce_loss entry · level 1 · ran · our draft was wrong ·
e5a1ba36ae15b5da
harvested Assembly for Contrastive Predictive Coding (graph method: Contrastive Predictive Coding). 1 brick; individually on a fixture: 1 ran (of which 0 constructed an object rather than computing a result; 0 with no instrument failure: 0 honoured, 0 violated, 0 with no contract checked; 1 where Syntology's instrument failed) · 0 unverified. The assembly has not been run end-to-end.
one of 18 siblings
- info_nce entry · level 1 · ran · our draft was wrong ·
4bd8a922e4fd21df
harvested Assembly for Contrastive Predictive Coding (graph method: Contrastive Predictive Coding). 2 bricks; individually on a fixture: 1 ran (of which 1 constructed an object rather than computing a result; 1 with no instrument failure: 0 honoured, 0 violated, 1 with no contract checked; 0 where Syntology's instrument failed) · 1 unverified; the one sample that ran constructed an object rather than computing a result. The assembly has not been run end-to-end.
one of 18 siblings
- CPC entry · level 0 · unverified ·
274596d912e6af16 - CPCEncoder model · level 1 · ran ·
90540cd2dfd95c3c
harvested Assembly for Contrastive Predictive Coding (graph method: Contrastive Predictive Coding). 1 brick; individually on a fixture: 1 ran (of which 1 constructed an object rather than computing a result; 1 with no instrument failure: 0 honoured, 0 violated, 1 with no contract checked; 0 where Syntology's instrument failed) · 0 unverified; the one sample that ran constructed an object rather than computing a result. The assembly has not been run end-to-end.
one of 18 siblings
- ContextPredictionModel entry · level 1 · ran ·
1fb147a76c863ded
harvested Assembly for Contrastive Predictive Coding (graph method: Contrastive Predictive Coding). 1 brick; individually on a fixture: 0 ran · 1 unverified. The assembly has not been run end-to-end.
one of 18 siblings
- CPC entry · level 0 · unverified ·
e720870fffa7cffb
- InfoNCE · 8f97b045f34d4007 · 1 brick; individually on a fixture: 1 ran (of which 1 constructed an object rather than computing a result; 1 with no instrument failure: 0 honoured, 0 violated, 1 with no contract checked; 0 where Syntology's instrument failed) · 0 unverified; the one sample that ran constructed an object rather than computing a result · The assembly has not been run end-to-end · assemblies[12] in the JSON twin
- CPCModel · 9207a7ca17443d19 · 3 bricks; individually on a fixture: 3 ran (of which 3 constructed an object rather than computing a result; 3 with no instrument failure: 0 honoured, 0 violated, 3 with no contract checked; 0 where Syntology's instrument failed) · 0 unverified; every one of the 3 samples that ran constructed an object rather than computing a result · The assembly has not been run end-to-end · assemblies[13] in the JSON twin
- network_cpc · db28345e721346f5 · 5 bricks; individually on a fixture: 1 ran (of which 0 constructed an object rather than computing a result; 0 with no instrument failure: 0 honoured, 0 violated, 0 with no contract checked; 1 where Syntology's instrument failed) · 4 unverified · The assembly has not been run end-to-end · assemblies[14] in the JSON twin
- multi_batch_InfoNCE_loss · e1bfb9133450456c · 1 brick; individually on a fixture: 1 ran (of which 0 constructed an object rather than computing a result; 1 with no instrument failure: 0 honoured, 0 violated, 1 with no contract checked; 0 where Syntology's instrument failed) · 0 unverified · The assembly has not been run end-to-end · assemblies[15] in the JSON twin
- CPC_encoder · e48d8afe68412cc9 · 1 brick; individually on a fixture: 1 ran (of which 0 constructed an object rather than computing a result; 1 with no instrument failure: 0 honoured, 0 violated, 1 with no contract checked; 0 where Syntology's instrument failed) · 0 unverified · The assembly has not been run end-to-end · assemblies[16] in the JSON twin
- CDCK2 · ee661d2d2f91cd0f · 1 brick; individually on a fixture: 0 ran · 1 unverified · The assembly has not been run end-to-end · assemblies[17] in the JSON twin
Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="1807.03748") returns these assemblies with each brick's role and wiring (how to connect).
Tasks
Results from the paper archive 2025-07-28
| Task | Dataset | Model | Metric | Value | Rank at snapshot | Leaderboard | Report |
|---|---|---|---|---|---|---|---|
| Self-Supervised Image Classification | ImageNet | CPC (ResNet-101 V2) | Number of Params | 44M | #134 of 144 | Archive leaderboard | report |
| Self-Supervised Image Classification | ImageNet | CPC (ResNet-101 V2) | Top 1 Accuracy | 48.7% | #134 of 144 | Archive leaderboard | report |
| Self-Supervised Image Classification | ImageNet | CPC (ResNet-101 V2) | Top 5 Accuracy | 73.6% | #134 of 144 | Archive leaderboard | report |
| Semi-Supervised Image Classification | ImageNet - 1% labeled data | CPC | Top 5 Accuracy | 64.03% | #56 of 65 | Archive leaderboard | report |
| Semi-Supervised Image Classification | ImageNet - 10% labeled data | CPC | Top 5 Accuracy | 84.88% | #57 of 75 | 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
Introduced by this paper: Contrastive Predictive Coding
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