Skip to main content

matterlens

Hooks, caches, and lenses for machine-learning interatomic potentials and other geometric GNNs. The TransformerLens idea, built for models whose activations are per-atom irreps rather than a token residual stream.

Status (2026-09-10): design stage. Read docs/v0-design.md for what the first release is and why. docs/architecture-survey.md records what MACE, SevenNet, Orb, and UMA module trees actually look like; docs/prior-art.md records the landscape. scripts/spike_hooked_mace.py is a runnable feasibility spike.

Intended v0 usage:

from matterlens import load
hm = load("mace", "mace-mp-0-medium")          # native mace-torch model underneath
batch = hm.from_atoms(atoms)
out, cache = hm.run_with_cache(batch)
cache["blocks.1.node_feats"].shape             # [n_atoms, 256] as 128x0e+128x1o
cache.blocks("blocks.1.node_feats")[1]         # [n_atoms, 128, 3] the vector channels
with hm.hooks({"blocks.0.node_feats": lambda a, hp: torch.zeros_like(a)}):
    ablated = hm.model(batch)

Part of the Amatterlens program (interpretability for scientific discovery), workstream 1. Companion to Rootstock, which supplies the isolated per-family environments each adapter installs into.

Run the spike:

uv run scripts/spike_hooked_mace.py

Download files

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

Source Distribution

matterlens-0.0.1.tar.gz (25.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

matterlens-0.0.1-py3-none-any.whl (2.3 kB view details)

Uploaded Python 3

File details

Details for the file matterlens-0.0.1.tar.gz.

File metadata

  • Download URL: matterlens-0.0.1.tar.gz
  • Upload date:
  • Size: 25.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.12 {"installer":{"name":"uv","version":"0.12.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for matterlens-0.0.1.tar.gz
Algorithm Hash digest
SHA256 b3edede4ff4ae85a0599e6f91fd72b253afbb1b22244f36cf3db17e12a8db40a
MD5 e1f349321ebc1ee2395a2aee2761e76c
BLAKE2b-256 c88b4a4d9494f43c3e0480dd04919376992f2f5a5c8650c2882238166205d98f

See more details on using hashes here.

File details

Details for the file matterlens-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: matterlens-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.12 {"installer":{"name":"uv","version":"0.12.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for matterlens-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1435c4e98c0c4684604c393d894aa0b122e72177126f076f3203ab6fb41c97a8
MD5 2c4e08b833bc0bac5ed82025aa9d5348
BLAKE2b-256 34e69afa3b7a67be1efc3ca1555a604e130fee34565a9092a77b16d87c62c354

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page