---
title: 'AFSAT: GPU-Accelerated Fourier SAT Solver'
url: https://www.emergentmind.com/topics/accelerated-fourier-sat-afsat
type: topic
---

# AFSAT: GPU-Accelerated Fourier SAT Solver

Searching arXiv for AFSAT and related FourierSAT/FastFourierSAT papers.
Accelerated Fourier SAT (AFSAT) is a fully engineered, GPU-accelerated solver for pseudo-Boolean satisfiability problems whose constraints are symmetric. It realizes and extends the FourierSAT/FastFourierSAT line of work by supporting heterogeneous mixtures of symmetric pseudo-Boolean constraints within the same instance, providing a robust continuous local search (CLS) kernel compiled via JAX/XLA with automatic differentiation and vectorization, addressing numerical stability issues through a tailored discrete Fourier transform (DFT) construction, and scaling nearly linearly across multiple accelerators using array sharding [2606.06641]. In its immediate lineage, FourierSAT introduced a Fourier expansion-based algebraic framework for solving hybrid Boolean constraints [1912.01032], and FastFourierSAT supplied a proof-of-concept GPU-oriented realization based on gradient-driven CLS and an FFT-inspired convolution pipeline for elementary symmetric polynomials (ESPs) [2308.15020]. The supplied literature also uses the acronym AFSAT for a distinct quantum-inspired projection-and-decimation solver instantiated by AmplificationSAT [2212.04016].

## 1. Historical lineage and conceptual positioning

FourierSAT is an incomplete SAT solver based on Fourier analysis of Boolean functions. Its core construction is the sum of closed-form Fourier expansions of clauses, relaxed from $\{-1,1\}^n$ to $[-1,1]^n$, yielding a differentiable objective suitable for gradient-based search; the framework was designed for systems consisting of different types of constraints, including CNF, XOR, NAE, and cardinality constraints [1912.01032].

FastFourierSAT is a highly parallel hybrid SAT solver based on gradient-driven continuous local search. In that work, Accelerated Fourier SAT refers to a CLS framework that accelerates the evaluation and differentiation of Walsh expansions for Boolean constraints by exploiting FFT-inspired convolution and massive GPU parallelism. The concrete realization, FastFourierSAT, computes the dominant quantities—ESPs and their gradients—via an FFT-inspired batched convolution that is vectorized and amenable to GPU execution, achieves the same asymptotic work complexity as the best sequential CLS, and incorporates restart heuristics native to CLS [2308.15020].

The 2026 AFSAT system is the fully engineered successor in this line. It supports any heterogeneous mixture of symmetric constraint types and lengths within a single problem instance, uses JAX for pure function composition, automatic vectorisation, automatic differentiation, and just-in-time compilation, and emphasizes runtime performance, memory efficiency, and numerical stability [2606.06641].

A recurring point of comparison is CDCL. In the FastFourierSAT formulation, CDCL solvers perform discrete, sequential search with conflict analysis and clause learning; they excel on CNF instances but are hard to exploit for fine-grained data-parallel acceleration. By contrast, FourierSAT, FastFourierSAT, and AFSAT move the computational bottleneck to evaluating and differentiating polynomials, described as structured linear algebra that maps naturally to GPUs [2308.15020].

## 2. Problem class, representations, and optimization objective

AFSAT focuses on symmetric pseudo-Boolean constraints. Formally, let $S \subseteq \{1,\dots,n\}$ index a subset of variables $x \in \{0,1\}^n$. A constraint $C$ over $S$ is symmetric if there exists a function $h : \{0,\dots,|S|\} \to \{0,1\}$ such that
$$
C(x) = h\!\left(\sum_{i \in S} x_i\right).
$$
Under the Walsh-Fourier embedding, variables are mapped to $X \in \{-1,1\}^n$, and symmetricity equivalently means that $C$ depends only on the Hamming weight, or equivalently the sum of literals, of the subset [2606.06641].

AFSAT accepts hybrid instances via an extended DIMACS-like input grammar and internally normalizes CARD inequalities to $\ge$ or $<$ forms. Its parser performs automatic simplifications, including unit propagation, trivial elimination of constraints like CARD-0, EO units, reductions such as CARD-1$\to$CNF and EK-1$\to$EO, and detection of conflicting units [2606.06641].

| Constraint type | Form |
|---|---|
| CNF disjunction (OR) | $\sum x_i \ge 1$ |
| At-most-one (AMO) | $\sum x_i \le 1$ |
| Exactly-one (EO) | $\sum x_i = 1$ |
| Exactly-k (EK) | $\sum x_i = k$ |
| Not-all-equal (NAE) | $0 < \sum x_i < |S|$ |
| XOR (odd parity) | $\sum x_i \equiv 1 \bmod 2$ |
| Cardinality-k threshold (CARD) | $\sum x_i \ge k$, plus $<,\le,>,\ge$ variants |

