Papers
Topics
Authors
Recent
Search
2000 character limit reached

Normalized Bi-Semantic Entropy

Updated 7 July 2026
  • Normalized Bi-Semantic Entropy is a family of measures that quantify semantic uncertainty by embedding explicit semantic structures into the sample space.
  • It generalizes traditional entropy estimators like SE and DSE through pairwise similarity metrics (e.g., SNNE and WSNNE) to address challenges in long, single-sentence outputs.
  • Normalization in these constructions removes trivial dependencies (such as sample size and temperature), enabling robust comparisons across diverse LLM tasks and uncertainty metrics.

Searching arXiv for the cited papers to ground the article and confirm metadata. [arXiv search] Query: (Nguyen et al., 30 May 2025) Normalized Bi-Semantic Entropy denotes a family of normalized entropy constructions in which uncertainty is measured after introducing an explicitly semantic structure into the sample space. In recent arXiv work, one formulation is a normalized pairwise uncertainty score for LLM outputs, obtained by normalizing Semantic Nearest Neighbor Entropy (SNNE/WSNNE) built from pairwise semantic similarities among sampled generations (Nguyen et al., 30 May 2025). Distinct constructions also define a bi-semantic entropy through the joint use of statistical and logical probabilities in a P–T framework (Lu, 2021), through normalization of semantic entropy over semantic classes or over a binary semantic partition in natural language generation (Kuhn et al., 2023), through normalized spatial Rényi entropy equal to normalized fractal dimension (Chen, 2016), and through a Jensen–Shannon functional over identity and independence couplings that is bounded by one (Çamkıran, 2022). Taken together, these constructions suggest a shared concern with scale-free semantic uncertainty, but not a single universally fixed definition.

1. Pairwise semantic uncertainty in language generation

For LLM uncertainty quantification, the construction in “Beyond Semantic Entropy: Boosting LLM Uncertainty Quantification with Pairwise Semantic Similarity” begins from Semantic Entropy (SE). Given a prompt qq, one generates nn responses {a1,,an}\{a_1,\dots,a_n\}. In the white-box setting, the sequence log-probability is

P(aq)=jlogp(ajqa<j),P(a\mid q)=\sum_j \log p(a_j \mid q \oplus a_{<j}),

and the length-normalized score is

P~(aq)=P(aq)len(a).\widetilde{P}(a\mid q)=\frac{P(a\mid q)}{\operatorname{len}(a)}.

SE clusters the responses into MM semantic classes {Ck}k=1M\{C_k\}_{k=1}^M using a bidirectional entailment NLI model, forms cluster masses

P(Ck)=i:aiCkP~(aiq),pˉk=P(Ck)jP(Cj),P(C_k)=\sum_{i: a_i\in C_k}\widetilde{P}(a_i\mid q), \qquad \bar p_k=\frac{P(C_k)}{\sum_j P(C_j)},

and computes

SE(q)=k=1Mpˉklogpˉk.SE(q)=-\sum_{k=1}^{M}\bar p_k \log \bar p_k.

In the black-box setting, Discrete SE (DSE) replaces probabilities with empirical fractions,

DSE(q)=kCknlogCkn.DSE(q)=-\sum_k \frac{|C_k|}{n}\log\frac{|C_k|}{n}.

The motivation for moving beyond SE is tied to long single-sentence generations. The cited work states that modern models such as Llama-3.1-8B and Phi-3-mini produce longer one-sentence outputs, and that the number of semantic clusters correlates strongly with response length, with Spearman nn0 on SQuAD for Llama-3.1-8B. When nn1, DSE saturates to a near-constant value because clusters become nearly singleton; even when nn2 is small, SE ignores intra-cluster dispersion and inter-cluster separation because it only depends on cluster masses nn3. This is the specific regime in which pairwise semantic methods are introduced (Nguyen et al., 30 May 2025).

2. SNNE, WSNNE, and the normalized bi-semantic score

The pairwise construction works directly in a semantic space. Let responses nn4 have embeddings nn5, or let similarity be defined at the string level. The similarity function nn6 may be instantiated by ROUGE-L scores in nn7, NLI entailment probabilities nn8, or cosine similarity on sentence embeddings rescaled to nn9 by {a1,,an}\{a_1,\dots,a_n\}0. The full pairwise matrix {a1,,an}\{a_1,\dots,a_n\}1 has entries

{a1,,an}\{a_1,\dots,a_n\}2

