AI Glossary / Probabilistic machine learning / Advanced

InfoNCE lower bound

Definition

The InfoNCE lower bound is a relationship connecting a particular contrastive-learning objective to mutual information. Under its specified sampling assumptions, log(N) minus the expected InfoNCE loss is a lower bound on the mutual information between the paired variables, where N counts all candidates including the positive.

What it means

Contrastive learning trains a scoring function to identify a related, or positive, item among alternatives. The InfoNCE loss measures how much probability the scoring rule assigns to the correct item within that candidate set.

Mutual information measures statistical dependence between variables. The lower-bound interpretation links the classification-style objective to that information quantity, but it does not make the loss an exact mutual-information measurement.

The distinction matters in representation learning. A representation can improve at the contrastive task without preserving exactly the information a downstream business task needs. The pairing rule and negative-sampling process define what the objective encourages the model to distinguish.

How it works

In the standard construction, draw a paired context and positive sample from their joint distribution. Draw N − 1 negative samples independently from the appropriate marginal distribution. A positive score f(context, candidate) is normalized across the N candidates.

The loss is the expectation of the negative logarithm of the positive candidate's normalized score. The resulting lower bound is log(N) − L_N, using the same logarithm convention throughout.

This bound cannot exceed log(N), because the loss is nonnegative. Changing how negatives are sampled, introducing dependence or selecting only difficult negatives can change the mathematical interpretation. A contrastive loss may remain useful, but the original mutual-information bound should not be claimed without checking the new construction.

Three practical examples

  • A representation-learning researcher uses the bound to interpret a contrastive objective for paired observations.
  • An audio experiment distinguishes a related future segment from marginally sampled alternatives.
  • An evaluation team reports the candidate count and sampling assumptions when discussing information-related contrastive results.

Think of it this way

Think of finding the correctly paired card among a tray of candidates. Successful matching shows that the two card descriptions share useful clues for this particular task.

The analogy does not show that every relevant fact is preserved. A shortcut clue, such as a printing mark, could make matching easy while contributing little to the real purpose. Likewise, contrastive success needs to be evaluated beyond the training game.

Worked example

Calculating loss and its bound contribution

Consider one contrastive trial with N = 4 candidates. Give the positive item score 6 and the three negative items scores 1, 2 and 1. The total score is 10, so the positive probability is 0.6.

The trial loss is −log(0.6), approximately 0.5108 nats. Subtracting this from log(4), approximately 1.3863, gives a trial contribution of approximately 0.8755 nats.

The theoretical lower bound uses the expected loss across the specified sampling process, not this single trial. An average of trial contributions estimates that quantity and has sampling uncertainty. One favorable trial does not certify that the mutual information equals or exceeds 0.8755.

If all four scores were equal, the positive probability would be 1/4, the loss would be log(4), and the contribution would be zero. Even perfect identification could make this four-candidate bound approach at most log(4), approximately 1.3863 nats or 2 bits. The actual mutual information may be larger; the finite-candidate ceiling limits this bound's expressiveness.

Illustrative case study

Fictional case: learning document representations

A fictional research team pairs two views of each document and trains a contrastive representation. It initially reports a reduced InfoNCE loss as evidence of better semantic understanding.

During review, the team discovers that the two views retain a document-specific formatting marker. The marker may help matching without helping the intended topic-classification task. It revises the view construction and evaluates the representations on separate, relevant tasks.

The report describes the contrastive result and its assumptions precisely. It does not translate the loss improvement into an unsupported amount of semantic knowledge. This fictional case illustrates why information shared between views is not automatically the information a product needs.

Common misconceptions and mistakes

InfoNCE loss and the InfoNCE lower bound have opposite optimization directions for fixed N: lowering the loss raises the bound. Reporting only “higher InfoNCE” is ambiguous.

N includes the positive candidate. Confusing N negatives with N total candidates shifts the log term and produces the wrong numerical bound.

A negative label in the contrastive construction does not necessarily mean the item is semantically unrelated. A marginal draw can resemble the positive. Conversely, deliberately chosen hard negatives need a revised analysis if they no longer follow the original marginal-sampling assumptions. Mutual information also describes dependence, not causation.

Business use

Use the bound as a carefully qualified interpretation of a contrastive objective. Specify the paired variables, candidate count, sampling distribution and logarithm base. If embeddings are the variables of interest, state that rather than silently switching between raw inputs and their representations.

For business evaluation, measure performance on the intended tasks and inspect shortcut features. Do not compare raw losses from different candidate counts as though they were automatically on the same difficulty scale. Treat an empirical bound estimate as a statistical result with estimation limitations, not a direct score of general intelligence.

People also ask

Is InfoNCE an exact mutual-information estimator?

No. It provides a lower-bound construction under stated assumptions and can be limited by candidate count and scoring-function quality.

Can the reported expression be negative?

Yes. A poor score function can yield log(N) − L_N below zero, which is a valid but uninformative lower bound because mutual information is nonnegative.

Does more mutual information ensure a better representation?

Not by itself. The shared information may include details irrelevant to the downstream task.

Check your understanding

If N = 8 and the expected loss is log(8), what does the bound equal?

Answer: Zero. This does not prove the variables are independent; it only means this objective and scoring setup have not established a positive lower bound.

Related terms

  • Contrastive Learning
  • Mutual information
  • Negative sampling
  • Representation learning
  • Cross-entropy
  • contrastive predictive coding
  • density ratio

Learn next

Compare mutual information between raw paired inputs with information between learned representations. Then examine how changing the view construction or negative distribution changes what the contrastive task rewards.

  • Mutual information

More in Probabilistic machine learning

  • Importance-weighted evidence lower bound - An importance-weighted evidence lower bound is a variational objective formed by taking the expected logarithm of an average of importance weights.
  • Independence Metropolis sampler - An independence Metropolis sampler is a Metropolis - Hastings algorithm that proposes each candidate from a fixed distribution independent of the chain's...
  • Inducing point approximation - An inducing point approximation is a method for making Gaussian process inference more manageable by representing important function information through a...
  • Information arc in an influence diagram - An information arc in an influence diagram is an arrow into a decision node showing that the source variable's value is available when that decision is made.
  • Informative vector machine - The informative vector machine (IVM) is a sparse Gaussian process method that builds a limited active set of training examples using information-based...
  • InfoVAE - InfoVAE is a family of variational-autoencoder training objectives designed to give more explicit control over data modeling, latent-variable information...

Sources

Primary source: van den Oord, Li and Vinyals, Representation Learning with Contrastive Predictive Coding, sections on InfoNCE and mutual information: https://arxiv.org/pdf/1807.03748

The four-candidate arithmetic and document-representation case are original teaching examples. The numerical trial is explicitly not a certified population bound.

Previous: Infomax Next: Information arc in an influence diagram

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer