Skip to main content

FADE: Why Bad Descriptions Happen to Good Features

Project description

Logo FADE: Why Bad Descriptions Happen to Good Features

FADE is a framework for evaluating the alignment between LLM features and their descriptions across four key metrics: Clarity, Responsiveness, Purity, and Faithfulness.

🚧 This repository is still in development! More examples and documentation will follow soon! 🚧

Getting Started

Installation

Currently we only support installation from source:

git clone https://github.com/brunibrun/FADE
pip install ./FADE

Example Usage

In the following example, we show how to use the EvaluationPipeline to evaluate the alignment between a feature and a feature description.

from fade import EvaluationPipeline

# Initialize custom configuration with OpenAI LLM
custom_config = {
    'paths': {
        'output_path': '/Path/To/Output/Folder/'
    },
    'subjectLLM': {
        'sae_module': False,
        'batch_size': 4,
    },
    'evaluationLLM': {
        'type': 'openai',
        'name': 'gpt-4o-mini-2024-07-18',
        'api_key': 'YOUR-KEY-HERE',
    }
}

# Initialize eval pipeline
eval_pipeline = EvaluationPipeline(
    subject_model=model,  # e.g. huggingface model
    subject_tokenizer=tokenizer,  # e.g. huggingface tokenizer
    dataset=dataset,  # python dict with int keys and str values
    config=custom_config,
    device=device,  # e.g. torch.device
)

# Example neuron specification
neuron_module = 'named.module.of.the.feature'  # str of the module name
neuron_index = 42  # int of the neuron index
concept = "The feature description you want to evaluate."  # str of the feature description

# Run evaluation
(clarity, responsiveness, purity, faithfulness) = eval_pipeline.run(
    neuron_module=neuron_module,
    neuron_index=neuron_index,
    concept=concept
)

Citation

@misc{puri2025fadebaddescriptionshappen,
    title={FADE: Why Bad Descriptions Happen to Good Features}, 
    author={Bruno Puri and Aakriti Jain and Elena Golimblevskaia and Patrick Kahardipraja and Thomas Wiegand and Wojciech Samek and Sebastian Lapuschkin},
    year={2025},
    eprint={2502.16994},
    archivePrefix={arXiv},
    primaryClass={cs.LG},
    url={https://arxiv.org/abs/2502.16994}, 
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fade_language-0.1.0.tar.gz (22.7 kB view details)

Uploaded Source

File details

Details for the file fade_language-0.1.0.tar.gz.

File metadata

  • Download URL: fade_language-0.1.0.tar.gz
  • Upload date:
  • Size: 22.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for fade_language-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ed30f1ed9d3ea2df95351278bcfa7b42458d3048ac31a001a252b71d7d1e273e
MD5 015ce871b7f7556eafcc356c83efe2f5
BLAKE2b-256 4955902c242c65ef51baf37666f1144190c64ca26b27bac2687488726ede3060

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page