Methods › General › Semi-Supervised Learning Methods › Contrastive Predictive Coding

Contrastive Predictive Coding

113 papers tagged archive 2025-07-28

Introduced by Aaron van den Oord et al. in Representation Learning with Contrastive Predictive Coding

archive 2025-07-28 Description, source and code snippet are the archive's method entry.

Contrastive Predictive Coding (CPC) learns self-supervised representations by predicting the future in latent space by using powerful autoregressive models. The model uses a probabilistic contrastive loss which induces the latent space to capture information that is maximally useful to predict future samples.

First, a non-linear encoder g_(enc) maps the input sequence of observations xₜ to a sequence of latent representations zₜ = g_(enc)(xₜ), potentially with a lower temporal resolution. Next, an autoregressive model gₐᵣ summarizes all z≤t in the latent space and produces a context latent representation cₜ = gₐᵣ(z≤t).

A density ratio is modelled which preserves the mutual information between xₜ₊ₖ and cₜ as follows:

fₖ(xₜ₊ₖ, cₜ) ∝(p(xₜ₊ₖ|cₜ))/(p(xₜ₊ₖ))

where ∝ stands for ’proportional to’ (i.e. up to a multiplicative constant). Note that the density ratio f can be unnormalized (does not have to integrate to 1). The authors use a simple log-bilinear model:

fₖ(xₜ₊ₖ, cₜ) = exp(zᵀₜ₊ₖWₖcₜ)

Any type of autoencoder and autoregressive can be used. An example the authors opt for is strided convolutional layers with residual blocks and GRUs.

The autoencoder and autoregressive models are trained to minimize an InfoNCE loss (see components).

PaperSourceSee Code · jefflai108/Contrastive-Predictive-Coding-PyTorch

In Syntology repository known, no verified implementation (declared_code; repositories: 5 listed of 28 in the graph, strongest link: mentioned on GitHub). This answer is about arXiv:1807.03748, the paper the archive credits with this method.

Code Syntology holds under other names, as the lookup lists them (code_nearby); not a complete list, and none of them is this method.

Origin paper of this answer, arXiv:1807.03748 (its page on this site · its page on Syntology): Syntology's run record for its harvested code, 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 (of 45 harvested samples) · 22 pointer-only (licence). The instrument figure counts failures of Syntology's instrument, not of the code. Ran means executed on a synthesized input, not that the code is correct.

Syntology's have check for this name (free, it answers coverage only), read 2026-10-05; ask it again live. A level is the served verification level of that one answer; nothing here is summed across methods.

What each level means, quoted from Syntology's server card: V0 “imports”; V1 “executes against a synthesized fixture and returns a value of the recorded type”; V2 “two implementations GENERATED from the paper's signature and spec agree numerically (1e-6) on fixture inputs” “neither of the two ever read the authors' own code, so V2 measures how unambiguously the paper specifies the method, not fidelity to the authors' implementation (measured 2026-09-11, commit 75eaa77: cross_checked_by is a second LLM on 2,628 of 2,831 served samples)”; V3 “paper-derived property tests pass on both of those same two generations.” The card adds: “No rung on this ladder compares the served code against the authors' implementation, so treat every level as evidence about runnability and internal agreement, not about matching the paper's results.” A level quoted in two parts is one definition the card writes as two clauses joined by a double hyphen, each clause quoted on its own (how these levels are quoted).

Papers archive 2025-07-28

archive papers tagged: 113 · with a code link: 39 · where Syntology ran a sample: 14 (12 with a run with no instrument failure, 2 where every run was a failure of Syntology's instrument) Syntology

Show: all tagged papersonly where code ran (14 of 113 tagged: 12 with a run with no instrument failure, 2 where every run was a failure of Syntology's instrument)

Page 1 of 2: papers 1 to 100 of 113, newest first by the archive's date (ties by slug), in archive order.

Repository counts are the archive's code-links table. A Syntology line states what Syntology ran from that paper's harvested code, as “N ran (of which C constructed an object rather than computing a result; K with no instrument failure: H honoured, V violated, P with no contract checked; I where Syntology's instrument failed) · U unverified”; the instrument figure counts failures of Syntology's instrument, not of the code. It is per sample and not a correctness claim. When the archive marks a repository official for the paper, the line starts with that repository's state (the archive's flag, not a verdict on who wrote the code; “community repositories only” when every sample that ran came from a community repository, “official: no sample here; runs from other or unrecorded repositories” when some came from a repository the paper names or has in its text, or from none recorded); hover it for the repositories the samples that ran came from.

Tasks archive 2025-07-28

20 shown of 137 tasks the archive attaches to papers tagged with this method, by distinct papers. A task without a page in the catalog is plain text.

TaskPapers
Representation Learning23
Self-Supervised Learning17
Contrastive Learning10
Speech Recognition10
speech-recognition10
Automatic Speech Recognition9
Automatic Speech Recognition (ASR)7
Acoustic Unit Discovery6
Transfer Learning6
Voice Conversion6
Anomaly Detection5
Language Modelling5
Activity Recognition4
General Classification4
Human Activity Recognition4
Quantization4
Segmentation4
Time Series4
Disentanglement3
Language Modeling3

Usage over time archive 2025-07-28

Papers per year tagged with Contrastive Predictive Coding: 2018 to 2025, peak 27 27 0 2018: 2 papers 2018 2019: 7 papers 2019 2020: 20 papers 2020 2021: 27 papers 2021 2022: 21 papers 2022 2023: 14 papers 2023 2024: 16 papers 2024 2025: 6 papers 2025
Papers per year the archive tags with this method, by the paper's archive date (113 dated). Bars are counts, not a trend claim.

Components: the archive holds no method-to-method composition, so PwC's Components table cannot be rebuilt; the Papers list carries no Results column for the same reason (the archive does not join its leaderboard rows to method tags).

Categories archive 2025-07-28

Semi-Supervised Learning MethodsSelf-Supervised 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