peal.teachers¶
Teachers: the sources of feedback an adaptor learns from.
A teacher implements interfaces.TeacherInterface.get_feedback and labels
the explanations an explainer produced (typically: did the counterfactual
change the true feature, a spurious one, or leave the data manifold?).
Included are a human in a Flask GUI (human2model_teacher), a headless
Claude process (llm2model_teacher), another model with optional label
noise (model2model_teacher), segmentation masks, symbolic rules, the
SpRAy / ViRelAy clustering tools, direction-level labelling for DiDAE
(cluster_teacher, preclustered_teacher), the web-demo feedback bridge
and a no-feedback baseline. teacher_factory.get_teacher resolves the
teacher config string to one of them.
Submodules
A teacher that answers with a fixed or random verdict. |
|
Human-in-the-loop teacher that collects one verdict per counterfactual cluster. |
|
Interactive Flask teacher that asks a human to label counterfactual collages. |
|
Minimal interface every PEAL teacher implements. |
|
LLM-in-the-loop teacher. |
|
Oracle teacher that judges counterfactuals with a second classifier. |
|
Teacher that grades counterfactuals by a precomputed cluster assignment. |
|
A teacher that judges counterfactuals with ground-truth segmentation masks. |
|
SpRAy teacher: find confounded samples by clustering LRP attributions. |
|
Teacher for tabular data with a known symbolic confounder feature. |
|
Factory that turns a |
|
CFKD teacher that gathers human feedback through the ViReLay web GUI. |
|
File-based feedback teacher for the web demo. |