Where Am I and What Will I See: An Auto-Regressive Model for Spatial Localization and View Prediction

## Abstract

Abstract Spatial intelligence is the ability of a machine to perceive, reason, and act in three dimensions within space and time.
Recent advancements in large-scale auto-regressive models have demonstrated remarkable capabilities across various reasoning tasks. However, these models often struggle with fundamental aspects of spatial reasoning, particularly in answering questions like ”Where am I?” and ”What will I see?”.
While some attempts have been done, existing approaches typically treat them as separate tasks, failing to capture their interconnected nature.
In this paper, we present G enerative S patial T ransformer (GST), a novel auto-regressive framework that jointly addresses spatial localization and view prediction. Our model simultaneously estimates the camera pose from a single image and predicts the view from a new camera pose, effectively bridging the gap between spatial awareness and visual prediction. The proposed innovative camera tokenization method enables the model to learn the joint distribution of 2D projections and their corresponding spatial perspectives in an auto-regressive manner.
This unified training paradigm demonstrates that joint optimization of pose estimation and novel view synthesis leads to improved performance in both tasks, for the first time, highlighting the inherent relationship between spatial awareness and visual prediction.
Project page: https://sotamak1r.github.io/gst/ .

## 1 Introduction

Spatial Intelligence is a critical piece of the Al puzzle, as it encompasses the ability to understand the spatial relationships between objects and scenes.
”Where am I?” and ”What will I see?” are two fundamental questions used to test the spatial capability of intelligent agents.
For humans, commencing from the observation of an image, they can effortlessly reconstruct the entire scene represented by the image in their minds.
This spatial ability enables humans to easily orient themselves in space and to envision observations from different perspectives within a given space.
Therefore, expanding existing general intelligence into the realm of 3D space, enabling it to effortlessly answer the aforementioned two foundational questions, is a crucial step in the development of spatial intelligence.

Modern auto-regressive models (Brown, ; Touvron et al., ) demonstrate exceptional intelligence due to their advanced architecture,
enabling effective long-range dependency modeling.
This capacity empowers large language models (LLM) to exhibit outstanding intellectual performance across various domains (Kondratyuk et al., ; Team, ).
To enable the model to answer ”Where am I?” and ”What will I see?” effectively, we endeavor to leverage the strong modeling capabilities of auto-regressive models to spatial intelligence.
These two questions correspond to two classic tasks in the 3D domain: spatial localization and view prediction.
Prior research has traditionally treated the tasks of generating novel views from a given location (Liu et al., ; Tewari et al., ; Chan et al., ) and estimating camera poses from varied perspectives (Zhang et al., ; Wang et al., ; Zhang et al., ) as distinct tasks, typically employing separate models for each task.
Nevertheless, human cognition does not perceive these processes as isolated entities.

To bridge this gap, we propose Generative Spatial Transformer (GST), a model designed to align its understanding of 3D space with that of humans.
Rays entering the eye form image signals; hence, 2D image is the projection of 3D space from a given viewpoint position and direction.
Building upon this notion, we introduce, for the first time, the concept of tokenizing the camera and incorporating it into the training of the auto-regressive model.
Specifically, we leverage Plücker coordinates to transform the camera into a camera map akin to an image, and convert it into a token sequence by applying a tokenization method similar to that used for image.
To address the uncertainties associated with scene scale and unseen regions, we employ an auto-regressive approach to construct a joint distribution of novel views and camera locations given an initial observation.
This joint distribution inherently encapsulates two posterior probability distributions, one for novel views and another for camera locations, and introduces two conditional probability distributions.
This approach contrasts with directly modeling two completely different distributions using the same model.

Experiments demonstrate that modeling a single joint distribution leads to a more stable optimization process compared to modeling two distinct distributions.
This stability is achieved without compromising the final convergence accuracy, ultimately leading to better results in both novel view synthesis and relative camera pose estimation tasks through the introduction of redundant objectives.
Furthermore, by integrating additional target distributions, our model can effectively complete novel tasks such as sampling valid camera poses from an observation, generating images under no camera conditions.
This approach has been shown to significantly improve the model’s understanding of the intricate nuances present within 3D spatial environments.

In summary, our contribution lies in introducing GST, the first model capable of concurrently performing both novel view synthesis and relative camera pose estimation within a unified framework. Drawing inspiration from human spatial reasoning, we design GST to model the joint distribution of images and camera poses, enabling it to effectively integrate the training objectives of both tasks. Extensive experiments demonstrate that GST achieves state-of-the-art performance in synthesizing a single novel view in a feed-forward manner while accurately estimating the relative camera pose between two frames, establishing a new benchmark for spatial intelligence in vision-based systems.

## 2 Related Work

### 2.1 Auto-Regressive Models

