{"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/neural-networks-behave-as-hash-encoders-an-1","title":"Neural networks behave as hash encoders: An empirical study","arxiv_id":"2101.05490","date":"2021-01-14","proceeding":null,"authors":["Fengxiang He","Shiye Lei","Jianmin Ji","DaCheng Tao"],"abstract":"The input space of a neural network with ReLU-like activations is partitioned into multiple linear regions, each corresponding to a specific activation pattern of the included ReLU-like activations. We demonstrate that this partition exhibits the following encoding properties across a variety of deep learning models: (1) {\\it determinism}: almost every linear region contains at most one training example. We can therefore represent almost every training example by a unique activation pattern, which is parameterized by a {\\it neural code}; and (2) {\\it categorization}: according to the neural code, simple algorithms, such as $K$-Means, $K$-NN, and logistic regression, can achieve fairly good performance on both training and test data. These encoding properties surprisingly suggest that {\\it normal neural networks well-trained for classification behave as hash encoders without any extra efforts.} In addition, the encoding properties exhibit variability in different scenarios. {Further experiments demonstrate that {\\it model size}, {\\it training time}, {\\it training sample size}, {\\it regularization}, and {\\it label noise} contribute in shaping the encoding properties, while the impacts of the first three are dominant.} We then define an {\\it activation hash phase chart} to represent the space expanded by {model size}, training time, training sample size, and the encoding properties, which is divided into three canonical regions: {\\it under-expressive regime}, {\\it critically-expressive regime}, and {\\it sufficiently-expressive regime}. The source code package is available at \\url{https://github.com/LeavesLei/activation-code}.","url_abs":"https://arxiv.org/abs/2101.05490v1","url_pdf":"https://arxiv.org/pdf/2101.05490v1.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":"neural-networks-behave-as-hash-encoders-an-1","repo_url":"https://github.com/LeavesLei/activation-code","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":null,"mcp":null,"developers":"https://syntology.ai/developers"},"arxiv_metadata":null,"syntology_extracted_results":null}