feat(eval): generator-agnostic attribution signals + threshold-free metrics#14
Merged
Merged
Conversation
…etrics
Replace the gradient-Inseq attribution (signal C), which is undefined for
RAGTruth's external-model summaries, with a generator-agnostic support
attribution derived from the sentence-level NLI matrix: attr_conc (support
concentration) and attr_loo (best-supporter margin), as signals C and D.
These are well-defined for any (source, summary) pair.
Add threshold-free roc_auc / pr_auc to the ablation so the report is not
read off a single fixed-0.5 operating point, which is misleading under the
~5% hallucination base rate. The ablation now covers every non-empty subset
of {A classifier, B nli, C attr_conc, D attr_loo}.
- sumlens/signals/support.py: support_attribution() over a shared NLI matrix
- eval/features.py: attr_conc/attr_loo columns (drop legacy "attribution")
- eval/ablation.py: 4 signals, 15 conditions, emit roc_auc/pr_auc
- eval/metrics.py: roc_auc (rank-based) + pr_auc (average precision)
- train_fusion.py: impute empty signal columns to neutral 0.5
- scripts/jobs/run_eval.sbatch: ablation fits its own per-subset models
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #13
Replaces gradient-Inseq signal C (undefined for RAGTruth, whose summaries come from external models) with a generator-agnostic NLI-matrix support attribution: attr_conc (C, support concentration) and attr_loo (D, best-supporter margin). Adds threshold-free ROC-AUC / PR-AUC to the ablation, since fixed-0.5 F1 is misleading at the ~5% hallucination base rate.
Result (iris run, n_test=4826, positive=hallucinated): fusion lifts the best single signal A 0.791 -> A+B+C+D 0.835 ROC-AUC (PR-AUC 0.377 -> 0.419, base rate 0.053). C/D are real detectors (0.72 / 0.71) and make signal C applicable to RAGTruth, but add only +0.004 over A+B -- largely redundant with B (same NLI matrix). Reported honestly.
Eval-path only; the live pipeline (fuse/types/app) and the UI contract are untouched.