The core concept of auto-regressive models is to establish the probability distribution of future sequences given the current sequence.
Building upon this principle, powerful large language models (Brown, ; Touvron et al., ) have emerged, demonstrating their ability to tackle a variety of challenging language tasks.
To extend these capability to multimodal tasks, researchers have explored tokenization methods (Esser et al., ; Yu et al., ; Zeghidour et al., ) that are specifically tailored to different data modalities.
By tokenizing data from various modalities, researchers can construct diverse task sequences and leverage the next-token prediction mechanism of language models for training (Team, ; Kondratyuk et al., ).
This approach has shown promising results in enhancing multimodal capabilities.

### 2.2 Novel View Synthesis

In recent years, significant strides (Rombach et al., ; Ramesh et al., ; Saharia et al., ) have been made in the field of image generation.
Numerous scholarly investigations posit that these modalities effectively encapsulate intricate 3D prior knowledge.
One notable approach, Zero-1-to-3 (Liu et al., ), introduces a methodology that begins with a single image and incorporates the relative camera pose as a contextual factor to define the conditional distribution of novel views, yielding promising results.
However, generalizing this approach to real 3D environments remains an area requiring further scholarly inquiry.
Additionally, DFM (Tewari et al., ) conceptualizes the synthesis of new perspectives within a scene as a solution to stochastic inverse problems.
Nevertheless, the exorbitant computational demands inherent in the denoising process and the resource-intensive nature of volume rendering impede the seamless scalability of this framework.
In contrast, CAT3D (Gao et al., ) enhances this process by concatenating the representation of each view’s camera using Plücker ray notation with the image channels.
It employs a diffusion model to characterize the conditional distribution of multiple views based on a specific camera configuration.

### 2.3 Camera Pose Estimation

Estimating camera poses from sparse views poses a significant challenge, as sparse images often lack sufficient information to accurately determine the position and orientation of the camera.
COLMAP (Schönberger & Frahm, ) ccomplishes camera pose estimation by detecting and matching features in images, estimating relative camera poses using robust algorithms, refining poses through bundle adjustment.
This is a computationally intensive process and performs poorly with sparse viewpoints.
RelPose (Zhang et al., ) addresses this issue by presents an energy-based model for estimating camera rotation. By modeling the probability distribution of camera rotations, this approach can estimate the camera viewpoints across multiple images.
PoseDiffusion (Wang et al., ) utilizes diffusion models to directly sample camera parameters.
Building upon this foundation, Ray Diffusion (Zhang et al., ) represents a notable advancement.
While it still employs a diffusion model, this approach generates camera rays as targets, demonstrating superior precision compared to directly predicting camera parameters.

Figure: Figure 2: Illustration of the GST . Upon providing an observed image, task category, and the target camera position or the other view image, GST autonomously generates the desired outcome in an auto-regressive manner. The training process of GST comprises two significant phases: (1) training of the image and camera tokenizer, (2) training of the auto-regressive model.
Refer to caption: x2.png

## 3 Method

We consider the challenge of simultaneously sampling novel view images and their corresponding camera poses given a single input image.
Diverging from prior research, our focus lies in uncovering the inherent consistency between these two tasks rather than alternately training the two objectives during the training process.
Our approach starts by tokenizing the image and camera spatial positions, merging two codebooks to ensure the model treats both modalities equally (Sec 3.1). We then proceed to train a generative network to model the joint distribution of these components (Sec 3.2).

### 3.1 Tokenization

Image Tokenization.
In our approach, we employ VQGAN (Esser et al., ) as our image tokenizer, comprising the following components: an encoder that maps an image $x\in\mathbb{R}^{H\times W\times 3}$ to a feature map $f\in\mathbb{R}^{h\times w\times d}$, and a quantizer containing a codebook of $k$ $d$-dimensional vectors.
The quantization process involves selecting the nearest vector from the codebook, based on Euclidean distance, for each $d$-dimensional vector at every position in $f$.
The index in the codebook serves as the image encoding, and the quantized feature map $z$ is then reprojected back to the image space $\hat{x}$ through a decoder.

Concerning constraints on the quality of image reconstruction, both ${\cal L}_{2}$ reconstruction loss and LPIPS perceptual loss ${\cal L}_{p}$ are utilized, along with incorporating an adversarial loss ${\cal L}_{d}$.
Consequently, a discriminator is alternately trained during this process, with $\lambda_{d}$ representing the weight of the adversarial loss:

$$ ${\cal L}_{x}={\cal L}_{2}(x,\hat{x})+{\cal L}_{p}(x,\hat{x})+\lambda_{d}{\cal L }_{d}(\hat{x}).$ (1) $$

Due to the non-differentiability of quantization, the straight-through estimator is employed to propagate gradients from the decoder to the encoder:

$$ $z={\rm sg}[z-f]+f,$ (2) $$

where ${\rm sg}[\cdot]$ stands for the stopgradient operator (Van Den Oord et al., ).
The training loss of the codebook is defined as the proximity of the embedding of the force codebook to the features output by the encoder.
The utilization of the stopgradient operator prevents the gradient from propagating back to the encoder.
To address this, a loss term is introduced to enforce the feature vectors extracted from the encoder to approach those in the codebook, with the weighting adjusted by the parameter $\beta$:

