{"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/overfitting-of-neural-nets-under-class","title":"Overfitting of neural nets under class imbalance: Analysis and improvements for segmentation","arxiv_id":"1907.10982","date":"2019-07-25","proceeding":null,"authors":["Zeju Li","Konstantinos Kamnitsas","Ben Glocker"],"abstract":"Overfitting in deep learning has been the focus of a number of recent works, yet its exact impact on the behavior of neural networks is not well understood. This study analyzes overfitting by examining how the distribution of logits alters in relation to how much the model overfits. Specifically, we find that when training with few data samples, the distribution of logit activations when processing unseen test samples of an under-represented class tends to shift towards and even across the decision boundary, while the over-represented class seems unaffected. In image segmentation, foreground samples are often heavily under-represented. We observe that sensitivity of the model drops as a result of overfitting, while precision remains mostly stable. Based on our analysis, we derive asymmetric modifications of existing loss functions and regularizers including a large margin loss, focal loss, adversarial training and mixup, which specifically aim at reducing the shift observed when embedding unseen samples of the under-represented class. We study the case of binary segmentation of brain tumor core and show that our proposed simple modifications lead to significantly improved segmentation performance over the symmetric variants.","url_abs":"https://arxiv.org/abs/1907.10982v2","url_pdf":"https://arxiv.org/pdf/1907.10982v2.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":"overfitting-of-neural-nets-under-class","repo_url":"https://github.com/ZerojumpLine/OverfittingUnderClassImbalance","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"image-segmentation","task_name":"Image Segmentation"},{"task_slug":"segmentation","task_name":"Segmentation"},{"task_slug":"semantic-segmentation","task_name":"Semantic Segmentation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=1907.10982","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1907.10982"}},"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/ZerojumpLine/OverfittingUnderClassImbalance","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":17},"by_repo_kind":{"official":{"samples":17,"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":"63cc61fbcb26e1c1","entry":"applyBn","repo":"ZerojumpLine/OverfittingUnderClassImbalance","repo_kind":"official","path":"DeepMedic/deepmedic/neuralnet/ops.py","file_url":"https://github.com/ZerojumpLine/OverfittingUnderClassImbalance/blob/HEAD/DeepMedic/deepmedic/neuralnet/ops.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":"63cc61fbcb26e1c1"}},{"code_sha256_prefix":"c71bea9d050b4a3c","entry":"applyDropout","repo":"ZerojumpLine/OverfittingUnderClassImbalance","repo_kind":"official","path":"DeepMedic/deepmedic/neuralnet/ops.py","file_url":"https://github.com/ZerojumpLine/OverfittingUnderClassImbalance/blob/HEAD/DeepMedic/deepmedic/neuralnet/ops.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":"c71bea9d050b4a3c"}},{"code_sha256_prefix":"93947ffa6feaaa08","entry":"calcRecFieldFromKernDimListPerLayerWhenStrides1","repo":"ZerojumpLine/OverfittingUnderClassImbalance","repo_kind":"official","path":"DeepMedic/deepmedic/neuralnet/utils.py","file_url":"https://github.com/ZerojumpLine/OverfittingUnderClassImbalance/blob/HEAD/DeepMedic/deepmedic/neuralnet/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":"93947ffa6feaaa08"}},{"code_sha256_prefix":"280beba3466e6865","entry":"calculateSubsampledImagePartDimensionsFromImagePartSizePatchSizeAndSubsampleFactor","repo":"ZerojumpLine/OverfittingUnderClassImbalance","repo_kind":"official","path":"DeepMedic/deepmedic/neuralnet/utils.py","file_url":"https://github.com/ZerojumpLine/OverfittingUnderClassImbalance/blob/HEAD/DeepMedic/deepmedic/neuralnet/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":"280beba3466e6865"}},{"code_sha256_prefix":"56a35a765c4ddb29","entry":"checkRecFieldVsSegmSize","repo":"ZerojumpLine/OverfittingUnderClassImbalance","repo_kind":"official","path":"DeepMedic/deepmedic/neuralnet/utils.py","file_url":"https://github.com/ZerojumpLine/OverfittingUnderClassImbalance/blob/HEAD/DeepMedic/deepmedic/neuralnet/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":"56a35a765c4ddb29"}},{"code_sha256_prefix":"5caf38aae31d6629","entry":"cropRczOf5DimArrayToMatchOther","repo":"ZerojumpLine/OverfittingUnderClassImbalance","repo_kind":"official","path":"DeepMedic/deepmedic/neuralnet/pathways.py","file_url":"https://github.com/ZerojumpLine/OverfittingUnderClassImbalance/blob/HEAD/DeepMedic/deepmedic/neuralnet/pathways.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":"5caf38aae31d6629"}},{"code_sha256_prefix":"9d5e70582a1d30c1","entry":"dsc","repo":"ZerojumpLine/OverfittingUnderClassImbalance","repo_kind":"official","path":"DeepMedic/deepmedic/neuralnet/cost_functions.py","file_url":"https://github.com/ZerojumpLine/OverfittingUnderClassImbalance/blob/HEAD/DeepMedic/deepmedic/neuralnet/cost_functions.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":"9d5e70582a1d30c1"}},{"code_sha256_prefix":"dec48a9241121f7d","entry":"getEpochsBetweenFullInf","repo":"ZerojumpLine/OverfittingUnderClassImbalance","repo_kind":"official","path":"DeepMedic/plotTrainingProgress.py","file_url":"https://github.com/ZerojumpLine/OverfittingUnderClassImbalance/blob/HEAD/DeepMedic/plotTrainingProgress.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":"dec48a9241121f7d"}},{"code_sha256_prefix":"3349f980a9bcf37d","entry":"getNameOfLogFileWithoutEnding","repo":"ZerojumpLine/OverfittingUnderClassImbalance","repo_kind":"official","path":"DeepMedic/plotTrainingProgress.py","file_url":"https://github.com/ZerojumpLine/OverfittingUnderClassImbalance/blob/HEAD/DeepMedic/plotTrainingProgress.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":"3349f980a9bcf37d"}},{"code_sha256_prefix":"224bcebf7e0e8b89","entry":"getSubepochsPerEpoch","repo":"ZerojumpLine/OverfittingUnderClassImbalance","repo_kind":"official","path":"DeepMedic/plotTrainingProgress.py","file_url":"https://github.com/ZerojumpLine/OverfittingUnderClassImbalance/blob/HEAD/DeepMedic/plotTrainingProgress.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":"224bcebf7e0e8b89"}},{"code_sha256_prefix":"ab8004d0b5654bc2","entry":"get_normalized_vector","repo":"ZerojumpLine/OverfittingUnderClassImbalance","repo_kind":"official","path":"DeepMedic/deepmedic/neuralnet/cnn3d.py","file_url":"https://github.com/ZerojumpLine/OverfittingUnderClassImbalance/blob/HEAD/DeepMedic/deepmedic/neuralnet/cnn3d.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":"ab8004d0b5654bc2"}},{"code_sha256_prefix":"730ced37040cedf6","entry":"iou","repo":"ZerojumpLine/OverfittingUnderClassImbalance","repo_kind":"official","path":"DeepMedic/deepmedic/neuralnet/cost_functions.py","file_url":"https://github.com/ZerojumpLine/OverfittingUnderClassImbalance/blob/HEAD/DeepMedic/deepmedic/neuralnet/cost_functions.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":"730ced37040cedf6"}},{"code_sha256_prefix":"7857723aa3534d8e","entry":"makeBiasParamsAndApplyToFms","repo":"ZerojumpLine/OverfittingUnderClassImbalance","repo_kind":"official","path":"DeepMedic/deepmedic/neuralnet/ops.py","file_url":"https://github.com/ZerojumpLine/OverfittingUnderClassImbalance/blob/HEAD/DeepMedic/deepmedic/neuralnet/ops.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":"7857723aa3534d8e"}},{"code_sha256_prefix":"c3e2ff49dcdf5978","entry":"padImageWithMirroring","repo":"ZerojumpLine/OverfittingUnderClassImbalance","repo_kind":"official","path":"DeepMedic/deepmedic/neuralnet/cnn3d.py","file_url":"https://github.com/ZerojumpLine/OverfittingUnderClassImbalance/blob/HEAD/DeepMedic/deepmedic/neuralnet/cnn3d.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":"c3e2ff49dcdf5978"}},{"code_sha256_prefix":"8ccd7fca225d0c27","entry":"repeatRcz5DimArrayByFactor","repo":"ZerojumpLine/OverfittingUnderClassImbalance","repo_kind":"official","path":"DeepMedic/deepmedic/neuralnet/pathways.py","file_url":"https://github.com/ZerojumpLine/OverfittingUnderClassImbalance/blob/HEAD/DeepMedic/deepmedic/neuralnet/pathways.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":"8ccd7fca225d0c27"}},{"code_sha256_prefix":"c470664471f70591","entry":"upsampleRcz5DimArrayAndOptionalCrop","repo":"ZerojumpLine/OverfittingUnderClassImbalance","repo_kind":"official","path":"DeepMedic/deepmedic/neuralnet/pathways.py","file_url":"https://github.com/ZerojumpLine/OverfittingUnderClassImbalance/blob/HEAD/DeepMedic/deepmedic/neuralnet/pathways.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":"c470664471f70591"}},{"code_sha256_prefix":"343c57cfda89db25","entry":"x_entr","repo":"ZerojumpLine/OverfittingUnderClassImbalance","repo_kind":"official","path":"DeepMedic/deepmedic/neuralnet/cost_functions.py","file_url":"https://github.com/ZerojumpLine/OverfittingUnderClassImbalance/blob/HEAD/DeepMedic/deepmedic/neuralnet/cost_functions.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":"343c57cfda89db25"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}