{"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/class-level-structural-relation-modelling-and","title":"Class-level Structural Relation Modelling and Smoothing for Visual Representation Learning","arxiv_id":"2308.04142","date":"2023-08-08","proceeding":null,"authors":["Zitan Chen","Zhuang Qi","Xiao Cao","Xiangxian Li","Xiangxu Meng","Lei Meng"],"abstract":"Representation learning for images has been advanced by recent progress in more complex neural models such as the Vision Transformers and new learning theories such as the structural causal models. However, these models mainly rely on the classification loss to implicitly regularize the class-level data distributions, and they may face difficulties when handling classes with diverse visual patterns. We argue that the incorporation of the structural information between data samples may improve this situation. To achieve this goal, this paper presents a framework termed \\textbf{C}lass-level Structural Relation Modeling and Smoothing for Visual Representation Learning (CSRMS), which includes the Class-level Relation Modelling, Class-aware Graph Sampling, and Relational Graph-Guided Representation Learning modules to model a relational graph of the entire dataset and perform class-aware smoothing and regularization operations to alleviate the issue of intra-class visual diversity and inter-class similarity. Specifically, the Class-level Relation Modelling module uses a clustering algorithm to learn the data distributions in the feature space and identify three types of class-level sample relations for the training set; Class-aware Graph Sampling module extends typical training batch construction process with three strategies to sample dataset-level sub-graphs; and Relational Graph-Guided Representation Learning module employs a graph convolution network with knowledge-guided smoothing operations to ease the projection from different visual patterns to the same class. Experiments demonstrate the effectiveness of structured knowledge modelling for enhanced representation learning and show that CSRMS can be incorporated with any state-of-the-art visual representation learning models for performance gains. The source codes and demos have been released at https://github.com/czt117/CSRMS.","url_abs":"https://arxiv.org/abs/2308.04142v1","url_pdf":"https://arxiv.org/pdf/2308.04142v1.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":"class-level-structural-relation-modelling-and","repo_url":"https://github.com/czt117/csrms","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"graph-sampling","task_name":"Graph Sampling"},{"task_slug":null,"task_name":"Relation"},{"task_slug":"representation-learning","task_name":"Representation Learning"}],"methods":[{"method_slug":"convolution","method_name":"Convolution"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2308.04142","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2308.04142"}},"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/czt117/csrms","reach":{"status":"ok"}}],"summary":{"ran":5,"ran_draft_wrong":1,"unverified":4},"by_repo_kind":{"official":{"samples":10,"ran":6,"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":10,"samples":[{"code_sha256_prefix":"46dd76e49a4bb02c","entry":"ResNet18","repo":"czt117/csrms","repo_kind":"official","path":"models/resnet.py","file_url":"https://github.com/czt117/csrms/blob/HEAD/models/resnet.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":"46dd76e49a4bb02c"}},{"code_sha256_prefix":"82ac85b1483cd87c","entry":"ResNet50","repo":"czt117/csrms","repo_kind":"official","path":"models/resnet.py","file_url":"https://github.com/czt117/csrms/blob/HEAD/models/resnet.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":"82ac85b1483cd87c"}},{"code_sha256_prefix":"b80b71baf2feec94","entry":"accuracy","repo":"czt117/csrms","repo_kind":"official","path":"utils.py","file_url":"https://github.com/czt117/csrms/blob/HEAD/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":"b80b71baf2feec94"}},{"code_sha256_prefix":"fe906cf5793628af","entry":"build_graph","repo":"czt117/csrms","repo_kind":"official","path":"graph/calcu_graph.py","file_url":"https://github.com/czt117/csrms/blob/HEAD/graph/calcu_graph.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":"fe906cf5793628af"}},{"code_sha256_prefix":"5155e27e925e74d7","entry":"exp_lr_scheduler","repo":"czt117/csrms","repo_kind":"official","path":"utils.py","file_url":"https://github.com/czt117/csrms/blob/HEAD/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":"5155e27e925e74d7"}},{"code_sha256_prefix":"c97b99c4e8201a97","entry":"sparse_mx_to_torch_sparse_tensor","repo":"czt117/csrms","repo_kind":"official","path":"graph/calcu_graph.py","file_url":"https://github.com/czt117/csrms/blob/HEAD/graph/calcu_graph.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":"c97b99c4e8201a97"}},{"code_sha256_prefix":"faf6bdb799752adb","entry":"art","repo":"czt117/csrms","repo_kind":"official","path":"prepare_datas/clustering.py","file_url":"https://github.com/czt117/csrms/blob/HEAD/prepare_datas/clustering.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"faf6bdb799752adb"}},{"code_sha256_prefix":"c46bb8d296728be4","entry":"default_loader","repo":"czt117/csrms","repo_kind":"official","path":"prepare_datas/dataloaders.py","file_url":"https://github.com/czt117/csrms/blob/HEAD/prepare_datas/dataloaders.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c46bb8d296728be4"}},{"code_sha256_prefix":"43dd41dba3bdca2e","entry":"get_dataloader","repo":"czt117/csrms","repo_kind":"official","path":"prepare_datas/dataloaders.py","file_url":"https://github.com/czt117/csrms/blob/HEAD/prepare_datas/dataloaders.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"43dd41dba3bdca2e"}},{"code_sha256_prefix":"f8d2d7cbe9b95c1c","entry":"normalize_data","repo":"czt117/csrms","repo_kind":"official","path":"utils.py","file_url":"https://github.com/czt117/csrms/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f8d2d7cbe9b95c1c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}