$$ ${\cal L}_{vq}=\big{\|}{\rm sg}[f]-z\big{\|}_{2}^{2}+\beta\big{\|}f-{\rm sg}[z] \big{\|}_{2}^{2}.$ (3) $$

The final loss function comprises a combination of image reconstruction loss and codebook parameter constraint loss.

Camera Parameterization.
Liu et al. () directly utilizes the azimuth and elevation changes in camera poses as model inputs,
yet such a simplistic parameterization proves challenging to extend to real-world scenarios.
Following Zhang et al. (), we opt to utilize Plücker rays for the dense parameterization of the camera pose.

Specifically, for a camera extrinsic matrix, the spatial position and orientation of the camera can be derived.
Each pixel on the image plane corresponds to a ray emanating from the camera origin, denoted as $\bm{r}=(\bm{o},\bm{d})$.
Plücker rays represent this ray as a 6-dimensional set of Plücker coordinates $\bm{r}=(\bm{o}\times\bm{d},\bm{d})$, encapsulating both the position and direction of the ray in space.
Upon converting all rays emanating from the camera origin and intersecting with image pixels into Plücker coordinates, we can obtain a tensor of the similar size as the image, referred to as the camera map.
The camera map can be utilized to infer the camera matrix through a reverse derivation process (Zhang et al., ).

Camera Tokenization.
To enable a auto-regressive model to handle both camera and image modalities concurrently, we have adopted a consistent tokenization method for processing camera rays, akin to image tokenization.
This approach involves leveraging a modified version of the VQVAE (Van Den Oord et al., ) with reduced convolutional network depths in both the encoder and decoder, following a training procedure analogous to that of the image tokenizer, albeit without the discriminator component.
By adjusting the initial size of the camera map, we ensure the eventual derivation of camera tokens that align in size with the image tokens, facilitating seamless integration within the model architecture.

Figure: Figure 3: Comparison of target distributions for different tasks. Previous methods have traditionally constructed unimodal target distributions for novel view synthesis and camera estimation tasks. However, GST has introduced a joint distribution for both the image and the corresponding camera poses.
Refer to caption: x3.png

### 3.2 Joint Distribution Modeling

Backbone.
Previously, we formulated the entire training approach as an auto-regressive problem, which could be addressed using modern large language model (LLM) techniques.
Here, we employed the training paradigm of next-token prediction to effectively integrate the capabilities of advanced large language models for future applications.
We adopt Sun et al. () codebase, and implemented techniques from current LLM, such as QK-Norm (Henry et al., ), RMSNorm (Zhang & Sennrich, ), and leveraged the 2D form of rotary positional embeddings (RoPE) (Su et al., ) to operate on the image and camera map embeddings.

Figure: Figure 4: The impact of joint distribution training. (a) By transforming two distributions into a joint distribution, the target of the model can be unified. (b) (c) We trained using the same initial model parameters and hyperparameters, averaging the loss and gradient norms every $50$ steps, and observed that joint distribution training yields a more stable training trajectory compared to alternatively training two objectives.
Refer to caption: x4.png

Training Target.
In the pursuit of unifying two divergent training tasks $p(i|c,o)$ and $p(c|i,o)$, a straightforward strategy entails the direct alternation between the respective training objectives throughout the training regimen.
Nonetheless, the discernible dissimilarity between the disparate probability distributions can precipitate pronounced instability in training dynamics.
To redress this quandary, our focus has pivoted towards the joint distribution governing novel view images and camera poses, as illustrated in the figure 3.
This distribution inherently encapsulates the training requirements for these dual tasks:

$$ $p(i,c|o)=p(i|c,o)p(c|o)=p(c|i,o)p(i|o).$ (4) $$

Upon completing training, during the inference stage, it proves adequate to stochastically sample from the prescribed prior probabilities $p(i|o)$ or $p(c|o)$ under conditional settings (either through manual intervention or automated model-driven processes) to generate results corresponding to the alternate modality, thereby realizing the objective of unifying the dual tasks within a singular model.
Crucially, the circumvention of the necessity to oscillate between the training of two vastly different training objectives ensures a more stable trajectory in training losses and gradient norms, as illustrated in the figure 4.

In our training stage, we tokenize the initial observed image $o$ along with the image $i$ and camera $c$ corresponding to random sampled viewpoints, resulting in three token sequences ($t_{o}$, $t_{i}$, and $t_{c}$) of equal length. These sequences are concatenated to form a fixed-length token sequence denoted as $s$, illustrated in figure 5.
Subsequently, a decoder-only transformer denoted as $G$ and parameterized by $\theta$ is trained.
The generation target is formulated as:

$$ ${\cal L}(\theta)=-\sum_{j=|t_{o}|+1}^{|s|}logP(s_{j}|s_{1},\dots,s_{j-1};\theta)$ (5) $$

The attention mask in figure 5 illustrates the distinction between our training approach and alternating training of two targets.

