---
title: 'FourierCSP: Continuous Optimization for Finite-Domain CSPs'
url: https://www.emergentmind.com/topics/fouriercsp
type: topic
---

# FourierCSP: Continuous Optimization for Finite-Domain CSPs

Searching arXiv for the named method and closely related finite-domain/Fourier CSP work.
FourierCSP is a continuous optimization framework for finite-domain constraint satisfaction problems (CSPs) that extends continuous local search from Boolean satisfiability to general CSP with finite-domain variables and expressive constraints. It presents a generalized Walsh-Fourier transform for CSP, transforms constraints to compact multilinear polynomials, evaluates the objective and its derivatives via circuit-output probability, and uses projected gradient optimization over products of simplices. The framework is intended to avoid auxiliary variables and memory-intensive encodings associated with Booleanization and CNF conversion, while remaining directly applicable to constraints such as inequalities, disequalities, modulo constraints, and logical combinations of such predicates [2510.04480].

## 1. Problem class and motivation

FourierCSP studies finite-domain CSP instances consisting of variables \(X=\{x_1,\dots,x_n\}\), finite domains \(D=\{\mathrm{dom}(x_1),\dots,\mathrm{dom}(x_n)\}\), and constraints \(C=\{c_1,\dots,c_m\}\), where each constraint \(c_i\) is defined on some scope \(A_i\subseteq X\). The instance formula is
\[
F=\bigwedge_{c_i\in C} c_i.
\]
The target is a satisfying assignment of every \(x_i\) to a value in \(\mathrm{dom}(x_i)\). The setting strictly generalizes Boolean SAT: SAT uses domain \(\{0,1\}\) and Boolean constraints, whereas FourierCSP permits arbitrary finite domains and arbitrary predicates over those values [2510.04480].

The stated motivation is twofold. First, recent continuous local search solvers such as UniSAT, FourierSAT, GradSAT, and FastFourierSAT showed that smooth continuous objectives can be competitive on some SAT instances. Second, many practical CSPs are not naturally Boolean, so SAT-based workflows require Booleanization and often CNF encoding. The paper emphasizes that this can cause severe blowup in the number of variables, the number of clauses, and the memory footprint; its largest Booleanized/CNF-encoded benchmark exceeds **160 million variables** and **710 million clauses**, producing a text CNF of roughly **16 GB** [2510.04480].

The framework is positioned against several established paradigms. SAT/CDCL is effective for Boolean reasoning but is natural only for CNF or Booleanized formulations. ILP can remain compact after linearization but often introduces auxiliary variables and has weaker Boolean reasoning. CP/CP-SAT is more expressive, yet can still require auxiliary or channeling variables and may struggle on some non-linear or modulo constraints. FourierCSP is proposed as a direct finite-domain alternative based on continuous optimization rather than Boolean encoding [2510.04480].

## 2. Finite-domain “Fourier” representation

The core representational step is a finite-domain analogue of Walsh-Fourier expansion built from indicator bases. A constraint is written as a function
\[
f:D\to\{0,1\},
\]
with \(f(X)=1\) iff the assignment \(X\) satisfies the constraint. The basis functions are
\[
\phi_{\alpha}(X)=\prod_{i=1}^n \phi_{\alpha_i}(x_i),
\]
where \(\alpha_i\in \mathrm{dom}(x_i)\) and \(\phi_{\alpha_i}(x_i)=1\) if \(x_i=\alpha_i\) and \(0\) otherwise. Hence \(\phi_\alpha(X)\) is the indicator of the full assignment \(X=\alpha\). The expansion theorem used in the paper is
\[
f(X)=\sum_{\alpha\in D}\left(\hat{f}(\alpha)\cdot \phi_{\alpha}(X)\right),
\]
with coefficients
\[
\hat{f}(\alpha)=\mathbb{E}_{X\sim D}\left[f(X)\cdot\phi_{\alpha}(X)\right].
\]
The paper refers to this as a generalized Walsh-Fourier expansion over finite-domain variables [2510.04480].

