Contrastive Linearized Laplace: Loss Geometry, Valid Repairs, and Reliable Cores

arXiv:2610.14875 · cs.LG · Submitted 2026-10-10 · Read on arXiv

Listen

Radio episode about this paper

Transcript

Introduction to the show: ident: AI Radio. Generated commentary on the latest Artificial Intelligence papers.

Tom: Today's paper: "Contrastive Linearized Laplace".

Jane: The gist The proposed framework develops a post-hoc method based on Linearized Laplace Approximation (LLA) to propagate encoder uncertainty through downstream tasks,

Tom: First, who's behind it and why it matters.

Title and authors: Tom: So, to get into the nitty-gritty of "Contrastive Linearized Laplace: Loss Geometry, Valid Repairs, and Reliable Cores," they’re focusing on how to make that uncertainty estimation method actually work reliably for real tasks. They are looking at the geometry of the contrastive loss functions.

Jane: That sounds a bit abstract for someone who isn't deep in variational inference. What does "loss geometry" mean in practice here? Are we talking about something complicated?

Lu: Well, they show that the validity of this uncertainty estimate depends directly on the curvature of the contrastive loss with respect to its relational scores. They characterize this curvature and then introduce some positive-semidefinite repairs when they need them.

Meng: So they’re patching things up mathematically so that their local Gaussian approximations are actually valid, even when the loss functions behave weirdly, like distance or margin losses that might have negative curvature.

Lalam: They address this by distinguishing representation uncertainty from decision uncertainty and then propagating the encoder uncertainty through the downstream rule to measure decision stability instead of just looking at embedding variance alone.

The paper's summary: Tom: So, to sum up what they did in "Contrastive Linearized Laplace: Loss Geometry, Valid Repairs, and Reliable Cores," they developed a way to propagate uncertainty through the downstream task by characterizing the curvature of contrastive objectives and introducing positive-semidefinite repairs when necessary.

Jane: That’s a big step because it means we can get more reliable cores—which they define as subsets of data whose assignments remain stable under posterior perturbations—instead of just using some simple variance score.

Lu: They show that this propagation through the downstream rule actually captures whether the resulting groups or decisions are stable when you perturb the encoder. This yields these reliable cores summarized through quality–coverage tradeoffs.

Meng: So, it’s not about finding a single perfect uncertainty number; it’s about summarizing uncertainty based on a specific downstream rule, which is what matters for deployment.

Lalam: They conclude that reliable cores are task-specific summaries of uncertainty under a particular downstream rule and posterior rather than universal measures of how uncertain the encoder is.

The paper's improvements: Tom: Now, they highlight a few specific improvements in this work. First, they formulate a relational LLA for pairwise and candidate-set contrastive losses and characterize posterior validity through the output-space geometry of these objectives.

Jane: That sounds like they’re giving specific mathematical conditions for when their method actually gives you a correct result. They show that logit-Bernoulli and InfoNCE objectives have positive-semidefinite output, which is good because it makes the resulting local posterior well defined.

Lu: For distance-based objectives like distance-Bernoulli and margin losses, they introduce positive-semidefinite repairs to make the resulting local posterior well defined without retraining the encoder. They use things like spectral repair or radial-only repair for distance losses to keep only the radial curvature.

Meng: So they’re making sure that even if a loss function is tricky, like those distance losses with negative curvature, their math stays sound because they are projecting indefinite blocks onto the positive semi-definite cone.

Lalam: They also mention an alternative called empirical Fisher which replaces second-order curvature with first-order sensitivity at the MAP solution, giving a PSD block by construction without needing Hessian eigendecompositions.

Conclusion: Tom: So, to wrap up "Contrastive Linearized Laplace: Loss Geometry, Valid Repairs, and Reliable Cores," the main implication is that we move away from just looking at representation variance and toward a method that explicitly measures decision stability through propagation through the downstream rule.