Figure: Figure 5: The comparison of Attention Mechanisms. (a) We standardize the token sequences $s$ of two tasks to the same length. (b) In the conventional alternating training scheme, target modality tokens can attend to all preceding conditional tokens. (c) We propose to model the joint distribution such that, in (a), the token sequences for the two tasks have visibility only to the currently observation tokens $o$.
Refer to caption: x5.png

## 4 Experiments

### 4.1 Experiment Setup

Datasets.
We trained GST auto-regressive model and camera tokenizer on four datasets with multi-view images and camera pose annotations: Objaverse (Deitke et al., ), CO3D (Reizenstein et al., ), RealEstate10k (Zhou et al., ), and MVImgNet (Yu et al., ).
These datasets encompass 3D object models, real-world environments, and object-centric scenes.
Objaverse exclusively offers object 3D models, for which we utilized the rendering outputs from Liu et al. () and employed the filtered object ID list provided by Tang et al. ().
We performed center cropping on all training images to ensure obtaining token sequences of the same length.

Baseline.
We adopted the feed-forward method Zero-1-to-3 (Liu et al., ), and its counterpart, the model Zero-1-to-3 XL trained on the larger-scale dataset Objaverse-XL (Deitke et al., ), as our qualitative and quantitative comparison approach for novel view synthesis.
A non-overlapping subset was randomly sampled from Objaverse (Deitke et al., ) as our test set, distinct from the training set.
We selected various methods (Zhang et al., ; ; Lin et al., ; Wang et al., ) for evaluating the camera pose estimation performance of GST , following the experimental setup of raydiffusion (Zhang et al., ), conducting quantitative experiments on the relative camera pose estimation of 2 images on CO3D (Reizenstein et al., ).

Implementation details.
We utilized the image tokenizer from LlamaGen (Sun et al., ) along with its auto-regressive model with 1.4 billion parameters to initialize our model weights, and made some slight modifications to the architecture like adding QK-Norm (Henry et al., ) to the attention operations.
Throughout the training process, the weights of the image tokenizer were kept constant, while all parameters of the auto-regressive model were trained.
We employed a structure similar to the image tokenizer to construct our camera tokenizer, albeit with fewer parameters. The parameter quantities for each model is detailed in table 1(a).
The base learning rate for training the camera tokenizer is set at $10^{-4}$ with a batch size of $128$.
The auto-regressive model also starts with a base learning rate of $10^{-4}$, which later decreases to $10^{-5}$ in the later stages of training.
The batch size for the auto-regressive model is $192$, with gradient accumulation performed every $8$ steps.
Both models utilize the AdamW optimizer with a gradient clipping threshold set at $1.0$.

**Table 1: We present the selection of the model parameter size and the camera tokenizer codebook size that we used for our all experiments.**
| Models | Parameters |
| --- | --- |
| Image tokenizer | 77 M |
| Camera tokenizer | 22 M |
| Auto-regressive model | 1.4 B |

### 4.2 Novel View Synthesis

We conducted a comparison between GST and the comparative methods (Liu et al., ) on Objaverse.
As shown in the figure 6 and table 2, even though GST was trained on a subset of Objaverse, it achieved superior results compared to Zero-1-to-3, which was trained on a several orders of magnitude larger dataset than ours.
Moreover, we incorporate camera conditions as token-wise constraints.
This allows our auto-regressive model to generate more accurate images for a specific viewpoint.
This capability enables GST to excel in capturing the spatial structure and semantics of objects compared to existing models.
This advantage is also evident in the SSIM and LPIPS metrics displayed in the table 2.

**Table 2: The quantitative results of novel view synthesis. GST outperforms Zero-1-to-3 and Zero-1-to-3 XL in terms of LPIPS and SSIM metrics. However, Zero-1-to-3 achieves higher PSNR scores compared to GST, because it was trained on the complete Objaverse dataset, which includes our test set.**
|  | LPIPS $\downarrow$ | PSNR $\uparrow$ | SSIM $\uparrow$ |
| --- | --- | --- | --- |
| Zero-1-to-3 | 0.135 | 14.77 | 0.845 |
| Zero-1-to-3 XL | 0.141 | 14.53 | 0.834 |
| GST (ours) | 0.085 | 13.95 | 0.871 |

Figure: Figure 6: Visualization comparison of novel view synthesis. Among these methods, GST demonstrates the highest quality of generated results. Additionally, due to the design of the camera condition, GST is capable of producing the most accurate images for the specific viewpoints.
Refer to caption: x6.png

### 4.3 Relative Camera Pose Estimation

**Table 3: Camera Rotation Accuracy on CO3D (@ 15^∘). Here we report the proportion of relative camera rotations that are within 15 degrees of the ground truth. Results for all comparative methods are referenced from Ray Diffusion.**
| Methods | Seen Categories | Unseen Categories |
| --- | --- | --- |
| RelPose | 56.0 | 48.6 |
| PoseDiffusion | 75.7 | 63.2 |
| RelPose++ | 81.8 | 69.8 |
| Ray Diffusion | 91.8 | 83.5 |
| GST (Ours) | 86.6 | 85.1 |

