TL;DR
Researchers have introduced FactorLibrary, a reinforcement learning (RL) framework that finds minimal arithmetic circuits for polynomials by treating the task as a recursive decomposition problem. By caching factorizable subexpressions as reusable subgoals and shifting from a "bottom-up" construction to a "top-down" splitting strategy, their agents achieved a 91.8% success rate in finding optimal circuits, significantly outperforming traditional search methods.
What Problem Does This Paper Address?
At the heart of algebraic complexity theory lies a deceptively simple question: what is the smallest number of addition and multiplication gates needed to compute a specific polynomial? This is the arithmetic circuit problem.
Finding these minimal circuits is a "combinatorially hard" problem. As the number of variables and the desired circuit complexity grow, the number of possible gate combinations explodes. Previous attempts used "bottom-up" RL, where an agent starts with variables and constants and adds gates one by one. However, this approach is like trying to build a skyscraper from the ground up without a blueprint; the agent often gets lost in a sea of useless intermediate expressions before ever reaching the target polynomial.
Methods
The authors propose two major shifts in how we approach this search:
- FactorLibrary (The "Memory"): They created a library that stores "useful" polynomials—specifically those that are easily factorizable. This library acts as a symbolic memory. In a bottom-up approach, it provides "subgoal rewards" when an agent happens to build a known useful piece. In a top-down approach, it suggests smart ways to split a complex polynomial into simpler parts.
- Top-Down Formulation: Instead of building up from variables, the top-down agent starts with the target polynomial $f$ and decides how to split it into a sum ($f = g + h$). The environment then uses deterministic factorization algorithms to automatically handle the multiplication gates. This process repeats recursively until the agent reaches basic variables or constants.
- Algorithmic Backbone:
- Bottom-Up: Uses Gumbel-PPO-MCTS, combining Proximal Policy Optimization with Monte Carlo Tree Search and Gumbel sampling for better exploration.
- Top-Down: Compares PPO+MCTS with Soft Actor-Critic (SAC). While PPO+MCTS is more stable, SAC (an off-policy method) proved to be significantly faster.
Datasets
The study focuses on two-variable polynomials over the finite field $\mathbb{F}_5$.
- Training/Evaluation Sets: A fixed 450-target training set and a disjoint 207-target held-out set for testing generalization.
- Complexity Buckets: Targets are categorized by "heuristic size" ($C_1$ to $C_{10}$), representing the number of gates in the circuit.
- Polynomial Families: The targets include Horner schemes, sums of products, and elementary symmetric polynomials.
Key Insights and Ideas
- Reversing the Search Direction is a Game-Changer: The top-down approach drastically reduces the "effective action space." Because multiplication is handled by deterministic factorization, the agent only needs to worry about addition split points. This makes the search tree much shallower and easier to navigate.
- Subgoals as "Lemmas": The FactorLibrary functions similarly to a "lemma library" in automated theorem proving. By learning to recognize and reuse successful sub-constructions across different episodes, the agent doesn't have to "reinvent the wheel" for every new polynomial.
- Generalization over Memorization: The high success rate on the held-out set (91.8%) proves that the agents aren't just memorizing specific circuits; they are learning general heuristics for how polynomials "want" to be decomposed.
Key Results
- Top-Down Superiority: The top-down PPO+MCTS agent maintained a 91.8% success rate for finding optimal circuits up to complexity 8.
- Bottom-Up Failure: The bottom-up agent performed well on very simple circuits (99.2% for $C_3$) but collapsed to a 7.8% success rate at $C_{10}$ due to the combinatorial explosion of the action space.
- Efficiency of SAC: The top-down SAC agent achieved a peak success rate of 92.8% and trained in just 30 minutes, compared to 2.5 hours for the PPO+MCTS version, though it was slightly less stable in late-stage training.
- Baseline Comparison: All RL methods far exceeded the uniform random baseline, which only managed a 40% success rate.
Limitations and Future Work
- Scalability: The current experiments are limited to two variables and small coefficients (in $\mathbb{F}_5$). The authors acknowledge that the action space for top-down splitting still grows significantly as the degree of the polynomial increases.
- Complexity Ceiling: The study only reaches circuits of complexity 10. Real-world applications in algebraic complexity often involve much larger structures.
- Future Directions: The team plans to scale the system to handle more variables and higher-degree targets. They also aim to apply these models to find efficient circuits for "VNP-hard" polynomials, such as the permanent, which is a holy grail in the field of computational complexity.
Summary updated