{"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/fast-a-dual-tier-few-shot-learning-paradigm","title":"FAST: A Dual-tier Few-Shot Learning Paradigm for Whole Slide Image Classification","arxiv_id":"2409.19720","date":"2024-09-29","proceeding":null,"authors":["Kexue Fu","Xiaoyuan Luo","Linhao Qu","Shuo Wang","Ying Xiong","Ilias Maglogiannis","Longxiang Gao","Manning Wang"],"abstract":"The expensive fine-grained annotation and data scarcity have become the primary obstacles for the widespread adoption of deep learning-based Whole Slide Images (WSI) classification algorithms in clinical practice. Unlike few-shot learning methods in natural images that can leverage the labels of each image, existing few-shot WSI classification methods only utilize a small number of fine-grained labels or weakly supervised slide labels for training in order to avoid expensive fine-grained annotation. They lack sufficient mining of available WSIs, severely limiting WSI classification performance. To address the above issues, we propose a novel and efficient dual-tier few-shot learning paradigm for WSI classification, named FAST. FAST consists of a dual-level annotation strategy and a dual-branch classification framework. Firstly, to avoid expensive fine-grained annotation, we collect a very small number of WSIs at the slide level, and annotate an extremely small number of patches. Then, to fully mining the available WSIs, we use all the patches and available patch labels to build a cache branch, which utilizes the labeled patches to learn the labels of unlabeled patches and through knowledge retrieval for patch classification. In addition to the cache branch, we also construct a prior branch that includes learnable prompt vectors, using the text encoder of visual-language models for patch classification. Finally, we integrate the results from both branches to achieve WSI classification. Extensive experiments on binary and multi-class datasets demonstrate that our proposed method significantly surpasses existing few-shot classification methods and approaches the accuracy of fully supervised methods with only 0.22$\\%$ annotation costs. All codes and models will be publicly available on https://github.com/fukexue/FAST.","url_abs":"https://arxiv.org/abs/2409.19720v1","url_pdf":"https://arxiv.org/pdf/2409.19720v1.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":"fast-a-dual-tier-few-shot-learning-paradigm","repo_url":"https://github.com/fukexue/fast","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"classification-1","task_name":"Classification"},{"task_slug":"few-shot-learning","task_name":"Few-Shot Learning"},{"task_slug":"image-classification","task_name":"Image Classification"},{"task_slug":"image-classification","task_name":"image-classification"},{"task_slug":"whole-slide-images","task_name":"whole slide images"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2409.19720","atlas_url":"https://app.syntology.ai/?focus=2409.19720","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2409.19720"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/fukexue/FAST","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/fukexue/fast","reach":{"status":"ok"}}],"summary":{"ran":11,"ran_draft_wrong":2,"ran_honours":1,"unverified":3},"by_repo_kind":{"official":{"samples":17,"ran":14,"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":17,"samples":[{"code_sha256_prefix":"015136437f28c6ba","entry":"AlexNet_CIFAR10_attention","repo":"fukexue/fast","repo_kind":"official","path":"models/learnable_prompt.py","file_url":"https://github.com/fukexue/fast/blob/HEAD/models/learnable_prompt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"015136437f28c6ba"}},{"code_sha256_prefix":"1352df0a3319e2e7","entry":"alexnet","repo":"fukexue/FAST","repo_kind":"official","path":"models/alexnet.py","file_url":"https://github.com/fukexue/FAST/blob/HEAD/models/alexnet.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1352df0a3319e2e7"}},{"code_sha256_prefix":"76bb126e7ce54fba","entry":"alexnet_MNIST","repo":"fukexue/FAST","repo_kind":"official","path":"models/alexnet.py","file_url":"https://github.com/fukexue/FAST/blob/HEAD/models/alexnet.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"76bb126e7ce54fba"}},{"code_sha256_prefix":"fac5364e2f53c6db","entry":"conv3x3","repo":"fukexue/FAST","repo_kind":"official","path":"models/resnetv1.py","file_url":"https://github.com/fukexue/FAST/blob/HEAD/models/resnetv1.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"fac5364e2f53c6db"}},{"code_sha256_prefix":"0d5505bd782b4a89","entry":"elu_feature_map","repo":"fukexue/FAST","repo_kind":"official","path":"models/linear_attention.py","file_url":"https://github.com/fukexue/FAST/blob/HEAD/models/linear_attention.py","link_basis":"plan_row","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":"0d5505bd782b4a89"}},{"code_sha256_prefix":"da63f97238fd433d","entry":"elu_feature_map","repo":"fukexue/FAST","repo_kind":"official","path":"FAST_CAMELYON_CLIP_Train.py","file_url":"https://github.com/fukexue/FAST/blob/HEAD/FAST_CAMELYON_CLIP_Train.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"da63f97238fd433d"}},{"code_sha256_prefix":"660bb1c1cfb15688","entry":"elu_feature_map","repo":"fukexue/FAST","repo_kind":"official","path":"FAST_TCGA_RENAL_CLIP_Train.py","file_url":"https://github.com/fukexue/FAST/blob/HEAD/FAST_TCGA_RENAL_CLIP_Train.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"660bb1c1cfb15688"}},{"code_sha256_prefix":"d58fdc4f1e79465d","entry":"get_pathological_tissue_level_prompts","repo":"fukexue/FAST","repo_kind":"official","path":"FAST_CAMELYON_CLIP_Train.py","file_url":"https://github.com/fukexue/FAST/blob/HEAD/FAST_CAMELYON_CLIP_Train.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d58fdc4f1e79465d"}},{"code_sha256_prefix":"409e7a46044e5655","entry":"k_means_clustering","repo":"fukexue/FAST","repo_kind":"official","path":"select_method.py","file_url":"https://github.com/fukexue/FAST/blob/HEAD/select_method.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"409e7a46044e5655"}},{"code_sha256_prefix":"379b5ec8ccdf7c7d","entry":"list_print_format","repo":"fukexue/FAST","repo_kind":"official","path":"FAST_TCGA_RENAL_CLIP_Train.py","file_url":"https://github.com/fukexue/FAST/blob/HEAD/FAST_TCGA_RENAL_CLIP_Train.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"379b5ec8ccdf7c7d"}},{"code_sha256_prefix":"71a8b60d245a6336","entry":"make_layers_features","repo":"fukexue/FAST","repo_kind":"official","path":"models/alexnet.py","file_url":"https://github.com/fukexue/FAST/blob/HEAD/models/alexnet.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"71a8b60d245a6336"}},{"code_sha256_prefix":"49a25b4e286a26bb","entry":"mini_batch_k_means","repo":"fukexue/FAST","repo_kind":"official","path":"select_method.py","file_url":"https://github.com/fukexue/FAST/blob/HEAD/select_method.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"49a25b4e286a26bb"}},{"code_sha256_prefix":"b073ea484dc3837e","entry":"resnet18","repo":"fukexue/FAST","repo_kind":"official","path":"models/resnetv1.py","file_url":"https://github.com/fukexue/FAST/blob/HEAD/models/resnetv1.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b073ea484dc3837e"}},{"code_sha256_prefix":"5edd587f0ca09bf9","entry":"resnet34","repo":"fukexue/FAST","repo_kind":"official","path":"models/resnetv1.py","file_url":"https://github.com/fukexue/FAST/blob/HEAD/models/resnetv1.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5edd587f0ca09bf9"}},{"code_sha256_prefix":"b510e26c50954d65","entry":"MIL_CLIP","repo":"fukexue/fast","repo_kind":"official","path":"models/learnable_prompt.py","file_url":"https://github.com/fukexue/fast/blob/HEAD/models/learnable_prompt.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b510e26c50954d65"}},{"code_sha256_prefix":"c47aa9e5b049a11d","entry":"build_model","repo":"fukexue/FAST","repo_kind":"official","path":"clip/model.py","file_url":"https://github.com/fukexue/FAST/blob/HEAD/clip/model.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c47aa9e5b049a11d"}},{"code_sha256_prefix":"b272fde70a038dd8","entry":"load_clip_to_cpu","repo":"fukexue/FAST","repo_kind":"official","path":"FAST_CAMELYON_CONCH_Train.py","file_url":"https://github.com/fukexue/FAST/blob/HEAD/FAST_CAMELYON_CONCH_Train.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b272fde70a038dd8"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}