A common misunderstanding is to equate this construction with ordinary finite-group Fourier analysis. That is not the formalism adopted here. On the Boolean cube, standard character-based Fourier analysis uses Walsh characters \(\chi_g(x)=(-1)^{g\cdot x}\), more generally characters \(\chi:G\to T\) on finite abelian groups diagonalize convolution operators [1908.07154]. FourierCSP instead uses an indicator-product basis. The paper states explicitly that this is **not** the usual character-based Fourier analysis over finite groups; it is an indicator-product basis expansion [2510.04480].

This choice has a direct algorithmic consequence. A constraint becomes a multilinear polynomial in relaxed assignment variables without introducing auxiliary variables merely to encode finite-domain semantics. The representation is exact rather than heuristic: it computes exact satisfaction probabilities under the relaxation introduced in the next section [2510.04480].

## 3. Continuous relaxation and satisfiability reduction

Because the indicator basis is non-differentiable, FourierCSP relaxes each finite-domain variable \(x_i\) to a probability vector over its domain:
\[
\tilde{D}_i := \left\{p_{i,j}\ \Bigg|\ \min_{j\in\mathrm{dom}(x_i)} p_{i,j}\ge 0,\ \sum_{j\in\mathrm{dom}(x_i)} p_{i,j}=1 \right\}.
\]
The global feasible region is the product of simplices
\[
\tilde{D}=\tilde{D}_1\times \cdots \times \tilde{D}_n.
\]
Here \(p_{i,j}\) is interpreted as the probability that \(x_i\) takes value \(j\) [2510.04480].

The relaxation is tied to a randomized rounding map \(\mathcal R:\tilde D\to D\) defined by
\[
\mathbb{P}[\mathcal{R}(P)_i=j]=p_{i,j}.
\]
Variables are rounded independently, inducing the product distribution
\[
\mathcal{S}_P(X)=\mathbb{P}[\mathcal{R}(P)=X]=\prod_{i=1}^n p_{i,x_i}.
\]
If \(\mathcal F=\sum_{c\in C} f_c\) denotes the number of satisfied constraints, then the continuous objective is its expectation under \(\mathcal S_P\):
\[
\mathbb{E}_{X\sim\mathcal{S}_P}[\mathcal{F}(X)] = \sum_{c\in C}\sum_{\alpha} \left( \hat{f}_c(\alpha)\cdot \prod_{i=1}^{n} p_{i,\alpha_i} \right).
\]
This is the key multilinear polynomial objective of the framework [2510.04480].

The central reduction theorem is
\[
F \text{ is satisfiable if and only if } \max_{P\in \tilde D} \left( \mathbb{E}_{X\sim\mathcal{S}_P}[\mathcal F(X)] \right)=|C|.
\]
Thus the CSP is satisfiable exactly when the maximum expected number of satisfied constraints equals the total number of constraints. The reduction preserves satisfiability exactly, not approximately [2510.04480].

The paper illustrates the semantics with compact closed forms for common predicates. For graph coloring,
\[
\mathbb P[x_u\neq x_v] = 1-\sum_{i=0}^{C-1} p_{u,i}p_{v,i}.
\]
For the scheduling constraint \((t_u\ne t_v)\vee (s_u\ne s_v)\),
\[
1- \left(\sum_\tau p^{(t)}_{u,\tau}p^{(t)}_{v,\tau}\right) \left(\sum_\sigma p^{(s)}_{u,\sigma}p^{(s)}_{v,\sigma}\right)
\]
is the continuous score. For graph-coloring instances with hashing queries,
\[
\mathbb P\!\left[\sum_{i\in h} x_i \bmod 2 =1\right] = \frac{ 1-\prod_{i\in h} \left( 1-2\sum_{j=0}^{\frac{C}{2}-1}\mathbb P[x_i=2j+1] \right) }{2}.
\]
These examples show how disequalities, disjunctions, and parity-style constraints are mapped directly to multilinear or product-form expressions over simplex coordinates [2510.04480].

## 4. Circuit-output probability and MDD-based computation

