Modelling Long Range Dependencies in N-D: From Task-Specific to a General Purpose CNN

David M. Knigge, David W. Romero, Albert Gu, Efstratios Gavves, Erik J. Bekkers, Jakub M. Tomczak, Mark Hoogendoorn, Jan-Jakob Sonke · DOI

Abstract

Traditional Convolutional Neural Networks (CNNs) are inherently constrained by discrete kernels, making them sensitive to input resolution and dimensionality. This paper introduces the Continuous Convolutional Neural Network (CCNN), a general-purpose architecture that utilizes a continuous kernel generator to decouple model parameters from data resolution. By representing kernels as continuous functions, the CCNN achieves state-of-the-art performance across 1D, 2D, and 3D modalities—including audio, images, and point clouds—using a single, unified structural design.

Introduction

The success of deep learning has often relied on task-specific architectures. A CNN optimized for 32x32 images typically requires significant redesign—adjusting strides, pooling layers, and kernel sizes—to process high-resolution images or 1D sequential data. This "brittleness" stems from the use of discrete kernels: fixed grids of weights tied to specific spatial or temporal resolutions.

To overcome these limitations, the Continuous Convolutional Neural Network (CCNN) replaces discrete weight matrices with a continuous kernel generator. This allows the model to process data of arbitrary length, resolution, and dimensionality without structural modifications, effectively creating a single architecture capable of handling diverse data types.

Methodology: The Continuous Convolutional Kernel

The core innovation of the CCNN is the transition from stored weight grids to a functional representation of kernels.

Kernel Generation and Coordinate Mapping

Instead of a static matrix, the CCNN employs a small neural network, $\phi_{Kernel}$, to generate kernel values. For any given relative coordinate (e.g., $x, y, z$), the model queries $\phi_{Kernel}$ to determine the weight at that position. This approach offers several advantages:

  1. Resolution Independence: Since the kernel is a continuous function over $\mathbb{R}^d$, it can be sampled at any density. This enables zero-shot generalization, where a model trained on low-resolution data can be deployed on high-resolution data without retraining.
  2. Global Context: Unlike standard CNNs that use small (e.g., 3x3) local filters and rely on pooling to expand their receptive field, CCNN kernels can span the entire input domain at every layer. This eliminates the need for task-specific downsampling or complex hierarchical structures like U-Nets.

Stability and Efficiency

Implementing continuous kernels requires addressing two technical hurdles identified by the authors:

  • Initialization Fix: Standard initialization schemes often lead to exploding variance in continuous kernels. The authors propose a specific re-weighting of the generator's final layer to ensure stable training dynamics.
  • Depthwise Separability: To maintain parameter efficiency, the CCNN utilizes a continuous version of depthwise separable convolutions. This allows for wider, more expressive networks without a massive increase in the parameter count.

Experimental Evaluation

The CCNN was evaluated across a diverse range of benchmarks spanning multiple dimensions, using the same underlying architecture for all tasks.

1D and Sequential Data

On the Long Range Arena (LRA) benchmark, a CCNN with 2 million parameters achieved an average score of 77.02. Notably, on the Pathfinder task—a 2D challenge often treated as a long 1D sequence—the CCNN reached 96.00% accuracy, nearly 10 points higher than previous state-of-the-art models. In audio processing, the CCNN matched the performance of specialized models like S4 on raw Speech Commands (98.44%) and demonstrated the ability to handle varying sampling rates zero-shot.

2D and 3D Data

The architecture demonstrated robust performance on standard image datasets (CIFAR10/100) and 3D point cloud classification (ModelNet40). In 3D tasks, a CCNN with only 200k parameters outperformed larger, more complex models like Perceiver IO, demonstrating the extreme efficiency of the continuous representation.

Key Insights

A significant discovery occurred during 1D sequence training. When trained on flattened image pixels, the CCNN's learned kernels exhibited periodic patterns corresponding exactly to the original 2D image width. This suggests the model autonomously "discovered" the underlying spatial structure of the data, despite being presented with a 1D input string.

Furthermore, the CCNN's global kernels bake context into every layer. By removing the dependency between kernel size and parameter count, the model achieves a level of structural simplicity where the "global context" is a fundamental property of the convolution itself rather than an emergent property of depth.

Limitations and Future Work

While powerful, the CCNN faces computational trade-offs. Global convolutions are typically optimized using Fast Fourier Transforms (FFTs), which are highly efficient on regular grids but do not apply to irregular data like point clouds. In these cases, the model must render unique kernels for every point, which is computationally heavy. Additionally, sparse 3D data can lead to "aliasing" (high-frequency noise) in the continuous kernels, suggesting a need for integrated anti-aliasing techniques in future iterations.

Conclusion

The Continuous Convolutional Neural Network represents a step toward a truly general-purpose vision and sequence model. By decoupling kernels from the underlying grid, the CCNN provides a flexible, parameter-efficient framework capable of mastering diverse tasks across N-dimensional space without the need for task-specific engineering.

Summary updated

BibTeX
@inproceedings{knigge2023modelling,
  author = {David M. Knigge and David W. Romero and Albert Gu and Efstratios Gavves and Erik J. Bekkers and Jakub M. Tomczak and Mark Hoogendoorn and Jan-Jakob Sonke},
  title = {{Modelling Long Range Dependencies in N-D: From Task-Specific to a General Purpose CNN}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=ZW5aK4yCRqU},
}
Figure