Large {a1,,an}\{a_1,\dots,a_n\}3 encode intra-cluster similarity, while small {a1,,an}\{a_1,\dots,a_n\}4 encode inter-cluster separation.

The black-box Semantic Nearest Neighbor Entropy is

{a1,,an}\{a_1,\dots,a_n\}5

with temperature {a1,,an}\{a_1,\dots,a_n\}6. The white-box version inserts length-normalized probability weights,

{a1,,an}\{a_1,\dots,a_n\}7

As {a1,,an}\{a_1,\dots,a_n\}8, the inner LogSumExp approaches a soft nearest-neighbor similarity via {a1,,an}\{a_1,\dots,a_n\}9; as P(aq)=jlogp(ajqa<j),P(a\mid q)=\sum_j \log p(a_j \mid q \oplus a_{<j}),0 increases, it averages across neighbors. The construction is described as a nearest-neighbor-style entropy estimator in semantic space that is less sensitive to outliers than sum-of-similarity graph methods.

Normalization is introduced because the magnitude of SNNE/WSNNE depends on P(aq)=jlogp(ajqa<j),P(a\mid q)=\sum_j \log p(a_j \mid q \oplus a_{<j}),1, P(aq)=jlogp(ajqa<j),P(a\mid q)=\sum_j \log p(a_j \mid q \oplus a_{<j}),2, and the range of P(aq)=jlogp(ajqa<j),P(a\mid q)=\sum_j \log p(a_j \mid q \oplus a_{<j}),3. If P(aq)=jlogp(ajqa<j),P(a\mid q)=\sum_j \log p(a_j \mid q \oplus a_{<j}),4, then

P(aq)=jlogp(ajqa<j),P(a\mid q)=\sum_j \log p(a_j \mid q \oplus a_{<j}),5

which yields

P(aq)=jlogp(ajqa<j),P(a\mid q)=\sum_j \log p(a_j \mid q \oplus a_{<j}),6

The normalized bi-semantic entropy is then

P(aq)=jlogp(ajqa<j),P(a\mid q)=\sum_j \log p(a_j \mid q \oplus a_{<j}),7

The white-box normalization is

P(aq)=jlogp(ajqa<j),P(a\mid q)=\sum_j \log p(a_j \mid q \oplus a_{<j}),8

For ROUGE-L and NLI probabilities, the prescribed choice is P(aq)=jlogp(ajqa<j),P(a\mid q)=\sum_j \log p(a_j \mid q \oplus a_{<j}),9, P~(aq)=P(aq)len(a).\widetilde{P}(a\mid q)=\frac{P(a\mid q)}{\operatorname{len}(a)}.0; cosine similarity is first rescaled to P~(aq)=P(aq)len(a).\widetilde{P}(a\mid q)=\frac{P(a\mid q)}{\operatorname{len}(a)}.1. Under this normalization, P~(aq)=P(aq)len(a).\widetilde{P}(a\mid q)=\frac{P(a\mid q)}{\operatorname{len}(a)}.2 when pairwise similarities are near P~(aq)=P(aq)len(a).\widetilde{P}(a\mid q)=\frac{P(a\mid q)}{\operatorname{len}(a)}.3, and P~(aq)=P(aq)len(a).\widetilde{P}(a\mid q)=\frac{P(a\mid q)}{\operatorname{len}(a)}.4 when similarities are near P~(aq)=P(aq)len(a).\widetilde{P}(a\mid q)=\frac{P(a\mid q)}{\operatorname{len}(a)}.5 (Nguyen et al., 30 May 2025).

3. Generalization of semantic entropy and nearest-neighbor structure

A central theoretical claim is that SNNE and WSNNE strictly generalize DSE and SE. The cited work proves a DSE recovery theorem: if

P~(aq)=P(aq)len(a).\widetilde{P}(a\mid q)=\frac{P(a\mid q)}{\operatorname{len}(a)}.6

whenever P~(aq)=P(aq)len(a).\widetilde{P}(a\mid q)=\frac{P(a\mid q)}{\operatorname{len}(a)}.7 for some P~(aq)=P(aq)len(a).\widetilde{P}(a\mid q)=\frac{P(a\mid q)}{\operatorname{len}(a)}.8, and P~(aq)=P(aq)len(a).\widetilde{P}(a\mid q)=\frac{P(a\mid q)}{\operatorname{len}(a)}.9 otherwise, then

MM0

It also proves an SE recovery theorem: if

MM1

and

MM2

whenever MM3, with MM4 otherwise, then

MM5

