peal.teachers.model2model_teacher¶
Oracle teacher that judges counterfactuals with a second classifier.
Teachers are PEAL’s sources of feedback on explanations. This one replaces the human annotator by a reference (“teacher”) model that is assumed to be unconfounded: a counterfactual is accepted as a genuine explanation when it flips the reference model’s prediction too, and rejected as a shortcut edit when the reference model is unimpressed. It is the cheap stand-in used to run CFKD-style repair loops without a human in the loop; the noisy variant below simulates an unreliable annotator.
Classes
Teacher that asks a reference classifier whether a counterfactual is real. |
|
Model-to-model teacher that flips a fraction of its verdicts. |