feature-lens
A research engineering toolkit for understanding how SAE features relate to each other, and to upstream / downstream components.
For projects supported by feature-lens, see projects
Quickstart
git clone https://github.com/dtch1997/feature-lens
cd feature-lens
pip install -e .
Development
Refer to Setup for how to set up development environment.
Implementation Details
Techniques for finding relevant feature associations:
- Activation patching (employed in Causal Graphs)
- (Total) attribution patching (employed in Sparse Feature Circuits)
- Direct attribution patching (employed in MLP Transcoders, Attention-out SAEs)
Note: "Total" attribution patching calculates the full effect of one feature on another via gradient backpropagation. "Direct" attribution patching estimates only the direct effect, which can be calculated analytically using matrix multiplication.
Tools which will be implemented.
- SAE features. We will use SAEs from SAE-Lens, which are annotated and have Neuronpedia visualizations.
- Feature dashboards. By visualizing the "functional connectome" of SAE features, we may obtain novel insight about what an SAE feature is doing. For each target SAE feature, we can create a dashboard of all relevant upstream / downstream features.
Ideas under consideration.
- Feature clustering. Features with similar upstream and downstream features could be hypothesized to be performing a similar role. Clustering features based on their connections may reveal novel insight about the general types of "functional role" played by SAE features.
- Linear direction features. Steering vectors are like an SAE feature because they are added to the residual activations.
Metadata
Release files for feature-lens 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| feature_lens-0.2.0.tar.gz | 20.3 kB | Without provenance | Details for feature_lens-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| feature_lens-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for feature_lens-0.2.0-py3-none-any.whl |
Total release size: 43.8 kB
Release files / feature_lens-0.2.0.tar.gz
| Download URL | feature_lens-0.2.0.tar.gz |
|---|---|
| Size | 20.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8d0f804eb930da50e149caf9fbf9b2828537814e1772bdcb28dd32b54953d507
|
|
BLAKE2b-256 checksum How to use checksums |
03ea51a74574c30c683760a40b97eadeba624279ef4c7e7e3b361483bf631c82
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / feature_lens-0.2.0-py3-none-any.whl
| Download URL | feature_lens-0.2.0-py3-none-any.whl |
|---|---|
| Size | 23.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5ca6981d0d5f94b091b9d9b1f02d2255bf51bccac0c946b0479a306b1c13ce19
|
|
BLAKE2b-256 checksum How to use checksums |
5bde20143e023bf94e909e05a624a05f4eb45c7d80a9df7aa4f97ae8b17ba2bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Security for feature-lens 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.