The black-box and white-box pairwise estimators therefore reduce exactly to cluster-level semantic entropy under special similarity functions.

Although SNNE does not require explicit clustering, the pairwise form admits an implicit decomposition. Given a clustering MM6, for MM7,

MM8

The first term represents intra-cluster cohesion; the second represents inter-cluster overlap or separation. SNNE averages MM9 over {Ck}k=1M\{C_k\}_{k=1}^M0.

The relation to classical {Ck}k=1M\{C_k\}_{k=1}^M1-NN entropy estimation is also explicit. The Kozachenko–Leonenko estimator in {Ck}k=1M\{C_k\}_{k=1}^M2 uses nearest-neighbor radii {Ck}k=1M\{C_k\}_{k=1}^M3,

{Ck}k=1M\{C_k\}_{k=1}^M4

In the semantic construction, one may define a distance {Ck}k=1M\{C_k\}_{k=1}^M5 for {Ck}k=1M\{C_k\}_{k=1}^M6, so that {Ck}k=1M\{C_k\}_{k=1}^M7. SNNE replaces the hard minimum with LogSumExp on similarities, thereby inheriting nearest-neighbor behavior without Euclidean geometric constants or embedding-dimension calibration (Nguyen et al., 30 May 2025).

4. Estimation workflow, calibration, and empirical behavior

The black-box workflow is specified as follows. One samples {Ck}k=1M\{C_k\}_{k=1}^M8 outputs at a chosen generation temperature, computes all pairwise similarities {Ck}k=1M\{C_k\}_{k=1}^M9, evaluates

P(Ck)=i:aiCkP~(aiq),pˉk=P(Ck)jP(Cj),P(C_k)=\sum_{i: a_i\in C_k}\widetilde{P}(a_i\mid q), \qquad \bar p_k=\frac{P(C_k)}{\sum_j P(C_j)},0

and normalizes it to P(Ck)=i:aiCkP~(aiq),pˉk=P(Ck)jP(Cj),P(C_k)=\sum_{i: a_i\in C_k}\widetilde{P}(a_i\mid q), \qquad \bar p_k=\frac{P(C_k)}{\sum_j P(C_j)},1. The white-box variant first computes P(Ck)=i:aiCkP~(aiq),pˉk=P(Ck)jP(Cj),P(C_k)=\sum_{i: a_i\in C_k}\widetilde{P}(a_i\mid q), \qquad \bar p_k=\frac{P(C_k)}{\sum_j P(C_j)},2, forms P(Ck)=i:aiCkP~(aiq),pˉk=P(Ck)jP(Cj),P(C_k)=\sum_{i: a_i\in C_k}\widetilde{P}(a_i\mid q), \qquad \bar p_k=\frac{P(C_k)}{\sum_j P(C_j)},3, evaluates P(Ck)=i:aiCkP~(aiq),pˉk=P(Ck)jP(Cj),P(C_k)=\sum_{i: a_i\in C_k}\widetilde{P}(a_i\mid q), \qquad \bar p_k=\frac{P(C_k)}{\sum_j P(C_j)},4, and then normalizes to P(Ck)=i:aiCkP~(aiq),pˉk=P(Ck)jP(Cj),P(C_k)=\sum_{i: a_i\in C_k}\widetilde{P}(a_i\mid q), \qquad \bar p_k=\frac{P(C_k)}{\sum_j P(C_j)},5. The default hyperparameters reported in the paper are P(Ck)=i:aiCkP~(aiq),pˉk=P(Ck)jP(Cj),P(C_k)=\sum_{i: a_i\in C_k}\widetilde{P}(a_i\mid q), \qquad \bar p_k=\frac{P(C_k)}{\sum_j P(C_j)},6 and P(Ck)=i:aiCkP~(aiq),pˉk=P(Ck)jP(Cj),P(C_k)=\sum_{i: a_i\in C_k}\widetilde{P}(a_i\mid q), \qquad \bar p_k=\frac{P(C_k)}{\sum_j P(C_j)},7. For long single-sentence summarization and translation, ROUGE-L is recommended; for QA, NLI entailment or embedding cosine is recommended. Full pairwise evaluation costs P(Ck)=i:aiCkP~(aiq),pˉk=P(Ck)jP(Cj),P(C_k)=\sum_{i: a_i\in C_k}\widetilde{P}(a_i\mid q), \qquad \bar p_k=\frac{P(C_k)}{\sum_j P(C_j)},8 similarity computations and P(Ck)=i:aiCkP~(aiq),pˉk=P(Ck)jP(Cj),P(C_k)=\sum_{i: a_i\in C_k}\widetilde{P}(a_i\mid q), \qquad \bar p_k=\frac{P(C_k)}{\sum_j P(C_j)},9 memory if the similarity matrix is stored; SE(q)=k=1Mpˉklogpˉk.SE(q)=-\sum_{k=1}^{M}\bar p_k \log \bar p_k.0-NN truncation reduces aggregation to SE(q)=k=1Mpˉklogpˉk.SE(q)=-\sum_{k=1}^{M}\bar p_k \log \bar p_k.1 after neighbor selection (Nguyen et al., 30 May 2025).

