RayViT: Ray-Conditioned Visual Representations for Viewpoint-Robust Imitation Learning

Qian Wang, Longrui Chen, Peiran Sun, Aleksandar Taranovic, Niklas Freymuth, Ge Li, Weiran Liao, C. F. Maximilian Nagy, Yucheng Tan, Tao Chen, Gerhard NeumannarXiv 2026

TL;DR

RayViT introduces a lightweight way to make robot imitation learning robust to camera shifts by injecting camera geometry directly into pretrained Vision Transformers (ViTs) using Plücker ray maps. By combining patch-level geometric embeddings with a gated cross-attention mechanism, RayViT prevents robotic policies from breaking when cameras are bumped or moved, improving success rates by 13% in simulation and significantly boosting real-world manipulation resilience without requiring extra 3D sensors.

What Problem Does This Paper Address?

Visual imitation learning allows robots to learn complex manipulation skills directly from human demonstrations. Typically, powerful vision foundation models (like DINO) process RGB images to extract semantic features for downstream policies. However, standard RGB images lack explicit geometric context.

Because these models only understand scene appearance and know nothing about the camera's physical relationship to the world, the resulting robotic policies are incredibly brittle. If a camera is slightly bumped, re-mounted, or placed on a moving robot base, the policy often fails completely. Existing solutions either rely on massive, expensive multi-view data augmentation or switch to explicit 3D representations like point clouds, which are noisy and don't integrate cleanly with modern, image-pre-trained vision models.

Methods

The authors propose RayViT (Ray-conditioned Vision Transformer Encoder), an architecture that injects camera geometry into a fully fine-tuned ViT backbone while preserving its rich, pre-trained semantic features.

Figure 1: Overview of RayViT. Camera geometry is injected through a ray-map–conditioned class token and patch-aligned ray embeddings. An intermediate cross-view consistency loss regularizes the visual representation. Visual tokens, frozen CLIP [19] language tokens, and noisy action tokens are processed by a decoder-only xLSTM policy [41, 42].

The method breaks down into three core components:

  1. Plücker Ray Maps: Camera intrinsics and extrinsics are transformed into a 6D vector per pixel (representing the ray's 3D origin direction and spatial moment). Because this ray map is pixel-aligned with the RGB image, it provides a direct bridge between appearance and geometry.
  2. Dual Geometry Injection:
  3. Patch-aligned Ray Features: The ray map is downsampled via average pooling to match the ViT's patch resolution and added directly to the image patch tokens as dense positional embeddings, providing absolute 3D grounding alongside standard Rotary Position Embeddings (RoPE).
  4. Ray-Conditioned Class Token: Instead of using the standard [CLS] token, a learnable token is fed through two lightweight gated cross-attention blocks to progressively summarize the camera geometry, replacing the original [CLS] token in the forward pass.
  5. Cross-View Alignment Objective: To encourage the model to learn view-invariant representations, the authors apply an auxiliary cosine similarity loss to the class tokens at an intermediate layer (specifically the 10th layer). It forces representations of the same scene from different viewpoints to converge, using the robot's in-hand (gripper) camera as the anchor view.

The resulting visual representations are then fed into a decoder-only xLSTM policy with a score-based diffusion action head to predict robot actions.

Datasets

The authors evaluated RayViT in both simulation and real-world environments:

  • RoboCasa (Simulation): A large-scale benchmark featuring 16 multi-task kitchen manipulation challenges (e.g., opening drawers, turning on stoves, navigating counters). To test robustness, they built a "Variant" environment where static cameras were randomly rotated and shifted.
  • Real-World Robot Setup: Evaluated on a 7-DOF Franka Panda robot across 4 long-horizon tasks: Drawer, Insertion, Pick Place, and Cup Stack. The setup utilized two external ZED Mini stereo cameras and an Intel RealSense gripper camera, introducing a severely perturbed camera angle for the variant evaluation.

Key Insights and Ideas

  • Naive Concatenation Fails: Simply slapping geometric features onto image tokens disrupts the pre-trained feature distribution of foundation models, degrading performance. RayViT’s gated cross-attention acts as a gentle regulator, ensuring geometry conditions the token stream without overwhelming it.
  • Geometry is a Prerequisite for Consistency: One of the most fascinating findings is that applying a cross-view consistency loss to a vanilla RGB baseline does not yield stable performance gains. The model must possess explicit geometric grounding before it can effectively align different viewpoints into a shared representation.
  • Deeper Alignment is Better: Aligning representations at deeper layers of the ViT backbone (e.g., the 10th layer) yields significantly better robustness than attempting alignment at earlier layers.
Figure 2: RGB-variant and RayViT-cls success rates when applying the auxiliary cosine-similarity loss at different intermediate layers. Colored lines report mean success rate, with background bands indicating standard deviation. Left: Effect of auxiliary loss on the RGB variant. - denotes no auxiliary loss applied at an intermediate layer. Right: Influence of the auxiliary loss when injected into RayViT-cls layers 6−12.

Key Results

  • Simulation Robustness: On the RoboCasa benchmark under camera perturbations, RayViT outperformed the standard 2D RGB baseline by 13 percentage points in average success rate. While the RGB baseline saw its performance plummet by 18.5% when cameras shifted, RayViT exhibited a mere 2.5% performance drop.
  • Real-Robot Resilience: In real-world testing with perturbed camera views, RayViT maintained high performance, improving the average completed stages by 1.78 compared to the baseline. RayViT proved particularly effective here, likely because real-world images have higher resolutions, resulting in longer patch sequences that benefit more from rich geometric conditioning.

Limitations and Future Work

The authors note two primary limitations:

  1. Architecture Constraints: RayViT is strictly designed for ViT-based visual encoders and does not currently accommodate convolution-based (CNN) models.
  2. Anchor View Dependency: The cross-view consistency loss relies on a multi-view setup with a designated, task-relevant anchor view (the gripper camera).

Future research directions include developing geometry-conditioning mechanisms for convolutional backbones, exploring how the system handles varying numbers of sparse vs. dense viewpoints, and pre-training geometry-conditioned foundation models entirely from scratch.

Summary updated

BibTeX
@misc{wang2026rayvit,
  author = {Qian Wang and Longrui Chen and Peiran Sun and Aleksandar Taranovic and Niklas Freymuth and Ge Li and Weiran Liao and C. F. Maximilian Nagy and Yucheng Tan and Tao Chen and Gerhard Neumann},
  title = {{RayViT: Ray-Conditioned Visual Representations for Viewpoint-Robust Imitation Learning}},
  year = {2026},
  eprint = {2607.29622},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2607.29622},
}
Figure