The paper emphasizes that a naive expansion of the multilinear objective can contain at most exponentially many terms, and that explicit evaluation or differentiation is \(\#P\)-hard in general. FourierCSP therefore replaces explicit polynomial expansion by circuit-output probability (COP) [2510.04480].

For a single constraint \(c\), COP is
\[
COP_c(P)=\sum_{X\in D} f_c(X)\prod_{i=1}^n p_{i,x_i}.
\]
This is exactly \(\mathbb E_{X\sim\mathcal S_P}[f_c(X)]\). The full objective becomes
\[
\mathcal C(P)=\sum_{c\in C} COP_c(P) = \mathbb E_{X\sim\mathcal S_P}[\mathcal F(X)].
\]
FourierCSP therefore optimizes the expected number of satisfied constraints through a sum of COP terms [2510.04480].

Efficient computation is obtained by representing each constraint as a multi-valued decision diagram (MDD). The MDD is treated as a probabilistic computation graph induced by the product distribution over variable assignments. With a compact MDD \(G(V,E)\), COP can be evaluated in time
\[
O(|E|).
\]
The practical efficiency of the method is therefore tied to the structured size of the decision diagrams rather than to the full assignment space [2510.04480].

The top-down dynamic program initializes \(m_{td}[root]=1\), others \(0\), and propagates
\[
m_{td}[u] \mathrel{+}= p_{\mathrm{id}(v),\mathrm{label}(v,u)} \cdot m_{td}[v].
\]
The bottom-up dynamic program initializes \(m_{bu}[true]=1\), \(m_{bu}[false]=0\), and propagates
\[
m_{bu}[v] += p_{\mathrm{id}(v),\mathrm{label}(v,u)} \cdot m_{bu}[u].
\]
The paper states that \(m_{td}[true]=COP_c(P)\) in the top-down pass and \(m_{bu}[root]=COP_c(P)\) in the bottom-up pass. After both traversals, the partial derivative is
\[
\frac{\partial COP_c(P)}{\partial p_{i,j}} = \sum_{v\in\{u:\mathrm{id}(u)=i\} } m_{td}[v]\cdot m_{bu}[v.j].
\]
For the full objective,
\[
\nabla \mathcal C(P)=\sum_{c\in C}\nabla COP_c(P).
\]
The implementation note in the paper is that autodiff may suffice in practice, but the explicit message-passing formulas provide the analytical structure of gradient computation [2510.04480].

## 5. Projected gradient optimization and theoretical guarantees

The optimization problem is
\[
\max_{P\in \tilde D} \mathcal C(P) = \max_{P\in \tilde D}\sum_{c\in C} COP_c(P),
\]
with \(\tilde D\) the product of simplices. Since unconstrained gradient steps do not preserve simplex feasibility, FourierCSP uses projected gradient ascent:
\[
P'_{t+1}=P_t+\eta \cdot \nabla \mathcal C(P_t),
\]
\[
P_{t+1}=\mathrm{proj}_{\tilde D}(P'_{t+1}).
\]
The projection operator is
\[
\mathrm{proj}_{\tilde D}(Q) = \argmin_{P} \left( I_{\tilde D}(P)+\frac{1}{2}\|Q-P\|_2^2 \right),
\]
where \(I_{\tilde D}(P)\) is \(0\) on \(\tilde D\) and \(\infty\) otherwise. Because \(\tilde D\) is a product of simplices, projection decomposes into independent simplex projections [2510.04480].

The projected gradient mapping is defined as
\[
g(P)=\frac{1}{\eta} \left( \mathrm{proj}_{\tilde D}(P+\eta\cdot \nabla \mathcal C(P)) - P \right).
\]
The paper proves a monotonic ascent lemma for multilinear \(\mathcal C\): if
\[
\eta \le \frac{1}{|C|\sqrt N},
\]
where
\[
N=\sum_{i=1}^n |\mathrm{dom}(x_i)|,
\]
then for a projected gradient step \(y=z+\eta g(z)\),
\[
\mathcal C(y)-\mathcal C(z)\ge \frac{\eta}{2}\|g(z)\|^2.
\]
It also uses the Lipschitz bound
\[
|\mathcal C(y)-\mathcal C(z)| \le |C|N^{1/2}\|y-z\|
\]
and
\[
|\mathcal C(y) - \mathcal C(z) - \langle \nabla\mathcal C(z), y-z \rangle| \le \frac{L}{2}\|y-z\|^2, \qquad L=|C|N^{1/2},
\]
to derive convergence to an \(\epsilon\)-projected-critical point in
\[
\mathcal O\!\left(\frac{|C|^2\sqrt N}{\epsilon^{2}}\right)
\]
iterations when \(\eta=1/(|C|\sqrt N)\) [2510.04480].

A structural theorem states that no interior point \(P\in\tilde D\setminus\delta\tilde D\) can be a local maximum of \(\mathcal C(P)\); maxima are attained only on the boundary \(\delta\tilde D\). This matters because boundary points correspond to degenerate or nearly degenerate simplex coordinates and are therefore closer to deterministic assignments. The paper’s decoding mechanism remains randomized rounding,
\[
\mathbb P[\mathcal R(P)_i=j]=p_{i,j},
\]
followed by evaluation of the resulting discrete assignment. The framework is consequently an incomplete solver: it can return a satisfying assignment when one is found, but it does not certify unsatisfiability or global optimality in the manner of complete SAT, ILP, or CP methods [2510.04480].

## 6. Empirical performance, scope, and limitations

The empirical study covers two benchmark families. The constraint-satisfaction suite is task scheduling with \(N_{\text{worker}}\in\{32,64,128,256,512\}\), \(m\in\{4,8,16\}\), \(N_{\text{job}}=m\cdot N_{\text{worker}}\), and 10 random instances per setting. The constraint-optimization suite is graph coloring with hashing queries, using \(N_{\text{node}}\in\{512,1024,2048,4096\}\), \(N_{\text{color}}\in\{8,16,32,64\}\), 10 random instances per setting, and \(N_{\text{node}}\) modulo-2 constraints per instance. Experiments were run on dual AMD EPYC 9654 CPUs with an NVIDIA H100 GPU and a 1000-second timeout [2510.04480].

| Benchmark | FourierCSP result | Comparison reported |
|---|---:|---|
| Task scheduling | Solves all 150 instances | ParaILP 60, CP-SAT 89, Gurobi-ILP 60, LinPB 30 |
| Task scheduling PAR-2 | Best reported | \(13.88\times\) vs CP-SAT, \(17.573\times\) vs Gurobi-ILP, \(23.691\times\) vs LinPB |
| Graph coloring + hashing | Relative score 0.98; best on 84/160 | FourierMaxSAT 0.94, LinPB 0.16, ParaILP no valid solutions |

The paper also reports that FourierSAT fails to solve any instances obtained by Booleanizing the scheduling and graph-coloring benchmarks, which is used as evidence that Boolean-only continuous local search does not transfer automatically to general CSP structure [2510.04480].

The reported strengths are specific. FourierCSP is most useful when variables are naturally finite-domain, constraints admit compact MDD representations, structural regularity enables GPU parallelism, and modulo or parity predicates are present. The paper repeatedly suggests that direct finite-domain modeling, compact COP evaluation, and native handling of modulo constraints are decisive in its best results. A plausible implication is that the framework is particularly well aligned with repetitive, structured combinatorial models rather than with arbitrary heterogeneous CSPs [2510.04480].

Its limitations are equally explicit. The solver is incomplete. Practical efficiency depends on compact decision diagrams, even though COP is \(\#P\)-hard in general. The benchmark families are structurally regular, and the paper notes that Fourier-based continuous local search performs best when constraints have similar structural patterns, which supports strong GPU utilization. Practical optimizer choices such as restart schedules, step-size adaptation, and advanced rounding heuristics are not deeply developed. The conclusion identifies generalization beyond such structural regularity as future work [2510.04480].

FourierCSP therefore occupies a specific place in the broader landscape. It is neither a conventional finite-group Fourier method nor a standard SAT encoding pipeline. It is a continuous optimization framework over products of simplices whose “Fourier” component is an indicator-product expansion of finite-domain predicates, whose computational core is COP on MDDs, and whose optimization engine is projected gradient ascent with theorem-level guarantees. Within that design space, its main significance is to extend the continuous local search paradigm from Boolean SAT to general finite-domain CSPs while avoiding the memory-intensive encodings that often dominate Booleanization-based workflows [2510.04480].

Source: https://www.emergentmind.com/topics/fouriercsp