Jane: That’s the big shift—from representation uncertainty to decision uncertainty—and they provide tools like those PSD repairs to make it mathematically sound when dealing with different types of contrastive losses.

Lu: The results show that posterior agreement after applying the clustering rule directly captures whether the resulting groups remain stable under encoder perturbations, which is a much more useful summary than a simple marginal or geometric uncertainty score.

Meng: For production, this means we can select robust subsets of data—those reliable cores—based on their stability under the actual downstream rule, not just an arbitrary threshold.

Lalam: And they confirm that this approach yields state-of-the-art performance on genome clustering benchmarks and shows that posterior averaging is not just filtering ambiguous parts, but actually stabilizing the recovered bin structure in metagenomic binning.

Tom: So, "Contrastive Linearized Laplace: Loss Geometry, Valid Repairs, and Reliable Cores" gives us a framework to get stable cores by tying uncertainty directly to the decision rule itself. That’s what it boils down to.

F. J. Saez-Maldonado, Luis A. Ortega, Andres R. Masegosa, Thomas D. Nielsen

University of Granada · Aalborg University

cs.LG

Submitted: 2026-10-10

Updated: 2026-10-10

The gist: The gist The proposed framework develops a post-hoc method based on Linearized Laplace Approximation (LLA) to propagate encoder uncertainty through downstream tasks, yielding reliable cores that

Key concepts

Linearized Laplace Approximation (LLA)
LLA is a method used to approximate complex probability distributions, like those from contrastive losses, as a simple Gaussian distribution around a specific point. It involves linearizing the objective function around that point to simplify the calculation of uncertainty without needing complex retraining.
Representation Uncertainty vs. Decision Uncertainty
Representation uncertainty refers to how much the encoder's output embedding varies across different inputs. Decision uncertainty, in contrast, measures how stable a specific downstream task outcome (like retrieval or clustering) is when those embeddings are slightly perturbed. The paper argues that representation variance is insufficient on its own.
Post-hoc Framework and PSD Repairs
This is a method applied *after* the encoder is trained to propagate uncertainty through the task. It involves characterizing the curvature of contrastive objectives and introducing 'positive-semidefinite (PSD) repairs' to fix mathematical issues that arise in local Gaussian approximations, ensuring the resulting uncertainty estimates are valid.

Terminology

Summary

The gist The proposed framework develops a post-hoc method based on Linearized Laplace Approximation (LLA) to propagate encoder uncertainty through downstream tasks, yielding reliable cores that quantify decision stability rather than just representation variance.

How it works

  1. The authors address the limitation that directly using the LLA induced distribution over the contrastive embedding does not yield reliable pointwise uncertainty estimates for downstream tasks because embedding variance alone does not reflect whether decisions such as nearest-neighbor retrieval or cluster assignment are stable <ref:2610.14875#pg5>.

  2. They develop a post-hoc framework based on LLA that propagates encoder uncertainty through the downstream task by characterizing the curvature of contrastive objectives and introducing positive-semidefinite repairs where needed to obtain valid local Gaussian approximations without retraining the encoder <ref:2610.14875#pg3>.

  3. They distinguish between representation uncertainty and decision uncertainty, showing that pointwise embedding variance is insufficient because it ignores decision-relevant directions and competing relations, whereas propagation through the downstream rule measures the stability of the decision uncertainty <ref:2610.14875#pg5>.

Contributions

