SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2312.15033 · 2023

Sparsity-Guided Holistic Explanation for LLMs with Interpretable Inference-Time Intervention

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 4 functions out of this paper's own repositories and ran 4 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
zhen-tan-dmml/sparsecbm canonical 3 of 3
zhen-tan-dmml/cbm_nlp canonical 1 of 1
FunctionStatusWhere it lives
convert_to_multi_concept_sparse_model Ran zhen-tan-dmml/sparsecbm/run_cebab/sparse_model.py
pointer only (licence: NONE) · get_code("978d4528677fb322")
convert_to_multi_concept_sparse_model_structure Ran zhen-tan-dmml/sparsecbm/run_cebab/sparse_model.py
pointer only (licence: NONE) · get_code("f8f444babdbc3ab2")
convert_to_multi_concept_sparse_model_with_custom_mask Ran zhen-tan-dmml/sparsecbm/run_cebab/sparse_model.py
pointer only (licence: NONE) · get_code("d73304762cf158ef")
mixup_hidden_concept Ran zhen-tan-dmml/cbm_nlp/run_cebab/cbm_LLM_mix_joint.py
pointer only (licence: NONE) · get_code("94e9fb80207d105b")

Repositories linked to this paper

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

Abstract

Large Language Models (LLMs) have achieved unprecedented breakthroughs in various natural language processing domains. However, the enigmatic ``black-box'' nature of LLMs remains a significant challenge for interpretability, hampering transparent and accountable applications. While past approaches, such as attention visualization, pivotal subnetwork extraction, and concept-based analyses, offer some insight, they often focus on either local or global explanations within a single dimension, occasionally falling short in providing comprehensive clarity. In response, we propose a novel methodology anchored in sparsity-guided techniques, aiming to provide a holistic interpretation of LLMs. Our framework, termed SparseCBM, innovatively integrates sparsity to elucidate three intertwined layers of interpretation: input, subnetwork, and concept levels. In addition, the newly introduced dimension of interpretable inference-time intervention facilitates dynamic adjustments to the model during deployment. Through rigorous empirical evaluations on real-world datasets, we demonstrate that SparseCBM delivers a profound understanding of LLM behaviors, setting it apart in both interpreting and ameliorating model inaccuracies. Codes are provided in supplements.

For agents

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

get_harvested_code_for_paper("2312.15033")
get_code_for_paper("2312.15033")
have("2312.15033")

Connect an agent — have() is free.