{"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":"/method/tnt","slug":"tnt","name":"TNT","full_name":"Transformer in Transformer","full_name_withheld":false,"description_markdown":"[Transformer](https://paperswithcode.com/method/transformer) is a type of self-attention-based neural networks originally applied for NLP tasks. Recently, pure transformer-based models are proposed to solve computer vision problems. These visual transformers usually view an image as a sequence of patches while they ignore the intrinsic structure information inside each patch. In this paper, we propose a novel Transformer-iN-Transformer (TNT) model for modeling both patch-level and pixel-level representation. In each TNT block, an outer transformer block is utilized to process patch embeddings, and an inner transformer block extracts local features from pixel embeddings. The pixel-level feature is projected to the space of patch embedding by a linear transformation layer and then added into the patch. By stacking the TNT blocks, we build the TNT model for image recognition.\r\n\r\nImage source: [Han et al.](https://arxiv.org/pdf/2103.00112v1.pdf)","description_state":"present","introduced_year":null,"introduced_by":{"title":"Transformer in Transformer","paper":"/paper/transformer-in-transformer","first_author":"Kai Han","n_authors":6,"url_abs":null,"archive_paper_url":"https://paperswithcode.com/paper/transformer-in-transformer"},"source":{"url":"https://arxiv.org/abs/2103.00112v3","title":"Transformer in Transformer","url_on_a_paper_host":true},"code_snippet_url":null,"code_snippet_url_on_a_code_host":false,"categories":[{"area":"Computer Vision","area_id":"computer-vision","collection":"Vision Transformers","url":"/methods/category/vision-transformers","pwc_aliases":["vision-transformer"]},{"area":"Computer Vision","area_id":"computer-vision","collection":"Image Model Blocks","url":"/methods/category/image-model-blocks","pwc_aliases":[]},{"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":"Backbone Architectures","url":"/methods/category/backbone-architectures","pwc_aliases":[]},{"area":"Natural Language Processing","area_id":"natural-language-processing","collection":"Transformers","url":"/methods/category/transformers","pwc_aliases":[]}],"n_papers_tagged":12,"archive_num_papers":12,"papers_newest_first":[{"paper":null,"slug":"quadratic-gaussian-splatting-for-efficient","title":"Quadratic Gaussian Splatting for Efficient and Detailed Surface Reconstruction","date":"2024-11-25","arxiv_id":"2411.16392","n_code_links":0,"syntology":null},{"paper":null,"slug":"intensity-field-decomposition-for-tissue","title":"Intensity Field Decomposition for Tissue-Guided Neural Tomography","date":"2024-11-01","arxiv_id":"2411.00900","n_code_links":0,"syntology":null},{"paper":"/paper/towards-minimal-targeted-updates-of-language","slug":"towards-minimal-targeted-updates-of-language","title":"Towards Minimal Targeted Updates of Language Models with Targeted Negative Training","date":"2024-06-19","arxiv_id":"2406.13660","n_code_links":1,"syntology":null},{"paper":null,"slug":"deep-learning-classifier-of-locally-advanced","title":"Swin transformers are robust to distribution and concept drift in endoscopy-based longitudinal rectal cancer assessment","date":"2024-05-06","arxiv_id":"2405.03762","n_code_links":0,"syntology":null},{"paper":null,"slug":"revolutionizing-traffic-sign-recognition","title":"Revolutionizing Traffic Sign Recognition: Unveiling the Potential of Vision Transformers","date":"2024-04-29","arxiv_id":"2404.19066","n_code_links":0,"syntology":null},{"paper":null,"slug":"nested-tnt-hierarchical-vision-transformers","title":"Nested-TNT: Hierarchical Vision Transformers with Multi-Scale Feature Processing","date":"2024-04-20","arxiv_id":"2404.13434","n_code_links":0,"syntology":null},{"paper":null,"slug":"a-mini-block-natural-gradient-method-for-deep","title":"A Mini-Block Fisher Method for Deep Neural Networks","date":"2022-02-08","arxiv_id":"2202.04124","n_code_links":0,"syntology":null},{"paper":"/paper/pyramidtnt-improved-transformer-in","slug":"pyramidtnt-improved-transformer-in","title":"PyramidTNT: Improved Transformer-in-Transformer Baselines with Pyramid Architecture","date":"2022-01-04","arxiv_id":"2201.00978","n_code_links":1,"syntology":null},{"paper":null,"slug":"tnt-attacks-universal-naturalistic","title":"TnT Attacks! Universal Naturalistic Adversarial Patches Against Deep Neural Network Systems","date":"2021-11-19","arxiv_id":"2111.09999","n_code_links":0,"syntology":null},{"paper":"/paper/tree-in-tree-from-decision-trees-to-decision","slug":"tree-in-tree-from-decision-trees-to-decision","title":"Tree in Tree: from Decision Trees to Decision Graphs","date":"2021-10-01","arxiv_id":"2110.00392","n_code_links":1,"syntology":null},{"paper":"/paper/tensor-normal-training-for-deep-learning","slug":"tensor-normal-training-for-deep-learning","title":"Tensor Normal Training for Deep Learning Models","date":"2021-06-05","arxiv_id":"2106.02925","n_code_links":1,"syntology":{"ran":2,"of":3,"n_ran_checked":1,"n_instrument":1,"unverified":1,"pointer_only":3,"phrase":"2 ran (of which 0 constructed an object rather than computing a result; 1 with no instrument failure: 1 honoured, 0 violated, 0 with no contract checked; 1 where Syntology's instrument failed) · 1 unverified","official":{"repos":["renyiryry/tnt_neurips_2021"],"state":"official (archive's flag): 2 ran","n_ran":2,"n_constructed":0,"n_ran_no_instrument_failure":1,"n_unverified":1,"ran_from_kinds":["official"]}}},{"paper":"/paper/transformer-in-transformer","slug":"transformer-in-transformer","title":"Transformer in Transformer","date":"2021-02-27","arxiv_id":"2103.00112","n_code_links":12,"syntology":{"ran":16,"of":24,"n_ran_checked":15,"n_instrument":1,"unverified":8,"pointer_only":5,"phrase":"16 ran (of which 12 constructed an object rather than computing a result; 15 with no instrument failure: 1 honoured, 1 violated, 13 with no contract checked; 1 where Syntology's instrument failed) · 8 unverified","official":{"repos":["huawei-noah/CV-backbones"],"state":"official (archive's flag): 4 ran","n_ran":4,"n_constructed":4,"n_ran_no_instrument_failure":4,"n_unverified":1,"ran_from_kinds":["listed","official"]}}}],"papers_shown":12,"papers_order":"date (newest first), then slug","paper_counts":{"archive_papers_tagged":12,"with_a_code_link":5,"where_syntology_ran_a_sample":2,"not_listed_spam_title":0,"listed":12,"listed_where_code_ran":2,"where_syntology_ran_a_sample_split":{"with_a_run_with_no_instrument_failure":2,"every_run_a_failure_of_syntologys_instrument":0,"listed_with_a_run_with_no_instrument_failure":2,"listed_every_run_a_failure_of_syntologys_instrument":0,"filter":{"states":["a run with no instrument failure","any run, instrument failures included"],"default":"a run with no instrument failure","note":"on the 'only where code ran' pages the default hides, in the browser, the rows where every run was a failure of Syntology's instrument; the second state shows them again. Rows are hidden, never re-ordered; these twins list every row"}},"definition":"distinct papers the archive tags; 'where Syntology ran a sample' counts papers with at least one harvested sample that ran, which is not a correctness claim"},"papers_where_code_ran":2,"papers_where_code_ran_first_page":"/method/tnt/papers/ran/1","papers_where_code_ran_caption":"We ran code from the paper's repository; we did not isolate this method inside it.","pages":[{"order":"ran","page":1,"of":1,"url":"/method/tnt/papers/ran/1","json":"/method/tnt/papers/ran/1.json","rows":2}],"tasks":[{"task":"/task/image-classification","name":"Image Classification","papers":2},{"task":"/task/second-order-methods","name":"Second-order methods","papers":2},{"task":"/task/sentence","name":"Sentence","papers":2},{"task":"/task/3dgs","name":"3DGS","papers":1},{"task":"/task/autonomous-vehicles","name":"Autonomous Vehicles","papers":1},{"task":"/task/deep-learning","name":"Deep Learning","papers":1},{"task":"/task/evolutionary-algorithms","name":"Evolutionary Algorithms","papers":1},{"task":"/task/fine-grained-image-classification","name":"Fine-Grained Image Classification","papers":1},{"task":"/task/image-harmonization","name":"Image Harmonization","papers":1},{"task":"/task/nerf","name":"NeRF","papers":1},{"task":"/task/neural-rendering","name":"Neural Rendering","papers":1},{"task":"/task/surface-reconstruction","name":"Surface Reconstruction","papers":1},{"task":"/task/traffic-sign-recognition","name":"Traffic Sign Recognition","papers":1},{"task":"/task/image-classification","name":"image-classification","papers":1}],"tasks_shown":14,"n_tasks":14,"usage_by_year":[{"year":"2021","papers":4},{"year":"2022","papers":2},{"year":"2024","papers":6}],"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/tnt"},"syntology_read_at":"2026-10-05T00:36:11+00:00","syntology":{"source":"Syntology's have check for this name (the free coverage lookup), read from Syntology's graph","have_url":"https://syntology.ai/api/graph/have?x=TNT","read_at":"2026-10-05T01:03:07+00:00","query":"TNT","kind":"method","have":"declared_code","tier":"repo_known","verified_implementation":false,"level":null,"level_meaning":"the served verification level, per answer; never summed across methods","resolved_to":{"method":"Transformer in Transformer (TNT)","origin_arxiv_id":"2103.00112"},"resolution":"alias","resolved_name_differs":true,"absence_asserted":false,"absence_unchecked":null,"no_code_is_about_this_method":false,"subject":"same_paper","archive_paper_arxiv_id":"2103.00112","repositories":{"listed":5,"in_graph":11,"list_truncated":true,"strongest_link":"official"},"retrieve_with":null,"name_competition":{"verdict":"contested","may_be_wrong_sense":false,"bearers_found":5,"served":{"arxiv_id":"2103.00112","citations":2273},"leading_other_bearer":{"arxiv_id":"2008.08294","title":"TNT: Target-driveN Trajectory Prediction","citations":743,"named_by":["title_prefix"],"bearer_name":"TNT: Target-driveN Trajectory Prediction","ask_with":"have('2008.08294')"},"n_other_bearers_listed":4,"note":"4 other thing(s) here are also called 'TNT', and none of them is cited more than the paper this answer is about. They are listed in `also_named` -- check `served.arxiv_id` is the paper you meant."},"name_competition_text":null,"near_matches":null,"code_nearby":[],"code_nearby_caption":null,"origin_paper":{"arxiv_id":"2103.00112","page":"/paper/transformer-in-transformer","syntology_url":"https://syntology.ai/paper/2103.00112","in_graph_layer":true,"samples":24,"ran":16,"n_ran_checked":15,"n_instrument":1,"unverified":8,"phrase":"16 ran (of which 12 constructed an object rather than computing a result; 15 with no instrument failure: 1 honoured, 1 violated, 13 with no contract checked; 1 where Syntology's instrument failed) · 8 unverified","instrument_means":"failures of Syntology's instrument, not of the code"},"line":"repository known, no verified implementation (declared_code; repositories: 5 listed of 11 in the graph, strongest link: official). The lookup matched a different name in Syntology's graph, 'Transformer in Transformer (TNT)' (resolution: alias); this answer is about that name. This answer is about arXiv:2103.00112, the paper the archive credits with this method.","level_legend":null},"syntology_have_state":"loaded","record_sha256":"e95840e870e637132f9a24d2ad5b7451b258424980ae9577db05d123bb620674","record_changed_at":"2026-10-05","record_changed_at_basis":"changed"}