Term
positional encoding
Meaning
Vectors that encode token position and are combined with the input token representations, so that a model that is otherwise order-agnostic can receive information about token order.
How papers use it 18 papers
On Expressive Power of Floating-Point Transformers
Use Considered as an additive term \(X \oplus [p_1,\dots,p_n]\) in floating-point arithmetic. The paper shows that for any nontrivial choice of position vectors this map is not injective, so some input information can be lost. It also notes that appending a coordinate \((1,\dots,n)\) as an extra dimension keeps the tokens distinct when \([n] \subset \mathbb{F}\), and contrasts this with exact arithmetic, where positional encoding can increase expressive power.
CvT: Introducing Convolutions to Vision Transformers
Use In ViT-style models, positional encoding is summed with the patch tokens to convey coarse spatial layout. CvT does not add an ad-hoc position embedding to its tokens; the paper argues that the convolutions supply local spatial information, so the positional encoding can be dropped without degrading performance.
Meaning A learned or fixed signal added to token embeddings so that a Transformer can account for where each token lies in the input grid. Without it, a standard Transformer treats the tokens as an unordered set.
BARF: Bundle-Adjusting Neural Radiance Fields
Use Used in NeRF as the default input mapping. The paper argues that its frequency-dependent gradient amplification makes camera-pose updates incoherent, which hurts registration. BARF keeps the encoding but scales each frequency band by a weight that ramps from 0 to 1, so that high-frequency bands are gradually activated. Naive full encoding is the setting that the paper compares against in both the 2D and 3D experiments.
Meaning A deterministic mapping that lifts 3D coordinates into a vector containing the raw input and sinusoidal features at several frequency bases. It lets coordinate-based MLPs represent higher-frequency signals.
Fourier Features Let Networks Learn High Frequency Functions in Low Dimensional Domains
Use In this paper it is one of the four compared input mappings in Table 1, alongside no mapping, the basic mapping and the Gaussian mapping. The frequencies are log-linearly spaced for each dimension, and the scale is chosen per task by a hyperparameter sweep. The paper notes that it contains only on-axis frequencies, so it is biased toward data with more frequency content along the axes. The paper generalizes prior uses of this mapping and reports it as beating no mapping in its comparisons, though below the Gaussian variant.
Meaning A deterministic sinusoidal input mapping in which a coordinate is expanded into sine and cosine features at logarithmically spaced frequencies along each coordinate axis. It is used to give neural networks access to high-frequency content.
Unifying Flow, Stereo and Depth Estimation
Use Fixed 2D sine and cosine positional encodings, following DETR, are added to the convolutional features of both images before the Transformer. The same encoding is added to the query and key-value inputs in the symmetric feature enhancement, so that matching depends on spatial distance as well as feature similarity. The authors report that removing it weakens the ambiguity handling of the matching.
Meaning A fixed encoding made of sine and cosine signals that gives each feature location a spatial coordinate. Adding it to feature maps lets an attention or matching operation take spatial position into account, not only feature appearance.
NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis
Use Each location and direction component is expanded with L frequencies before entering the MLP.
Meaning Mapping a coordinate to sine and cosine features at increasing frequencies so that a network can represent fine variation.
Qwen3-VL Technical Report
Use In Qwen2.5-VL the paper used MRoPE as a unified positional encoding scheme for text and vision. Qwen3-VL builds on this scheme and changes how it is applied, as described in the paper's architecture sections.
Meaning A mechanism that encodes the position of each token in a sequence so that a model can take order and location into account. In multimodal models it provides position information for both text tokens and visual tokens.
ProSST: Protein Language Modeling with Quantized Structure and Disentangled Attention
Use In ProSST, relative position embeddings are included as a separate term in the disentangled attention alongside residue and structure terms. The paper reports that positional encoding is necessary in its design, since removing it lowers performance in the ablation.
Meaning An embedding that encodes the position of a token within a sequence, so that attention can account for order or distance between tokens. In relative variants it represents the offset between two positions rather than an absolute index.
Conformer: Convolution-augmented Transformer for Speech Recognition
Use Used inside the multi-headed self-attention module of the Conformer, adopted from Transformer-XL, and implemented as relative positional embedding within the pre-norm residual unit. The authors state that it helps the encoder generalize to different input lengths and makes it more robust to variation in utterance length. In the ablation on the small-to-large model, removing it raises the test-other WER from 4.3 to 5.6 without the external language model.
Meaning A positional encoding scheme that injects position information into a sequence model by encoding the relative distance between positions rather than absolute indices. The relative sinusoidal variant uses sinusoidal functions of these offsets, letting attention depend on how far apart two frames are.
ReRead: Wrong Predictions, Useful Representations - Correcting Frozen Robot Policies by Re-reading Their Own Representations
Use In the corrector's cross-attention, the keys are the content vectors plus this encoding, while the values are the content vectors alone. Matching therefore uses both content and position, but only content is retrieved.
Meaning A position signal added to the tokens of a cache that encodes where each token comes from, such as its source layer, camera, modality, spatial or action position, and its cache age. The signal is combined with the token content to support matching.
Neural Articulated Radiance Field
Use Applied to the 3D location and the viewing direction before they enter the radiance field network, so the NeRF-style model can capture fine detail. In the paper, the encoded location and encoded view direction are the inputs that carry the spatial and viewing information of the radiance field.
Meaning A fixed encoding that maps a scalar input to a vector of sine and cosine values at several frequencies, which lets a coordinate-based network represent high-frequency detail.
DONeRF: Towards Real-Time Rendering of Compact Neural Radiance Fields using Depth Oracle Networks
Use Applied to the sample positions, after they are transformed into a view-cell-local frame, before they are fed into the shading network. The paper applies this encoding equally to foreground and background, and warps the space before encoding so that background content is dampened, and it feeds NDC samples into this encoding in the NDC sampling variant.
Meaning An encoding that maps input coordinates to a higher-dimensional feature vector, typically with sine and cosine functions of several frequencies, so that a neural network can represent high-frequency detail more easily.
Transformers in Time Series: A Survey
Use The survey groups time series Transformers by how they encode position into three kinds: vanilla fixed encodings, learnable encodings (such as a learned embedding per position or an LSTM-based encoding), and timestamp encodings that use calendar or event time information through learnable embedding layers. Informer, Autoformer and FEDformer are cited as using timestamp encoding.
Meaning A vector added to the input embeddings of a Transformer so that the model can use the order of the sequence elements. The vanilla form is a fixed sinusoidal function of the position index, with sine values for even dimensions and cosine values for odd dimensions, scaled by a hand-set frequency per dimension.
Segment Anything in Medical Images
Use In MedSAM's prompt encoder, the corner points of each bounding box are mapped into 256-dimensional embeddings, with each box represented by an embedding of its top-left corner and one of its bottom-right corner. This turns the user-drawn box into features that the mask decoder can use.
Meaning A way of encoding coordinates or positions as a vector of features so that a neural network can represent where something lies in an image.
BEHRT: Transformer for Electronic Health Records
Use Pre-determined encodings tell BEHRT where each diagnosis falls in a patient history.
Meaning A signal added to each token so that a model without recurrence can tell where each token sits in a sequence.
Mip-NeRF: A Multiscale Representation for Anti-Aliasing Neural Radiance Fields
Use Serves as NeRF's input feature for each sampled point along a ray. The paper treats it as a point-sampled feature that ignores the size of the region each sample represents, which is what integrated positional encoding is designed to fix. The number of frequency levels is a hyperparameter in NeRF that Mip-NeRF's IPE aims to make unnecessary to tune.
Meaning An encoding that maps a 3D position to sine and cosine values of each coordinate at frequencies that are powers of two, up to a chosen number of frequency levels. It lets an MLP represent high-frequency detail.
YOLOv12: Attention-Centric Real-Time Object Detectors
Use Removed from the YOLOv12 attention design to keep the model fast and simple. In place of it, the paper adds a large separable convolution, called the Position Perceiver, to help area attention capture position. In the N-scale position embedding diagnostics, the variant with no positional embedding is reported as the best-performing configuration, with lower latency than the relative and absolute alternatives.
Meaning A mechanism that adds information about each token's location to a transformer's input or attention computation, so that the model can distinguish spatial or sequential order.
Are Transformers Effective for Time Series Forecasting?
Use Used in Transformer-based LTSF models to preserve part of the ordering information. The authors argue that this is not sufficient, because temporal information is still lost after self-attention is applied on top of the positional signals.
Meaning A technique that adds position-dependent signals to the input tokens of a Transformer so that the model can access some ordering information that attention alone would ignore.