We tested GST on the CO3D (Reizenstein et al., ) benchmark to evaluate its performance in estimating relative camera poses.
Here, we trained the model using a setting with only two frames, as this setting is considered the most challenging yet fundamental for this task.
As shown in the table 3, we achieved the best generalization under this setting (Unseen Categories).
Considering the joint training of GST on multiple datasets, the differences between datasets may affect the model’s testing performance on individual datasets, which may explain the slightly lower accuracy of training categories compared to the method proposed in Zhang et al. ().

### 4.4 Ablation Study

Camera Tokenizer Designs.
The size of the camera tokenizer’s codebook and the length of the quantized vectors are crucial factors that influence the performance of subsequent models.
We trained our camera tokenizer on the same dataset used for training the auto-regressive model, instead of randomly sampling camera positions in space.
While the latter approach could better represent all camera positions in space, it would reduce the usage of the camera tokenizer’s codebook during the training of the auto-regressive model.
This is because some randomly sampled, unconventional camera positions would consume a portion of the tokenizer’s training resources, even though these positions would not appear during auto-regressive model training.
Moreover, we aim for the model to learn a camera distribution that aligns with the dataset’s distribution.
This alignment is expected to help the model gain an spatial understanding from observations, as mentioned in the following text.

In the table 1(b), we present the usage of the codebook under different parameters.
As the distribution of cameras can be better learned compared to images, we observed very low reconstruction losses for all parameters.
Consequently, usage became a critical selection criterion.
It is notable that as the size and dimension of the codebook increase, we observe a trend of increasing usage followed by a decrease, aligning with observations from previous work Sun et al. ().
Ultimately, we selected parameters with a size of $2048$ and a dimension of $4$ for our final model.

Figure: Figure 7: Through our experiments with different camera conditions, we observed that employing token-wise conditioning and tokenizing the cameras alongside the images yielded the best generation results for the auto-regressive model.
Refer to caption: x7.png

Figure: Figure 8: We present the results of automatically sampled camera distributions using GST, obtained from observing the same object placed in different locations and under various perspectives. The figure showcases three distinct scenarios: (a) a top-down view of the object, where the sampled cameras are predominantly top-down; (b) a frontal view of the object, where the sampled cameras are primarily horizontal; and (c) the object positioned near a wall, where the sampled camera locations effectively avoid the obstruction.
Refer to caption: x8.png

Different Camera Parameterizations.
In Section 3.1, we mentioned that we represent the camera using a method based on Plücker coordinates.
Prior to this, we had explored another direct tokenization approach: representing the relative camera’s rotation matrix as a three-dimensional vector in terms of Euler angles, and adding an offset to ensure all elements of this vector are positive.
After quantization into positive integers, we can then use a codebook of size $360$ to represent each dimension.
Ultimately, only $3$ tokens are needed to represent this rotation angle.
We only conducted this ablation experiment on a subset of the object-level dataset Objaverse, as we did not incorporate transformations of camera positions for the sake of simplification.
As shown in the results depicted in the figure 7, it is evident that using only $3$ tokens as a condition in the auto-regressive model for novel view synthesis makes it challenging to generate ideal viewpoints.
In other words, there is a need to introduce more detailed conditions to improve the quality of the generated outputs.

We also explored a scenario where only the camera is used as a condition without requiring the model to output the camera.
Specifically, instead of training a camera tokenizer, the Plücker coordinates obtained from the camera are encoded using sine and cosine functions and fed into a small MLP (Mildenhall et al., ).
This MLP, initially trained concurrently with the auto-regressive model, was subsequently frozen after a predetermined number of training steps.
As shown in the figure 7, we obtained visual results from this model, indicating that tokenization continues to exhibit the best performance in the generative process of the auto-regressive model.

**Table 4: we compared the performance of two training methods on two distinct tasks. Our findings indicate that training the joint distribution leads to superior results compared to alternating training on the two distributions.**
|  | *Pose Estimation* | *Visual Prediction* |  |  |  |
| --- | --- | --- | --- | --- | --- |
|  | @ 15^∘ $\uparrow$ | @ 30^∘ $\uparrow$ | LPIPS $\downarrow$ | PSNR $\uparrow$ | SSIM $\uparrow$ |
| DTU Dataset |  |  |  |  |  |
| GST (alternately) | 84.6 | 92.8 | 0.554 | 10.97 | 0.328 |
| GST (jointly) | 85.7 | 93.5 | 0.500 | 11.90 | 0.358 |

Figure: Figure 9: Uncondition image generation. Training unconditional image generation in each scenario can assist the model in constructing the distribution of images within that context.
Refer to caption: x9.png

Figure: Figure 10: Visual compare. By employing training on the joint distribution, GST exhibits enhancements in image quality and spatial positional accuracy.
Refer to caption: x10.png

