---
title: Uncertainty-driven Embedding Convolution (UEC)
url: https://www.emergentmind.com/topics/uncertainty-driven-embedding-convolution-uec
type: topic
---

# Uncertainty-driven Embedding Convolution (UEC)

Searching arXiv for the primary UEC paper and closely related uncertainty-aware embedding work.
Uncertainty-driven Embedding Convolution (UEC) is a post-hoc framework for combining multiple pretrained text embedding models by first converting each deterministic embedding into a probabilistic embedding, then computing adaptive ensemble weights from embedding uncertainty, and finally evaluating similarity with an uncertainty-aware score [2507.20718]. In the formulation introduced in "Uncertainty-driven Embedding Convolution" [2507.20718], the method is designed for settings in which no single embedding model consistently performs best across domains, languages, or tasks, and it treats uncertainty as a first-class signal for both fusion and retrieval-time scoring rather than as a purely auxiliary diagnostic.

## 1. Definition, scope, and terminological placement

UEC was introduced for **text embeddings** as an uncertainty-aware ensemble method over multiple pretrained encoders such as **BGE**, **E5**, and **GTE** [2507.20718]. Its motivation is that embedding models are often complementary, but conventional ensemble methods such as uniform averaging, manually weighted averaging, and deterministic model merging treat embeddings as equally reliable and therefore cannot down-weight a model that is unreliable on a particular input, express confidence in the fused representation, or calibrate similarity scoring by uncertainty [2507.20718].

The framework takes, for an input text \(x\), \(K\) pretrained embedding models and converts each model output into a Gaussian embedding
\[
z_k(x) \sim \mathcal{N}(\mu_k(x), \Sigma_k(x)).
\]
It then produces a fused probabilistic embedding
\[
z(x) \sim \mathcal{N}(\mu(x), \Sigma(x)),
\]
together with an uncertainty-aware scalar similarity score between two inputs [2507.20718].

The term **“convolution”** in UEC refers to **Gaussian convolution in embedding space**, not to a literal CNN-style convolution. Concretely, the method defines the fused embedding as a weighted linear combination of independent Gaussian embeddings, with exact uncertainty propagation under independence [2507.20718]. This distinguishes UEC from architectures in which uncertainty modulates spatial kernels or graph message-passing operators.

A useful contextual distinction is that other papers use closely related terminology differently. "Rectified Iterative Disparity for Stereo Matching" [2406.10943] defines **UEC** as **Cost volume-based disparity Uncertainty Estimation**, not Uncertainty-driven Embedding Convolution. Conversely, earlier work such as "Convolutional Gaussian Embeddings for Personalized Recommendation with Uncertainty" [2006.10932] can be read as a precursor in the broader sense of uncertainty-aware embedding plus convolutional interaction modeling, but it does not use the term UEC. This suggests that UEC, in the strict sense, is best reserved for the text-embedding framework of [2507.20718].

## 2. Probabilistic embedding construction

UEC begins by transforming deterministic embeddings into probabilistic ones using **Laplace approximation (LA)** applied only to the **last layer** [2507.20718]. With training data
\[
\mathcal{D} = \{(x,y)\},
\]
Bayes’ theorem is written as
\[
p(w \mid \mathcal{D}) = \frac{p(\mathcal{D}\mid w)p(w)}{p(\mathcal{D})}.
\]
Because the exact posterior is intractable, the method approximates it with a Gaussian centered at the MAP estimate \(\hat w\), using the second-order expansion
\[
-\log p(w\mid\mathcal{D}) \approx - \log p(\hat w\mid\mathcal{D}) + \frac{1}{2}(w-\hat w)^\top H_{\hat w}(w-\hat w),
\]
with Hessian
\[
H_{\hat w} = \nabla^2\big[-\log p(\mathcal{D}\mid w)-\log p(w)\big]\Big|_{w=\hat w},
\]
so that
\[
p(w\mid\mathcal{D}) \approx \mathcal{N}(\hat w, H_{\hat w}^{-1}).
\]
In practice, the method uses **diagonal Laplace approximation** on the final layer rather than a full-covariance posterior over all parameters [2507.20718].

Let \(f(x)\) be an embedding model with \(L\) layers, \(w^{(L)}\) the final-layer parameters, and \(h^{(L-1)}\) the penultimate representation. In the deterministic setting,
\[
z = w^{(L)\top} h^{(L-1)}.
\]
Under the Laplace approximation, the final-layer posterior becomes
\[
p(w^{(L)}\mid \mathcal{D}) \approx \mathcal{N}\!\left(\hat w^{(L)}, H_{\hat w^{(L)}}^{-1}\right),
\]
which induces a Gaussian output embedding
\[
z(x)\sim \mathcal{N}(\mu(x),\Sigma(x)) = \mathcal{N}\!\left( \hat w^{(L)\top}h^{(L-1)}, \; h^{(L-1)\top}H_{\hat w^{(L)}}^{-1}h^{(L-1)} \right).
\]
Thus each encoder produces a mean \(\mu(x)\) and covariance \(\Sigma(x)\) without retraining the full model [2507.20718].

