{"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/neural-similarity-learning","title":"Neural Similarity Learning","arxiv_id":"1910.13003","date":"2019-10-28","proceeding":"NeurIPS 2019 12","authors":["Weiyang Liu","Zhen Liu","James M. Rehg","Le Song"],"abstract":"Inner product-based convolution has been the founding stone of convolutional neural networks (CNNs), enabling end-to-end learning of visual representation. By generalizing inner product with a bilinear matrix, we propose the neural similarity which serves as a learnable parametric similarity measure for CNNs. Neural similarity naturally generalizes the convolution and enhances flexibility. Further, we consider the neural similarity learning (NSL) in order to learn the neural similarity adaptively from training data. Specifically, we propose two different ways of learning the neural similarity: static NSL and dynamic NSL. Interestingly, dynamic neural similarity makes the CNN become a dynamic inference network. By regularizing the bilinear matrix, NSL can be viewed as learning the shape of kernel and the similarity measure simultaneously. We further justify the effectiveness of NSL with a theoretical viewpoint. Most importantly, NSL shows promising performance in visual recognition and few-shot learning, validating the superiority of NSL over the inner product-based convolution counterparts.","url_abs":"https://arxiv.org/abs/1910.13003v3","url_pdf":"https://arxiv.org/pdf/1910.13003v3.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":"neural-similarity-learning","repo_url":"https://github.com/wy1iu/NSL","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"few-shot-learning","task_name":"Few-Shot Learning"}],"methods":[{"method_slug":"convolution","method_name":"Convolution"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/1910.13003","atlas_url":"https://app.syntology.ai/?focus=1910.13003","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1910.13003"}},"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/wy1iu/NSL","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":9},"by_repo_kind":{"official":{"samples":9,"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":"4319edefc1377d2b","entry":"distorted_inputs","repo":"wy1iu/NSL","repo_kind":"official","path":"nsl_global_ns/cifar10_input.py","file_url":"https://github.com/wy1iu/NSL/blob/HEAD/nsl_global_ns/cifar10_input.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":"4319edefc1377d2b"}},{"code_sha256_prefix":"db351dee13022e90","entry":"distorted_inputs","repo":"wy1iu/NSL","repo_kind":"official","path":"nsl_image_recog/nsl_fspherenet/cifar100_input.py","file_url":"https://github.com/wy1iu/NSL/blob/HEAD/nsl_image_recog/nsl_fspherenet/cifar100_input.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":"db351dee13022e90"}},{"code_sha256_prefix":"bc68079bf939c329","entry":"distorted_inputs","repo":"wy1iu/NSL","repo_kind":"official","path":"nsl_image_recog/nsl_fspherenet/cifar10_input.py","file_url":"https://github.com/wy1iu/NSL/blob/HEAD/nsl_image_recog/nsl_fspherenet/cifar10_input.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":"bc68079bf939c329"}},{"code_sha256_prefix":"950dbedeeb8cfd93","entry":"inputs","repo":"wy1iu/NSL","repo_kind":"official","path":"nsl_global_ns/cifar10_input.py","file_url":"https://github.com/wy1iu/NSL/blob/HEAD/nsl_global_ns/cifar10_input.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":"950dbedeeb8cfd93"}},{"code_sha256_prefix":"76df9f0846ab5570","entry":"inputs","repo":"wy1iu/NSL","repo_kind":"official","path":"nsl_image_recog/nsl_fspherenet/cifar100_input.py","file_url":"https://github.com/wy1iu/NSL/blob/HEAD/nsl_image_recog/nsl_fspherenet/cifar100_input.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":"76df9f0846ab5570"}},{"code_sha256_prefix":"059480856cbbff38","entry":"loss2","repo":"wy1iu/NSL","repo_kind":"official","path":"nsl_global_ns/loss.py","file_url":"https://github.com/wy1iu/NSL/blob/HEAD/nsl_global_ns/loss.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":"059480856cbbff38"}},{"code_sha256_prefix":"7bb2163a72b8b7cc","entry":"loss2","repo":"wy1iu/NSL","repo_kind":"official","path":"nsl_image_recog/nsl_fspherenet/loss.py","file_url":"https://github.com/wy1iu/NSL/blob/HEAD/nsl_image_recog/nsl_fspherenet/loss.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":"7bb2163a72b8b7cc"}},{"code_sha256_prefix":"969bfd9c98f79209","entry":"read_cifar10","repo":"wy1iu/NSL","repo_kind":"official","path":"nsl_global_ns/cifar10_input.py","file_url":"https://github.com/wy1iu/NSL/blob/HEAD/nsl_global_ns/cifar10_input.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":"969bfd9c98f79209"}},{"code_sha256_prefix":"31e2b07fd9e3c442","entry":"read_cifar10","repo":"wy1iu/NSL","repo_kind":"official","path":"nsl_image_recog/nsl_fspherenet/cifar100_input.py","file_url":"https://github.com/wy1iu/NSL/blob/HEAD/nsl_image_recog/nsl_fspherenet/cifar100_input.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":"31e2b07fd9e3c442"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}