Views
No views yet

lettucedect-v2-taxonomy-head types a hallucinated span — it does not find spans. It is a
label-conditioned mmBERT-base bi-encoder that, given a span a binary detector already
located, assigns a hallucination category and subcategory by embedding the span and
taking the nearest taxonomy-label description (cosine). Paired with the binary encoder
lettucedect-v2-mmbert-base, it forms a fully-encoder typed detector — detection + typing
at encoder cost, no generative model.lettucedect-v2-mmbert-base) first, then this head types each span.lettucedect-v2-qwen-2b.1from lettucedetect.models.inference import HallucinationDetector
2
3det = HallucinationDetector(
4 method="transformer",
5 model_path="KRLabsOrg/lettucedect-v2-mmbert-base", # binary detector (finds spans)
6 taxonomy_head="KRLabsOrg/lettucedect-v2-taxonomy-head", # this head (types them)
7)
8spans = det.predict(context=[context], question=question, answer=answer, output_format="spans")
9# [{"start": ..., "end": ..., "text": "...", "category": "contradiction", "subcategory": "numerical"}]answer [CTX] context — and (ii) each taxonomy label
as the mean-pooled embedding of its "name: description" text. Training minimizes cross-entropy
between the span embedding and the label embeddings (temperature-scaled cosine similarity),
jointly over the category and subcategory label sets, so a span is typed by its nearest label
description. Because labels enter only as text, the same head scores any label in the taxonomy.lettucedect-v2-qwen-2b types in a
single pass and is higher (typed-F1 0.585 / 0.468); this cascade is the option when you want
typed spans from a small, fast encoder-only stack.1@misc{kovács2026documentgroundingspanlevelhallucination,
2 title={Beyond Document Grounding: Span-Level Hallucination Detection over Code, Tool Output, and Documents},
3 author={Ádám Kovács and Bowei He and Xue Liu and István Boros and Szilveszter Tóth and Gábor Recski},
4 year={2026},
5 eprint={2607.00895},
6 archivePrefix={arXiv},
7 primaryClass={cs.CL},
8 url={https://arxiv.org/abs/2607.00895},
9}