The uncertainty represented here is at the **embedding/model output level**, is **input-dependent** through \(h^{(L-1)}\), and is represented in practice by a **diagonal / per-dimension covariance approximation**, not by a full covariance matrix [2507.20718]. The paper explicitly notes that this is post-hoc but not fully data-free, because a **small labeled dataset** is still needed to fit the diagonal Laplace approximation. For MIRACL, the setup uses **binary-labeled query-passage pairs** with **50 labeled examples per selected language/model setting**. For MMTEB, LA is fitted using subsets of **MS MARCO** and **SNLI**, specifically **3,983 query-passage pairs from MS MARCO** and **3,775 sentence pairs from SNLI**; the implementation uses the **laplace-redux** library [2507.20718].

## 3. Gaussian convolution and uncertainty-driven weighting

Given \(K\) independent embedding models,
\[
z_k(x)\sim\mathcal{N}(\mu_k(x), \Sigma_k(x)),
\]
UEC defines the fused embedding as
\[
z(x)=\sum_{k=1}^K \pi_k(x)\, z_k(x), \qquad \sum_{k=1}^K \pi_k(x)=1.
\]
Under the independence assumption, the fused representation remains Gaussian:
\[
z(x)\sim \mathcal{N}\left( \sum_{k=1}^K \pi_k(x)\mu_k(x), \; \sum_{k=1}^K \pi_k^2(x)\Sigma_k(x) \right).
\]
This is the paper’s formal notion of **Gaussian convolution** [2507.20718].

