On the Cryptographic Hardness of Learning Single Periodic Neurons

Min Jae Song, Ilias Zadik, Joan Bruna

Abstract

We show a simple reduction which demonstrates the cryptographic hardness of learning a single periodic neuron over isotropic Gaussian distributions in the presence of noise. More precisely, our reduction shows that any polynomial-time algorithm (not necessarily gradient-based) for learning such functions under small noise implies a polynomial-time quantum algorithm for solving worst-case lattice problems, whose hardness form the foundation of lattice-based cryptography. Our core hard family of functions, which are well-approximated by one-layer neural networks, take the general form of a univariate periodic function applied to an affine projection of the data. These functions have appeared in previous seminal works which demonstrate their hardness against gradient-based (Shamir'18), and Statistical Query (SQ) algorithms (Song et al.'17). We show that if (polynomially) small noise is added to the labels, the intractability of learning these functions applies to all polynomial-time algorithms, beyond gradient-based and SQ algorithms, under the aforementioned cryptographic assumptions. Moreover, we demonstrate the necessity of noise in the hardness result by designing a polynomial-time algorithm for learning certain families of such functions under exponentially small adversarial noise. Our proposed algorithm is not a gradient-based or an SQ algorithm, but is rather based on the celebrated Lenstra-Lenstra-Lovász (LLL) lattice basis reduction algorithm. Furthermore, in the absence of noise, this algorithm can be directly applied to solve CLWE detection (Bruna et al.'21) and phase retrieval with an optimal sample complexity of $d+1$ samples. In the former case, this improves upon the quadratic-in-$d$ sample complexity required in (Bruna et al.'21).

Introduction

In the quest to understand why deep learning works—and where it fails—researchers often look for "hardness results." While it is well-known that certain functions are hard to learn for specific types of algorithms, like Gradient Descent (which gets stuck in local minima) or Statistical Query (SQ) algorithms (which only see global averages), a more fundamental question remains: are there simple neural network components that are hard for any polynomial-time algorithm to learn?

This work focuses on a single periodic neuron: a function of the form $f(x) = \cos(2\pi\gamma \langle w, x \rangle)$, where $w$ is a hidden direction and $\gamma$ is a high frequency. While seemingly simple, these high-frequency oscillations create a complex landscape for optimization. This paper investigates the "computational-to-statistical gap" in learning these neurons—specifically, how the level of noise in the data determines whether the problem is easy, hard, or mathematically impossible.

Methodology

The researchers employ two primary mathematical tools to map out this hardness landscape:

  1. Cryptographic Reduction: To prove hardness, the authors reduce a fundamental problem in lattice-based cryptography—the Shortest Vector Problem (SVP)—to the task of learning a noisy cosine neuron. They utilize the Continuous Learning with Errors (CLWE) framework. If a polynomial-time algorithm could learn the neuron efficiently under polynomial noise, it would imply a polynomial-time quantum algorithm for solving SVP, a problem widely believed to be intractable.
  2. The LLL Algorithm: For the "easy" regime, the authors depart from standard machine learning optimization. Instead of gradient descent, they use the Lenstra-Lenstra-Lovász (LLL) lattice basis reduction algorithm. LLL is a powerful tool from number theory capable of finding integer relations. By treating the periodic nature of the neuron as a source of integer constraints, they use LLL to "unwrap" the cosine and recover the hidden direction $w$.

The theoretical analysis assumes inputs $x$ are drawn from an isotropic $d$-dimensional Gaussian distribution $N(0, I_d)$, and labels $y$ are generated by $y = \cos(2\pi\gamma \langle w, x \rangle) + \xi$, where $\xi$ represents adversarial or random noise.

The Computational-to-Statistical Gap

A key insight of this work is that the hardness of the problem is intrinsically linked to the Signal-to-Noise Ratio (SNR). The paper identifies a clear phase transition in computational complexity based on the noise level.

As illustrated in the figure above, the landscape is divided into three primary regimes:

  • Impossible Regime ($O(1)$ noise): The problem is information-theoretically impossible or requires exponential time due to the low SNR.
  • Crypto Hard Regime ($1/\text{poly}(d)$ noise): The problem is information-theoretically possible but computationally hard. No polynomial-time algorithm can solve it without breaking modern cryptographic assumptions.
  • Polynomial-Time Possible Regime ($\exp(-\tilde{O}(d^3))$ noise): When noise is exponentially small, a "trapdoor" opens. The LLL algorithm can solve the problem in polynomial time, bypassing the barriers that hinder gradient-based and SQ algorithms.

Key Results and Implications

The paper provides several significant contributions to the understanding of neural network learnability:

  • Hardness Guarantee: It proves that learning cosine neurons with $1/\text{poly}(d)$ noise is as hard as solving the approximate SVP, extending hardness to all polynomial-time learners.
  • Algorithmic Breakthrough: The LLL-based learner succeeds where gradient descent fails by looking at precise algebraic relationships rather than global averages.
  • Optimal Sample Complexity: In the noiseless or very low-noise setting, the hidden direction can be recovered with only $d+1$ samples, reaching the information-theoretic minimum.
  • Applications to Phase Retrieval and CLWE: The LLL technique achieves optimal sample complexity for Phase Retrieval ($d+1$ vs. previous $O(d^2)$) and improves detection bounds for Continuous Learning with Errors.

Limitations and Future Work

Despite these advances, a "noise gap" remains between the polynomial and exponential regimes. The authors conjecture that the intermediate sub-exponential noise regime remains hard, though this is not yet proven. Furthermore, while LLL is polynomial-time, its high-degree complexity (often $O(d^6)$) makes it less practical than SGD for very high dimensions. A major open question is whether these lattice-based insights can be extended to non-periodic activations like ReLU, which are more common in practice but lack the same algebraic structure.

Summary updated

BibTeX
@inproceedings{song2021cryptographic,
  author = {Min Jae Song and Ilias Zadik and Joan Bruna},
  title = {{On the Cryptographic Hardness of Learning Single Periodic Neurons}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=gXdOOeqRN8g},
}
Figure