Who Said Neural Networks Aren't Linear?

Nimrod Berman, Assaf Hallak, Assaf Shocher
10/9/2025
cs.LG

No official code found. Best implementation: gnocchiarsugo/NN-Linearity (0 stars, last commit 2025-11-08).

Abstract

Neural networks are famously nonlinear. However, linearity is defined relative to a pair of vector spaces, $f$$:$$X$$\to$$Y$. Is it possible to identify a pair of non-standard vector spaces for which a conventionally nonlinear function is, in fact, linear? This paper introduces a method that makes such vector spaces explicit by construction. We find that if we sandwich a linear operator $A$ between two invertible neural networks, $f(x)=g_y^{-1}(A g_x(x))$, then the corresponding vector spaces $X$ and $Y$ are induced by newly defined addition and scaling actions derived from $g_x$ and $g_y$. We term this kind of architecture a Linearizer. This framework makes the entire arsenal of linear algebra, including SVD, pseudo-inverse, orthogonal projection and more, applicable to nonlinear mappings. Furthermore, we show that the composition of two Linearizers that share a neural network is also a Linearizer. We leverage this property and demonstrate that training diffusion models using our architecture makes the hundreds of sampling steps collapse into a single step. We further utilize our framework to enforce idempotency (i.e. $f(f(x))=f(x)$) on networks leading to a globally projective generative model and to demonstrate modular style transfer.

View on arXivView PDF

Code Implementations(1)

Implementation of 2510.08570 on a simple test case

00Jupyter NotebookNov 8, 202511 months ago

Cite this paper

@article{berman2025said,
  title  = {Who Said Neural Networks Aren't Linear?},
  author = {Nimrod Berman and Assaf Hallak and Assaf Shocher},
  year   = {2025},
  eprint = {2510.08570},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.08570v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2510.08570.svg)](https://codeofpaper.com/paper/2510.08570)

Discussion