On the Cryptographic Hardness of Learning Single Periodic Neurons

Min Jae Song, Ilias Zadik, Joan Bruna

Introduction

In deep learning theory, there is a massive gap between what neural networks can empirically learn and what we can mathematically prove is efficiently learnable. To study this, researchers often analyze "hard-to-learn" functions, such as high-frequency oscillating functions (e.g., $f(x) = \cos(2\pi\gamma\langle w, x \rangle)$).

Previous research has shown that learning these periodic neurons is hard for specific, restricted classes of algorithms—namely gradient-based methods and Statistical Query (SQ) algorithms. However, this leaves a glaring question: is it fundamentally hard for any polynomial-time algorithm?

This paper establishes the cryptographic hardness of learning a single periodic (cosine) neuron over Gaussian distributions in the presence of noise. By reducing from the Continuous Learning with Errors (CLWE) problem, the authors show that any polynomial-time algorithm capable of learning this function under polynomially small noise would break worst-case lattice problems foundational to post-quantum cryptography. Conversely, they introduce a novel LLL-based algorithm that efficiently learns the neuron when noise is exponentially small, revealing a fascinating computational-to-statistical gap based on the noise level.

Methodology

The authors map out the hardness landscape of this problem based on the Signal-to-Noise Ratio (SNR). They employ two vastly different methodological approaches for the lower (hardness) and upper (algorithmic) bounds:

  1. Cryptographic Reduction (The Hardness): To prove that learning is hard under polynomially small noise, the authors construct a mathematical reduction from the Continuous Learning with Errors (CLWE) problem. CLWE is a continuous variant of the standard LWE problem used in lattice-based cryptography. Because the cosine function is periodic, it naturally mimics the "modulo 1" wrapping effect of CLWE.
  2. Lattice Basis Reduction (The Algorithm): To prove that learning is possible under exponentially small noise, the authors step away from standard machine learning optimizers (like SGD). Instead, they frame the learning task as an integer relation detection problem. They use the celebrated Lenstra-Lenstra-Lovász (LLL) algorithm—a staple of computational number theory—to deduce the hidden integer periods lost to the cosine function. Once these periods are recovered, finding the neuron's weights reduces to solving a simple linear system.

Key Insights and Results

Hardness landscape based on Signal-to-Noise Ratio (SNR)
  • The Critical Role of Noise: As illustrated above, the computational tractability of learning a cosine neuron is entirely dictated by the noise level (or SNR):
  • Constant noise ($O(1)$ SNR): Statistically impossible to learn efficiently (requires exponential time).
  • Polynomially small noise ($\text{poly}(d)$ SNR): Cryptographically hard (computationally intractable for any polynomial-time algorithm).
  • Exponentially small noise ($\exp((d \log d)^3)$ SNR): Efficiently solvable in polynomial time.
  • Beyond SQ Lower Bounds: By grounding their proofs in worst-case lattice problems (GapSVP), the authors provide a conditional lower bound against all polynomial-time algorithms. This is a much stronger theoretical barrier than previous SQ or gradient-descent lower bounds.
  • Cosine as a Cryptographic Mask: The cosine activation function naturally hides information in two ways: it hides the sign (because it is an even function) and it hides the scale/location (because it is periodic). This makes it a perfect bridge between neural network theory and lattice cryptography.
  • Optimal Sample Complexity via LLL: The proposed LLL-based algorithm can recover the hidden direction $w$ in polynomial time using exactly $d + 1$ samples, provided the noise is bounded by $\exp(-\tilde{O}(d^3))$.
  • Application to Phase Retrieval: Because the cosine function drops the sign of the input, the noiseless version of this learning problem encompasses the famous "phase retrieval" problem. The authors' LLL algorithm achieves the optimal sample complexity ($d+1$ samples) for noiseless phase retrieval, matching prior specialized work.

Limitations and Future Work

  • Algorithmic Scaling: While the LLL-based algorithm runs in polynomial time, its actual runtime scales as $O(d^6 \log^3 M)$. For high-dimensional machine learning tasks, a $d^6$ scaling is computationally prohibitive in practice.
  • Unrealistic Noise Assumptions for the Upper Bound: The polynomial-time algorithm only works if the noise is exponentially small ($\exp(-\tilde{O}(d^3))$). In any real-world dataset, noise levels are vastly higher, placing practical scenarios firmly in the "cryptographically hard" regime.
  • Future Directions: The authors suggest that exploring the LLL algorithm for other high-dimensional statistical inference tasks—especially those currently believed to be computationally hard for gradient-based methods—is a highly promising frontier.

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