{"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/a-neural-network-with-feature-sparsity","title":"LassoNet: A Neural Network with Feature Sparsity","arxiv_id":"1907.12207","date":"2019-07-29","proceeding":null,"authors":["Ismael Lemhadri","Feng Ruan","Louis Abraham","Robert Tibshirani"],"abstract":"Much work has been done recently to make neural networks more interpretable, and one obvious approach is to arrange for the network to use only a subset of the available features. In linear models, Lasso (or $\\ell_1$-regularized) regression assigns zero weights to the most irrelevant or redundant features, and is widely used in data science. However the Lasso only applies to linear models. Here we introduce LassoNet, a neural network framework with global feature selection. Our approach enforces a hierarchy: specifically a feature can participate in a hidden unit only if its linear representative is active. Unlike other approaches to feature selection for neural nets, our method uses a modified objective function with constraints, and so integrates feature selection with the parameter learning directly. As a result, it delivers an entire regularization path of solutions with a range of feature sparsity. On systematic experiments, LassoNet significantly outperforms state-of-the-art methods for feature selection and regression. The LassoNet method uses projected proximal gradient descent, and generalizes directly to deep networks. It can be implemented by adding just a few lines of code to a standard neural network.","url_abs":"https://arxiv.org/abs/1907.12207v9","url_pdf":"https://arxiv.org/pdf/1907.12207v9.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":"a-neural-network-with-feature-sparsity","repo_url":"https://github.com/ilemhadri/lassoNet","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"a-neural-network-with-feature-sparsity","repo_url":"https://github.com/lasso-net/lassonet","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"feature-selection","task_name":"feature selection"},{"task_slug":"regression-1","task_name":"regression"}],"methods":[{"method_slug":"feature-selection","method_name":"Feature Selection"},{"method_slug":"residual-connection","method_name":"Residual Connection"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1907.12207","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1907.12207"}},"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/lasso-net/lassonet","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ilemhadri/lassoNet","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":1,"ran_honours":1,"unverified":11},"by_repo_kind":{"official":{"samples":13,"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":"72eb093eb143edd8","entry":"sign_binary","repo":"ilemhadri/lassoNet","repo_kind":"official","path":"lassonet/prox.py","file_url":"https://github.com/ilemhadri/lassoNet/blob/HEAD/lassonet/prox.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"72eb093eb143edd8"}},{"code_sha256_prefix":"3f9208771cec0b61","entry":"soft_threshold","repo":"ilemhadri/lassoNet","repo_kind":"official","path":"lassonet/prox.py","file_url":"https://github.com/ilemhadri/lassoNet/blob/HEAD/lassonet/prox.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3f9208771cec0b61"}},{"code_sha256_prefix":"6d28f3f15d6b4442","entry":"abstractattr","repo":"ilemhadri/lassoNet","repo_kind":"official","path":"lassonet/interfaces.py","file_url":"https://github.com/ilemhadri/lassoNet/blob/HEAD/lassonet/interfaces.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":"6d28f3f15d6b4442"}},{"code_sha256_prefix":"c978e6818ea01805","entry":"eval_on_path","repo":"ilemhadri/lassoNet","repo_kind":"official","path":"lassonet/utils.py","file_url":"https://github.com/ilemhadri/lassoNet/blob/HEAD/lassonet/utils.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":"c978e6818ea01805"}},{"code_sha256_prefix":"3e948e6f3b10a45a","entry":"lassonet_eval","repo":"ilemhadri/lassoNet","repo_kind":"official","path":"lassonet/r.py","file_url":"https://github.com/ilemhadri/lassoNet/blob/HEAD/lassonet/r.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":"3e948e6f3b10a45a"}},{"code_sha256_prefix":"7868c5292dc4787e","entry":"lassonet_path","repo":"ilemhadri/lassoNet","repo_kind":"official","path":"lassonet/r.py","file_url":"https://github.com/ilemhadri/lassoNet/blob/HEAD/lassonet/r.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":"7868c5292dc4787e"}},{"code_sha256_prefix":"ebb17c927b326e18","entry":"load_data","repo":"ilemhadri/lassoNet","repo_kind":"official","path":"experiments/data_utils.py","file_url":"https://github.com/ilemhadri/lassoNet/blob/HEAD/experiments/data_utils.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":"ebb17c927b326e18"}},{"code_sha256_prefix":"92305d8388541e0e","entry":"load_mice","repo":"ilemhadri/lassoNet","repo_kind":"official","path":"experiments/data_utils.py","file_url":"https://github.com/ilemhadri/lassoNet/blob/HEAD/experiments/data_utils.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":"92305d8388541e0e"}},{"code_sha256_prefix":"9301354d553d2c5c","entry":"load_mnist_two_digits","repo":"ilemhadri/lassoNet","repo_kind":"official","path":"experiments/data_utils.py","file_url":"https://github.com/ilemhadri/lassoNet/blob/HEAD/experiments/data_utils.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":"9301354d553d2c5c"}},{"code_sha256_prefix":"f8a4a258e2118d30","entry":"log_substract","repo":"ilemhadri/lassoNet","repo_kind":"official","path":"lassonet/utils.py","file_url":"https://github.com/ilemhadri/lassoNet/blob/HEAD/lassonet/utils.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":"f8a4a258e2118d30"}},{"code_sha256_prefix":"1a8970e7e4a34bcb","entry":"make_writable","repo":"ilemhadri/lassoNet","repo_kind":"official","path":"lassonet/r.py","file_url":"https://github.com/ilemhadri/lassoNet/blob/HEAD/lassonet/r.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":"1a8970e7e4a34bcb"}},{"code_sha256_prefix":"feaf95baefd799b5","entry":"prox","repo":"ilemhadri/lassoNet","repo_kind":"official","path":"lassonet/prox.py","file_url":"https://github.com/ilemhadri/lassoNet/blob/HEAD/lassonet/prox.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":"feaf95baefd799b5"}},{"code_sha256_prefix":"4ba51cbf2fe87c3f","entry":"scatter_logsumexp","repo":"ilemhadri/lassoNet","repo_kind":"official","path":"lassonet/utils.py","file_url":"https://github.com/ilemhadri/lassoNet/blob/HEAD/lassonet/utils.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":"4ba51cbf2fe87c3f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}