{"about":{"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.","site":"https://codewithpapers.app","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","syntology":{"site":"https://syntology.ai","developers":"https://syntology.ai/developers","mcp":{"server":"https://syntology.ai/mcp","transport":"streamable-http","server_card":"https://syntology.ai/.well-known/mcp/server-card.json","auth":{"type":"trial token, no account","trial_token":"https://syntology.ai/api/oauth/trial/token","method":"POST","docs":"https://syntology.ai/developers"}},"have":"https://syntology.ai/api/graph/have?x=<method, arXiv id or title> (free, answers coverage only)","paper_base":"https://syntology.ai/paper/","atlas_base":"https://app.syntology.ai/?focus="},"machine_readable":[{"url":"https://codewithpapers.app/llms.txt","what":"the machine catalog: every machine-readable file, counted"},{"url":"https://codewithpapers.app/index/manifest.json","what":"paper-to-code index by arXiv id, with Syntology's counts"},{"url":"https://codewithpapers.app/search/manifest.json","what":"site search index (titles, authors) and its files"},{"url":"https://codewithpapers.app/download","what":"bulk files: Syntology's layer, described there"},{"url":"https://codewithpapers.app/build_manifest.json","what":"the build record: inputs, counts, exclusions, probes"}]},"url":"/paper/context-aware-robust-fine-tuning","title":"Context-Aware Robust Fine-Tuning","arxiv_id":"2211.16175","date":"2022-11-29","proceeding":null,"authors":["Xiaofeng Mao","Yuefeng Chen","Xiaojun Jia","Rong Zhang","Hui Xue","Zhao Li"],"abstract":"Contrastive Language-Image Pre-trained (CLIP) models have zero-shot ability of classifying an image belonging to \"[CLASS]\" by using similarity between the image and the prompt sentence \"a [CONTEXT] of [CLASS]\". Based on exhaustive text cues in \"[CONTEXT]\", CLIP model is aware of different contexts, e.g. background, style, viewpoint, and exhibits unprecedented robustness against a wide range of distribution shifts. However, recent works find further fine-tuning of CLIP models improves accuracy but sacrifices the robustness on downstream tasks. We conduct an empirical investigation to show fine-tuning will corrupt the context-aware ability of pre-trained CLIP features. To solve this problem, we propose Context-Aware Robust Fine-tuning (CAR-FT). CAR-FT regularizes the model during fine-tuning to capture the context information. Specifically, we use zero-shot prompt weights to get the context distribution contained in the image. By minimizing the Kullback-Leibler Divergence (KLD) between context distributions induced by original/fine-tuned CLIP models, CAR-FT makes the context-aware ability of CLIP inherited into downstream tasks, and achieves both higher In-Distribution (ID) and Out-Of-Distribution (OOD) accuracy. The experimental results show CAR-FT achieves superior robustness on five OOD test datasets of ImageNet, and meanwhile brings accuracy gains on nine downstream tasks. Additionally, CAR-FT surpasses previous Domain Generalization (DG) methods and gets 78.5% averaged accuracy on DomainBed benchmark, building the new state-of-the-art.","url_abs":"https://arxiv.org/abs/2211.16175v1","url_pdf":"https://arxiv.org/pdf/2211.16175v1.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":[],"tasks":[{"task_slug":"domain-generalization","task_name":"Domain Generalization"},{"task_slug":"sentence","task_name":"Sentence"}],"methods":[{"method_slug":"aware","method_name":"AWARE"},{"method_slug":"clip","method_name":"CLIP"},{"method_slug":"test","method_name":"Test"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/domain-generalization-on-domainnet","task":"Domain Generalization","dataset":"DomainNet","model":"CAR-FT (CLIP, ViT-B/16)","rank_in_archive_order":6,"of":38,"metrics":{"Average Accuracy":"62.5"},"uses_additional_data":true},{"leaderboard":"/sota/domain-generalization-on-imagenet-a","task":"Domain Generalization","dataset":"ImageNet-A","model":"CAR-FT (CLIP, ViT-L/14@336px)","rank_in_archive_order":4,"of":39,"metrics":{"Top-1 accuracy %":"81.5"},"uses_additional_data":true},{"leaderboard":"/sota/domain-generalization-on-imagenet-r","task":"Domain Generalization","dataset":"ImageNet-R","model":"CAR-FT (CLIP, ViT-L/14@336px)","rank_in_archive_order":3,"of":39,"metrics":{"Top-1 Error Rate":"10.3"},"uses_additional_data":true},{"leaderboard":"/sota/domain-generalization-on-imagenet-sketch","task":"Domain Generalization","dataset":"ImageNet-Sketch","model":"CAR-FT (CLIP, ViT-L/14@336px)","rank_in_archive_order":3,"of":20,"metrics":{"Top-1 accuracy":"65.5"},"uses_additional_data":true},{"leaderboard":"/sota/domain-generalization-on-office-home","task":"Domain Generalization","dataset":"Office-Home","model":"CAR-FT (CLIP, ViT-B/16)","rank_in_archive_order":6,"of":45,"metrics":{"Average Accuracy":"85.7"},"uses_additional_data":false},{"leaderboard":"/sota/domain-generalization-on-pacs-2","task":"Domain Generalization","dataset":"PACS","model":"CAR-FT (CLIP, ViT-B/16)","rank_in_archive_order":10,"of":133,"metrics":{"Average Accuracy":"96.8"},"uses_additional_data":false},{"leaderboard":"/sota/domain-generalization-on-terraincognita","task":"Domain Generalization","dataset":"TerraIncognita","model":"CAR-FT (CLIP, ViT-B/16)","rank_in_archive_order":4,"of":30,"metrics":{"Average Accuracy":"61.9"},"uses_additional_data":false},{"leaderboard":"/sota/domain-generalization-on-vlcs","task":"Domain Generalization","dataset":"VLCS","model":"CAR-FT (CLIP, ViT-B/16)","rank_in_archive_order":1,"of":37,"metrics":{"Average Accuracy":"85.5"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2211.16175","atlas_url":"https://app.syntology.ai/?focus=2211.16175","mcp":null,"developers":"https://syntology.ai/developers","held":true,"reason":"arxiv_id_in_atlas","checked_against":{"atlas_ids":549449,"atlas_ids_sha256":"afd72399dafd9906e9062927f70655952385a3d75488558e1f0484e950ab09b7","read_at":"2026-10-05T01:46:21Z"},"agent_calls":[{"tool":"get_citation_path","arguments":{"paper_1":"2211.16175"},"arguments_in":{"paper_2":"another paper's arXiv id or title"},"call":"get_citation_path(paper_1=\"2211.16175\", paper_2=\"…\")"},{"tool":"get_concepts_for_paper","arguments":{"arxiv_id":"2211.16175"},"call":"get_concepts_for_paper(arxiv_id=\"2211.16175\")"}],"by_repo":[],"by_repo_is":"one row per repository in the archive's code links, Syntology's graph links or the samples; samples 0 means no sample is linked to this paper, a statement about Syntology's coverage, not about the repository: with harvested_for_other_papers present, Syntology harvested the repository for that many other papers, and without it, Syntology harvested nothing from it; placed_by_identical_code counts samples whose link records no repository, placed here because identical code was harvested from this repository for another paper; ran counts executions on a synthesized input and instrument counts failures of Syntology's instrument, not of the code"},"code_links_note":"the archive holds no code link for this paper","arxiv_metadata":null,"syntology_extracted_results":null,"record_sha256":"6a9d029689d2e298620be8b3f76e2d933d1b89b94e378db5e2d26ca9c21a7c2b","record_changed_at":"2026-09-28","record_changed_at_basis":"first_hashed"}