AI Glossary / Probabilistic machine learning / Advanced
Latent coincidence analysis
Definition
Latent coincidence analysis (LCA) is a supervised latent-variable method for learning a linear transformation in which distances reflect labeled similarity between examples. It models a pair of uncertain latent locations and a binary indicator of whether those locations are expected to be close.
What it means
Two examples can be close in their raw numerical features yet different for the task that matters. Conversely, irrelevant variation can place similar examples far apart. Distance metric learning tries to make the geometry reflect a useful definition of similarity.
The specific LCA model introduced by Matthew Der and Lawrence Saul uses paired inputs with binary similarity judgments. It learns a shared linear projection into an equal- or lower-dimensional space. Its probabilistic construction allows the latent positions to be uncertain rather than treating them as fixed points throughout training.
Here coincidence means closeness in a latent representation. It does not refer to events occurring at the same time, accidental correlations, or the separate method called latent class analysis, which also uses the initials LCA.
How it works
Each input has a Gaussian latent location centered on its linear projection, with an isotropic noise parameter. Conditional on two latent locations, the probability of a positive pair label decreases exponentially with their squared separation, using a length-scale parameter.
The model integrates over the uncertain latent positions to obtain the probability of the observed pair label. Training uses expectation-maximization: infer relevant posterior statistics for the latent pair, then update parameters. The projection update can be expressed as a least-squares problem.
Positive and negative pair labels have different posterior behavior. In particular, the posterior for a negative pair is not generally Gaussian, even though the conditional latent-location distributions are Gaussian. The required moments are nevertheless tractable in the original formulation.
Three practical examples
- A classification experiment learns a linear representation from same-class and different-class pairs before applying nearest-neighbor classification.
- A similarity-search study tests whether a learned distance retrieves examples that match a task-specific pair-label definition.
- A research team compares LCA with ordinary Euclidean distance and other supervised metric-learning methods on a held-out data split.
Think of it this way
Think of redrawing a map so that places considered similar for a particular purpose lie closer together. The drawing process also allows uncertainty about where each place belongs before the map is settled.
The analogy has limits: the original model learns a linear transformation, not an unrestricted rearrangement of every point. A map useful for one similarity judgment may be unsuitable for another, and the labels define what the method is trying to preserve.
Worked example
Calculating a pair's coincidence probability
Use an original two-feature example with a one-dimensional latent space. Let the projection be W = (1, 0), so only the first feature affects the projected mean. Choose inputs x = (0, 0) and x' = (2, 5). Their projected means are 0 and 2.
Set each latent location's noise variance to 0.5 and the coincidence length-scale squared to 1. Integrating over the two Gaussian locations gives a positive-pair probability equal to square root of [1/(1 + 2 times 0.5)] times exp[−4/(2 times (1 + 2 times 0.5))].
That simplifies to exp(−1)/square root of 2, approximately 0.2601. The calculation combines separation of the projected means with uncertainty in both latent positions.
If the observed pair label is positive, the posterior means move toward each other: from 0 and 2 to 0.5 and 1.5 under these parameters. If the projected means instead coincide, the marginal positive-pair probability is about 0.7071, not one, because the latent positions remain noisy. These calculations evaluate a specified model; they do not claim that training would learn this particular projection.
Illustrative case study
Fictional case: learning a task-specific distance
A fictional parts-catalog team wants nearby search results to represent components with a shared functional category. Its numerical features include both relevant measurements and variation that may distract a raw Euclidean distance.
The team constructs reviewed positive and negative training pairs, fits an LCA projection and evaluates retrieval on components excluded from training. It splits by component before creating pairs so that the same item does not quietly appear on both sides of the evaluation.
The report checks which similarity judgments the learned geometry supports. It avoids claiming a universally correct notion of similarity or assuming that lower-dimensional distances improve every downstream task.
Common misconceptions and mistakes
LCA is supervised in this formulation: pair labels guide the representation. It is not simply an unsupervised projection that preserves the largest data variance.
The Gaussian distributions over latent positions do not make every posterior Gaussian. Negative pair information changes that shape, although the original model still supports the moments needed for its learning procedure.
A lower-dimensional linear projection can map distinct inputs to the same point. The induced distance on the original input space can therefore be a pseudometric rather than a strict metric that separates every distinct pair. Calling it metric learning does not remove that mathematical distinction or guarantee semantic usefulness.
Business use
This method is relevant as an interpretable research baseline when a linear transformation is appropriate and reliable pairwise supervision is available. Its usefulness depends on how pairs are selected and what their labels mean.
Document feature scaling, latent dimension, pair construction, initialization and evaluation splits. Check whether a large number of generated pairs overrepresents a few underlying examples. Compare against simple distances and established alternatives using the same labels. A successful likelihood optimization does not by itself establish better retrieval, classification or transfer to new categories.
People also ask
Does coincidence require identical latent points?
No. The model assigns a decreasing probability of a positive label as latent separation grows; it is not an exact-equality test.
Is the learned mapping nonlinear?
The original projection is linear, although the probability of a pair label depends nonlinearly on distance.
Does expectation-maximization guarantee the best possible projection?
No. Its improvement properties do not imply a global optimum for this learning problem, and initialization can matter.
Check your understanding
With W = (1, 0), do inputs (2, 5) and (2, −8) have different projected means?
Answer: No. Both project to 2. The second feature is discarded by this specified projection, illustrating why distinct inputs can have zero projected distance.
Related terms
- Latent variable
- Expectation-maximization
- Mahalanobis distance
- Distance metric learning
- supervised dimensionality reduction
- nearest-neighbor classification
- pairwise supervision
Learn next
Derive the projected squared distance using W transpose W, then compare deterministic projected distance with LCA's uncertainty-integrated pair probability. Study how positive and negative pair selection changes the learning task.
More in Probabilistic machine learning
- Knowledge gradient acquisition - A knowledge gradient acquisition function scores a possible measurement by the expected improvement it would produce in the value of the best final decision.
- Label bias problem - The label bias problem is a limitation of certain locally normalized sequence models: each state's outgoing transition probabilities must sum to one, which...
- Laplace approximation - A Laplace approximation replaces a probability density near a smooth mode with a Gaussian whose center and curvature match that local peak.
- LDA-HMM - LDA-HMM is a composite text model combining latent Dirichlet allocation's document-level topics with a hidden Markov model's local sequence structure.
- Leapfrog integrator - The leapfrog integrator is a numerical method that advances position and momentum through alternating half and full steps.
- Likelihood tempering - Likelihood tempering changes the influence of observed data by raising the likelihood to a power before combining it with the prior.
Sources
Primary method paper: Der and Saul, Latent Coincidence Analysis: A Hidden Variable Model for Distance Metric Learning: https://cseweb.ucsd.edu/~mfder/papers/lca_nips12.pdf
The projection calculation and catalogue case are original teaching examples.
Previous: Latent class model Next: Latent diffusion