Joint Distribution Training vs Alternately Training.
As mentioned in the section 3.2, training a joint distribution tends to have a more stable training trajectory compared to alternating between training two separate targets.
This stability is crucial in the training of large transformers, as instability in loss can lead to loss explosion during auto-regressive training, aligning with our experimental observations.
Furthermore, we have quantitatively compared the two approaches in the table 4 on the DTU dataset (Jensen et al., ), revealing that training on the joint distribution outperforms alternately training for the selected two tasks.
This observation underscores the notion that establishing a well-defined objective distribution can positively impact both the training process and the ultimate outcomes.

Introduction of Excess Distribution.
As mentioned in Section 3.2, despite introducing an additional distribution, our model not only avoids performance degradation but also achieves enhanced performance while ensuring training stability.
A straightforward interpretation is that our conditional prior distribution further assists the model in truly understanding the space.

As illustrated in the figure 8, we capture a real-world object from various angles and positions, allowing GST to sample valid camera distributions from $p(c|o)$ for each scenario.
For images captured from a top-down perspective (a), GST predominantly sampled cameras with a top-down viewpoint.
Similarly, for objects viewed from a frontal angle (b), GST preferentially sampled cameras with a frontal perspective.
Notably, in scenarios involving obstacles (c), GST effectively avoided these obstructions and sampled reasonable camera positions.
These results, achieved without any manual intervention, further demonstrate GST’s ability to accurately comprehend the spatial layout from observed images.

As depicted in the figure 9, we employ an alternative distribution for sampling $p(i|o)$ by GST, which compels the model to learn the unconditional image distribution within the same scenario. This approach, as discussed in Ho & Salimans (), intertwines unconditional loss within the conditional generation training process to strike a balance between sample quality and diversity. This conclusion has also been validated in the figure 10.

## 5 Conclusion

In this paper, we propose the Generative Spatial Transformer (GST).
To the best of our knowledge, this is the first work that connects novel view synthesis with camera pose estimation.
Our method treats the camera as a bridge between 2D projections and 3D space by introducing a camera tokenizer and including the camera as a new modality in training the auto-regressive model.
Furthermore, we propose a joint distribution as the training target, enabling diverse task completion and boosting the model’s spatial understanding. These advancements not only broaden the model’s capabilities but also set the stage for future strides in spatial intelligence.

## Appendix A Additional experimental details

### A.1 Pre-processing

Camera System Unification.
In our experiments, due to the utilization of diverse camera systems across different datasets, we initially unify the camera coordinate systems of all datasets into a common reference frame, the RUB coordinate system.

Standardization of Camera Distribution.
Since the camera positions obtained by COLMAP lack scale information and the datasets used in training stage encompass both synthetic object datasets and real-world scene datasets, significant variations in camera position scales exist across different datasets and scenes.
To mitigate the scale discrepancies among different scenes, we first employ a fixed intrinsic camera matrix.
Although this approach may introduce certain perspective issues, it does not impact the final results of camera positions and orientations.

Subsequently, we computed the variance of camera positions across different scenes and scaled the camera positions of scenes within the same dataset by a common factor $\beta$ such that the variance of camera positions in the dataset is standardized to 1.
We present the $\beta$ corresponding to different datasets in the table 5.
This standardization process compacts the relative camera positions within the training set, facilitating the modeling of the overall camera distribution of the dataset.

Finally, as our cameras are randomly sampled, cases where two distant cameras capture images with little to no overlap are prevalent.
To address this, during the training of the camera tokenizer and auto-regressive model, we filter out such instances by setting a distance threshold $\delta=5$ to restrict excessive distances between two cameras.

**Table 5: Dataset scaling factor.**
| Dataset | Scaling Factor $\beta$ |
| --- | --- |
| Objaverse | 1.0 |
| Co3D | 0.1 |
| MVImgNet | 0.5 |
| RealEstate10K | 10.0 |

### A.2 Auto-regressive Model Training

Task Tokens.
In this study, we focus solely on two tasks: novel view synthesis and camera pose estimation.
Therefore, our task tokens are limited to these two, placed at the end of the codebook for easier future expansion with additional tasks.

Training Process.
At the initial phase, we adopt a uniform allocation strategy, distributing training resources evenly across four conditional distributions.
This initial approach ensures a balanced allocation of resources, providing a solid foundation for the subsequent training process.
As the training progresses, we observe that reducing the occurrences of $p(i|o)$ and $p(c|o)$ during training yields gradual enhancements in quantitative results.
However, this adaptive adjustment also entails a trade-off.
By reducing the occurrences of $p(i|o)$ and $p(c|o)$, we compromise a portion of training stability.
By carefully calibrating the resource allocation and adjusting the occurrences of $p(i|o)$ and $p(c|o)$, we can work towards achieving a harmonious balance between these objectives.

## Appendix B Visualization Results

### B.1 Novel View Synthesis

