Findings, consensus and aggregation
A detector run produces a Finding; a completed examination produces a FindingsCollection. This layer enforces Verity's central design rule: independent detector outputs stay separate with full provenance, and any panel summary is strictly an orientation aid — never a replacement for individual findings and visual exhibits.
Because FF++-era face models, self-blended boundary detectors, vision-language transformers, and frequency/wavelet classifiers fail differently across generator families and recompression levels, disagreement between methods is an investigative signal, not noise to average away.
The Finding model
src/verity/models/findings.py defines:
| Type | Fields |
|---|---|
Classification | REAL, FAKE, UNCERTAIN |
Reasoning | summary, evidence (artifact paths), confidence_factors |
Finding | detector_id, detector_version, classification, confidence (0.0..1.0), reasoning, raw_output, tier, timestamp |
FindingsCollection | media_id, findings, aggregated_score |
Finding.is_trained is True only when tier == "trained". That single gate protects every downstream summary so backbone-only, random-init, and untrained scaffolds never influence scores or consensus bands.
Compiling findings
FindingsCompiler.compile (src/verity/compile/findings_compiler.py) scans workspace/output/ for <media_id>_* subdirectories, reads every finding.json, and:
- Backfills a missing
tierfrom the currentDetectorRegistrydefinition so older workspace artifacts cannot silently pass astrained. - Sorts findings monotonically by
detector_idfor deterministic reports. - Computes
_aggregate(findings)overis_trainedfindings only.
Confidence-weighted aggregate score
FindingsCompiler._aggregate weights each evidence-grade FAKE indicator (1.0 vs 0.0) by its detector confidence:
findings = [f for f in findings if f.is_trained]
weighted = sum(f.confidence * (1.0 if f.classification == Classification.FAKE else 0.0)
for f in findings)
total = sum(f.confidence for f in findings)
score = weighted / total if total > 0 else NoneReturns None when zero evidence-grade findings exist. The exported HTML/PDF report deliberately omits even this aggregate score, keeping the examiner focused on per-method coverage and exhibits.
Mean fake probability consistency
Both the HTTP API (verity_api.service.mean_fake_probability) and the report generator (ReportGenerator._mean_probability) compute per-detector probability via the exact same three-step rule:
- Mean of
raw_output["per_face"][*]["fake_prob"]when non-empty; - Otherwise
raw_output["prediction"]; - Otherwise
0.0.
Sharing this rule prevents the web console and the PDF/HTML dossier from ever displaying contradictory numbers for the same case.
Consensus bands and panel splits
verity_api.service.consensus(findings) excludes untrained findings (untrained_excluded) and summarizes the panel without hiding contention. If zero trained findings exist, it returns band: "no_analysis".
Otherwise, it computes agreement = max(fake, real) / total, disagreement = fake > 0 and real > 0, mean_fake_probability, and leaning_split (whether at least one detector leans fake at >= 0.6 while another leans real at <= 0.4), selecting the consensus band in strict precedence order:
| Condition | Band |
|---|---|
disagreement and min(fake, real) / total >= 0.25 | inconclusive |
fake / total >= 0.7 and mean_fake_probability >= 0.6 | strong_manipulation |
fake > real | likely_manipulation |
real / total >= 0.7 and mean_fake_probability <= 0.4 | strong_authentic |
real > fake | likely_authentic |
| Otherwise | inconclusive |
If at least a quarter of evidence-grade detectors dissent across FAKE and REAL, the panel always resolves to inconclusive regardless of how confident individual models are.
UI probability spectrum and inspection workflow
On the Web Console Overview tab (src/verity_ui/src/routes/tabs/OverviewTab.tsx), evidence-grade findings are additionally rendered as a Detector probability spectrum sorted by descending mean_fake_probability. Each spectrum bar displays the detector's probability meter, unit count, classification badge, and confidence, and clicks directly into the Evidence & XAI tab focused on that specific detector so the examiner can inspect why disagreeing detectors diverged (e.g., face crop framing, lip-sync offset, or post-compression degradation).
Consumers
verity compile— prints sorted findings.GET /api/media/{id}andGET /api/media/{id}/findings— return serialized findings,aggregated_score, andconsensus.- Web console Overview, Findings, and Evidence tabs (
OverviewTab.tsx,FindingsTab.tsx,DetectorEvidence.tsx). ReportGenerator(report.html/report.pdf— without aggregate score or verdict).
Related pages
- Detector selection and trust tiers — how trust tiers are assigned.
- Report generation — why exported reports omit aggregate scores.
- Web API and investigator console — consensus and probability spectrum presentation.