The weighting rule is motivated through a surrogate to contrastive learning. For a positive pair \((x,x')\), the method defines
\[
\mathcal{L}_{\mathrm{sur}}(\pi; x, x') = \sum_{k=1}^{K}\pi_k(x)\, \mathbb{E}\big[\|z_k(x)-z_k(x')\|^2\big],
\]
which expands to
\[
\mathcal{L}_{\mathrm{sur}}(\pi; x, x') =
\sum_{k=1}^{K}\pi_k(x)\left(
\|\mu_k(x)-\mu_k(x')\|^2 +
\operatorname{tr}(\Sigma_k(x))+\operatorname{tr}(\Sigma_k(x'))
\right).
\]
The paper interprets the mean-distance term as **fidelity** and the trace terms as **uncertainty** [2507.20718].

For retrieval, because document embeddings are precomputed offline, the method retains only query-dependent terms and solves
\[
\min_{\pi} \sum_{k=1}^{K}\pi_k(x)\left( \operatorname{tr}(\Sigma_k(x))+\|\mu_k(x)\|^2 \right)
\quad\text{s.t.}\quad
\sum_{k=1}^{K}\pi_k(x)=1,\; \pi_k(x)\ge 0.
\]
The appendix defines
\[
c_k := \operatorname{tr}(\Sigma_k(x))+\|\mu_k(x)\|^2,
\]
and derives the optimal coefficients as
\[
\pi_k^\star(x) =
\frac{\left(\operatorname{tr}(\Sigma_k(x))+\|\mu_k(x)\|^2\right)^{-1}}
{\sum_{j=1}^{K} \left(\operatorname{tr}(\Sigma_j(x))+\|\mu_j(x)\|^2\right)^{-1}}.
\]
Since the embeddings are typically \(\ell_2\)-normalized so that \(\|\mu_k(x)\|^2\approx 1\), the paper simplifies this to inverse-uncertainty weighting:
\[
\pi_k^\star(x)\approx \frac{1/\operatorname{tr}(\Sigma_k(x))}
{\sum_{j=1}^{K}1/\operatorname{tr}(\Sigma_j(x))}.
\]
The weighting is therefore analogous to **precision-weighted model averaging**, and the paper characterizes it as **Bayes-optimal under the surrogate loss** and the stated assumptions [2507.20718].

This weighting is **data-wise** rather than global. A heatmap analysis shows that Arabic inputs receive higher weight from Arabic-specialized embeddings, while Chinese inputs favor Chinese embeddings [2507.20718]. This suggests that UEC is not merely an uncertainty-aware ensemble in the average-case sense; it is an input-conditional mixture governed by posterior variance estimates.

## 4. Uncertainty-aware similarity and retrieval-time scoring

Once two inputs \(x\) and \(x'\) have fused Gaussian embeddings,
\[
q=z(x)\sim\mathcal{N}(\mu_q,\Sigma_q), \qquad
c=z(x')\sim\mathcal{N}(\mu_c,\Sigma_c),
\]
UEC treats similarity as a random variable. Rather than using KL divergence between Gaussians, which the paper states is too expensive for large-scale retrieval because it requires matrix inverses and log-determinants, the method extends cosine similarity through a Gaussian approximation of the dot product [2507.20718].

After \(\ell_2\)-normalization, the similarity is
\[
s = q^\top c,
\]
and is approximated by
\[
s \sim \mathcal{N}(\mu_s,\sigma_s^2),
\]
with
\[
\mu_s = \mu_q^\top \mu_c,
\]
and
\[
\sigma_s^2 = \mu_q^\top \Sigma_c \mu_q + \mu_c^\top \Sigma_q \mu_c + \operatorname{tr}(\Sigma_q\Sigma_c).
\]
The first term is the ordinary mean alignment, while the remaining terms quantify uncertainty projected along the matched directions and the covariance interaction term [2507.20718].

The final uncertainty-aware similarity is then defined by the probit-style approximation
\[
\hat s \approx \frac{\mu_s}{\sqrt{1+\frac{\pi}{8}\sigma_s^2}}.
\]
Compared with ordinary cosine similarity, which would use only \(\mu_q^\top \mu_c\), UEC divides the mean similarity by a quantity that grows with uncertainty. This makes uncertainty a direct **confidence penalty**: if uncertainty is low, \(\hat s \approx \mu_s\); if uncertainty is high, the score is downscaled [2507.20718].

The method therefore uses uncertainty in two separate but coupled places: first in the ensemble coefficients \(\pi_k(x)\), and second in the similarity score itself through \(\sigma_s^2\) [2507.20718]. The ablation results indicate that both parts matter. On the MIRACL subset, the full UEC system yields **NDCG@10 = 59.65**, **Recall@10 = 80.07**, and **AUC@10 = 91.04**. Removing uncertainty-aware similarity gives **58.72 / 78.13 / 82.48**; removing uncertainty-driven convolution gives **48.45 / 66.69 / 10.30**; removing both gives **46.78 / 62.66 / 4.01** [2507.20718]. The especially large degradation in **AUC@10** when uncertainty-driven convolution is removed supports the paper’s claim that adaptive uncertainty-weighted fusion is the more critical component.

## 5. Empirical evaluation, efficiency, and operating regime

UEC is evaluated on **retrieval**, **classification**, and **Semantic Textual Similarity (STS)**, with appendix experiments additionally covering **Bitext Mining**, **Clustering**, and **Reranking** [2507.20718]. The retrieval benchmarks include a MIRACL multilingual subset with **English**, **Russian**, **Chinese**, and **Arabic**, each with **25 query-passage pairs per language**, and an MMTEB retrieval subset containing **SCIDOCS**, **LegalBenchCorporateLobbying**, **BelebeleRetrieval**, **WikipediaRetrievalMultilingual**, and **StackOverflowQA**. STS is evaluated on ten datasets including **STSBenchmark**, **FinParaSTS**, **SICK-R**, **STS22.v2**, **SemRel24STS**, and **STS12–STS17**. Classification uses **FinancialPhrasebankClassification**, **SwissJudgementClassification**, **PoemSentimentClassification**, **MassiveIntentClassification**, and **TweetTopicSingleClassification** [2507.20718].

The reported metrics are **NDCG@10**, **Recall@100** or **Recall@10**, and **AUC@10** for retrieval; **Accuracy** and **F1** for classification; **Spearman correlation** for STS; **F1** for bitext mining; **V-measure** for clustering; and **MAP** for reranking [2507.20718]. In this setup, **AUC@10** is used as an uncertainty metric via abstention.

The main quantitative findings are consistent across tasks. On the MIRACL multilingual subset, UEC reports average **NDCG@10 = 59.65**, **Recall@10 = 80.07**, and **AUC@10 = 91.04**, compared with **48.83**, **65.65**, and **30.87** for the weighted ensemble baseline [2507.20718]. On the MMTEB retrieval subset, UEC achieves **Avg NDCG@10 = 78.86**, **Avg Recall@100 = 90.59**, and **Avg AUC@10 = 66.05**. On STS, it reports **Avg Spearman = 76.39** and ranks first on **8 of 10 datasets**. On classification, it reports **Avg Accuracy = 68.89** and **Avg F1 = 61.04** [2507.20718]. Appendix averages are also strongest for **Bitext mining** with **Avg F1 = 32.39**, **Clustering** with **Avg V-measure = 42.79**, and **Reranking** with **Avg MAP = 53.33** [2507.20718].

The framework is also designed to be lightweight. The paper states that it preserves time complexity \(\mathcal{O}(KD)\) and memory complexity \(\mathcal{O}(KD)\), where \(K\) is the number of models and \(D\) is the embedding dimension, and reports only **0.6% additional runtime** for similarity estimation [2507.20718]. In the efficiency table, uniform and weighted baselines are normalized to **1.000** runtime, whereas UEC reports **1.006**. This is important because the method adds sample-specific weighting and uncertainty-aware scoring without retraining base encoders.

The operating hyperparameters reported for the experimental protocol include a **temperature** parameter for sharpening ensemble coefficients and a parameter \(\beta\) to scale the influence of \(\sigma_s^2\) in uncertainty-aware similarity. For MIRACL, the temperature is fixed at **1.5**, with \(\beta\in\{0.0001,0.001,0.01,0.1\}\); for MMTEB, the temperature is fixed at **1.8** with the same \(\beta\) search range [2507.20718]. The exact modified formula using temperature or \(\beta\) is not explicitly written in the main equations.

## 6. Related formulations, conceptual neighbors, and limitations

UEC belongs to a broader family of uncertainty-aware embedding methods, but its mechanism is distinct. "Exploring Uncertainty Measures for Image-Caption Embedding-and-Retrieval Task" [1904.08504] also uses uncertainty for **model averaging** and **reliability assessment**, and shows that **posterior uncertainty** is better than **feature uncertainty** for query rejection in retrieval. However, that work does not define a Gaussian fusion rule or an uncertainty-aware similarity of the UEC form. "Convolutional Gaussian Embeddings for Personalized Recommendation with Uncertainty" [2006.10932] represents users and items as Gaussian embeddings and applies a CNN over a sampled interaction cube, making it a plausible precursor in the broader sense of uncertainty-aware embedding plus convolution. Yet its uncertainty enters through Monte Carlo sampling over user-item latent pairs rather than through post-hoc Laplace approximation, closed-form uncertainty-driven coefficients, and uncertainty-penalized similarity [2006.10932].

Other neighboring works illuminate what UEC is not. "REGE: A Method for Incorporating Uncertainty in Graph Embeddings" [2412.05735] is an uncertainty-aware graph embedding wrapper that augments node embeddings with a scalar radius and uses uncertainty-conditioned perturbation of latent states plus curriculum over graph views. It is explicitly **not** a new graph convolution primitive. Similarly, "U3-xi: Pushing the Boundaries of Speaker Recognition via Incorporating Uncertainty" [2601.15719] is best interpreted as uncertainty-aware pooling and uncertainty-weighted embedding aggregation rather than uncertainty-driven convolution. These comparisons suggest that UEC is most precisely characterized as a **probabilistic embedding fusion and scoring framework**, not as a generic label for all uncertainty-aware embedding models.

A terminological caveat is necessary because the acronym is overloaded. In stereo matching, **UEC** denotes **Cost volume-based disparity Uncertainty Estimation** [2406.10943]. That method also operates on learned matching representations and uses a lightweight residual head, but it is not Uncertainty-driven Embedding Convolution. The semantic overlap is limited to the idea that uncertainty should be extracted from learned representations and then used to improve downstream refinement.

The principal limitations stated for UEC are also structurally informative [2507.20718]. The method is validated mainly on **text embeddings**; it uses **diagonal LA**, so richer uncertainty estimators may exist; it requires that all embeddings have the **same dimensionality**; it still needs a **small labeled dataset** to fit LA, so it is post-hoc but not fully data-free; and its derivations assume **independence** among model outputs. A plausible implication is that performance may degrade when ensemble members are highly correlated, when diagonal LA provides poor variance estimates, or when the calibration data are mismatched. The paper’s Bayes-optimality claim is correspondingly restricted: it is optimal under the specified surrogate loss and assumptions, not for arbitrary downstream task objectives [2507.20718].

In its most concise technical form, UEC can therefore be summarized by three coupled operations: post-hoc conversion of deterministic embeddings into Gaussian embeddings by diagonal Laplace approximation, uncertainty-driven Gaussian convolution with coefficients
\[
\pi_k^\star(x) \propto \left(\operatorname{tr}(\Sigma_k(x))+\|\mu_k(x)\|^2\right)^{-1},
\]
and uncertainty-aware similarity
\[
\hat s \approx \frac{\mu_s}{\sqrt{1+\frac{\pi}{8}\sigma_s^2}}.
\]
Within the literature presently available on arXiv, that combination defines the method’s distinctive identity [2507.20718].

Source: https://www.emergentmind.com/topics/uncertainty-driven-embedding-convolution-uec