Related Experiment Video
Updated: Jul 17, 2025

A Step-by-Step Implementation of DeepBehavior, Deep Learning Toolbox for Automated Behavior Analysis
Published on: February 6, 2020
Extracting and visualizing hidden activations and computational graphs of PyTorch models with TorchLens
JohnMark Taylor1, Nikolaus Kriegeskorte2
1Zuckerman Mind Brain Behavior Institute, Columbia University, 3227 Broadway, New York, NY, 10027, USA. johnmarkedwardtaylor@gmail.com.
TorchLens is a new Python package that extracts and characterizes hidden-layer activations from deep neural network models (DNNs) in PyTorch. This tool offers a comprehensive analysis of DNN computations, aiding research in AI and neuroscience.
Area of Science:
- Artificial Intelligence
- Computational Neuroscience
- Machine Learning
Background:
- Deep neural networks (DNNs) are crucial for AI and serve as models for biological neural networks.
- Understanding DNN internal representations is vital for both AI and neuroscience research.
- Current methods lack comprehensive extraction and characterization of DNN internal operations.
Purpose of the Study:
- Introduce TorchLens, an open-source Python package for PyTorch.
- Enable exhaustive extraction and characterization of hidden-layer activations in DNNs.
- Facilitate deeper understanding of DNN internal computations and representations.
Main Methods:
- Developed TorchLens, a Python package for PyTorch models.
- Implemented exhaustive extraction of all intermediate operation results.
- Integrated intuitive visualization of computational graphs and metadata.
- Included algorithmic validation for activation accuracy.
- Ensured automatic applicability to diverse PyTorch model architectures.
Main Results:
- TorchLens exhaustively extracts all intermediate operations, providing a full computational graph record.
- The package visualizes the computational graph with metadata for analysis.
- Built-in validation ensures the accuracy of extracted activations.
- TorchLens seamlessly applies to various PyTorch models, including complex architectures.
Conclusions:
- TorchLens simplifies the analysis of DNN internal representations and operations.
- It serves as a valuable tool for AI and neuroscience researchers.
- The package facilitates model development, analysis, and education in deep learning.
More Related Videos
08:32Neurovascular Network Explorer 2.0: A Simple Tool for Exploring and Sharing a Database of Optogenetically-evoked Vasomotion in Mouse Cortex In Vivo
Published on: May 4, 2018
12:49A Method for 3D Reconstruction and Virtual Reality Analysis of Glial and Neuronal Cells
Published on: September 28, 2019
Related Concept Videos
Lampbrush Chromosomes
Vision