Practical guidance is also explicit. The work states that AUROC improves with SE(q)=k=1Mpˉklogpˉk.SE(q)=-\sum_{k=1}^{M}\bar p_k \log \bar p_k.2 but saturates around SE(q)=k=1Mpˉklogpˉk.SE(q)=-\sum_{k=1}^{M}\bar p_k \log \bar p_k.3. Extremely low SE(q)=k=1Mpˉklogpˉk.SE(q)=-\sum_{k=1}^{M}\bar p_k \log \bar p_k.4 yields overly conservative samples, and extremely high SE(q)=k=1Mpˉklogpˉk.SE(q)=-\sum_{k=1}^{M}\bar p_k \log \bar p_k.5 yields excessively diverse outputs; degraded performance is reported near SE(q)=k=1Mpˉklogpˉk.SE(q)=-\sum_{k=1}^{M}\bar p_k \log \bar p_k.6 and SE(q)=k=1Mpˉklogpˉk.SE(q)=-\sum_{k=1}^{M}\bar p_k \log \bar p_k.7, while the primary setting uses SE(q)=k=1Mpˉklogpˉk.SE(q)=-\sum_{k=1}^{M}\bar p_k \log \bar p_k.8 with SE(q)=k=1Mpˉklogpˉk.SE(q)=-\sum_{k=1}^{M}\bar p_k \log \bar p_k.9. Thresholds for hallucination detection are to be set on a development set, with DSE(q)=kCknlogCkn.DSE(q)=-\sum_k \frac{|C_k|}{n}\log\frac{|C_k|}{n}.0 used as a threshold-friendly score.

Across two LLMs and three tasks, the paper reports consistent gains over SE/DSE and other baselines. The reported examples are summarized below.

Setting Metric Reported values
QA, Llama-3.1-8B AUROC SNNE DSE(q)=kCknlogCkn.DSE(q)=-\sum_k \frac{|C_k|}{n}\log\frac{|C_k|}{n}.1, SE DSE(q)=kCknlogCkn.DSE(q)=-\sum_k \frac{|C_k|}{n}\log\frac{|C_k|}{n}.2, WSNNE DSE(q)=kCknlogCkn.DSE(q)=-\sum_k \frac{|C_k|}{n}\log\frac{|C_k|}{n}.3, KLE DSE(q)=kCknlogCkn.DSE(q)=-\sum_k \frac{|C_k|}{n}\log\frac{|C_k|}{n}.4
QA, Phi-3-mini AUROC SNNE DSE(q)=kCknlogCkn.DSE(q)=-\sum_k \frac{|C_k|}{n}\log\frac{|C_k|}{n}.5, SE DSE(q)=kCknlogCkn.DSE(q)=-\sum_k \frac{|C_k|}{n}\log\frac{|C_k|}{n}.6, WSNNE DSE(q)=kCknlogCkn.DSE(q)=-\sum_k \frac{|C_k|}{n}\log\frac{|C_k|}{n}.7, KLE DSE(q)=kCknlogCkn.DSE(q)=-\sum_k \frac{|C_k|}{n}\log\frac{|C_k|}{n}.8
Summarization, Phi-3-mini, ROUGE-L correctness PRR SNNE DSE(q)=kCknlogCkn.DSE(q)=-\sum_k \frac{|C_k|}{n}\log\frac{|C_k|}{n}.9, DSE nn00, WSNNE nn01, LexSim nn02
Summarization, Phi-3-mini, BERTScore correctness PRR SNNE nn03, SE nn04, WSNNE nn05, LexSim nn06
Translation, Phi-3-mini, ROUGE-L correctness PRR SNNE nn07, SE nn08, WSNNE nn09
Translation, Phi-3-mini, BERTScore correctness PRR SNNE nn10, SE nn11, WSNNE nn12

