TasksSotADatasetsPapersMethodsSubmitAbout
Papers With Code 2

A community resource for machine learning research: papers, code, benchmarks, and state-of-the-art results.

Explore

Notable BenchmarksAll SotADatasetsPapersMethods

Community

Submit ResultsAbout

Data sourced from the PWC Archive (CC-BY-SA 4.0). Built by the community, for the community.

Methods/Contrastive Predictive Coding

Contrastive Predictive Coding

GeneralIntroduced 2000113 papers
Source Paper

Description

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_encg\_{enc}g_enc maps the input sequence of observations x_tx\_{t}x_t to a sequence of latent representations z_t=g_enc(x_t)z\_{t} = g\_{enc}\left(x\_{t}\right)z_t=g_enc(x_t), potentially with a lower temporal resolution. Next, an autoregressive model g_arg\_{ar}g_ar summarizes all z≤tz\leq{t}z≤t in the latent space and produces a context latent representation c_t=g_ar(z≤t)c\_{t} = g\_{ar}\left(z\leq{t}\right)c_t=g_ar(z≤t).

A density ratio is modelled which preserves the mutual information between x_t+kx\_{t+k}x_t+k and c_tc\_{t}c_t as follows:

f_k(x_t+k,c_t)∝p(x_t+k∣c_t)p(x_t+k)f\_{k}\left(x\_{t+k}, c\_{t}\right) \propto \frac{p\left(x\_{t+k}|c\_{t}\right)}{p\left(x\_{t+k}\right)}f_k(x_t+k,c_t)∝p(x_t+k)p(x_t+k∣c_t)​

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

f_k(x_t+k,c_t)=exp⁡(zT_t+kW_kc_t)f\_{k}\left(x\_{t+k}, c\_{t}\right) = \exp\left(z^{T}\_{t+k}W\_{k}c\_{t}\right)f_k(x_t+k,c_t)=exp(zT_t+kW_kc_t)

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).

Papers Using This Method

Two-Player Zero-Sum Games with Bandit Feedback2025-06-17Integration of Contrastive Predictive Coding and Spiking Neural Networks2025-06-10Koopman-Based Event-Triggered Control from Data2025-04-19Learning Transformer-based World Models with Contrastive Predictive Coding2025-03-06Contrastive Representation Learning Helps Cross-institutional Knowledge Transfer: A Study in Pediatric Ventilation Management2025-01-23Performance-Barrier Event-Triggered PDE Control of Traffic Flow2025-01-01Automated Toll Management System Using RFID and Image Processing2024-12-02A Contrastive Self-Supervised Learning scheme for beat tracking amenable to few-shot learning2024-11-06Trading through Earnings Seasons using Self-Supervised Contrastive Representation Learning2024-09-25Context-Aware Predictive Coding: A Representation Learning Framework for WiFi Sensing2024-09-20Context-Aware Predictive Coding: A Representation Learning Framework for WiFi Sensing2024-09-16Hierarchical Event-Triggered Systems: Safe Learning of Quasi-Optimal Deadline Policies2024-09-15Speaker and Style Disentanglement of Speech Based on Contrastive Predictive Coding Supported Factorized Variational Autoencoder2024-09-05Contrastive Representation Learning for Dynamic Link Prediction in Temporal Networks2024-08-22Performance-Barrier Event-Triggered Control of a Class of Reaction-Diffusion PDEs2024-07-11Contextual Dynamic Pricing: Algorithms, Optimality, and Local Differential Privacy Constraints2024-06-04Causal Contrastive Learning for Counterfactual Regression Over Time2024-06-01Offline Reinforcement Learning from Datasets with Structured Non-Stationarity2024-05-23Multilingual Turn-taking Prediction Using Voice Activity Projection2024-03-11Event-Triggered Robust Cooperative Output Regulation for a Class of Linear Multi-Agent Systems with an Unknown Exosystem2024-03-01