We selected a number of representative images, including those from the training dataset, virtually synthesized images, real-world images, and stylistic images, as initial observations.
Due to the uncertainty regarding the scale of the scenes, we first employed GST sampling to determine reasonable camera positions.
These positions were then used as conditions in conjunction with the initial observations to generate new perspective images, as illustrated in the figure 11.

Figure: Figure 11: Visualization results of novel view synthesis.
Refer to caption: x11.png

### B.2 Relative Camera Pose Estimation

We selected several highly challenging examples to test the spatial localization capabilities of GST.
As illustrated in the figure 12, the selected image pairs include real-world images, images of the same subject taken under different shooting conditions, and images of the same object depicted under various artistic styles. GST demonstrated outstanding performance across all these examples.

Figure: Figure 12: Visualization results of relative camera pose estimation.
Refer to caption: x12.png

## Appendix C Limitations

The scarcity of multi-view datasets with precise camera annotations poses a significant barrier to scale up GST.
In the current work, we only explored the most fundamental scenario involving a single observation image and one novel perspective.
Consequently, when sampling multiple images and camera positions simultaneously, issues of consistency may arise, although this problem decreases as the number of training viewpoints increases.
Additionally, we trained on datasets without scale, and the potential for extension to scenes with real-world scale remains to be investigated.

## Peer Reviews

confidence: 4
contribution: 2
initial_rating: 3
presentation: 4
questions: Please interpret some of my stated "weaknesses" as questions.
soundness: 1
strengths: This paper's figures are very well designed. Good color coordination across the paper.
summary: This paper aims to do view prediction and pose estimation with a single autoregressive model. The paper claims that humans do this task effortlessly, and that their own model does it effortlessly too. The method is inspired by LLMs, by which the authors mean: it is autoregressive. The paper claims to be the first to tokenize camera data. The model itself is enormous: >1.4B parameters. It achieves good results.
weaknesses: The paper says that, given an image of a scene, humans can "effortlessly reconstruct the entire scene". I don't think this is true. Can the authors give some support for this claim?

The paper says that it wants the model to "effortlessly" estimate camera poses and estimate novel views. What does this mean? How can we distinguish effortless vs effortful models?

In talking about pose estimation vs. view prediction, the paper says "human cognition does not perceive these processes as isolated entities". I think it's quite clear that this is false. If we did not perceive these as separate tasks, how could we even talk about them so distinctly?

The paper says that their approach is "a model designed to align its understanding of 3D space with that of humans". Given that I question the paper's description of human cognition, I also question whether it's a good idea to design a model based on this shaky foundation.

The paper makes a major claim about novelty by saying "we introduce, for the first time, the concept of tokenizing the camera". It is not the first time. The authors can read, for example, "Input-level inductive biases for 3d reconstruction" (CVPR 2022). There are probably dozens of papers that convert camera information into tokens; checking the papers that cite the input-level biases paper should reveal many references. The paper goes on to say, "Specifically, we leverage Plucker coordinates to transform the camera into a camera map akin to an image". This has also been done before: check "Cameras as Rays: Pose Estimation via Ray Diffusion" (ICLR 2024). I can see that this is in fact cited in a later part of the paper, so perhaps there was some mixup in the writing, and the author of this section is not aware of the related work and what the actual contributions are. Nonetheless, this is a serious issue. 

Overall, it is unfortunate for a work like this, which appears to be otherwise quite well polished, to make wild and unsupported statements about human cognition, and to claim novelty on techniques that have been published before (and even gained re-use across follow-up work). It is possible that this paper actually has novel parts and useful contributions, but the amount of false (or unsupported) and misleading material is overwhelming. 

the Al puzzle -> the AI puzzle

---

confidence: 4
contribution: 3
initial_rating: 8
presentation: 3
questions: My main concerns are as follows:
Line 268. I am curious about the effect of the concatenation order of the three tokens on the experimental results in this problem.
Line 342, GST only uses part of the data set for training, but I want to know what the results will be if the same experimental settings are maintained as Zero-1-to-3.
In line 375, the author does not elaborate on the definition of Unseen Categories. Of course, I can understand that due to the experimental settings, there may be some disadvantages compared to these methods.
soundness: 3
strengths: First, the paper's approach and the scientific questions it raises are novel and intriguing.
Second, the method proposed in the paper can simultaneously estimate camera pose from a single image and predict the view from a new camera pose, effectively bridging the gap between spatial awareness and visual prediction. Interesting validations are shown in Figure 7.
Finally, the writing of the paper is clear and accessible, with excellent explanations from the motivation to the introduction of the method, and the provided conceptual diagrams are easy to understand.
summary: This paper introduces the Generative Spatial Transformer (GST), an innovative autoregressive framework capable of simultaneously handling spatial localization and view prediction tasks. By introducing a novel camera tokenization method, GST learns the joint distribution of 2D projections and spatial perspectives during training, thereby improving the performance of camera pose estimation and novel view synthesis. Experiments demonstrate that GST achieves state-of-the-art performance in these tasks, highlighting the intrinsic connection between spatial awareness and visual prediction.
weaknesses: I did not find any obvious shortcomings. I only have one suggestion: when citing the methods of other articles, it would be better for the author to briefly introduce them.

