ER-Test: Evaluating Explanation Regularization Methods for Language Models

Brihi Joshi, Aaron Chan, Ziyi Liu, Shaoliang Nie, Maziar Sanjabi +2 more
5/25/2022
cs.CL

Official code: INK-USC/ER-Test (3 stars, Python, MIT, last commit 2023-02-02).

Abstract

By explaining how humans would solve a given task, human rationales can provide strong learning signal for neural language models (LMs). Explanation regularization (ER) aims to improve LM generalization by pushing the LM's machine rationales (Which input tokens did the LM focus on?) to align with human rationales (Which input tokens would humans focus on?).

Show full abstract

Though prior works primarily study ER via in-distribution (ID) evaluation, out-of-distribution (OOD) generalization is often more critical in real-world scenarios, yet ER's effect on OOD generalization has been underexplored. In this paper, we introduce ER-Test, a framework for evaluating ER models' OOD generalization along three dimensions: unseen dataset tests, contrast set tests, and functional tests. Using ER-Test, we extensively analyze how ER models' OOD generalization varies with different ER design choices. Across two tasks and six datasets, ER-Test shows that ER has little impact on ID performance but can yield large OOD performance gains. Also, we find that ER can improve OOD performance even with limited rationale supervision. ER-Test's results help demonstrate ER's utility and establish best practices for using ER effectively.

View on arXivView PDF

Code Implementations(1)

INK-USC/ER-TestOfficial100%
MIT

Code for ER-Test, accepted to the Findings of EMNLP 2022

30PythonOct 22, 20223 years agoMIT
explanabilitynlp

Similar Papers

Cite this paper

@article{joshi2022ertest,
  title  = {ER-Test: Evaluating Explanation Regularization Methods for Language Models},
  author = {Brihi Joshi and Aaron Chan and Ziyi Liu and Shaoliang Nie and Maziar Sanjabi and Hamed Firooz and Xiang Ren},
  year   = {2022},
  eprint = {2205.12542},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2205.12542}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2205.12542.svg)](https://codeofpaper.com/paper/2205.12542)

Discussion