Trading Positional Complexity vs. Deepness in Coordinate Networks

Jianqiao Zheng, Sameera Ramasinghe, Xueqian Li, Simon Lucey

TL;DR

This paper introduces a new theoretical framework for understanding positional encoding in coordinate-based neural networks. It shows that performance hinges on a trade-off between the "stable rank" of the encoded representation and "distance preservation" between coordinates, allowing for non-Fourier embeddings and enabling significantly faster training by using complex embeddings with simple linear networks.

What Problem Does This Paper Address?

Coordinate-based neural networks (coordinate-MLPs) are powerful for representing continuous signals like images and 3D shapes. However, they struggle to capture high-frequency details when given raw coordinates. A common solution is positional encoding, often using Fourier features, which project coordinates into a higher-dimensional space. While effective, the theoretical understanding of why Fourier features work has been limited, and their performance can be sensitive to frequency selection. This paper aims to provide a more general and interpretable theory for positional encoding, explore alternative embedding functions, and demonstrate a new approach that trades embedding complexity for network simplicity, leading to significant speedups.

Methods

The authors propose a general theory for positional encoding based on two key factors:

  1. Stable Rank of the Embedded Representation: This relates to the ability of the network to memorize training data. A higher stable rank generally means better memorization.
  2. Distance Preservation: This measures how well the embedding preserves the Euclidean distance between original coordinates. Good distance preservation is crucial for generalization.

They show that any continuous function can serve as a positional embedder, as long as it balances these two factors. The paper introduces the concept of "bandlimited embedders" and analyzes various embedders (impulse, rectangle, triangle, sine, Gaussian, and Random Fourier Features) through this theoretical lens. A key contribution is demonstrating that a more complex positional encoding (e.g., using more modes) can allow a simple linear network to achieve performance comparable to deep networks using simpler encodings. They also extend these ideas to higher dimensions using Kronecker products for "complex encoding," which can be solved in closed-form, leading to substantial speedups.

Datasets

The paper uses standard datasets for evaluation:

  • Natural 2D images (from [34]) for image reconstruction.
  • A YouTube video dataset [27] for 3D video reconstruction.

Key Insights and Ideas

  • Beyond Fourier: Positional encoding is not limited to Fourier features. Any function that balances stable rank and distance preservation can work.
  • The Trade-off: The core performance of positional encoding lies in the trade-off between memorization (stable rank) and generalization (distance preservation).
  • Complexity for Simplicity: A more complex positional encoding (more modes) can compensate for a simpler network architecture (linear layer), leading to faster training.
  • "Complex Encoding": Using Kronecker products for higher-dimensional data allows for a higher rank embedding, enabling linear models to perform well.
  • Closed-Form Solutions: For separable coordinates, the "complex encoding" can be solved in closed-form, drastically reducing training time.

Key Results

  • Performance Equivalence: Alternative non-Fourier embedders (like Gaussian and Triangle) can achieve comparable or better performance than Fourier-based methods (RFF, LinF, LogF) in various reconstruction tasks.
  • Speedup: Trading embedding complexity for network simplicity (complex encoding with a linear layer) results in orders of magnitude faster training compared to simple encodings with deep networks. For example, in 2D image reconstruction, complex encoding was ~20x faster.
  • Rank-Depth Relationship: The paper empirically shows that when the rank of the embedding is high, a linear network performs well. As the rank decreases, a deeper network becomes necessary for comparable performance.
  • Generalization: Shifted basis functions (like Gaussian and Triangle) tend to have higher ranks and better distance preservation compared to Fourier-based methods, leading to a better trade-off for generalization.

Limitations and Future Work

  • Bandwidth Control: While the theory provides a framework, carefully choosing the embedder and its parameters (like standard deviation for Gaussian) is crucial for balancing rank and distance preservation.
  • Non-separable Coordinates: While the paper proposes a workaround for non-separable coordinates using blending matrices, this still involves interpolation and might not be as efficient as the closed-form solution for separable cases.
  • Computational Cost of Complex Encoding: The "complex encoding" using Kronecker products can significantly increase memory and computational costs, although the paper proposes workarounds.
  • Future Work: The authors suggest exploring more complex embedding functions and further investigating the relationship between embedding complexity and network architecture for optimal performance and efficiency. They also hint at extending this framework to other domains beyond signal reconstruction.

Summary updated

BibTeX
@inproceedings{zheng2022trading,
  author = {Jianqiao Zheng and Sameera Ramasinghe and Xueqian Li and Simon Lucey},
  title = {{Trading Positional Complexity vs. Deepness in Coordinate Networks}},
  booktitle = {European Conference on Computer Vision},
  year = {2022},
  doi = {10.1007/978-3-031-19812-0\_9},
}
Figure