{"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/scaling-of-class-wise-training-losses-for","title":"Scaling of Class-wise Training Losses for Post-hoc Calibration","arxiv_id":"2306.10989","date":"2023-06-19","proceeding":null,"authors":["Seungjin Jung","Seungmo Seo","Yonghyun Jeong","Jongwon Choi"],"abstract":"The class-wise training losses often diverge as a result of the various levels of intra-class and inter-class appearance variation, and we find that the diverging class-wise training losses cause the uncalibrated prediction with its reliability. To resolve the issue, we propose a new calibration method to synchronize the class-wise training losses. We design a new training loss to alleviate the variance of class-wise training losses by using multiple class-wise scaling factors. Since our framework can compensate the training losses of overfitted classes with those of under-fitted classes, the integrated training loss is preserved, preventing the performance drop even after the model calibration. Furthermore, our method can be easily employed in the post-hoc calibration methods, allowing us to use the pre-trained model as an initial model and reduce the additional computation for model calibration. We validate the proposed framework by employing it in the various post-hoc calibration methods, which generally improves calibration performance while preserving accuracy, and discover through the investigation that our approach performs well with unbalanced datasets and untuned hyperparameters.","url_abs":"https://arxiv.org/abs/2306.10989v1","url_pdf":"https://arxiv.org/pdf/2306.10989v1.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":"scaling-of-class-wise-training-losses-for","repo_url":"https://github.com/seungjinjung/sctl","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2306.10989","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2306.10989"}},"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":"deterministic:regex_extraction","url":"https://github.com/markus93/NN_calibration","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/SeungjinJung/SCTL","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/seungjinjung/sctl","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":1,"unverified":7},"by_repo_kind":{"official":{"samples":8,"ran":1,"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":"40773557ed94ae9a","entry":"class_based_temperature_scaler","repo":"seungjinjung/sctl","repo_kind":"official","path":"models/scaler.py","file_url":"https://github.com/seungjinjung/sctl/blob/HEAD/models/scaler.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"40773557ed94ae9a"}},{"code_sha256_prefix":"27010e72471f6c1d","entry":"adam","repo":"SeungjinJung/SCTL","repo_kind":"official","path":"models/optimizer.py","file_url":"https://github.com/SeungjinJung/SCTL/blob/HEAD/models/optimizer.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":"27010e72471f6c1d"}},{"code_sha256_prefix":"47cc5a7673231462","entry":"calibrator_mapping","repo":"SeungjinJung/SCTL","repo_kind":"official","path":"models/utils.py","file_url":"https://github.com/SeungjinJung/SCTL/blob/HEAD/models/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":"47cc5a7673231462"}},{"code_sha256_prefix":"72b0d132e8a4f5c4","entry":"dataloader","repo":"SeungjinJung/SCTL","repo_kind":"official","path":"models/dataloader.py","file_url":"https://github.com/SeungjinJung/SCTL/blob/HEAD/models/dataloader.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":"72b0d132e8a4f5c4"}},{"code_sha256_prefix":"768d7c636555f7fd","entry":"dataloader","repo":"SeungjinJung/SCTL","repo_kind":"official","path":"models/utils.py","file_url":"https://github.com/SeungjinJung/SCTL/blob/HEAD/models/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":"768d7c636555f7fd"}},{"code_sha256_prefix":"a189dc26ca7b7fdf","entry":"dataset_mapping","repo":"SeungjinJung/SCTL","repo_kind":"official","path":"models/utils.py","file_url":"https://github.com/SeungjinJung/SCTL/blob/HEAD/models/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":"a189dc26ca7b7fdf"}},{"code_sha256_prefix":"26016a0b4c7d54b2","entry":"lbfgs","repo":"SeungjinJung/SCTL","repo_kind":"official","path":"models/optimizer.py","file_url":"https://github.com/SeungjinJung/SCTL/blob/HEAD/models/optimizer.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":"26016a0b4c7d54b2"}},{"code_sha256_prefix":"6464f7143a097230","entry":"lbfgs_schedule","repo":"SeungjinJung/SCTL","repo_kind":"official","path":"models/optimizer.py","file_url":"https://github.com/SeungjinJung/SCTL/blob/HEAD/models/optimizer.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":"6464f7143a097230"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}