{"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/rational-neural-networks","title":"Rational neural networks","arxiv_id":"2004.01902","date":"2020-04-04","proceeding":"NeurIPS 2020 12","authors":["Nicolas Boullé","Yuji Nakatsukasa","Alex Townsend"],"abstract":"We consider neural networks with rational activation functions. The choice of the nonlinear activation function in deep learning architectures is crucial and heavily impacts the performance of a neural network. We establish optimal bounds in terms of network complexity and prove that rational neural networks approximate smooth functions more efficiently than ReLU networks with exponentially smaller depth. The flexibility and smoothness of rational activation functions make them an attractive alternative to ReLU, as we demonstrate with numerical experiments.","url_abs":"https://arxiv.org/abs/2004.01902v2","url_pdf":"https://arxiv.org/pdf/2004.01902v2.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":"rational-neural-networks","repo_url":"https://github.com/NBoulle/RationalNets","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"rational-neural-networks","repo_url":"https://github.com/yonesuke/RationalNets","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"rational-neural-networks","repo_url":"https://github.com/yonesuke/jaxfss","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[{"method_slug":"relu","method_name":"ReLU"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2004.01902","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2004.01902"}},"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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/yonesuke/jaxfss","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/yonesuke/RationalNets","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/NBoulle/RationalNets","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_violates":1,"ran_draft_wrong":1,"unverified":6},"by_repo_kind":{"official":{"samples":8,"ran":2,"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":"a7083d5006bc1338","entry":"figsize","repo":"NBoulle/RationalNets","repo_kind":"official","path":"src/Approximation/plotting.py","file_url":"https://github.com/NBoulle/RationalNets/blob/HEAD/src/Approximation/plotting.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a7083d5006bc1338"}},{"code_sha256_prefix":"5f2fe5254661d168","entry":"newfig","repo":"NBoulle/RationalNets","repo_kind":"official","path":"src/Approximation/plotting.py","file_url":"https://github.com/NBoulle/RationalNets/blob/HEAD/src/Approximation/plotting.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5f2fe5254661d168"}},{"code_sha256_prefix":"5572f8d4233a59d5","entry":"initialize_NN","repo":"NBoulle/RationalNets","repo_kind":"official","path":"src/Approximation/KdV_poly.py","file_url":"https://github.com/NBoulle/RationalNets/blob/HEAD/src/Approximation/KdV_poly.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5572f8d4233a59d5"}},{"code_sha256_prefix":"75f6dfce852d99cd","entry":"neural_net","repo":"NBoulle/RationalNets","repo_kind":"official","path":"src/Approximation/KdV_relu.py","file_url":"https://github.com/NBoulle/RationalNets/blob/HEAD/src/Approximation/KdV_relu.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"75f6dfce852d99cd"}},{"code_sha256_prefix":"09a3613cfdf9d121","entry":"neural_net","repo":"NBoulle/RationalNets","repo_kind":"official","path":"src/Approximation/KdV_sine.py","file_url":"https://github.com/NBoulle/RationalNets/blob/HEAD/src/Approximation/KdV_sine.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"09a3613cfdf9d121"}},{"code_sha256_prefix":"25351cc2e570b1b3","entry":"rat_init","repo":"NBoulle/RationalNets","repo_kind":"official","path":"src/Approximation/KdV_poly.py","file_url":"https://github.com/NBoulle/RationalNets/blob/HEAD/src/Approximation/KdV_poly.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"25351cc2e570b1b3"}},{"code_sha256_prefix":"5765a539e4d4991b","entry":"rat_init","repo":"NBoulle/RationalNets","repo_kind":"official","path":"src/Approximation/KdV_rat.py","file_url":"https://github.com/NBoulle/RationalNets/blob/HEAD/src/Approximation/KdV_rat.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5765a539e4d4991b"}},{"code_sha256_prefix":"df01ac91ccf49144","entry":"xavier_init","repo":"NBoulle/RationalNets","repo_kind":"official","path":"src/Approximation/KdV_poly.py","file_url":"https://github.com/NBoulle/RationalNets/blob/HEAD/src/Approximation/KdV_poly.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"df01ac91ccf49144"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}