SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.01408 · 2024

Counterfactual Concept Bottleneck Models

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 16 functions out of this paper's own repositories and ran 12 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.

RepositoryRoleRan
gabriele-dominici/counterfactual-cbm canonical 12 of 16
FunctionStatusWhere it lives
EI Ran gabriele-dominici/counterfactual-cbm/baycon/baycon/acquisition_functions.py
pointer only (licence: NONE) · get_code("b6a6628cdfc08742")
PI Ran gabriele-dominici/counterfactual-cbm/baycon/baycon/acquisition_functions.py
pointer only (licence: NONE) · get_code("c0dd3d59e18c2e97")
UCB Ran gabriele-dominici/counterfactual-cbm/baycon/baycon/acquisition_functions.py
pointer only (licence: NONE) · get_code("12aa7a459caa41dc")
extract_concepts Ran gabriele-dominici/counterfactual-cbm/ccbm/utils.py
pointer only (licence: NONE) · get_code("e5a8875083f3d66c")
filter_outliers Ran gabriele-dominici/counterfactual-cbm/baycon/baycon/bayesian_generator.py
pointer only (licence: NONE) · get_code("e21532e86b163c25")
hinge_loss Ran gabriele-dominici/counterfactual-cbm/ccbm/models.py
pointer only (licence: NONE) · get_code("5ca94368a93ee4e7")
intersection_over_union Ran gabriele-dominici/counterfactual-cbm/ccbm/metrics.py
pointer only (licence: NONE) · get_code("b7d0860747dbad15")
randomize_class Ran gabriele-dominici/counterfactual-cbm/ccbm/utils.py
pointer only (licence: NONE) · get_code("c0863e960752f7f5")
scale Ran gabriele-dominici/counterfactual-cbm/baycon/common/DataAnalyzer.py
pointer only (licence: NONE) · get_code("2b68d4e9b71800ad")
score_y_away_from_target Ran gabriele-dominici/counterfactual-cbm/baycon/common/ScoreCalculator.py
pointer only (licence: NONE) · get_code("6d9ff45b5f74b1d7")
score_y_reaching_target Ran gabriele-dominici/counterfactual-cbm/baycon/common/ScoreCalculator.py
pointer only (licence: NONE) · get_code("12a80c0bb92deeca")
variability Ran gabriele-dominici/counterfactual-cbm/ccbm/metrics.py
pointer only (licence: NONE) · get_code("db27655f907743ca")
cf_in_distribution Not yet run gabriele-dominici/counterfactual-cbm/ccbm/metrics.py
pointer only (licence: NONE) · get_code("a1c54e25ee630b04")
encode Not yet run gabriele-dominici/counterfactual-cbm/baycon/common/DataAnalyzer.py
pointer only (licence: NONE) · get_code("3c06307d039c83ce")
load_data Not yet run gabriele-dominici/counterfactual-cbm/ccbm/utils.py
pointer only (licence: NONE) · get_code("5a99191dfe200ab1")
sample_different_label Not yet run gabriele-dominici/counterfactual-cbm/ccbm/baycon.py
pointer only (licence: NONE) · get_code("b5cb8a79e23ce469")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Current deep learning models are not designed to simultaneously address three fundamental questions: predict class labels to solve a given classification task (the "What?"), simulate changes in the situation to evaluate how this impacts class predictions (the "How?"), and imagine how the scenario should change to result in different class predictions (the "Why not?"). The inability to answer these questions represents a crucial gap in deploying reliable AI agents, calibrating human trust, and improving human-machine interaction. To bridge this gap, we introduce CounterFactual Concept Bottleneck Models (CF-CBMs), a class of models designed to efficiently address the above queries all at once without the need to run post-hoc searches. Our experimental results demonstrate that CF-CBMs: achieve classification accuracy comparable to black-box models and existing CBMs ("What?"), rely on fewer important concepts leading to simpler explanations ("How?"), and produce interpretable, concept-based counterfactuals ("Why not?"). Additionally, we show that training the counterfactual generator jointly with the CBM leads to two key improvements: (i) it alters the model's decision-making process, making the model rely on fewer important concepts (leading to simpler explanations), and (ii) it significantly increases the causal effect of concept interventions on class predictions, making the model more responsive to these changes.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2402.01408")
get_code_for_paper("2402.01408")
have("2402.01408")

Connect an agent — have() is free.