{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/benchmarking-and-optimizing-organism-wide","title":"Benchmarking and optimizing organism wide single-cell RNA alignment methods","arxiv_id":"2503.20730","date":"2025-03-26","proceeding":null,"authors":["Juan Javier Diaz-Mejia","Elias Williams","Octavian Focsa","Dylan Mendonca","Swechha Singh","Brendan Innes","Sam Cooper"],"abstract":"Many methods have been proposed for removing batch effects and aligning single-cell RNA (scRNA) datasets. However, performance is typically evaluated based on multiple parameters and few datasets, creating challenges in assessing which method is best for aligning data at scale. Here, we introduce the K-Neighbors Intersection (KNI) score, a single score that both penalizes batch effects and measures accuracy at cross-dataset cell-type label prediction alongside carefully curated small (scMARK) and large (scREF) benchmarks comprising 11 and 46 human scRNA studies respectively, where we have standardized author labels. Using the KNI score, we evaluate and optimize approaches for cross-dataset single-cell RNA integration. We introduce Batch Adversarial single-cell Variational Inference (BA-scVI), as a new variant of scVI that uses adversarial training to penalize batch-effects in the encoder and decoder, and show this approach outperforms other methods. In the resulting aligned space, we find that the granularity of cell-type groupings is conserved, supporting the notion that whole-organism cell-type maps can be created by a single model without loss of information.","url_abs":"https://arxiv.org/abs/2503.20730v1","url_pdf":"https://arxiv.org/pdf/2503.20730v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"benchmarking-and-optimizing-organism-wide","repo_url":"https://github.com/phenomicai/bascvi","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"benchmarking","task_name":"Benchmarking"},{"task_slug":"decoder","task_name":"Decoder"},{"task_slug":"variational-inference","task_name":"Variational Inference"}],"methods":[{"method_slug":"variational-inference","method_name":"Variational Inference"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2503.20730","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2503.20730"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/PhenomicAI/bascvi","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/phenomicai/bascvi","reach":{"status":"ok"}}],"summary":{"ran_fixture":2,"ran_honours":2},"by_repo_kind":{"official":{"samples":4,"ran":4,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":4,"samples":[{"code_sha256_prefix":"d5d8677ae6d6ea3d","entry":"_majority_vote","repo":"phenomicai/bascvi","repo_kind":"official","path":"src/ml_benchmarking/bascvi/utils/kni_fast.py","file_url":"https://github.com/phenomicai/bascvi/blob/HEAD/src/ml_benchmarking/bascvi/utils/kni_fast.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d5d8677ae6d6ea3d"}},{"code_sha256_prefix":"8a1d3da7b11e53c9","entry":"get_kld_cycle","repo":"phenomicai/bascvi","repo_kind":"official","path":"src/ml_benchmarking/bascvi/trainer/bascvi_trainer.py","file_url":"https://github.com/phenomicai/bascvi/blob/HEAD/src/ml_benchmarking/bascvi/trainer/bascvi_trainer.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8a1d3da7b11e53c9"}},{"code_sha256_prefix":"db9cb9aaf28605f9","entry":"kni_score","repo":"phenomicai/bascvi","repo_kind":"official","path":"src/ml_benchmarking/bascvi/utils/kni_fast.py","file_url":"https://github.com/phenomicai/bascvi/blob/HEAD/src/ml_benchmarking/bascvi/utils/kni_fast.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"db9cb9aaf28605f9"}},{"code_sha256_prefix":"4d0b4aef29130542","entry":"scale_embeddings","repo":"phenomicai/bascvi","repo_kind":"official","path":"src/ml_benchmarking/bascvi/utils/kni_fast.py","file_url":"https://github.com/phenomicai/bascvi/blob/HEAD/src/ml_benchmarking/bascvi/utils/kni_fast.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4d0b4aef29130542"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}