{"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-step-towards-understanding-why","title":"A step towards understanding why classification helps regression","arxiv_id":"2308.10603","date":"2023-08-21","proceeding":"ICCV 2023 1","authors":["Silvia L. Pintea","Yancong Lin","Jouke Dijkstra","Jan C. van Gemert"],"abstract":"A number of computer vision deep regression approaches report improved results when adding a classification loss to the regression loss. Here, we explore why this is useful in practice and when it is beneficial. To do so, we start from precisely controlled dataset variations and data samplings and find that the effect of adding a classification loss is the most pronounced for regression with imbalanced data. We explain these empirical findings by formalizing the relation between the balanced and imbalanced regression losses. Finally, we show that our findings hold on two real imbalanced image datasets for depth estimation (NYUD2-DIR), and age estimation (IMDB-WIKI-DIR), and on the problem of imbalanced video progress prediction (Breakfast). Our main takeaway is: for a regression task, if the data sampling is imbalanced, then add a classification loss.","url_abs":"https://arxiv.org/abs/2308.10603v1","url_pdf":"https://arxiv.org/pdf/2308.10603v1.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-step-towards-understanding-why","repo_url":"https://github.com/silvialaurapintea/reg-cls","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"age-estimation","task_name":"Age Estimation"},{"task_slug":"classification-1","task_name":"Classification"},{"task_slug":"depth-estimation","task_name":"Depth Estimation"},{"task_slug":"regression-1","task_name":"regression"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2308.10603","atlas_url":"https://app.syntology.ai/?focus=2308.10603","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2308.10603"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/silvialaurapintea/reg-cls","reach":{"status":"ok"}}],"summary":{"ran":13,"ran_draft_wrong":1},"by_repo_kind":{"official":{"samples":14,"ran":14,"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":14,"samples":[{"code_sha256_prefix":"17fb0539d6b732dd","entry":"accuracy","repo":"silvialaurapintea/reg-cls","repo_kind":"official","path":"1d/utils.py","file_url":"https://github.com/silvialaurapintea/reg-cls/blob/HEAD/1d/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"17fb0539d6b732dd"}},{"code_sha256_prefix":"21fe9de526aff373","entry":"change_ranges","repo":"silvialaurapintea/reg-cls","repo_kind":"official","path":"1d/histeq.py","file_url":"https://github.com/silvialaurapintea/reg-cls/blob/HEAD/1d/histeq.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"21fe9de526aff373"}},{"code_sha256_prefix":"fac5364e2f53c6db","entry":"conv3x3","repo":"silvialaurapintea/reg-cls","repo_kind":"official","path":"images/imdb-wiki-dir/resnet.py","file_url":"https://github.com/silvialaurapintea/reg-cls/blob/HEAD/images/imdb-wiki-dir/resnet.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"fac5364e2f53c6db"}},{"code_sha256_prefix":"2737bfb410c85be7","entry":"def_dataloaders","repo":"silvialaurapintea/reg-cls","repo_kind":"official","path":"1d/train_eval.py","file_url":"https://github.com/silvialaurapintea/reg-cls/blob/HEAD/1d/train_eval.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2737bfb410c85be7"}},{"code_sha256_prefix":"713b88d78142fdf6","entry":"doEq","repo":"silvialaurapintea/reg-cls","repo_kind":"official","path":"1d/histeq.py","file_url":"https://github.com/silvialaurapintea/reg-cls/blob/HEAD/1d/histeq.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"713b88d78142fdf6"}},{"code_sha256_prefix":"af188df6229ac760","entry":"func","repo":"silvialaurapintea/reg-cls","repo_kind":"official","path":"1d/make_data1d.py","file_url":"https://github.com/silvialaurapintea/reg-cls/blob/HEAD/1d/make_data1d.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"af188df6229ac760"}},{"code_sha256_prefix":"d149be207b41dae6","entry":"get_imbalanced","repo":"silvialaurapintea/reg-cls","repo_kind":"official","path":"1d/make_data1d.py","file_url":"https://github.com/silvialaurapintea/reg-cls/blob/HEAD/1d/make_data1d.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d149be207b41dae6"}},{"code_sha256_prefix":"c6c46e08e8618f36","entry":"get_uniform","repo":"silvialaurapintea/reg-cls","repo_kind":"official","path":"1d/make_data1d.py","file_url":"https://github.com/silvialaurapintea/reg-cls/blob/HEAD/1d/make_data1d.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c6c46e08e8618f36"}},{"code_sha256_prefix":"6e97647f8b72f5a8","entry":"removeStartZeros","repo":"silvialaurapintea/reg-cls","repo_kind":"official","path":"1d/histeq.py","file_url":"https://github.com/silvialaurapintea/reg-cls/blob/HEAD/1d/histeq.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6e97647f8b72f5a8"}},{"code_sha256_prefix":"9d857dee26c989e2","entry":"resume","repo":"silvialaurapintea/reg-cls","repo_kind":"official","path":"1d/train_eval.py","file_url":"https://github.com/silvialaurapintea/reg-cls/blob/HEAD/1d/train_eval.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9d857dee26c989e2"}},{"code_sha256_prefix":"6e71bc6cd8ccb243","entry":"shot_metrics","repo":"silvialaurapintea/reg-cls","repo_kind":"official","path":"images/imdb-wiki-dir/train_cls.py","file_url":"https://github.com/silvialaurapintea/reg-cls/blob/HEAD/images/imdb-wiki-dir/train_cls.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6e71bc6cd8ccb243"}},{"code_sha256_prefix":"953f661a54a1b2bd","entry":"weighted_focal_mse_loss","repo":"silvialaurapintea/reg-cls","repo_kind":"official","path":"images/imdb-wiki-dir/loss.py","file_url":"https://github.com/silvialaurapintea/reg-cls/blob/HEAD/images/imdb-wiki-dir/loss.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"953f661a54a1b2bd"}},{"code_sha256_prefix":"2a25dd59364377ff","entry":"weighted_l1_loss","repo":"silvialaurapintea/reg-cls","repo_kind":"official","path":"images/imdb-wiki-dir/loss.py","file_url":"https://github.com/silvialaurapintea/reg-cls/blob/HEAD/images/imdb-wiki-dir/loss.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2a25dd59364377ff"}},{"code_sha256_prefix":"1da83cb2ed411cd0","entry":"weighted_mse_loss","repo":"silvialaurapintea/reg-cls","repo_kind":"official","path":"images/imdb-wiki-dir/loss.py","file_url":"https://github.com/silvialaurapintea/reg-cls/blob/HEAD/images/imdb-wiki-dir/loss.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1da83cb2ed411cd0"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}