The continuous formulation is a Walsh-Fourier relaxation. For a Boolean formula $\phi$ decomposed into symmetric constraints $C_1,\dots,C_m$ over $\mathbf{X} \in [-1,1]^n$, the Fourier expansion is
$$
\mathcal{F}[f](\mathbf{X}) \;=\; \sum_{S \subseteq [n]} \hat{f}(S)\;\prod_{i \in S} X_i,
$$
and AFSAT minimizes
$$
\min_{\mathbf{X} \in [-1,1]^n} \; E(\mathbf{X}) \;=\; \sum_{k=1}^m \mathcal{F}[C_k](\mathbf{X}).
$$
Satisfaction corresponds to $E(X) = -m$, since each satisfied constraint contributes $-1$; violation increases the energy above $-1$ per constraint. The solver also computes
$$
\mathrm{unsat\_count}(\mathbf{X}) \;=\; \sum_{k=1}^m \mathbf{1}\!\left[ \mathcal{F}[C_k](\mathbf{X}) > 0 \right].
$$
No extra penalty terms or smoothing are required because the Walsh-Fourier expansion is multi-linear and differentiable on $[-1,1]^n$; projection enforces bounds, and optional partial assignments are handled via gradient masking [2606.06641].

In the FastFourierSAT precursor, the same basic idea appears in weighted form. If $f$ has constraints $C = \{c_i\}$ and each constraint $c$ has Walsh expansion $\mathrm{WE}_c(x)$, then
$$
F_f(x) = \sum_{c \in C} w_c \,\mathrm{WE}_c(x), \qquad x \in [-1,1]^n.
$$
There, $f$ is satisfiable iff
$$
\min_{x \in [-1,1]^n} F_f(x) = -\sum_{c \in C} w_c,
$$
and if a minimizer $x^\*$ lies on $\{\pm 1\}^n$, $\mathrm{sgn}(x^\*)$ encodes a satisfying assignment [2308.15020].

## 3. Walsh expansions, elementary symmetric polynomials, and DFT evaluation

For symmetric constraints, AFSAT exploits the fact that the Walsh-Fourier evaluation can be written in terms of elementary symmetric polynomials. For a symmetric constraint over $k$ literals with continuous values $X_1,\dots,X_k$,
$$
\mathcal{F}[C](\mathbf{X}) \;=\; \sum_{j=0}^{k} \hat{f}(j)\; e_j^{k}(\mathbf{X}),
$$
where $\hat{f}(j)$ are the Fourier coefficients grouped by cardinality $j$ and $e_j^k$ are ESPs, the sum over all $j$-sized products of distinct variables [2606.06641].

The generating-polynomial viewpoint is central in the FastFourierSAT derivation:
$$
P(t) = \prod_{i=1}^{n} (1 + x_i t) = \sum_{k=0}^{n} e_k(x_1,\dots,x_n) t^k.
$$
This identifies the ESP vector with the coefficients of a product polynomial and makes convolution the natural computational primitive [2308.15020].

AFSAT computes ESPs in the frequency domain using a tailored DFT. Let $W$ be the $(k+1)$-dimensional DFT matrix with entries
$$
W_{j\ell} \;=\; \omega^{j\ell}, \qquad \omega \;=\; \exp\!\left(\frac{2\pi i}{k+1}\right), \quad j,\ell=0,\dots,k,
$$
and let $W^\*$ be the conjugate transpose. For each variable $X_i$, form the padded sequence $s^{(i)} = [X_i,\,1,\,0,\dots,0] \in \mathbb{C}^{k+1}$. Then
$$
\widehat{s}^{(i)} = W s^{(i)}, \qquad
\widehat{e}^{k} = \widehat{s}^{(1)} \odot \widehat{s}^{(2)} \odot \cdots \odot \widehat{s}^{(k)}, \qquad
e^{k} = W^{*}\widehat{e}^{k},
$$
which yields the compact product form
$$
\widehat{e}^{k}_j \;=\; \prod_{i=1}^{k} \left(\omega^{j} + X_i\right), \quad j=0,\dots,k,
\qquad
e^{k} \;=\; W^{*}\left( \left[\prod_{i=1}^{k} (\omega^j + X_i)\right]_{j=0}^{k} \right).
$$
Constraint evaluation then becomes
$$
\mathcal{F}[C](\mathbf{X}) \;=\; \hat{f}^{\top} e^{k}(\mathbf{X}).
$$
This DFT-based construction is the basis of both the FastFourierSAT proof-of-concept and the engineered AFSAT solver [2606.06641].

