Question: Simulating gene knockout on novel datasets (zero-shot inference) & Implementation feedback
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 30/100
- Tipo de issue
- Funcionalidade
- Clareza
- Precisa de esclarecimento
- Status de atividade
- Ativa
- Stack de tecnologia
- python
- Domínio
- machine-learning
Direção de pesquisa
Comece rastreando as suposições relacionadas à inferência em dataset_core.py, sampler.py e diffusion_core.py e, em seguida, inspecione o carregamento de checkpoints e os mapeamentos de embedder referenciados. Reproduza as falhas relatadas com finetuned_tahoe100m_fixed.ckpt e um novo dataset .h5ad. A tarefa estará concluída quando houver uma decisão dos maintainers sobre o suporte a zero-shot e, se houver suporte, um ponto de entrada de inferência definido ou um workflow de predict.py.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Dear Authors,
First of all, thank you for your outstanding work on PerturbDiff! The concept and the methodology are truly inspiring.
I am currently trying to apply your pre-trained model (specifically the finetuned_tahoe100m_fixed.ckpt) to a novel, independent single-cell dataset (Colorectal Cancer data). My goal is to perform pure inference: simulating the knockout of a specific gene (e.g., TP53) on this unseen dataset, without having any actual ground-truth perturbation data or paired control cells.
My primary question is: Does the current theoretical framework and the pre-trained checkpoint support this kind of "zero-shot" simulation on a completely novel dataset?
While attempting to implement this inference pipeline, I ran into several engineering challenges. It seems that the current codebase is heavily optimized for training and reproducing benchmark metrics, which makes it quite difficult to decouple for pure, out-of-distribution inference. I would love to share a brief summary of the roadblocks I encountered, in hopes it might be helpful for future updates or an inference-only API:
Tight Coupling in DataLoader & Sampler: The dataset_core.py and sampler.py strictly expect paired "control" and "perturbed" cells to calculate metrics. Bypassing this to feed a simple .h5ad file of raw cells requires heavily modifying the dictionary mappings (e.g., grouped_num_cell, data_indices) to prevent KeyErrors and AssertionErrors.
Hardcoded Dataset Names & Metadata: The codebase heavily relies on predefined dataset names (pbmc, tahoe100m, etc.). When feeding novel data, the framework automatically assigns names like dummy_plate_9, which later causes AssertionErrors in functions like get_short_dsname and embedder mapping.
Strict Checkpoint Loading & Embedder Dimensions: When adapting the model to accept my dataset's dimensions (e.g., 2000 HVGs), modifying the nn.Linear layers causes Unexpected key(s) in load_state_dict because the checkpoint contains hardcoded dataset-specific embedders (e.g., x_embedder.pbmc.weight). This required setting strict=False to force initialization.
Shape Assertions in Diffusion Core: During the forward pass, the Transformer blocks often output a 3D tensor [Batch, 1, Dim], but the diffusion_core.py strictly asserts x_t.shape == eps.shape (expecting [Batch, Dim]). This required manual squeeze/reshape operations at the model's output to prevent runtime crashes.
I wanted to ask if you have any plans to release a simplified predict.py script for users who just want to input an .h5ad and a perturbation condition to get the simulated results.
Thank you again for your time, your amazing research, and for making this repository open-source!
- Linguagem predominante
- Python
- Estrelas
- 63
- Forks
- 10
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de DeepGraphLearning/PerturbDiff
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 45/100
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 38/100
DeepGraphLearning/PerturbDiff#7 · 1 comentário ·
-
RuntimeError: mat1 and mat2 shapes cannot be multiplied during sampling with finetuned_replogle.ckpt Aberta
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 68/100
DeepGraphLearning/PerturbDiff#4 · 3 comentários ·
-
Inference Aberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 45/100
DeepGraphLearning/PerturbDiff#1 · 4 comentários ·
Todas as issues de DeepGraphLearning/PerturbDiff
Issues semelhantes
-
bug confirmed issue
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
open-webui/open-webui#30750 · 1 comentário ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
-
enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
OpenwaterHealth/openmotion-bloodflow-app#604 · 1 comentário ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
-
good first issue
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 90/100