{"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/astroformer-more-data-might-not-be-all-you","title":"Astroformer: More Data Might not be all you need for Classification","arxiv_id":"2304.05350","date":"2023-04-03","proceeding":null,"authors":["Rishit Dagli"],"abstract":"Recent advancements in areas such as natural language processing and computer vision rely on intricate and massive models that have been trained using vast amounts of unlabelled or partly labeled data and training or deploying these state-of-the-art methods to resource constraint environments has been a challenge. Galaxy morphologies are crucial to understanding the processes by which galaxies form and evolve. Efficient methods to classify galaxy morphologies are required to extract physical information from modern-day astronomy surveys. In this paper, we introduce Astroformer, a method to learn from less amount of data. We propose using a hybrid transformer-convolutional architecture drawing much inspiration from the success of CoAtNet and MaxViT. Concretely, we use the transformer-convolutional hybrid with a new stack design for the network, a different way of creating a relative self-attention layer, and pair it with a careful selection of data augmentation and regularization techniques. Our approach sets a new state-of-the-art on predicting galaxy morphologies from images on the Galaxy10 DECals dataset, a science objective, which consists of 17736 labeled images achieving 94.86% top-$1$ accuracy, beating the current state-of-the-art for this task by 4.62%. Furthermore, this approach also sets a new state-of-the-art on CIFAR-100 and Tiny ImageNet. We also find that models and training methods used for larger datasets would often not work very well in the low-data regime.","url_abs":"https://arxiv.org/abs/2304.05350v2","url_pdf":"https://arxiv.org/pdf/2304.05350v2.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":"astroformer-more-data-might-not-be-all-you","repo_url":"https://github.com/Rishit-dagli/Astroformer","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"all","task_name":"All"},{"task_slug":"astronomy","task_name":"Astronomy"},{"task_slug":"data-augmentation","task_name":"Data Augmentation"},{"task_slug":"image-classification","task_name":"Image Classification"},{"task_slug":"medical-image-classification","task_name":"Medical Image Classification"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/image-classification-on-cifar-10","task":"Image Classification","dataset":"CIFAR-10","model":"Astroformer","rank_in_archive_order":13,"of":265,"metrics":{"Percentage correct":"99.12","Top-1 Accuracy":"99.12"},"uses_additional_data":true},{"leaderboard":"/sota/image-classification-on-cifar-100c","task":"Image Classification","dataset":"CIFAR-100C","model":"Astroformer","rank_in_archive_order":1,"of":1,"metrics":{"Percentage correct":"93.36"},"uses_additional_data":false},{"leaderboard":"/sota/image-classification-on-galaxy10-decals","task":"Image Classification","dataset":"Galaxy10 DECals","model":"Astroformer","rank_in_archive_order":2,"of":2,"metrics":{"PARAMS (M)":"272"},"uses_additional_data":false},{"leaderboard":"/sota/image-classification-on-tiny-imagenet-1","task":"Image Classification","dataset":"Tiny ImageNet Classification","model":"Astroformer","rank_in_archive_order":1,"of":23,"metrics":{"Validation Acc":"92.98"},"uses_additional_data":false},{"leaderboard":"/sota/medical-image-classification-on-galaxy10","task":"Medical Image Classification","dataset":"Galaxy10 DECals","model":"Astroformer","rank_in_archive_order":1,"of":1,"metrics":{"Top-1 Accuracy (%)":"94.87"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2304.05350","atlas_url":"https://app.syntology.ai/?focus=2304.05350","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2304.05350"}},"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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Rishit-dagli/Astroformer","reach":null}],"summary":{"ran_honours":1},"by_repo_kind":{"official":{"samples":1,"ran":1,"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":0,"samples":[{"code_sha256_prefix":"c6946ef9a1244755","entry":"num_groups","repo":"Rishit-dagli/Astroformer","repo_kind":"official","path":"astroformer.py","file_url":"https://github.com/Rishit-dagli/Astroformer/blob/HEAD/astroformer.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":2,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c6946ef9a1244755"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}