{"url":"/method/crossvit","slug":"crossvit","name":"CrossViT","full_name":"CrossViT","full_name_withheld":false,"description_markdown":"**CrossViT** is a type of [vision transformer](https://paperswithcode.com/method/vision-transformer) that uses a dual-branch architecture to extract multi-scale feature representations for image classification. The architecture combines image patches (i.e. tokens in a [transformer](https://paperswithcode.com/method/transformer)) of different sizes to produce stronger visual features for image classification. It processes small and large patch tokens with two separate branches of different computational complexities and these tokens are fused together multiple times to complement each other.\r\n\r\nFusion is achieved by an efficient [cross-attention module](https://paperswithcode.com/method/cross-attention-module), in which each transformer branch creates a non-patch token as an agent to exchange information with the other branch by attention. This allows for linear-time generation of the attention map in fusion instead of quadratic time otherwise.","description_state":"present","introduced_year":null,"introduced_by":{"title":"CrossViT: Cross-Attention Multi-Scale Vision Transformer for Image Classification","paper":"/paper/2103-14899","first_author":"Chun-Fu Chen","n_authors":3,"url_abs":null,"archive_paper_url":"https://paperswithcode.com/paper/2103-14899"},"source":{"url":"https://arxiv.org/abs/2103.14899v2","title":"CrossViT: Cross-Attention Multi-Scale Vision Transformer for Image Classification","url_on_a_paper_host":true},"code_snippet_url":"https://github.com/lucidrains/vit-pytorch/blob/22da26fa4b7d98c2a936b48c1b1dcf83c404dfb8/vit_pytorch/cross_vit.py#L205","code_snippet_url_on_a_code_host":true,"categories":[{"area":"Computer Vision","area_id":"computer-vision","collection":"Image Models","url":"/methods/category/image-models","pwc_aliases":[]},{"area":"Computer Vision","area_id":"computer-vision","collection":"Vision Transformers","url":"/methods/category/vision-transformers","pwc_aliases":["vision-transformer"]}],"n_papers_tagged":3,"archive_num_papers":3,"papers_newest_first":[{"paper":"/paper/maskedfusion360-reconstruct-lidar-data-by","title":"MaskedFusion360: Reconstruct LiDAR Data by Querying Camera Features","date":"2023-06-12","arxiv_id":"2306.07087","n_code_links":1,"syntology":null},{"paper":"/paper/joint-rotational-invariance-and-adversarial","title":"Joint rotational invariance and adversarial training of a dual-stream Transformer yields state of the art Brain-Score for Area V4","date":"2022-03-08","arxiv_id":"2203.06649","n_code_links":1,"syntology":null},{"paper":"/paper/2103-14899","title":"CrossViT: Cross-Attention Multi-Scale Vision Transformer for Image Classification","date":"2021-03-27","arxiv_id":"2103.14899","n_code_links":15,"syntology":{"ran":17,"of":26,"unverified":9,"pointer_only":0}}],"papers_shown":3,"tasks":[{"task":"/task/adversarial-robustness","name":"Adversarial Robustness","papers":1},{"task":"/task/classification","name":"General Classification","papers":1},{"task":"/task/image-classification","name":"Image Classification","papers":1},{"task":"/task/sensor-fusion","name":"Sensor Fusion","papers":1},{"task":"/task/image-classification","name":"image-classification","papers":1}],"tasks_shown":5,"n_tasks":5,"usage_by_year":[{"year":"2021","papers":1},{"year":"2022","papers":1},{"year":"2023","papers":1}],"row_source":"methods_table","archive":{"source":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","archive_url":"https://paperswithcode.com/method/crossvit"},"syntology_read_at":"2026-09-24T18:15:14+00:00"}