{"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/arxiv-2601-03805","title":"Detecting Semantic Backdoors in a Mystery Shopping Scenario","arxiv_id":"2601.03805","date":"2026-01-07","proceeding":null,"authors":["Arpad Berta","Gabor Danner","Istvan Hegedus","Mark Jelasity"],"abstract":"Detecting semantic backdoors in classification models--where some classes can be activated by certain natural, but out-of-distribution inputs--is an important problem that has received relatively little attention. Semantic backdoors are significantly harder to detect than backdoors that are based on trigger patterns due to the lack of such clearly identifiable patterns. We tackle this problem under the assumption that the clean training dataset and the training recipe of the model are both known. These assumptions are motivated by a consumer protection scenario, in which the responsible authority performs mystery shopping to test a machine learning service provider. In this scenario, the authority uses the provider's resources and tools to train a model on a given dataset and tests whether the provider included a backdoor. In our proposed approach, the authority creates a reference model pool by training a small number of clean and poisoned models using trusted infrastructure, and calibrates a model distance threshold to identify clean models. We propose and experimentally analyze a number of approaches to compute model distances and we also test a scenario where the provider performs an adaptive attack to avoid detection. The most reliable method is based on requesting adversarial training from the provider. The model distance is best measured using a set of input samples generated by inverting the models in such a way as to maximize the distance from clean samples. With these settings, our method can often completely separate clean and poisoned models, and it proves to be superior to state-of-the-art backdoor detectors as well.","url_abs":"https://arxiv.org/abs/2601.03805","url_pdf":"https://arxiv.org/pdf/2601.03805","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2601.03805","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2601.03805"}},"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":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/szegedai/SemanticBackdoorDetection","reach":{"status":"ok"}}],"summary":{"ran_draft_wrong":2,"unverified":7},"by_repo_kind":{"found_in_text":{"samples":9,"ran":2,"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":9,"samples":[{"code_sha256_prefix":"d9def42110729a85","entry":"conv1x1","repo":"szegedai/SemanticBackdoorDetection","repo_kind":"found_in_text","path":"models/resnetmod_ulp.py","file_url":"https://github.com/szegedai/SemanticBackdoorDetection/blob/HEAD/models/resnetmod_ulp.py","link_basis":"plan_row","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":"d9def42110729a85"}},{"code_sha256_prefix":"160bb14bd76201b4","entry":"conv3x3","repo":"szegedai/SemanticBackdoorDetection","repo_kind":"found_in_text","path":"models/resnetmod_ulp.py","file_url":"https://github.com/szegedai/SemanticBackdoorDetection/blob/HEAD/models/resnetmod_ulp.py","link_basis":"plan_row","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":"160bb14bd76201b4"}},{"code_sha256_prefix":"a55348359ff9d8f1","entry":"PreActResNet18","repo":"szegedai/SemanticBackdoorDetection","repo_kind":"found_in_text","path":"models/preact_resnet.py","file_url":"https://github.com/szegedai/SemanticBackdoorDetection/blob/HEAD/models/preact_resnet.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":"a55348359ff9d8f1"}},{"code_sha256_prefix":"8b5ea9c05fcaa68e","entry":"filter_labels","repo":"szegedai/SemanticBackdoorDetection","repo_kind":"found_in_text","path":"model_distillation.py","file_url":"https://github.com/szegedai/SemanticBackdoorDetection/blob/HEAD/model_distillation.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":"8b5ea9c05fcaa68e"}},{"code_sha256_prefix":"02ce38cdc4382eee","entry":"filter_labels","repo":"szegedai/SemanticBackdoorDetection","repo_kind":"found_in_text","path":"visualize_layer.py","file_url":"https://github.com/szegedai/SemanticBackdoorDetection/blob/HEAD/visualize_layer.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":"02ce38cdc4382eee"}},{"code_sha256_prefix":"2fc3d11ecded5622","entry":"filter_labels_every","repo":"szegedai/SemanticBackdoorDetection","repo_kind":"found_in_text","path":"model_distillation.py","file_url":"https://github.com/szegedai/SemanticBackdoorDetection/blob/HEAD/model_distillation.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":"2fc3d11ecded5622"}},{"code_sha256_prefix":"5d3cb8f7bb33ab0d","entry":"filter_samples","repo":"szegedai/SemanticBackdoorDetection","repo_kind":"found_in_text","path":"visualize_layer.py","file_url":"https://github.com/szegedai/SemanticBackdoorDetection/blob/HEAD/visualize_layer.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":"5d3cb8f7bb33ab0d"}},{"code_sha256_prefix":"add6275036b004d3","entry":"kld_loss","repo":"szegedai/SemanticBackdoorDetection","repo_kind":"found_in_text","path":"model_distillation.py","file_url":"https://github.com/szegedai/SemanticBackdoorDetection/blob/HEAD/model_distillation.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":"add6275036b004d3"}},{"code_sha256_prefix":"a753873103fc3d1a","entry":"normalize_data","repo":"szegedai/SemanticBackdoorDetection","repo_kind":"found_in_text","path":"visualize_layer.py","file_url":"https://github.com/szegedai/SemanticBackdoorDetection/blob/HEAD/visualize_layer.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":"a753873103fc3d1a"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.LG","source":"arxiv_2026.jsonl"},"syntology_extracted_results":null}