{"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/kan-or-mlp-a-fairer-comparison","title":"KAN or MLP: A Fairer Comparison","arxiv_id":"2407.16674","date":"2024-07-23","proceeding":null,"authors":["Runpeng Yu","Weihao Yu","Xinchao Wang"],"abstract":"This paper does not introduce a novel method. Instead, it offers a fairer and more comprehensive comparison of KAN and MLP models across various tasks, including machine learning, computer vision, audio processing, natural language processing, and symbolic formula representation. Specifically, we control the number of parameters and FLOPs to compare the performance of KAN and MLP. Our main observation is that, except for symbolic formula representation tasks, MLP generally outperforms KAN. We also conduct ablation studies on KAN and find that its advantage in symbolic formula representation mainly stems from its B-spline activation function. When B-spline is applied to MLP, performance in symbolic formula representation significantly improves, surpassing or matching that of KAN. However, in other tasks where MLP already excels over KAN, B-spline does not substantially enhance MLP's performance. Furthermore, we find that KAN's forgetting issue is more severe than that of MLP in a standard class-incremental continual learning setting, which differs from the findings reported in the KAN paper. We hope these results provide insights for future research on KAN and other MLP alternatives. Project link: https://github.com/yu-rp/KANbeFair","url_abs":"https://arxiv.org/abs/2407.16674v2","url_pdf":"https://arxiv.org/pdf/2407.16674v2.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":"kan-or-mlp-a-fairer-comparison","repo_url":"https://github.com/yu-rp/kanbefair","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"continual-learning","task_name":"Continual Learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2407.16674","atlas_url":"https://app.syntology.ai/?focus=2407.16674","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2407.16674"}},"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/yu-rp/kanbefair","reach":{"status":"ok"}}],"summary":{"ran":6,"unverified":2},"by_repo_kind":{"official":{"samples":8,"ran":6,"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":8,"samples":[{"code_sha256_prefix":"417db04b83ce1053","entry":"B_batch","repo":"yu-rp/kanbefair","repo_kind":"official","path":"src/models/kan/spline.py","file_url":"https://github.com/yu-rp/kanbefair/blob/HEAD/src/models/kan/spline.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":"417db04b83ce1053"}},{"code_sha256_prefix":"0480936fcee3aeac","entry":"coef2curve","repo":"yu-rp/kanbefair","repo_kind":"official","path":"src/models/kan/spline.py","file_url":"https://github.com/yu-rp/kanbefair/blob/HEAD/src/models/kan/spline.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":"0480936fcee3aeac"}},{"code_sha256_prefix":"576e18268f9a6f43","entry":"create_dataset","repo":"yu-rp/kanbefair","repo_kind":"official","path":"src/models/kan/utils.py","file_url":"https://github.com/yu-rp/kanbefair/blob/HEAD/src/models/kan/utils.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":"576e18268f9a6f43"}},{"code_sha256_prefix":"376df321e3409e35","entry":"curve2coef","repo":"yu-rp/kanbefair","repo_kind":"official","path":"src/models/kan/spline.py","file_url":"https://github.com/yu-rp/kanbefair/blob/HEAD/src/models/kan/spline.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":"376df321e3409e35"}},{"code_sha256_prefix":"c9583261bb126484","entry":"fit_params","repo":"yu-rp/kanbefair","repo_kind":"official","path":"src/models/kan/utils.py","file_url":"https://github.com/yu-rp/kanbefair/blob/HEAD/src/models/kan/utils.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":"c9583261bb126484"}},{"code_sha256_prefix":"9d40926ce9e140ac","entry":"get_logger","repo":"yu-rp/kanbefair","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/yu-rp/kanbefair/blob/HEAD/src/utils.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":"9d40926ce9e140ac"}},{"code_sha256_prefix":"437a9a59c72a2824","entry":"test","repo":"yu-rp/kanbefair","repo_kind":"official","path":"src/train_continual_learning.py","file_url":"https://github.com/yu-rp/kanbefair/blob/HEAD/src/train_continual_learning.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":"437a9a59c72a2824"}},{"code_sha256_prefix":"610ffde183692a23","entry":"train","repo":"yu-rp/kanbefair","repo_kind":"official","path":"src/train_continual_learning.py","file_url":"https://github.com/yu-rp/kanbefair/blob/HEAD/src/train_continual_learning.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":"610ffde183692a23"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}