Skip to content

jjfeng/bc-llm

Repository files navigation

🔍 BC-LLM 🔍

Bayesian Concept Bottleneck Models with LLM Priors (Feng et al. NeurIPS 2025).

Concept Bottleneck Models (CBMs) have been proposed as a compromise between white-box and black-box models, aiming to achieve interpretability without sacrificing accuracy. The standard training procedure for CBMs is to predefine a candidate set of human-interpretable concepts, extract their values from the training data, and identify a sparse subset as inputs to a transparent prediction model. However, such approaches are often hampered by the tradeoff between enumerating a sufficiently large set of concepts to include those that are truly relevant versus controlling the cost of obtaining concept extractions. This work investigates a novel approach that sidesteps these challenges: BC-LLM iteratively searches over a potentially infinite set of concepts within a Bayesian framework, in which Large Language Models (LLMs) serve as both a concept extraction mechanism and prior. BC-LLM is broadly applicable and multi-modal. Despite imperfections in LLMs, we prove that BC-LLM can provide rigorous statistical inference and uncertainty quantification. In experiments, it outperforms comparator methods including black-box models, converges more rapidly towards relevant concepts and away from spuriously correlated ones, and is more robust to out-of-distribution samples.

Reproducing experiments

All experiments are managed using scons and nestly. If you want to run a single experiment, specify the experiment's folder name, e.g. scons exp_mimic.

LLM Api

To use the either the OpenAI models or Hugging Face models through the API add a .env file in the root folder of this directory

llm-vi $ touch .env

Add your token for Open AI and/or Hugging face

llm-vi $ echo "OPENAI_ACCESS_TOKEN=<YOUR TOKEN>" >> .env
llm-vi $ echo "HF_ACCESS_TOKEN=<YOUR TOKEN>" >> .env

Citation

If you find our paper and code useful, please cite us:

@ARTICLE{Feng2025-um,
  title         = "Bayesian Concept Bottleneck Models with {LLM} Priors",
  author        = "Feng, Jean and Kothari, Avni and Zier, Luke and Singh,
                   Chandan and Tan, Yan Shuo",
  journal       = "Adv. Neural Inf. Process. Syst.",
  year          =  2025,
  url = "https://openreview.net/forum?id=oXSkzIXgbk"
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages