{"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/positional-encoding-generator","slug":"positional-encoding-generator","name":"Positional Encoding Generator","full_name":"Positional Encoding Generator","full_name_withheld":false,"description_markdown":"**Positional Encoding Generator**, or **PEG**, is a module used in the [Conditional Position Encoding](https://paperswithcode.com/method/conditional-positional-encoding) position embeddings. It dynamically produce the positional encodings conditioned on the local neighborhood of an input token. To condition on the local neighbors, we first reshape the flattened input sequence $X \\in \\mathbb{R}^{B \\times N \\times C}$ of DeiT back to $X^{\\prime} \\in \\mathbb{R}^{B \\times H \\times W \\times C}$ in the 2 -D image space. Then, a function (denoted by $\\mathcal{F}$ in the Figure) is repeatedly applied to the local patch in $X^{\\prime}$ to produce the conditional positional encodings $E^{B \\times H \\times W \\times C} .$ PEG can be efficiently implemented with a 2-D convolution with kernel $k(k \\geq 3)$ and $\\frac{k-1}{2}$ zero paddings. Note that the zero paddings here are important to make the model be aware of the absolute positions, and $\\mathcal{F}$ can be of various forms such as separable convolutions and many others.","description_state":"present","introduced_year":null,"introduced_by":{"title":"Conditional Positional Encodings for Vision Transformers","paper":"/paper/do-we-really-need-explicit-position-encodings","first_author":"Xiangxiang Chu","n_authors":5,"url_abs":null,"archive_paper_url":"https://paperswithcode.com/paper/do-we-really-need-explicit-position-encodings"},"source":{"url":"https://arxiv.org/abs/2102.10882v3","title":"Conditional Positional Encodings for Vision Transformers","url_on_a_paper_host":true},"code_snippet_url":null,"code_snippet_url_on_a_code_host":false,"categories":[{"area":"General","area_id":"general","collection":"Miscellaneous Components","url":"/methods/category/miscellaneous-components","pwc_aliases":[]}],"n_papers_tagged":8,"archive_num_papers":8,"papers_newest_first":[{"paper":"/paper/writevit-handwritten-text-generation-with","slug":"writevit-handwritten-text-generation-with","title":"WriteViT: Handwritten Text Generation with Vision Transformer","date":"2025-05-19","arxiv_id":"2505.13235","n_code_links":1,"syntology":null},{"paper":"/paper/cbramod-a-criss-cross-brain-foundation-model","slug":"cbramod-a-criss-cross-brain-foundation-model","title":"CBraMod: A Criss-Cross Brain Foundation Model for EEG Decoding","date":"2024-12-10","arxiv_id":"2412.07236","n_code_links":1,"syntology":{"ran":2,"of":5,"n_ran_checked":1,"n_instrument":1,"unverified":3,"pointer_only":0,"phrase":"2 ran (of which 0 constructed an object rather than computing a result; 1 with no instrument failure: 0 honoured, 0 violated, 1 with no contract checked; 1 where Syntology's instrument failed) · 3 unverified","official":{"repos":["wjq-learning/cbramod"],"state":"official (archive's flag): 2 ran","n_ran":2,"n_constructed":0,"n_ran_no_instrument_failure":1,"n_unverified":3,"ran_from_kinds":["official"]}}},{"paper":"/paper/serialized-point-mamba-a-serialized-point","slug":"serialized-point-mamba-a-serialized-point","title":"Serialized Point Mamba: A Serialized Point Cloud Mamba Segmentation Model","date":"2024-07-17","arxiv_id":"2407.12319","n_code_links":0,"syntology":null},{"paper":"/paper/csta-cnn-based-spatiotemporal-attention-for","slug":"csta-cnn-based-spatiotemporal-attention-for","title":"CSTA: CNN-based Spatiotemporal Attention for Video Summarization","date":"2024-05-20","arxiv_id":"2405.11905","n_code_links":1,"syntology":{"ran":7,"of":8,"n_ran_checked":7,"n_instrument":0,"unverified":1,"pointer_only":0,"phrase":"7 ran (of which 7 constructed an object rather than computing a result; 7 with no instrument failure: 0 honoured, 0 violated, 7 with no contract checked; 0 where Syntology's instrument failed) · 1 unverified; every one of the 7 samples that ran constructed an object rather than computing a result","official":{"repos":["thswodnjs3/CSTA"],"state":"official (archive's flag): 7 ran","n_ran":7,"n_constructed":7,"n_ran_no_instrument_failure":7,"n_unverified":1,"ran_from_kinds":["official"]}}},{"paper":"/paper/spectral-convolutional-transformer","slug":"spectral-convolutional-transformer","title":"Heracles: A Hybrid SSM-Transformer Model for High-Resolution Image and Time-Series Analysis","date":"2024-03-26","arxiv_id":"2403.18063","n_code_links":2,"syntology":{"ran":4,"of":4,"n_ran_checked":4,"n_instrument":0,"unverified":0,"pointer_only":4,"phrase":"4 ran (of which 0 constructed an object rather than computing a result; 4 with no instrument failure: 1 honoured, 0 violated, 3 with no contract checked; 0 where Syntology's instrument failed) · 0 unverified","official":{"repos":["badripatro/heracles","badripatro/sct"],"state":"official (archive's flag): 4 ran","n_ran":4,"n_constructed":0,"n_ran_no_instrument_failure":4,"n_unverified":0,"ran_from_kinds":["official"]}}},{"paper":"/paper/v4d-voxel-for-4d-novel-view-synthesis","slug":"v4d-voxel-for-4d-novel-view-synthesis","title":"V4d: voxel for 4d novel view synthesis","date":"2022-05-28","arxiv_id":"2205.14332","n_code_links":1,"syntology":null},{"paper":"/paper/twins-revisiting-spatial-attention-design-in","slug":"twins-revisiting-spatial-attention-design-in","title":"Twins: Revisiting the Design of Spatial Attention in Vision Transformers","date":"2021-04-28","arxiv_id":"2104.13840","n_code_links":9,"syntology":{"ran":2,"of":2,"n_ran_checked":0,"n_instrument":2,"unverified":0,"pointer_only":2,"phrase":"2 ran (of which 0 constructed an object rather than computing a result; 0 with no instrument failure: 0 honoured, 0 violated, 0 with no contract checked; 2 where Syntology's instrument failed) · 0 unverified","official":{"repos":["Meituan-AutoML/Twins"],"state":"official (archive's flag): 2 ran","n_ran":2,"n_constructed":0,"n_ran_no_instrument_failure":0,"n_unverified":0,"ran_from_kinds":["official"]}}},{"paper":"/paper/do-we-really-need-explicit-position-encodings","slug":"do-we-really-need-explicit-position-encodings","title":"Conditional Positional Encodings for Vision Transformers","date":"2021-02-22","arxiv_id":"2102.10882","n_code_links":2,"syntology":null}],"papers_shown":8,"papers_order":"date (newest first), then slug","paper_counts":{"archive_papers_tagged":8,"with_a_code_link":7,"where_syntology_ran_a_sample":4,"not_listed_spam_title":0,"listed":8,"listed_where_code_ran":4,"where_syntology_ran_a_sample_split":{"with_a_run_with_no_instrument_failure":3,"every_run_a_failure_of_syntologys_instrument":1,"listed_with_a_run_with_no_instrument_failure":3,"listed_every_run_a_failure_of_syntologys_instrument":1,"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":4,"papers_where_code_ran_first_page":"/method/positional-encoding-generator/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/positional-encoding-generator/papers/ran/1","json":"/method/positional-encoding-generator/papers/ran/1.json","rows":4}],"tasks":[{"task":"/task/semantic-segmentation","name":"Semantic Segmentation","papers":3},{"task":"/task/image-classification","name":"Image Classification","papers":2},{"task":"/task/instance-segmentation","name":"Instance Segmentation","papers":2},{"task":"/task/mamba","name":"Mamba","papers":2},{"task":"/task/3d-instance-segmentation-1","name":"3D Instance Segmentation","papers":1},{"task":"/task/3d-reconstruction","name":"3D Reconstruction","papers":1},{"task":"/task/3d-semantic-segmentation","name":"3D Semantic Segmentation","papers":1},{"task":"/task/automl","name":"AutoML","papers":1},{"task":"/task/classification-1","name":"Classification","papers":1},{"task":"/task/computational-efficiency","name":"Computational Efficiency","papers":1},{"task":"/task/eeg-1","name":"EEG","papers":1},{"task":"/task/eeg-decoding","name":"Eeg Decoding","papers":1},{"task":"/task/classification","name":"General Classification","papers":1},{"task":"/task/handwriting-generation","name":"Handwriting generation","papers":1},{"task":"/task/inductive-bias","name":"Inductive Bias","papers":1},{"task":"/task/lidar-semantic-segmentation","name":"LIDAR Semantic Segmentation","papers":1},{"task":"/task/novel-view-synthesis","name":"Novel View Synthesis","papers":1},{"task":"/task/point-cloud-segmentation","name":"Point Cloud Segmentation","papers":1},{"task":null,"name":"Position","papers":1},{"task":"/task/segmentation","name":"Segmentation","papers":1}],"tasks_shown":20,"n_tasks":29,"usage_by_year":[{"year":"2021","papers":2},{"year":"2022","papers":1},{"year":"2024","papers":4},{"year":"2025","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/positional-encoding-generator"},"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=Positional%20Encoding%20Generator","read_at":"2026-10-05T01:00:34+00:00","query":"Positional Encoding Generator","kind":"method","have":"unknown_name","tier":null,"verified_implementation":null,"level":null,"level_meaning":"the served verification level, per answer; never summed across methods","resolved_to":null,"resolution":null,"resolved_name_differs":false,"absence_asserted":false,"absence_unchecked":null,"no_code_is_about_this_method":false,"subject":null,"archive_paper_arxiv_id":"2102.10882","repositories":null,"retrieve_with":null,"name_competition":{"verdict":"none","may_be_wrong_sense":false,"bearers_found":0,"served":null,"leading_other_bearer":null,"n_other_bearers_listed":0,"note":"Nothing in this corpus is named 'Positional Encoding Generator' -- no method node, no paper announcing it in its title, no expanded form declaring it as an acronym."},"name_competition_text":null,"near_matches":["scale-consistent positional encodings and modified generator architecture","Morlet Positional Encoding","Spline Positional Encoding","Relative Positional Encoding","amplified positional encoding","Algebraic Positional Encodings","Stochastic Positional Encoding","Higher-Order Positional Encodings"],"code_nearby":[],"code_nearby_caption":null,"origin_paper":null,"line":"name not resolved (unknown_name). The lookup matched no method, paper or venue by this name; that asserts nothing about whether code exists.","level_legend":null},"syntology_have_state":"loaded","record_sha256":"376c20995c010df209d101973a9c00a5440d8e6175e0a087391abc495a71905c","record_changed_at":"2026-10-05","record_changed_at_basis":"changed"}