These results are paired with ablations showing that ROUGE-L is often best for long generations, embedding or NLI similarities are competitive for translation under BERTScore, and nn13 is a robust default. The implementation described in the paper uses ROUGE-L via Google’s implementation, models and datasets from Hugging Face, NVIDIA RTX A6000 hardware, and three runs per experiment; code is provided at https://github.com/BigML-CS-UCLA/SNNE (Nguyen et al., 30 May 2025).

5. Alternative formalizations of bi-semantic normalization

The phrase “bi-semantic” is also used in a distinct P–T framework in which two semantic systems coexist: statistical semantics, represented by nn14, nn15, nn16, nn17, and nn18; and logical or truth-function semantics, represented by nn19, nn20, semantic cross-entropy nn21, fuzzy entropy nn22, and semantic mutual information nn23. In that setting, the conditional bi-semantic entropy is

nn24

the marginal bi-semantic entropy is

nn25

and the associated information gain is

nn26

Two unit-range normalizations are defined: nn27 and

nn28

This construction is tied to semantic Bayes’ formulae, truth functions, NEFs, logical probabilities, and rate–distortion reinterpretations (Lu, 2021).

Within semantic uncertainty for natural language generation, a simpler normalization operates directly on semantic classes. If nn29 is the number of semantic classes with non-zero mass, then

nn30

With sampled clusters nn31, the practical estimator becomes

nn32

In the binary case nn33, with nn34 and nn35,

nn36

Operationally, this binary case may arise either from naturally binary tasks or from collapsing discovered clusters into a dominant meaning versus all alternatives (Kuhn et al., 2023).

A third formalization appears in spatial multifractal analysis. There the two “semantics” are macrostate Boltzmann entropy, nn37, and information/Shannon/Rényi entropy, nn38. The normalized quantity is

nn39

with nn40 and nn41. For regular monofractals the equality is exact; for empirical prefractals, the paper states that it becomes “infinitely approximate” as nn42 within the scaling range (Chen, 2016).

A fourth construction uses Jensen–Shannon divergence. Given a distribution nn43 on nn44, define two joint distributions on nn45: nn46 The entropy functional is

nn47

with base-2 logarithms, so nn48. The paper also gives the closed form

nn49

This functional is strictly concave, equals nn50 iff nn51 is degenerate, is maximized on a fixed finite alphabet by the uniform distribution, and is strictly increasing in alphabet size under uniformity (Çamkıran, 2022).

6. Interpretation, scope, and recurrent misconceptions

A recurrent misconception is to treat all normalized semantic entropies as normalized cluster counts. The pairwise LLM construction is explicitly different: it does not require clustering, and its uncertainty signal depends on pairwise semantic similarities rather than only on the masses or frequencies of semantic bins. This is why it is introduced as a remedy for regimes in which cluster proliferation causes DSE saturation and SE loses discriminative power (Nguyen et al., 30 May 2025).

A second misconception is that normalization alone determines comparability. In the pairwise LLM formulation, normalization removes the trivial dependence on nn52 and on the scale induced by nn53, but the score still depends on the chosen similarity function nn54. The paper therefore prescribes the codomain-based bounds nn55, recommends ROUGE-L for long single-sentence summarization and translation, and recommends NLI entailment or embedding cosine for QA-like answers. A plausible implication is that “normalized” here means scale-stable under fixed semantic geometry, not geometry-independent.

A third misconception is that semantic entropy and pairwise semantic entropy quantify only one type of uncertainty. The LLM literature describes sampling-based semantic UQ as primarily capturing epistemic uncertainty by the variation of model outputs across samples, while also noting that aleatoric noise in the data can manifest as dispersion. In the earlier semantic entropy framework, paraphrase invariance is the central property: if many surface forms express the same meaning, semantic entropy decreases relative to token-level predictive entropy because probability mass is aggregated at the level of meanings rather than sequences (Kuhn et al., 2023).

Across the broader literature, the phrase “bi-semantic” is not tied to one invariant mathematical object. In one line of work it refers to pairwise semantic similarity among generated responses; in another it refers to the simultaneous use of Shannon probabilities and logical truth functions; in another it denotes the alignment of macrostate and information-theoretic spatial entropies through normalization; and in another it refers to the pair nn56 of identity and independence couplings. This suggests that the stable conceptual core lies less in a single formula than in a recurring program: encode two semantic structures, normalize the resulting entropy, and obtain a bounded or scale-free quantity suitable for comparison across prompts, datasets, labels, or scales.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Normalized Bi-Semantic Entropy.