Manuscript Offprint

arXiv:2610.28284

HRoPE: Homography Relative Positional Encoding

Huachen Gao, Yang Yang, Xiaoqian Liang, Xingyu Chen, Youjia Zhang, Qi Zhang, Baorui Ma, Anpei Chen, Wei Yang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Geometric Relative Positional Encoding has become the primary mechanism for injecting spatial inductive biases into multi-view transformers. Existing designs condition attention on camera-level frustums or ray-marched depth, associating cross-view tokens through the sensor geometry. Such sensor-centric formulations, however, describe only where a token is observed from, leaving the rich surface geometry of the scene region depicted by the token. In this paper, we advocate a shift toward surface-aware positional encoding that explicitly grounds patch tokens in the geometry of physical surfaces. We introduce HRoPE, which represents the local geometry of each patch as a slanted 3D plane, following the slanted support-window assumption of classical multi-view stereo. We inject token-level, plane-induced homographies into attention as relative transformations. This equips the transformer with a geometric prior for rectifying perspective distortions and aligning patch features across viewpoints. Our encoding requires no ground-truth geometry: the plane parameters can be predicted end-to-end under a view-synthesis objective alone, or derived from foundation models. Extensive experiments on RealEstate10K, CO3Dv2, and DL3DV show that our best variant of HRoPE consistently outperforms the evaluated geometric positional encodings for novel view synthesis. Extensive ablations and analysis show the effectiveness of the proposed encoding. Please refer to our project page at: https://gaohchen.github.io/HRoPE.

1 INTRODUCTION

The Transformer has become the de facto architecture for recent feed-forward 3D vision (Wang et al., 2024; 2025; Jin et al., 2025). By tokenizing images from multiple viewpoints and exchanging information via attention, these models exhibit strong capabilities in jointly resolving appearance, visibility, and scene geometry. Attention, however, is permutation-equivariant: it operates on unordered sets and is inherently agnostic to the camera poses, metric scales, and epipolar constraints that couple multi-view observations. Consequently, geometric priors must be explicitly injected, either by conditioning token representations directly (e.g., via camera tokens (Wang et al., 2025) or ray maps (Jin et al., 2025; Zhang et al., 2024a)) or by imposing epipolar constraints on attention (He et al., 2020; Charatan et al., 2024; Ye et al., 2024). Positional encoding (PE) introduces geometric structure directly into attention by modulating pairwise token comparisons.

While existing PE designs exhibit increasing geometric fidelity by using priors from images, cameras, and rays, they invariably anchor positional information to the sensor. RoPE extensions (Su et al., 2024) encode 2D intra-view offsets, leaving inter-view transformations implicit (Weinzaepfel et al., 2023; Wang et al., 2024). GTA (Miyato et al., 2024) and CaPE (Kong et al., 2024) inject relative camera extrinsics to achieve invariance to global rigid motions, while PRoPE (Li et al., 2025) generalizes this to the full projection matrix. Ray-based formulations like RayRoPE (Wu et al., 2026) and URoPE (Xie et al., 2026) integrate depth by localizing patches along viewing rays and

∗^{*}These authors contributed equally.

†^{\dagger}Corresponding authors.

Sensor-centric

Surface-aware

Figure

Figure 1: From sensor-centric to surface-aware geometric positional encoding. Left: PRoPE (Li et al., 2025) assigns every token in a view the same camera projection P=K[R∣t]P = K[R \mid t]. Middle: RayRoPE (Wu et al., 2026) predicts a depth dd for each token and places it at a 3D point X along the camera ray, but does not model local surface orientation. Right: HRoPE associates each patch with a slanted tangent plane and relates token pairs through the plane-induced homography Hi,uHj,v−1H_{i,u}H_{j,v}^{-1} (Eq. 2), thereby encoding both depth and local surface orientation in the attention comparison.

re-projecting into the query frame. Across this progression, geometry is parameterized via sensor-centric abstractions: an image coordinate, a camera frustum, or a point of ray termination, leaving the rich local surface structure of the underlying scene unmodeled (see Fig. 1, left and middle).