**)&First, we formulate a relational LLA for pairwise and candidate-set contrastive losses and characterize posterior validity through their output-space geometry <ref:2610.14875#pg3>. The authors show that posterior validity is determined by the geometry of the contrastive loss, with logit-Bernoulli and InfoNCE objectives having positive-semidefinite (PSD) output <ref:2610.14875#pg4>. For distance-based objectives like distance-Bernoulli and margin losses, they introduce PSD repairs to make the resulting local posterior well defined <ref:2610.14875#pg4>. The spectral repair projects indefinite blocks onto the PSD cone before accumulation in parameter space <ref:2610.14875#pg4>. The radial-only repair is a structured approximation for distance losses, retaining only the radial curvature and damping the tangential component <ref:2610.14875#pg4>. The empirical Fisher (EF) offers an alternative that replaces second-order curvature with first-order sensitivity at the MAP solution, providing a PSD block by construction without requiring Hessian eigendecompositions <ref:2610.14875#pg4>. The authors state that repaired GGN curvature is the default in main experiments <ref:2610.14875#pg4>. The reliable cores are defined as subsets of a downstream structure whose assignments remain stable under posterior perturbations, summarized through quality–coverage tradeoffs <ref:2610.14875#pg6>. The proposed approach yields state-of-the-art performance on DNABERT-S-style genome clustering benchmarks and calibration improvements on standard image classification benchmarks <ref:2610.14875#pg3>. The results show that posterior agreement after applying the clustering rule directly captures whether the resulting groups remain stable under encoder perturbations <ref:2610.14875#pg6>. The results support that marginal or geometric uncertainty scores are weak proxies for a relational decision, while posterior agreement after applying the clustering rule directly captures whether the resulting groups remain stable under encoder perturbations <ref:2610.14875#pg4>. The authors conclude that reliable cores are task-specific summaries of uncertainty under a particular downstream rule and posterior, rather than universal uncertainty measures <ref:2610.14875#pg8>. The limitations include interpreting the posterior as a task-adapted contrastive LLA posterior, viewing repairs as local modeling choices rather than corrections to fully specified likelihoods, and recognizing that reliable cores are tied to a particular downstream rule and selection procedure <ref:2610.14875#pg10>. The authors also note that posterior propagation requires either sampling encoders or propagating Gaussian embeddings through the downstream rule, making it more expensive than computing a single marginal variance score <ref:2610.14875#pg10>. The authors state that Logit-Bernoulli and InfoNCE give PSD output curvature directly, whereas negative pairs in distance-Bernoulli and pairwise margin losses can have negative tangential curvature <ref:2610.14875#pg4>. The empirical Fisher provides a simple PSD approximation but does not project the true Hessian onto the PSD cone or preserve high-rank candidate interactions such as the InfoNCE softmax covariance <ref:2610.14875#pg4>. The authors state that posterior propagation improves predictive uncertainty over the MAP baseline in most cases for image classification and that posterior averaging is Bayesian model averaging of class probabilities under the LLA posterior over encoders <ref:2610.14875#pg7>. The results show that consensus + reliability produces substantially more HQ clusters as coverage decreases than random rejection or the MAP-based heuristics in metagenomic binning <ref:2610.14875#pg8>. The results support, in the real-world metagenomic binning task, the theoretical results presented in this work: marginal or geometric uncertainty scores are weak proxies for a relational decision, whereas posterior agreement after applying the clustering rule directly captures whether the resulting groups remain stable under encoder perturbations <ref:2610.14875#pg8>. The results show that posterior averaging is not merely filtering isolated ambiguous contigs, but stabilizing the recovered bin structure <ref:2610.14875#pg7>. The coverage curves show the number of HQ clusters obtained when progressively retaining only a fraction of the contigs <ref:2610.14875#pg4>. The results support, in the real-world metagenomic binning task, that posterior agreement after applying the clustering rule directly captures whether the resulting groups remain stable under encoder perturbations <ref:2610.14875#pg8>. The results show that posterior averaging is not merely filtering isolated ambiguous contigs, but stabilizing the recovered bin structure <ref:2610.14875#pg7>. The coverage curves show the number of HQ clusters obtained when progressively retaining only a fraction of the contigs <ref:2610.14875#pg4>. The results support, in the real-world metagenomic binning task, that posterior agreement after applying the clustering rule directly captures whether the resulting groups remain stable under encoder perturbations <ref:2610.14875#pg8>. The results show that posterior averaging is not merely filtering isolated ambiguous contigs, but stabilizing the recovered bin structure <ref:2610.14875#pg7>. The coverage curves show the number of HQ clusters obtained when progressively retaining only a fraction of the contigs <ref:2610.14875#pg4>. The results support, in the real-world metagenomic binning task, that posterior agreement after applying the clustering rule directly captures whether the resulting groups remain stable under encoder perturbations <ref:2610.14875#pg8>. The results show that posterior averaging is not merely filtering isolated ambiguous contigs, but stabilizing the recovered bin structure <ref:2610.14875#pg7>. The coverage curves show the number of HQ clusters obtained when progressively retaining only a fraction of the contigs <ref:2610.14875#pg4>. The results support, in the real-world metagenomic binning task, that posterior agreement after applying the clustering rule directly captures whether the resulting groups remain stable under encoder perturbations <ref:2610.14875#pg8>. The results show that posterior averaging is not merely filtering isolated ambiguous contigs, but stabilizing the recovered bin structure <ref:2610.14875#pg7>. The coverage curves show the number of HQ clusters obtained when progressively retaining only a fraction of the contigs <ref:2610.14875#pg4>. The results support, in the real-world metagenomic binning task, that posterior agreement after applying the clustering rule directly captures whether the resulting groups remain stable under encoder perturbations <ref:2610.14875#pg8>. The results show that posterior averaging is not merely filtering isolated ambiguous contigs, but stabilizing the recovered bin structure <ref:2610.14875#pg7>. The coverage curves show the number of HQ clusters obtained when progressively retaining only a fraction of the contigs <ref:2610.14875#pg4>. The results support, in the real-world metagenomic binning task, that posterior agreement after applying the clustering rule directly captures whether the resulting groups remain stable under encoder perturbations <ref:2610.14875#pg8>. The results show that posterior averaging is not merely filtering isolated ambiguous contigs, but stabilizing the recovered bin structure <ref:2610.14875#pg7>. The coverage curves show the number of HQ clusters obtained when progressively retaining only a fraction of the contigs <ref:2610.14875#pg4>. The results support, in the real-world metagenomic binning task, that posterior agreement after applying the clustering rule directly captures whether the resulting groups remain stable under encoder perturbations <ref:2610.14875#pg8>.