FastFourierSAT states the complexity in clause-local terms. For a clause of length $k$, outer addition costs $k(k+1)$ additions, row-wise reduce-product costs $k(k+1)$ multiplications, and the final contraction costs $O(k)$ flops, for total sequential work $O(k^2)$, matching GradSAT’s $O(k^2)$ and improving on FourierSAT’s $O(k^3)$ explicit gradient. Under unlimited resources, the balanced tree structure gives ideal parallel time $O^\*(\log k)$ [2308.15020].

The same structure also explains a special case of practical importance. For XOR constraints, the Walsh spectrum is degenerate, and algebraic simplifications eliminate the transforms entirely, reducing work to $O(k)$ and avoiding complex arithmetic [2308.15020].

## 4. Gradients, projected descent, and execution model

AFSAT uses Projected Gradient Descent with line search and projection to $[-1,1]^n$ after each step. A single PGD iteration computes a step length $\eta$ via a lineSearch procedure and updates
$$
\mathbf{X}^{(t)} \leftarrow \mathrm{proj}_{[-1,1]^n}\!\left(\mathbf{X}^{(t-1)} - \eta \,\nabla E(\mathbf{X}^{(t-1)})\right).
$$
Stopping occurs when either the step size falls below a threshold, $\eta < \delta$, a satisfying assignment is found with $\mathrm{unsat\_count}=0$, or a max-iteration limit $d$ is reached. AFSAT runs PGD in parallel across a batch $B$ of candidate assignments; converged candidates idle until the batch finishes [2606.06641].

The gradient can be obtained analytically in a form conforming to the DFT evaluation. For a literal index $r$ in a clause,
$$
\frac{\partial}{\partial X_r} \widehat{e}^{k}_j \;=\; \prod_{i\neq r} \left(\omega^{j} + X_i\right),
$$
hence
$$
\frac{\partial e^{k}}{\partial X_r} \;=\; W^{*}\!\left( \left[ \prod_{i\neq r} (\omega^j + X_i) \right]_{j=0}^{k} \right), \qquad
\frac{\partial \mathcal{F}[C]}{\partial X_r} \;=\; \hat{f}^{\top}\! \left( \frac{\partial e^{k}}{\partial X_r} \right).
$$
AFSAT nevertheless uses JAX automatic differentiation end-to-end, while retaining the analytic form as a structural explanation of the computation [2606.06641].

FastFourierSAT made the same derivative structure explicit through the ESP identity
$$
\frac{\partial e_j(x_1,\dots,x_k)}{\partial x_i} = e_{j-1}(x_{-i}),
$$
so that for a symmetric clause
$$
\frac{\partial \mathrm{WE}_c(x)}{\partial x_i}
= \sum_{j=1}^{k} \hat f_c[j]\, e_{j-1}(x_{-i}).
$$
That paper also described restart heuristics native to CLS. Weighting uses an ERWA update,
$$
w_c^{(t+1)} = (1-\alpha) w_c^{(t)} + \alpha r_c^{(t)},
$$
with $\alpha \in [0,1]$ and $r_c$ derived from normalized unsatisfaction counts across parallel tasks; rephasing alternates among Original, Flipped, and Random phases, with $(\mathrm{ROF})^\infty$ for SAT-like tasks and $(\mathrm{RF})^\infty$ for optimization tasks [2308.15020].

In systems terms, the two implementations occupy different points in the design space. FastFourierSAT describes custom kernels, shared-memory staging of $\Gamma$, warp-level reductions, and clause bucketing by length. AFSAT instead emphasizes pure function composition, JIT compilation with XLA, automatic vectorization over batch candidates, automatic differentiation, and array sharding across multiple GPUs in a compute-follows-data SPMD regime [2308.15020], [2606.06641].

## 5. Numerical stability, memory behavior, and throughput engineering

AFSAT’s 2026 contribution is not only algorithmic generalization but also numerical engineering. The product terms
$$
\prod_{i=1}^{k} (\omega^j + X_i)
$$
can reach magnitude approximately $2^k$ when $\omega^j \approx 1$ and $X_i \approx 1$, or vanish like $\epsilon^k$ when $\omega^j \approx -1$. The supplied description states that this stresses IEEE-754 FP64 when $k \gtrsim 50$, yields catastrophic cancellation in the inverse DFT and incorrect energies, and can produce exploding or vanishing gradients [2606.06641].

