He He, Nitish Joshi, Xiang Pan
We lifted 7 functions out of this paper's own repositories and ran 5 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.
| Repository | Role | Ran |
|---|---|---|
| joshinh/spurious-correlations-nlp | canonical | 5 of 7 |
| Function | Status | Where it lives |
|---|---|---|
| build_probe | Ran | joshinh/spurious-correlations-nlp/nlp/scripts/probing.py code served (permissive licence) · get_code("83b8335aa82f90c4") |
| compute_metrics_default | Ran | joshinh/spurious-correlations-nlp/nlp/scripts/training.py code served (permissive licence) · get_code("323fa71e27b117eb") |
| get_projection_to_intersection_of_nullspaces | Ran | joshinh/spurious-correlations-nlp/nlp/scripts/debias.py code served (permissive licence) · get_code("6603d34965799b5d") |
| get_rowspace_projection | Ran | joshinh/spurious-correlations-nlp/nlp/scripts/debias.py code served (permissive licence) · get_code("109a64c49d7364c5") |
| per_class_accuracy_with_names | Ran | joshinh/spurious-correlations-nlp/nlp/scripts/training.py code served (permissive licence) · get_code("02436469ae12f271") |
| debias_by_specific_directions | Not yet run | joshinh/spurious-correlations-nlp/nlp/scripts/debias.py code served (permissive licence) · get_code("3b1da49bcea7e00a") |
| paired_accuracy | Not yet run | joshinh/spurious-correlations-nlp/nlp/scripts/training.py code served (permissive licence) · get_code("b2a4cae875a44fdc") |
Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.
The term 'spurious correlations' has been used in NLP to informally denote any undesirable feature-label correlations. However, a correlation can be undesirable because (i) the feature is irrelevant to the label (e.g. punctuation in a review), or (ii) the feature's effect on the label depends on the context (e.g. negation words in a review), which is ubiquitous in language tasks. In case (i), we want the model to be invariant to the feature, which is neither necessary nor sufficient for prediction. But in case (ii), even an ideal model (e.g. humans) must rely on the feature, since it is necessary (but not sufficient) for prediction. Therefore, a more fine-grained treatment of spurious features is needed to specify the desired model behavior. We formalize this distinction using a causal model and probabilities of necessity and sufficiency, which delineates the causal relations between a feature and a label. We then show that this distinction helps explain results of existing debiasing methods on different spurious features, and demystifies surprising results such as the encoding of spurious features in model representations after debiasing.
The same record, over MCP at https://syntology.ai/mcp:
get_harvested_code_for_paper("2210.14011")
get_code_for_paper("2210.14011")
have("2210.14011")
Connect an agent — have() is free.