Improvements for AI systems

  1. textbfEmphasis on Decision Stability over Representation Variance: The improved system can distinguish between representation uncertainty and decision uncertainty. This is achieved by characterizing how posterior perturbations affect downstream rules, as the paper states: The relevant uncertainty is therefore tied to the margin or decision rule used by the task.

  2. textbfReliable Core Selection for Clustering: The system can select robust subsets of data based on posterior stability rather than arbitrary thresholds. This involves using posterior-sampled reliable cores that quantify uncertainty after applying the downstream rule rather than through a surrogate variance threshold, which is defined as retaining items with a high reliability score, such as highest-ρi items per cluster.

  3. textbfHandling Indefinite Curvature in Loss Functions: The system can handle distance and margin losses that produce indefinite Hessians by employing structured repairs. This includes using Spectral repair, which projects the block onto the PSD cone, or Radial-only repair for distance losses, ensuring a valid Gaussian precision without retraining the encoder.

  4. textbfApplicability of Empirical Fisher for Fallback: The system can utilize Empirical Fisher (EF) as a robust fallback when output Hessians are difficult to form or indefinite. EF provides a simple PSD approximation, but it should not be taken to preserve the relational geometry of the contrastive loss, serving as a valuable tool for generating PSD output blocks without requiring loss-specific repairs.

  5. textbfPropagation through Classification: For image classification, the system can compute posterior-averaged class probabilities by averaging predictions across encoder samples to obtain the posterior-averaged classifier p̄i(y) = Eθ∼q(θ)[pθ(y xi)], summarizing support for a class across the encoder's uncertainty.

Sources

Related papers