lucent  by greentfrapp

PyTorch adaptation of the Lucid feature visualization library

Created 5 years ago
643 stars

Top 51.7% on SourcePulse

GitHubView on GitHub
Project Summary

Lucent is a Python library that adapts the Lucid library for PyTorch, enabling feature visualization for PyTorch models. It is targeted at researchers and practitioners in machine learning and computer vision who want to understand and visualize the internal representations of neural networks. The primary benefit is providing PyTorch users with a familiar and powerful tool for interpretability.

How It Works

Lucent leverages PyTorch's autograd capabilities to perform gradient ascent on specific layers or neurons within a neural network. By optimizing an input image to maximize the activation of a chosen feature, it generates visualizations that reveal what the network has learned. This approach is advantageous as it integrates seamlessly with the PyTorch ecosystem.

Quick Start & Requirements

  • Install via pip: pip install torch-lucent
  • Requires PyTorch and a CUDA-enabled GPU for optimal performance, though CPU is supported.
  • Official Colab notebooks are available for immediate use.

Highlighted Details

  • Adapts the original Lucid library for PyTorch.
  • Provides tools for feature visualization and interpretability.
  • Includes examples recreating Lucid notebooks.

Maintenance & Community

  • Project is hosted on GitHub: greentfrapp/lucent.
  • Community discussion available on Distill Slack channels: #proj-lucid and #circuits.

Licensing & Compatibility

  • Licensed under the Apache 2.0 License.
  • Permissive license suitable for commercial use and integration with closed-source projects.

Limitations & Caveats

The library is explicitly stated to be in a "pre-alpha phase," indicating potential instability, incomplete features, and ongoing development. The authors note they are solely responsible for any issues or bugs.

Health Check
Last Commit

6 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
1 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.