Uncertainty-Aware Evaluation Fusion¶
This notebook is a compact research note showing how metric and human signals can be combined with reliability-aware weights.
In [1]:
from dataclasses import dataclass
from typing import List
In [2]:
@dataclass
class Signal:
name: str
score: float # normalized to [0, 1]
uncertainty: float # higher means less reliable
def reliability_weight(uncertainty: float, eps: float = 1e-6) -> float:
"""Inverse-uncertainty weighting."""
return 1.0 / max(uncertainty, eps)
def fused_score(signals: List[Signal]) -> float:
weights = [reliability_weight(s.uncertainty) for s in signals]
total = sum(weights)
return sum(w * s.score for w, s in zip(weights, signals)) / total
def confidence(signals: List[Signal]) -> float:
"""Higher value indicates more confident aggregate evidence."""
return 1.0 / (sum(s.uncertainty for s in signals) / len(signals))
In [3]:
signals = [
Signal(name="automatic_metric", score=0.82, uncertainty=0.18),
Signal(name="human_judgment", score=0.74, uncertainty=0.10),
Signal(name="narrative_alignment", score=0.78, uncertainty=0.15),
]
for s in signals:
print(f"{s.name:20s} score={s.score:.2f} uncertainty={s.uncertainty:.2f} weight={reliability_weight(s.uncertainty):.2f}")
automatic_metric score=0.82 uncertainty=0.18 weight=5.56 human_judgment score=0.74 uncertainty=0.10 weight=10.00 narrative_alignment score=0.78 uncertainty=0.15 weight=6.67
In [4]:
score = fused_score(signals)
conf = confidence(signals)
print(f"Fused score: {score:.3f}")
print(f"Aggregate confidence indicator: {conf:.3f}")
Fused score: 0.772 Aggregate confidence indicator: 6.977
Interpretation¶
- The fusion prioritizes signals with lower uncertainty.
- This is a lightweight baseline and can be extended using Bayesian models with dependence structures across evaluators.