This limitation is fundamental because multi-view matching does not compare isolated points; it compares local neighborhoods whose appearances are related through surface-induced deformations. A patch in one view and its corresponding patch in another are connected by a warp determined by the underlying surface geometry, and reliable correspondence requires compensating for this warp before comparing visual features. Given the pixel location and camera geometry, depth locates the patch center, while surface orientation additionally determines how its surrounding neighborhood deforms across views. By providing only view or positional information, existing PEs implicitly impose a fronto-parallel assumption on the attention computation mechanism. Although large neural models can learn to compensate for this bias given sufficient training data, doing so compromises efficiency and generalization. We argue that surface orientation is the missing degree of freedom: current PEs capture the zeroth-order position of a patch but neglect the first-order local orientation that dictates its cross-view appearance transformation.

To this end, we present HRoPE, a Homography Relative Positional Encoding that embeds orientation-aware rectification directly into the attention mechanism (Fig. 1, right). Inspired by the slanted support windows of classical multi-view stereo (Bleyer et al., 2011; Wang et al., 2021a), HRoPE anchors a local tangent plane to each patch token. We use the plane normal and distance, together with the camera poses, to define the homography governing cross-view neighborhood deformations. Concretely, we apply a per-patch 3×33 \times 3 transformation block-diagonally to the queries, keys, and values, and incorporate a closed-form inverse into the key projection so that the resulting attention logits depend exclusively on the relative homography between tokens. As we show in Sec. 3.2 and Appendix A.2, this mechanism acts as an in-attention analogue of computing a matching score only after both neighborhoods have been rectified onto a shared tangent plane. Consequently, whereas prior geometric PEs merely encode where a token is located, HRoPE explicitly models how its underlying surface transforms across views. This formulation offers two compelling advantages. First, HRoPE strictly generalizes point- and ray-based PEs: when a predicted normal aligns with the viewing direction, the induced transformation naturally reduces to the fronto-parallel case. Second, the per-patch transformation parameters can be regressed from patch features by a lightweight head trained jointly with the view-synthesis model, using the view-synthesis objective alone. The head can optionally use pretrained features from DINOv2 (Oquab et al., 2024) or VGGT (Wang et al., 2025), without changing the encoding formulation or training objective.

We validate HRoPE on feed-forward novel view synthesis (NVS) across the RealEstate10K (Zhou et al., 2018), CO3Dv2 (Reizenstein et al., 2021), and DL3DV (Ling et al., 2024) datasets, where it consistently outperforms view-, projection-, and ray-based encodings. Notably, HRoPE surpasses PRoPE on RealEstate10K without ground-truth camera poses, demonstrating that per-patch homography is a stronger prior than view-level projection. Furthermore, our ablations show that this geometry must condition token interactions multiplicatively, injecting the same information as additive features sharply degrades performance. Finally, HRoPE improves generalization to unseen zooms and wider baselines, supporting its role as a geometric inductive bias. Beyond NVS, HRoPE transfers unchanged to a multi-view diffusion model and to the visual tokens of a spatial reasoning MLLM, improving performance on both tasks (Appendix A.6).

We summarize our main contributions as follows:

  1. We formulate the principle of surface-aware positional encoding, positioning local 3D surface geometry as the natural anchor for comparing patch neighborhoods across views.

  2. We propose HRoPE, a per-patch relative encoding that uses plane-induced transforms with closed-form inverses to condition attention logits on relative cross-view homographies.

  3. We demonstrate consistent improvements over the evaluated geometric positional encodings on multiple NVS benchmarks and under out-of-distribution view settings. Controlled ablations analyze the roles of transformation structure, local geometry, and feature source, supporting the benefit of the homography inductive bias.

