You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

Histoscope UNI/SPIDER TopK SAE

This repository contains the fixed sparse autoencoder (SAE) checkpoint used in Histoscope: Expert-Grounded Inspection of Sparse Autoencoder Features in Histopathology Foundation Models.

The SAE was trained on 1,024-dimensional frozen UNI embeddings from the SPIDER-colorectal training split. It maps each embedding to a 49,152-feature dictionary and retains the largest 250 feature activations per patch.

Files

File Description
model.pt PyTorch state dictionary used in the paper
config.json Architecture, training, preprocessing, and recorded metrics
metadata.json Original training receipt emitted with the checkpoint
SHA256SUMS Integrity checksum

The state dictionary contains two tensors:

Key Shape Meaning
encoder.weight 49152 x 1024 Tied feature directions
b_pre 1024 Learned pre-encoder bias

The decoder uses encoder.weight.T; there is no separate decoder tensor.

Download

hf download mnhcorp/histoscope-uni-spider-sae \
  --local-dir ./histoscope-uni-spider-sae

The checkpoint can then be placed in the model directory expected by Histoscope. See the repository's models/README.md for the required dashboard-cache layout.

Configuration

  • Input dimension: 1,024
  • Dictionary size: 49,152 (48x expansion)
  • Activation: per-patch TopK, k=250
  • Weights: tied encoder/decoder
  • Pre-encoder bias: enabled
  • Training: 2 epochs, batch size 32, learning rate 1e-4, seed 42
  • Preprocessing: z-score normalization followed by row-wise L2 normalization
  • Recorded reconstruction loss: 1.3156334171071649e-4
  • Recorded mean active features per patch: 250

The corrected release pipeline fits normalization statistics on the training split and applies them unchanged to held-out embeddings. Refer to config.json and the Histoscope pipeline documentation for the executable receipt.

Intended use

This checkpoint is a derivative research model trained on embeddings produced by UNI. It is released solely for non-commercial academic research under CC BY-NC-ND 4.0 and remains subject to the UNI and SPIDER-colorectal upstream terms. It is not a diagnostic model or a medical device and must not be used for clinical decision-making.

The checkpoint does not contain source images, patient data, UNI weights, UNI embeddings, or pathologist responses. To reproduce the complete experiment, users must separately obtain access to SPIDER-colorectal and UNI under their respective terms, generate UNI embeddings, and run the released analysis pipeline.

License and upstream terms

This SAE checkpoint inherits UNI's CC BY-NC-ND 4.0 license and was trained on SPIDER-colorectal data. The upstream terms therefore apply in addition to the separate Histoscope source-code license:

  • UNI is distributed under CC BY-NC-ND 4.0 with additional gated-access terms covering models trained on UNI outputs.
  • SPIDER-colorectal is distributed under CC BY-NC 4.0 for research use.
  • Histoscope source code is separately released under GPL-3.0.

Use of this checkpoint is limited to non-commercial academic research with proper attribution. Users are responsible for complying with all applicable upstream restrictions. This repository does not redistribute UNI weights, UNI embeddings, SPIDER-colorectal images, or pathologist responses, and it does not grant rights to redistribute those resources beyond their upstream terms.

Citation

@inproceedings{hossain2026histoscope,
  title     = {Histoscope: Expert-Grounded Inspection of Sparse Autoencoder Features in Histopathology Foundation Models},
  author    = {Hossain, Mirza Nasir and Bell, Sarah L. and Bryson, Gareth and Harris-Birtill, David},
  booktitle = {Mechanistic Interpretability Workshop at the 43rd International Conference on Machine Learning},
  year      = {2026},
  url       = {https://openreview.net/forum?id=UIqw2I1CQk}
}
Downloads last month
2
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support