{"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/mali-a-memory-efficient-and-reverse-accurate-1","title":"MALI: A memory efficient and reverse accurate integrator for Neural ODEs","arxiv_id":"2102.04668","date":"2021-02-09","proceeding":"ICLR 2021 1","authors":["Juntang Zhuang","Nicha C. Dvornek","Sekhar Tatikonda","James S. Duncan"],"abstract":"Neural ordinary differential equations (Neural ODEs) are a new family of deep-learning models with continuous depth. However, the numerical estimation of the gradient in the continuous case is not well solved: existing implementations of the adjoint method suffer from inaccuracy in reverse-time trajectory, while the naive method and the adaptive checkpoint adjoint method (ACA) have a memory cost that grows with integration time. In this project, based on the asynchronous leapfrog (ALF) solver, we propose the Memory-efficient ALF Integrator (MALI), which has a constant memory cost \\textit{w.r.t} number of solver steps in integration similar to the adjoint method, and guarantees accuracy in reverse-time trajectory (hence accuracy in gradient estimation). We validate MALI in various tasks: on image recognition tasks, to our knowledge, MALI is the first to enable feasible training of a Neural ODE on ImageNet and outperform a well-tuned ResNet, while existing methods fail due to either heavy memory burden or inaccuracy; for time series modeling, MALI significantly outperforms the adjoint method; and for continuous generative models, MALI achieves new state-of-the-art performance. We provide a pypi package at \\url{https://jzkay12.github.io/TorchDiffEqPack/}","url_abs":"https://arxiv.org/abs/2102.04668v2","url_pdf":"https://arxiv.org/pdf/2102.04668v2.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":"mali-a-memory-efficient-and-reverse-accurate-1","repo_url":"https://github.com/juntang-zhuang/TorchDiffEqPack","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"image-generation","task_name":"Image Generation"},{"task_slug":"time-series-1","task_name":"Time Series"},{"task_slug":"time-series","task_name":"Time Series Analysis"}],"methods":[{"method_slug":"1x1-convolution","method_name":"1x1 Convolution"},{"method_slug":"average-pooling","method_name":"Average Pooling"},{"method_slug":"batch-normalization","method_name":"Batch Normalization"},{"method_slug":"bottleneck-residual-block","method_name":"Bottleneck Residual Block"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"global-average-pooling","method_name":"Global Average Pooling"},{"method_slug":"kaiming-initialization","method_name":"Kaiming Initialization"},{"method_slug":"max-pooling","method_name":"Max Pooling"},{"method_slug":"relu","method_name":"ReLU"},{"method_slug":"residual-block","method_name":"Residual Block"},{"method_slug":"residual-connection","method_name":"Residual Connection"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/image-generation-on-imagenet-64x64","task":"Image Generation","dataset":"ImageNet 64x64","model":"MALI","rank_in_archive_order":55,"of":65,"metrics":{"Bits per dim":"3.71"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2102.04668","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2102.04668"}},"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/juntang-zhuang/TorchDiffEqPack","reach":null}],"summary":{"ran_honours":2,"unverified":2},"by_repo_kind":{"official":{"samples":4,"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":"ddfbcc8cc75b02bd","entry":"flatten_params","repo":"juntang-zhuang/TorchDiffEqPack","repo_kind":"official","path":"TorchDiffEqPack/odesolver_mem/adjoint.py","file_url":"https://github.com/juntang-zhuang/TorchDiffEqPack/blob/HEAD/TorchDiffEqPack/odesolver_mem/adjoint.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ddfbcc8cc75b02bd"}},{"code_sha256_prefix":"ed0688b1a9390dd0","entry":"flatten_params_grad","repo":"juntang-zhuang/TorchDiffEqPack","repo_kind":"official","path":"TorchDiffEqPack/odesolver_mem/adjoint.py","file_url":"https://github.com/juntang-zhuang/TorchDiffEqPack/blob/HEAD/TorchDiffEqPack/odesolver_mem/adjoint.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ed0688b1a9390dd0"}},{"code_sha256_prefix":"ceaa2948f7bbf412","entry":"odesolve","repo":"juntang-zhuang/TorchDiffEqPack","repo_kind":"official","path":"TorchDiffEqPack/odesolver/ode_solver.py","file_url":"https://github.com/juntang-zhuang/TorchDiffEqPack/blob/HEAD/TorchDiffEqPack/odesolver/ode_solver.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":"ceaa2948f7bbf412"}},{"code_sha256_prefix":"d69c56c48687730d","entry":"odesolve_adjoint","repo":"juntang-zhuang/TorchDiffEqPack","repo_kind":"official","path":"TorchDiffEqPack/odesolver_mem/adjoint.py","file_url":"https://github.com/juntang-zhuang/TorchDiffEqPack/blob/HEAD/TorchDiffEqPack/odesolver_mem/adjoint.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":"d69c56c48687730d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}