NdLinear: Preserving Multi-Dimensional Structure for Parameter-Efficient Neural Networks
Abstract
In deep learning, processing multidimensional inputs (e.g., images, medical scans, and time series) is an important task that often requires flattening the inputs. We introduce , a drop-in replacement for linear layers that operates directly on tensors, requiring no flattening. By applying transformations separately along each dimension, NdLinear preserves native data structure while achieving dramatic parameter reductions, often by orders of magnitude, with minimal memory overhead. We prove NdLinear maintains expressivity through structured Tucker decomposition while preserving VC-dimension scaling. Extensive experiments demonstrate NdLinear's capacity to achieve significant parameter reductions with substantial wall-clock efficiency gains and minimal memory overhead. For instance, our matches or exceeds standard LoRA on language reasoning tasks using up to fewer parameters. Experiments across CNNs, RNNs, Transformers, and MLPs on vision, language, time-series, and tabular tasks consistently demonstrate NdLinear's efficiency gains. While excelling at axis-separable tasks, NdLinear has limitations with entangled spatial interactions. By processing data in its original N-dimensional form, NdLinear provides a theoretically grounded, practical component for building more efficient neural architectures.
Cite
@article{arxiv.2503.17353,
title = {NdLinear: Preserving Multi-Dimensional Structure for Parameter-Efficient Neural Networks},
author = {Alex Reneau and Jerry Yao-Chieh Hu and Zhongfang Zhuang and Ting-Chun Liu and Xiang He and Judah Goldfeder and Nadav Timor and Allen G Roush and Ravid Shwartz-Ziv},
journal= {arXiv preprint arXiv:2503.17353},
year = {2025}
}
Comments
Code is available at https://github.com/ensemble-core/NdLinear