AFSAT addresses these issues through a tailored DFT for conjugate symmetry and precision. The forward and inverse DFT matrices are constructed explicitly to guarantee exact conjugate symmetry between paired terms; cumulative error from repeated exponentiation that violates conjugate pairing is avoided; combinatorial Fourier-coefficient terms are computed in arbitrary-precision integer arithmetic with divisions and float conversion deferred to the last stage; and algebraic symmetry is mirrored explicitly rather than computing both halves independently. The implementation uses FP64, and the crucial improvements are attributed to the symmetry-preserving DFT matrix construction, avoiding repeated exponentiation error, and deferred floating-point operations [2606.06641].

Memory efficiency and throughput are treated as first-order design constraints. AFSAT stores only essential arrays: precomputed small DFT matrices per clause length, literal index lists, and Fourier coefficient vectors. Peak throughput occurs at batch sizes that consume approximately $0.1\%\!-\!1\%$ of GPU memory, correlated to roughly twice the device’s cache size. Larger batches saturate memory, causing cache thrashing and latency that reduce completed descents per unit time; beyond the peak, throughput decays roughly logarithmically with memory consumption [2606.06641].

The proof-of-concept FastFourierSAT presents the same issue in a lower-level form. It recommends contiguous clause literals in global memory, contiguous storage of precomputed transformed coefficients, structure-of-arrays for coalesced reads across clauses, shared-memory storage for per-clause $\Gamma$, and uniform clause lengths within a batch or padding to the next power-of-two to reduce divergence [2308.15020].

Taken together, these engineering choices indicate that AFSAT’s practical contribution is not reducible to a single transform identity. The supplied evidence points instead to a solver architecture in which numerical conditioning, cache behavior, vectorization strategy, and batching policy are tightly coupled [2606.06641].

## 6. Empirical results, limitations, and adjacent usages of the acronym

FastFourierSAT reports that gradient computation is accelerated by over $100\times$ versus CPU CLS prototypes on large instances. Specific RQ1 numbers are approximately $31.36\times$ for xor3, approximately $148.59\times$ for card3, and approximately $1.2\times$ on small instances where preprocessing dominates. On the benchmark suites summarized in the supplied text, FastFourierSAT solved all cardinality instances, solved all parity-learning instances via diversified multi-start and GPU acceleration, achieved average scores near $100\%$ on MSE’19 MaxCut, and on large planted partition graphs achieved best solutions for $323$ instances versus $83$ for the virtual best solver without CLS [2308.15020].

AFSAT replicates FastFourierSAT’s random cardinality and XOR-based parity learning benchmarks and also runs mixed heterogeneous pseudo-Boolean instances. It achieves equal or better cumulative solution times than FastFourierSAT, worst-case parity with universally lower baseline times due to improved preprocessing and kernel compilation or optimization, substantially reduced GPU memory use via compact data structures and tailored DFT matrices, and near-linear throughput scaling with GPU count through JAX array sharding. The experiments were run on NCI’s Gadi supercomputer, using the Volta partition with NVIDIA Tesla V100 GPUs [2606.06641].

The method remains incomplete. The supplied description states that CLS cannot certify unsatisfiability; AFSAT therefore functions naturally as a MaxSAT solver, reporting unsatisfied-constraint counts and best-found assignments. It also identifies a practical ceiling around $k \approx 50$, with constraints of length $k \ge 48$ often exhibiting degeneracy on FP64 GPUs. Long constraints should be decomposed into shorter equivalents where possible; the multi-linear objective hosts many saddle points; first-order PGD can stall; success probability and throughput are materially affected by step-size schedules and batch sizes; and very long clauses in a heterogeneous mix can dominate memory layout and suppress throughput [2606.06641].

Several misconceptions are explicitly addressed by the supplied literature. In the FastFourierSAT paper, “hybrid” refers to combining continuous optimization with history-aware heuristics and a multi-start portfolio on GPUs, not to coupling with CDCL, and hybridization with CDCL is discussed only as a future direction. The same source notes that on CNF-heavy, propagation-driven industrial instances, CDCL or portfolio approaches may still outperform CLS [2308.15020].

A separate ambiguity concerns the acronym itself. The supplied description attached to “Quantum-Inspired Approximations to Constraint Satisfaction Problems” uses AFSAT for a projection-and-decimation SAT solver instantiated by AmplificationSAT. That method constructs low-complexity approximations $g_t$ to the oracle $\omega$ via orthogonal projection,
$$
g_t = P_{A_t}\,\omega = \mathbf{A}_t (\mathbf{A}_t^\top \mathbf{A}_t)^{-1}\mathbf{A}_t^\top \bm{\omega},
$$
refines the approximation by enlarging the column space, and retrieves assignments through bias-guided decimation using $\beta_i(g)=2^n\hat g(\{i\})$. This is a distinct algorithmic line from the GPU DFT-based CLS solver that now predominates under the name Accelerated Fourier SAT [2212.04016].

Source: https://www.emergentmind.com/topics/accelerated-fourier-sat-afsat