References (62)

  • Reconstructing scenes with an autoregressive structured language model
  • Qwen2.5-VL Technical Report
  • Patchmatch: A randomized correspondence algorithm for structural image editing
  • Patchmatch stereo-stereo matching with slanted support windows
  • pixelsplat: 3d gaussian splats from image pairs for scalable generalizable 3d reconstruction
  • Mvsnerf: Fast generalizable radiance field reconstruction from multi-view stereo
  • Mvsplat: Efficient 3d gaussian splatting from sparse multi-view images
  • Longvila: Scaling long-context visual language models for long videos
  • Scaling up vision foundation models and aligning for generic visual-linguistic tasks
  • Scannet: Richly-annotated 3d reconstructions of indoor scenes
  • Objaverse: A universe of annotated 3d objects
  • Vlm-3r: Vision-language models augmented with instruction-aligned 3d reconstruction
  • Rore: Rotary ray embedding for generalised multi-modal scene understanding
  • Cascade cost volume for high-resolution multi-view stereo and stereo matching
  • Multiple view geometry in computer vision
  • Epipolar transformers
  • Lrm: Large reconstruction model for single image to 3d
  • GPT-4o System Card
  • A self-supervised large view synthesis model
  • Lvsm: A large view synthesis model with minimal 3d inductive bias
  • Eschernet: A generative model for scalable view synthesis
  • LLaVA-OneVision: Easy Visual Task Transfer
  • Rerope: Repurposing rope for relative camera control (opens arXiv in a new tab)
  • Cameras as relative positional encoding
  • Depth Anything 3: Recovering the Visual Space from Any Views
  • Vila: On pre-training for visual language models
  • A large-scale scene dataset for deep learning-based 3d vision
  • Petr: Position embedding transformation for multi-view 3d object detection
  • You see it, you got it: Learning 3d creation on pose-free videos at scale
  • Deeper understanding of the homography decomposition for vision-based control
  • Gta: A geometry-aware attention mechanism for multi-view transformers
  • TMLR, 2024
  • Common objects in 3d: Large-scale learning and evaluation of real-life 3d category reconstruction
  • Scene representation transformer: Geometry-free novel view synthesis through set-latent scene representations
  • Self-attention with relative position representations
  • Adjustment of an inverse matrix corresponding to a change in one element of a given matrix
  • Light field networks: Neural scene representations with single-evaluation rendering
  • Roformer: Enhanced transformer with rotary position embedding
  • Light field neural rendering
  • Gemini 1.5: Unlocking multimodal understanding across millions of tokens of context
  • Grf: Learning a general radiance field for 3d representation and rendering
  • Patch-matchnet: Learned multi-view patchmatch stereo
  • Vggt: Visual geometry grounded transformer
  • Ibrnet: Learning multi-view image-based rendering
  • Dust3r: Geometric 3d vision made easy
  • Image quality assessment: from error visibility to structural similarity
  • Croco v2: Improved cross-view completion pre-training for stereo matching and optical flow
  • Spatial-mllm: Boosting mllm capabilities in visual-based spatial intelligence (opens arXiv in a new tab)
  • Rayrope: Projective ray positional encoding for multi-view attention
  • Urope: Universal relative position embedding across geometric spaces
  • Thinking in space: How multimodal large language models see, remember, and recall spaces
  • Mvsnet: Depth inference for unstructured multi-view stereo
  • Consistent-1-to-3: Consistent image to 3d view synthesis via geometry-aware diffusion models
  • pixelnerf: Neural radiance fields from one or few images
  • Unified camera positional encoding for controlled video generation
  • Gs-lrm: Large reconstruction model for 3d gaussian splatting
  • Long context transfer from language to vision (opens arXiv in a new tab)
  • The unreasonable effectiveness of deep features as a perceptual metric
  • Llava-video: Video instruction tuning with synthetic data (opens arXiv in a new tab)
  • Stereo magnification: Learning view synthesis using multiplane images (opens arXiv in a new tab)
  • On the continuity of rotation representations in neural networks
  • High-fidelity 3d textured shapes generation by sparse encoding and adversarial decoding