{"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/learning-to-stop-while-learning-to-predict","title":"Learning to Stop While Learning to Predict","arxiv_id":"2006.05082","date":"2020-06-09","proceeding":"ICML 2020 1","authors":["Xinshi Chen","Hanjun Dai","Yu Li","Xin Gao","Le Song"],"abstract":"There is a recent surge of interest in designing deep architectures based on the update steps in traditional algorithms, or learning neural networks to improve and replace traditional algorithms. While traditional algorithms have certain stopping criteria for outputting results at different iterations, many algorithm-inspired deep models are restricted to a ``fixed-depth'' for all inputs. Similar to algorithms, the optimal depth of a deep architecture may be different for different input instances, either to avoid ``over-thinking'', or because we want to compute less for operations converged already. In this paper, we tackle this varying depth problem using a steerable architecture, where a feed-forward deep model and a variational stopping policy are learned together to sequentially determine the optimal number of layers for each input instance. Training such architecture is very challenging. We provide a variational Bayes perspective and design a novel and effective training procedure which decomposes the task into an oracle model learning stage and an imitation stage. Experimentally, we show that the learned deep model along with the stopping policy improves the performances on a diverse set of tasks, including learning sparse recovery, few-shot meta learning, and computer vision tasks.","url_abs":"https://arxiv.org/abs/2006.05082v1","url_pdf":"https://arxiv.org/pdf/2006.05082v1.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":"learning-to-stop-while-learning-to-predict","repo_url":"https://github.com/xinshi-chen/l2stop","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"meta-learning","task_name":"Meta-Learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2006.05082","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2006.05082"}},"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/xinshi-chen/l2stop","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":3,"unverified":3},"by_repo_kind":{"listed":{"samples":6,"ran":3,"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":"1391a8ffffc258ce","entry":"batch_PSNR","repo":"xinshi-chen/l2stop","repo_kind":"listed","path":"dncnn_stop/utils.py","file_url":"https://github.com/xinshi-chen/l2stop/blob/HEAD/dncnn_stop/utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1391a8ffffc258ce"}},{"code_sha256_prefix":"5dfad570b582b1ea","entry":"normalize","repo":"xinshi-chen/l2stop","repo_kind":"listed","path":"dncnn_stop/dataset.py","file_url":"https://github.com/xinshi-chen/l2stop/blob/HEAD/dncnn_stop/dataset.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5dfad570b582b1ea"}},{"code_sha256_prefix":"d0092b78fbcce2b3","entry":"sdn_training_step_DS","repo":"xinshi-chen/l2stop","repo_kind":"listed","path":"sdn_stop/model_funcs.py","file_url":"https://github.com/xinshi-chen/l2stop/blob/HEAD/sdn_stop/model_funcs.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d0092b78fbcce2b3"}},{"code_sha256_prefix":"2af2ba98f984835a","entry":"Im2Patch","repo":"xinshi-chen/l2stop","repo_kind":"listed","path":"dncnn_stop/dataset.py","file_url":"https://github.com/xinshi-chen/l2stop/blob/HEAD/dncnn_stop/dataset.py","link_basis":"harvester_set","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":"2af2ba98f984835a"}},{"code_sha256_prefix":"441688378928f71a","entry":"batch_PSNR_vector","repo":"xinshi-chen/l2stop","repo_kind":"listed","path":"dncnn_stop/utils.py","file_url":"https://github.com/xinshi-chen/l2stop/blob/HEAD/dncnn_stop/utils.py","link_basis":"harvester_set","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":"441688378928f71a"}},{"code_sha256_prefix":"0b71fac5a3384432","entry":"data_augmentation","repo":"xinshi-chen/l2stop","repo_kind":"listed","path":"dncnn_stop/utils.py","file_url":"https://github.com/xinshi-chen/l2stop/blob/HEAD/dncnn_stop/utils.py","link_basis":"harvester_set","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":"0b71fac5a3384432"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}