# Outlier Likelihood

To detect out-of-distribution (OOD) samples in a multi-modal setting, we can leverage the alignment score $$s(\mathbf{x}, \mathbf{y})$$ between a data point $$\mathbf{x}$$ and its corresponding instruction $$\mathbf{y}$$. Since the Multi-modal alignment agents (e.g. Visual Language Models, Speech Language Models) are trained to embed semantically similar pairs close together, so a low alignment score reflects a divergence in semantic coherence between the two, indicating a possible OOD sample.&#x20;

We formalize this detection process within a probabilistic framework, defining the likelihood of a sample being OOD as follows:

$$
\mathcal{L}\_{\tau, k}(s(\mathbf{x}, \mathbf{y})) = 1 - \frac{1}{1 + \exp(-k(s(\mathbf{x}, \mathbf{y}) - \tau))}
$$

We then simply apply a threshold to assign an outlier flag:

$$
\mathbf{I\_{ood}}(\mathbf{x}\_i, \mathbf{x}*j) = \begin{cases} 1 & \text{if } \mathcal{L}*{\tau, k}(s(\mathbf{x}, \mathbf{y})) < \epsilon\_o \ 0 & \text{otherwise} \end{cases}
$$

<figure><img src="/files/6GN1MMA75r829QhKybMM" alt="" width="563"><figcaption><p>Outlier Score</p></figcaption></figure>

In practice, threshold values $$\tau, \epsilon\_o$$ are determined through precision-recall (PR) analysis on a development set, calibrating boundary control to maximize OOD detection accuracy. This approach enables precise, probabilistic separation of ID and OOD samples by aligning the boundaries with the semantic coherence objectives of the alignment model.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.eidon.ai/the-network/reward-mechanism/technical-details/post-quality-memagent/outlier-likelihood.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