---

confidence: 4
contribution: 3
initial_rating: 5
presentation: 3
questions: 1. How does the proposed method deal with scale differences of camera poses from different datasets? Is any normalization used for ground truth camera poses across datasets?
2. Can authors provide more details about training resources? For example, how many GPUs are used, and how long has the model been trained?
soundness: 2
strengths: 1. The idea of jointly modeling the distribution of camera poses and novel views via a Generative Spatial Transformer is cool and novel.
2. The writing is clear, and the figures are nice.
3. This paper presents comprehensive ablation studies to justify model designs.
summary: This paper proposes to jointly model the distribution of camera poses and novel views via a shared Generative Spatial Transformer (GST).
weaknesses: 1. Insufficient evaluation:
    1. Novel view synthesis: The model has been trained on real-world images (CO3D, RealEstate10k, MVImgNet), but the evaluation is only on Objaverse (where the object shows simple and unrealistic textures). Can authors (quantitatively and qualitatively) compare to other baselines in terms of novel view synthesis on CO3D as well? One possible baseline is Zero123, fine-tuned on real-world images by ZeroNVS [1]. 
    2. Multi-image condition: Can the proposed approach synthesize novel views/estimate camera poses conditioned on multiple images? It'd be interesting to see its flexibility by showing these results (e.g., comparing with baselines, say Ray Diffusion with 3-8 images).
    3. How does the proposed approach compare with the state-of-the-art method, DUSt3R [2]?
2. Unfair comparison: In Tab.3, the proposed method achieves higher accuracy on unseen categories than the baseline. However, this could be explained by the more training datasets used by the proposed method, while the baselines, e.g., Ray Diffusion, are trained only on CO3D. Can the authors train the model on the same data used by Ray Diffusion and compare with it?
3. Minor issue: I think the two arrows in Tab.4 are in the wrong direction (Rot@15, Rot@30). 


[1] Sargent et al. ZeroNVS: Zero-Shot 360-Degree View Synthesis from a Single Real Image, 2024. 

[2] Wang et al. Dust3r: Geometric 3d vision made easy, 2024.

---

confidence: 4
contribution: 3
initial_rating: 8
presentation: 3
questions: 1. As the results are presented as training only on a subset of Objaverse, do the authors have any expectations on how the method will scale?
2. For other camera rotation accuracies (5 degree or 10 degree), will GST's performance still be competitive to state of the art methods?
3. What's the rough GPU memory and latency performance of the proposed pipeline relative to existing work (would this be a potential downsides of autoregressive modeling)? 
4. Would it be possible to leverage the model's understanding of the joint distribution of camera angles and views for 3D reconstruction/NVS from a set of potentially uncaliberated images?
soundness: 3
strengths: 1. How the authors leverage VQVAE to tokenize camera views consistent with image tokenization is considered novel.
2. The effective adoptation of language models for autoregressive image/camera pose predictictions is interesting.
3. The choice to model the joint distribution of camera views and frustums within the same model seems clean and effective in combining the task of novel view synthesis and camera estimation.
4. Descent visual illustrations and writing.
summary: The authors introduced a auto-regressive framework to simutaneously estimate camera pose of a given image, and synthesize novel views at new camera poses. The authors achieve this via modeling the joint distribution of camera frustums and their image projections in a unified training paradim.
weaknesses: 1. The NVS results seems to be mostly on par or slightly better than existing state of the art models only based on the training of "a subset of objaverse," and I am curious of the particular choice of the data subset used in training. What's stopping the authors from training on the same dataset as Zero-1-to-3 to make a more fair comparison? 
2. The camera rotation accuracy metric of 15 degree is rather a relatively coarse metric, and the authors did not present the camera translation accuracies in any kind.

Meta-review: This paper trains a joint model for novel-view synthesis and camera pose estimation. The cameras are parametrized via (tokenized) raymaps and novel-view images via VQ-VAE tokens.  Given a single input image, a common autoregressive transformer  predicts tokens for novel-view image patches and/or camera raymaps. The experiments demonstrate that this single network is better than/on par with prior approaches tacking a single task.

On the positive side, the approach of the paper is interesting both technically and practically — it is desirable to have a single model that can perform the two tasks of pose estimation and novel-view synthesis, and the technical contribution of using autoregressive models to jointly capture pose and novel views is a positive.

However, the current formulation is limited to a single input image, and cannot be trivially extended for multi-view (unposed) input. Moreover, based on results, the current method is worse than RayDiffusion when trained on similar data (perhaps highlighting the limitation of an autoregressive approach).

Overall, the central idea of the paper is neat, but there are also obvious limitations of the approach (single-view input) and concerns about the efficacy of the method. On the balance, the AC feels the technical contributions maybe interesting enough to justify acceptance and encourages the authors to improve the final text based on the reviewer feedback.

Decision: Accept (Poster)