AMICI: Attention Mechanism Interpretation of Cell-cell Interactions#
Cross-attention-based cell-cell interaction inference from spatial transcriptomics data.
Contents:
Installation#
You need to have Python 3.10 or newer installed on your system. If you don’t have Python installed, we recommend installing Mambaforge.
Install the latest release of amici-st from PyPI:
pip install amici-st
Or install the latest development version:
pip install git+https://github.com/azizilab/amici.git@main
Quick Start#
import anndata
from amici import AMICI
# Load your spatial transcriptomics data
adata = anndata.read_h5ad("./adata.h5ad")
# Setup the data for AMICI
AMICI.setup_anndata(adata, labels_key="cell_type", coord_obsm_key="spatial")
# Create and train the model
model = AMICI(adata, **model_params)
model.train()
# Get attention patterns
attention_patterns = model.get_attention_patterns()
attention_patterns.plot_attention_summary()
Citation#
If you find our work useful, please cite our preprint:
@article{Hong2025.09.22.677860,
title = {AMICI: Attention Mechanism Interpretation of Cell-cell Interactions},
author = {Hong, Justin and Desai, Khushi and Nguyen, Tu Duyen and Nazaret, Achille and Levy, Nathan and Ergen, Can and Plitas, George and Azizi, Elham},
doi = {10.1101/2025.09.22.677860},
journal = {bioRxiv},
publisher = {Cold Spring Harbor Laboratory},
year = {2025},
}