{"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/density-softmax-scalable-and-distance-aware","title":"Density-Softmax: Efficient Test-time Model for Uncertainty Estimation and Robustness under Distribution Shifts","arxiv_id":"2302.06495","date":"2023-02-13","proceeding":null,"authors":["Ha Manh Bui","Anqi Liu"],"abstract":"Sampling-based methods, e.g., Deep Ensembles and Bayesian Neural Nets have become promising approaches to improve the quality of uncertainty estimation and robust generalization. However, they suffer from a large model size and high latency at test-time, which limits the scalability needed for low-resource devices and real-time applications. To resolve these computational issues, we propose Density-Softmax, a sampling-free deterministic framework via combining a density function built on a Lipschitz-constrained feature extractor with the softmax layer. Theoretically, we show that our model is the solution of minimax uncertainty risk and is distance-aware on feature space, thus reducing the over-confidence of the standard softmax under distribution shifts. Empirically, our method enjoys competitive results with state-of-the-art techniques in terms of uncertainty and robustness, while having a lower number of model parameters and a lower latency at test-time.","url_abs":"https://arxiv.org/abs/2302.06495v3","url_pdf":"https://arxiv.org/pdf/2302.06495v3.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":"density-softmax-scalable-and-distance-aware","repo_url":"https://github.com/angie-lab-jhu/density_softmax","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"jax","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"computational-efficiency","task_name":"Computational Efficiency"}],"methods":[{"method_slug":"deep-ensembles","method_name":"Deep Ensembles"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"test","method_name":"Test"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2302.06495","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2302.06495"}},"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/angie-lab-jhu/density_softmax","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"unverified":8},"by_repo_kind":{"official":{"samples":8,"ran":0,"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":"93ff332515a8b9ba","entry":"Coupling","repo":"angie-lab-jhu/density_softmax","repo_kind":"official","path":"baselines/imagenet/density_softmax.py","file_url":"https://github.com/angie-lab-jhu/density_softmax/blob/HEAD/baselines/imagenet/density_softmax.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"93ff332515a8b9ba"}},{"code_sha256_prefix":"27eadedd984dcc3e","entry":"construct_input_and_output_dir","repo":"angie-lab-jhu/density_softmax","repo_kind":"official","path":"baselines/diabetic_retinopathy_detection/eval_model.py","file_url":"https://github.com/angie-lab-jhu/density_softmax/blob/HEAD/baselines/diabetic_retinopathy_detection/eval_model.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"27eadedd984dcc3e"}},{"code_sha256_prefix":"6dc593dd5ec24cd8","entry":"conv_pooled_block","repo":"angie-lab-jhu/density_softmax","repo_kind":"official","path":"baselines/clinc_intent/deterministic_model_textcnn.py","file_url":"https://github.com/angie-lab-jhu/density_softmax/blob/HEAD/baselines/clinc_intent/deterministic_model_textcnn.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"6dc593dd5ec24cd8"}},{"code_sha256_prefix":"12094c96164a0d6e","entry":"embedding_block","repo":"angie-lab-jhu/density_softmax","repo_kind":"official","path":"baselines/clinc_intent/deterministic_model_textcnn.py","file_url":"https://github.com/angie-lab-jhu/density_softmax/blob/HEAD/baselines/clinc_intent/deterministic_model_textcnn.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"12094c96164a0d6e"}},{"code_sha256_prefix":"c3a7ced1032722f0","entry":"mean_truncated_beta_distribution","repo":"angie-lab-jhu/density_softmax","repo_kind":"official","path":"baselines/imagenet/density_softmax.py","file_url":"https://github.com/angie-lab-jhu/density_softmax/blob/HEAD/baselines/imagenet/density_softmax.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c3a7ced1032722f0"}},{"code_sha256_prefix":"ea56ba3415e2b1fc","entry":"rescale","repo":"angie-lab-jhu/density_softmax","repo_kind":"official","path":"baselines/cifar/density_softmax.py","file_url":"https://github.com/angie-lab-jhu/density_softmax/blob/HEAD/baselines/cifar/density_softmax.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ea56ba3415e2b1fc"}},{"code_sha256_prefix":"dba732d886e5139d","entry":"rescale_normal","repo":"angie-lab-jhu/density_softmax","repo_kind":"official","path":"baselines/cifar/density_softmax.py","file_url":"https://github.com/angie-lab-jhu/density_softmax/blob/HEAD/baselines/cifar/density_softmax.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"dba732d886e5139d"}},{"code_sha256_prefix":"46cfd42e4dc8d661","entry":"textcnn","repo":"angie-lab-jhu/density_softmax","repo_kind":"official","path":"baselines/clinc_intent/deterministic_model_textcnn.py","file_url":"https://github.com/angie-lab-jhu/density_softmax/blob/HEAD/baselines/clinc_intent/deterministic_model_textcnn.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"46cfd42e4dc8d661"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}