{"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-2605-16372","title":"SwordBench: Evaluating Orthogonality of Steering Image Representations","arxiv_id":"2605.16372","date":"2026-05-10","proceeding":null,"authors":["Vladimir Zaigrajew","Dawid Pludowski","Hubert Baniecki","Przemyslaw Biecek"],"abstract":"Steering or intervening on model representations at inference time to correct predictions is essential for AI interpretability and safety, yet existing evaluation protocols are limited to ambiguous language modeling tasks. To address this gap, we introduce SwordBench, a benchmark for steering image representations of vision models across multiple backbones and concept removal tasks. Beyond a unified benchmarking suite, we propose new evaluation notions that uncover the second-order effects of orthogonalization among concept activation vectors for pragmatic steering. Specifically, cross-concept robustness measures the stability of concept detection performance across inputs orthogonalized against alternative concepts, and collateral damage quantifies whether steering inadvertently affects model performance on a downstream task for inputs lacking the bias. We find that although a linear support vector machine exhibits superior separability and orthogonality, it fails to achieve zero collateral damage, often trailing sparse autoencoders. In simpler regimes, both standard baselines and optimization-based methods fail to achieve perfect steering. The source code will be made available soon on GitHub.","url_abs":"https://arxiv.org/abs/2605.16372","url_pdf":"https://arxiv.org/pdf/2605.16372","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":{"atlas_url":null,"mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2605.16372"}},"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/openai/CLIP","reach":{"status":"unanswered"}},{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/Weixin-Liang/MetaShift","reach":null}],"summary":{"ran_draft_wrong":7,"ran_fixture":1,"ran":6,"unverified":7},"by_repo_kind":{"found_in_text":{"samples":21,"ran":14,"repositories":2}},"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":"ce7990d7ad5821ff","entry":"Classifier","repo":"Weixin-Liang/MetaShift","repo_kind":"found_in_text","path":"experiments/distribution_shift/networks.py","file_url":"https://github.com/Weixin-Liang/MetaShift/blob/HEAD/experiments/distribution_shift/networks.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ce7990d7ad5821ff"}},{"code_sha256_prefix":"a5e37b0cab1cbb28","entry":"accuracy","repo":"Weixin-Liang/MetaShift","repo_kind":"found_in_text","path":"experiments/distribution_shift/main_generalization.py","file_url":"https://github.com/Weixin-Liang/MetaShift/blob/HEAD/experiments/distribution_shift/main_generalization.py","link_basis":"plan_row","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a5e37b0cab1cbb28"}},{"code_sha256_prefix":"3e901c4ed59c9f3a","entry":"build_subset_graph","repo":"Weixin-Liang/MetaShift","repo_kind":"found_in_text","path":"dataset/generate_full_MetaShift.py","file_url":"https://github.com/Weixin-Liang/MetaShift/blob/HEAD/dataset/generate_full_MetaShift.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3e901c4ed59c9f3a"}},{"code_sha256_prefix":"e4b64902dbab5592","entry":"default_hparams","repo":"Weixin-Liang/MetaShift","repo_kind":"found_in_text","path":"experiments/distribution_shift/hparams_registry.py","file_url":"https://github.com/Weixin-Liang/MetaShift/blob/HEAD/experiments/distribution_shift/hparams_registry.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e4b64902dbab5592"}},{"code_sha256_prefix":"b190c86e12304666","entry":"get_all_nodes_in_dataset","repo":"Weixin-Liang/MetaShift","repo_kind":"found_in_text","path":"dataset/domain_generalization_cat_dog.py","file_url":"https://github.com/Weixin-Liang/MetaShift/blob/HEAD/dataset/domain_generalization_cat_dog.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b190c86e12304666"}},{"code_sha256_prefix":"d919ae32e5e4e616","entry":"get_pairs","repo":"openai/CLIP","repo_kind":"found_in_text","path":"clip/simple_tokenizer.py","file_url":"https://github.com/openai/CLIP/blob/HEAD/clip/simple_tokenizer.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d919ae32e5e4e616"}},{"code_sha256_prefix":"5f576ed342c48a0a","entry":"make_weights_for_balanced_classes","repo":"Weixin-Liang/MetaShift","repo_kind":"found_in_text","path":"experiments/distribution_shift/misc.py","file_url":"https://github.com/Weixin-Liang/MetaShift/blob/HEAD/experiments/distribution_shift/misc.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5f576ed342c48a0a"}},{"code_sha256_prefix":"27de4aa52fde48b8","entry":"node_str_to_subject_tag","repo":"Weixin-Liang/MetaShift","repo_kind":"found_in_text","path":"experiments/distribution_shift/main_generalization.py","file_url":"https://github.com/Weixin-Liang/MetaShift/blob/HEAD/experiments/distribution_shift/main_generalization.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"27de4aa52fde48b8"}},{"code_sha256_prefix":"4bf7300ac8e005e7","entry":"parse_node_str","repo":"Weixin-Liang/MetaShift","repo_kind":"found_in_text","path":"dataset/generate_full_MetaShift.py","file_url":"https://github.com/Weixin-Liang/MetaShift/blob/HEAD/dataset/generate_full_MetaShift.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4bf7300ac8e005e7"}},{"code_sha256_prefix":"b3a2e4269ad831cc","entry":"random_hparams","repo":"Weixin-Liang/MetaShift","repo_kind":"found_in_text","path":"experiments/distribution_shift/hparams_registry.py","file_url":"https://github.com/Weixin-Liang/MetaShift/blob/HEAD/experiments/distribution_shift/hparams_registry.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b3a2e4269ad831cc"}},{"code_sha256_prefix":"4fa2b54178fcc1df","entry":"random_pairs_of_minibatches","repo":"Weixin-Liang/MetaShift","repo_kind":"found_in_text","path":"experiments/distribution_shift/algorithms.py","file_url":"https://github.com/Weixin-Liang/MetaShift/blob/HEAD/experiments/distribution_shift/algorithms.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4fa2b54178fcc1df"}},{"code_sha256_prefix":"196cab71d7129d62","entry":"remove_batch_norm_from_resnet","repo":"Weixin-Liang/MetaShift","repo_kind":"found_in_text","path":"experiments/distribution_shift/networks.py","file_url":"https://github.com/Weixin-Liang/MetaShift/blob/HEAD/experiments/distribution_shift/networks.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"196cab71d7129d62"}},{"code_sha256_prefix":"18e820e42046bc45","entry":"split_dataset","repo":"Weixin-Liang/MetaShift","repo_kind":"found_in_text","path":"experiments/distribution_shift/misc.py","file_url":"https://github.com/Weixin-Liang/MetaShift/blob/HEAD/experiments/distribution_shift/misc.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"18e820e42046bc45"}},{"code_sha256_prefix":"9542161e9640b858","entry":"whitespace_clean","repo":"openai/CLIP","repo_kind":"found_in_text","path":"clip/simple_tokenizer.py","file_url":"https://github.com/openai/CLIP/blob/HEAD/clip/simple_tokenizer.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9542161e9640b858"}},{"code_sha256_prefix":"35b902a4c075efc3","entry":"Featurizer","repo":"Weixin-Liang/MetaShift","repo_kind":"found_in_text","path":"experiments/distribution_shift/networks.py","file_url":"https://github.com/Weixin-Liang/MetaShift/blob/HEAD/experiments/distribution_shift/networks.py","link_basis":"plan_row","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":"35b902a4c075efc3"}},{"code_sha256_prefix":"39e6b23b55f376ea","entry":"build_model","repo":"openai/CLIP","repo_kind":"found_in_text","path":"clip/model.py","file_url":"https://github.com/openai/CLIP/blob/HEAD/clip/model.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":"39e6b23b55f376ea"}},{"code_sha256_prefix":"ac8f33705a95e2de","entry":"draw_subject_set_graph","repo":"Weixin-Liang/MetaShift","repo_kind":"found_in_text","path":"dataset/generate_full_MetaShift.py","file_url":"https://github.com/Weixin-Liang/MetaShift/blob/HEAD/dataset/generate_full_MetaShift.py","link_basis":"plan_row","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":"ac8f33705a95e2de"}},{"code_sha256_prefix":"b0bc80b1655a6802","entry":"get_algorithm_class","repo":"Weixin-Liang/MetaShift","repo_kind":"found_in_text","path":"experiments/distribution_shift/algorithms.py","file_url":"https://github.com/Weixin-Liang/MetaShift/blob/HEAD/experiments/distribution_shift/algorithms.py","link_basis":"plan_row","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":"b0bc80b1655a6802"}},{"code_sha256_prefix":"021a688e5389b8b6","entry":"load","repo":"openai/CLIP","repo_kind":"found_in_text","path":"clip/clip.py","file_url":"https://github.com/openai/CLIP/blob/HEAD/clip/clip.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":"021a688e5389b8b6"}},{"code_sha256_prefix":"af3c9a80c8fd1f7a","entry":"print_row","repo":"Weixin-Liang/MetaShift","repo_kind":"found_in_text","path":"experiments/distribution_shift/misc.py","file_url":"https://github.com/Weixin-Liang/MetaShift/blob/HEAD/experiments/distribution_shift/misc.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":"af3c9a80c8fd1f7a"}},{"code_sha256_prefix":"b4966e51c262718f","entry":"validate","repo":"Weixin-Liang/MetaShift","repo_kind":"found_in_text","path":"experiments/distribution_shift/main_generalization.py","file_url":"https://github.com/Weixin-Liang/MetaShift/blob/HEAD/experiments/distribution_shift/main_generalization.py","link_basis":"plan_row","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":"b4966e51c262718f"}}]},"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}