NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Integer Factorization with Compositional Distributed Representations

Denis Kleyko, Connor Bybee, Christopher J. Kymn, Bruno A. Olshausen, Amir Khosrowshahi, Dmitri E. Nikonov, Friedrich T. Sommer, Edward Paxon Frady

TL;DR

Researchers have developed a way to perform integer factorization—the math problem behind much of modern cryptography—using high-dimensional "hypervectors." By combining a technique called Fractional Power Encoding with "Resonator Networks," they transform the hard combinatorial task of finding factors into a search process that can run efficiently on brain-inspired neuromorphic hardware.

What Problem Does This Paper Address?

Integer factorization (finding the prime numbers that multiply together to make a specific composite number) is a classic "hard" problem in computer science. While easy for small numbers, it becomes computationally explosive as numbers grow, which is why it's used to secure everything from bank transactions to private emails.

Traditional approaches rely on digital logic and number theory. However, the field of Neuromorphic Computing—which builds hardware that mimics the brain's parallel, energy-efficient structure—needs a different way to represent and solve these problems. The challenge is: how do you represent discrete numbers and the operation of multiplication in a way that a neural network can "understand" and solve?

Methods

The authors use a framework called Vector Symbolic Architectures (VSA), also known as Hyperdimensional Computing. Here’s the breakdown of their novel approach:

  1. Fourier Holographic Reduced Representations (FHRR): They represent data as high-dimensional vectors (hypervectors) consisting of complex-valued "phasors" (angles).
  2. The Logarithmic Trick: In VSA, there is a "binding" operation ($\odot$) that combines two vectors. Usually, this doesn't map directly to multiplication. The authors solved this by using Fractional Power Encoding (FPE) on the logarithms of numbers. Because $\log(x \cdot y) = \log(x) + \log(y)$, the binding of two hypervectors representing $\log(x)$ and $\log(y)$ results in a hypervector representing the product $xy$.
  3. Resonator Networks: To factorize a number, you start with the hypervector of the product and need to find the constituent factor hypervectors. A Resonator Network is an iterative dynamical system that "searches in superposition." It tests many possible factor combinations simultaneously, using interference to cancel out wrong guesses and amplify the correct factors.

Datasets

Since this is a fundamental math/algorithmic paper, the authors did not use standard image or text datasets. Instead, they generated:

  • Semiprimes: Numbers formed by multiplying exactly two primes.
  • 3-almost primes: Numbers formed by multiplying three primes.
  • Prime Pools: They tested the system against sets of potential factors ranging from small primes to pools containing over 16,000 candidate primes.

Key Insights and Ideas

  • Multiplication as Vector Binding: The most significant "aha" moment is mapping the multiplication of integers to the binding of hypervectors via the logarithmic domain. This turns a discrete math problem into a continuous state-space problem.
  • Search in Superposition: Unlike a standard computer that might check factors one by one, the Resonator Network considers the entire pool of possible primes at once. It’s a "classical analog" to the superposition principle used in quantum computing.
  • Linear Scaling: Surprisingly, the dimensionality of the hypervectors ($n$) only needs to grow linearly with the number of possible factors to maintain high accuracy. This suggests the method is highly scalable for specific search ranges.
  • Symbolic vs. Subsymbolic: By adjusting a parameter ($\beta$), the authors can choose whether the system treats numbers as "similar" if they are numerically close (subsymbolic) or as completely distinct entities (symbolic). For factorization, they found that a "purely symbolic" mode is necessary.

Key Results

  • High Accuracy: The system achieved near-perfect (95%+) accuracy in factorizing semiprimes, provided the hypervector dimensionality was large enough relative to the pool of possible factors.
  • Fast Convergence: In the "high-fidelity" regime, the Resonator Network typically identifies the correct factors in fewer than 40 iterations.
  • Generalization: The method successfully scaled from 2-factor (semiprime) to 3-factor problems by simply adding another "resonator" population to the network.
  • Hardware Potential: The operations involved (Hadamard products and Fast Fourier Transforms) are extremely efficient to implement on parallel hardware like GPUs or specialized neuromorphic chips (e.g., Intel’s Loihi).

Limitations and Future Work

  • The "Prime Pool" Constraint: The current method requires an "item memory" of all possible prime factors. While it can search this pool very fast, it doesn't "discover" new primes outside its known vocabulary.
  • Exponential Growth of Primes: While the vector dimensionality scales linearly with the number of primes, the number of primes itself grows exponentially with the number of bits in an integer. Therefore, this isn't a "magic bullet" to break RSA encryption on current hardware, but rather a new way to handle combinatorial searches.
  • Future Directions: The authors suggest applying this "search in superposition" to other difficult problems, like the "subset-sum problem" or finding the maximum/minimum in a complex dataset. They also aim to implement this directly on spiking neuromorphic hardware to measure actual energy savings.

Summary updated

BibTeX
@inproceedings{kleyko2022integer,
  author = {Denis Kleyko and Connor Bybee and Christopher J. Kymn and Bruno A. Olshausen and Amir Khosrowshahi and Dmitri E. Nikonov and Friedrich T. Sommer and Edward Paxon Frady},
  title = {{Integer Factorization with Compositional Distributed Representations}},
  booktitle = {NICE},
  year = {2022},
  url = {https://openreview.net/forum?id=kBUlfx_WeDr},
}

Loading related content...

Figure