Variational autoencoder with Kolmogorov-Arnold Network for spatial domain detection.
Project description
stkan
Variational autoencoder with Kolmogorov-Arnold Network for spatial domain detection.
Experiments were executed on NVIDIA A40 of 46068MiB memory in linux with torch==2.1.0+cu121, torch_geometric==2.3.1, torch-sparse==0.6.18+pt21cu121, and torchvision==0.16.0+cu121.
overview
The stkan is an integrated framework for spatial domain detection in spatial transcriptomics that synergizes the Kolmogorov-Arnold Network (KAN) with a variational autoencoder and contrastive learning. The framework addresses limitations of traditional graph-based methods by leveraging KAN's spline-based activation functions to explicitly model complex nonlinear spatial-gene interactions through univariate function decompositions. The stkan integrates multi-modal inputs including gene expression, spatial coordinates, and optional morphological features extracted via Vision Transformer. The workflow involves preprocessing with PCA dimensionality reduction, encoding through a KAN-based variational autoencoder combined with graph attention networks, and latent representation fusion enhanced by contrastive learning. Spatial domains are identified using Leiden clustering on the refined embeddings, optimized through a composite loss function combining reconstruction, binary cross-entropy, KL-divergence, and contrastive losses. The stkan demonstrates superior performance across multiple datasets including DLPFC, mouse embryo, and cancer tissues, achieving higher accuracy in domain detection and enabling robust downstream analyses like UMAP visualization, PAGA trajectory inference, and functional enrichment studies.
install stkan
pip install torch==2.1.0 torchvision==0.16.0 --index-url https://download.pytorch.org/whl/cu121
pip install torch_sparse==0.6.18+pt21cu121 -f https://data.pyg.org/whl/torch-2.1.0+cu121.html
pip install stkan
# pip install numpy==1.26.4
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file stkan-1.0.0.tar.gz.
File metadata
- Download URL: stkan-1.0.0.tar.gz
- Upload date:
- Size: 22.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4f0102b93c224e0a1bb7e7b9dcd46c451c1553fd84caf7fda3307d34a646e93
|
|
| MD5 |
c8c3eff6184e04cdb68c1d28dc440db5
|
|
| BLAKE2b-256 |
36aa416b733f5ae4b178148491a0957ecbf688de3b7ad94842ac712da23626ea
|
File details
Details for the file stkan-1.0.0-py3-none-any.whl.
File metadata
- Download URL: stkan-1.0.0-py3-none-any.whl
- Upload date:
- Size: 24.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
046bd08bb34c9f6cda412ce206b9f14474134368044477096cee3c3897b17802
|
|
| MD5 |
c0982ea209c88891af4713e4bef5a8a2
|
|
| BLAKE2b-256 |
23c3a2331e07e63d9511360d51ce5e58e70bed6fcf3447894cdbdaf2e3dec4c9
|