---
title: 'CSP-PAC: Ambiguities in CSP and PAC'
url: https://www.emergentmind.com/topics/csp-pac
type: topic
---

# CSP-PAC: Ambiguities in CSP and PAC

CSP-PAC is not a standardized formalism in the arXiv sources considered here. One source on Unique \((k,2)\)-CSP states that it “does **not** mention PAC learning or a separate ‘CSP-PAC’ formalism,” and the closest process-algebraic neighbor similarly says “Probably not by that exact name” [2110.03122][1907.07974]. The nearest technical meanings divide across Promise Constraint Satisfaction Problems (PCSPs), PAC-style guarantees for semi-supervised anomaly detection, ordinary constraint-satisfaction complexity and exact algorithms, and several process-algebraic uses of CSP such as \(tock\)-CSP prioritisation and compensating CSP [2010.04618][2205.10798][1404.0073].

## 1. Terminological status

The nearby usages can be organized as follows.

| Usage of “CSP” | Relation to “PAC” | Representative source |
|---|---|---|
| Constraint Satisfaction Problem | No PAC learning; exact algorithms and complexity classification | [2110.03122], [1704.01914] |
| Promise Constraint Satisfaction Problem (PCSP) | Approximation-style promise problems; no PAC formalism | [2010.04618] |
| Communicating Sequential Processes | Prioritisation, compensation, refinement, and encodings; no PAC learning formalism | [1907.07974], [1404.0073], [1508.06712] |
| Common Spatial Pattern | Unrelated signal-processing acronym | [2311.13004] |
| PAC-Wrap anomaly detection | PAC guarantees without a CSP formalism | [2205.10798] |

This suggests that “CSP-PAC” functions more as an umbrella label than as a settled technical object. A plausible implication is that any rigorous use of the expression requires an explicit expansion of both initials before the underlying mathematics can be identified.

## 2. PAC-style guarantees without a CSP formalism

PAC-Wrap develops the PAC side most directly. It is a wrapper for anomaly detectors that turns raw anomaly scores into a prediction-set mechanism with training-conditional guarantees on both false positives and false negatives. The setting is semi-supervised anomaly detection for safety-critical applications, where the objective is not merely good average performance but high-confidence, finite-sample guarantees that user-chosen error tolerances will not be exceeded on future data [2205.10798].

For a trained detector \(d:X\to\mathbb{R}\), PAC-Wrap builds two PAC prediction sets. The underlying threshold optimization is
\[
\hat\tau = \operatorname*{\arg\max}_{\tau \in \mathbb{R}_{\ge 0}} \ \tau \quad \text{s.t.} \quad \sum_{(x,y)\in Z} \mathbf{1}\!\left(y \notin C_\tau(x)\right)\le k^*,
\]
with
\[
k^* = \operatorname*{\arg\max}_{k\in\mathbb{N}\cup\{0\}} \quad \text{s.t.}\quad F(k;n,\epsilon)\le \delta,
\]
where \(F(k;n,\epsilon)\) is the CDF of a \(\mathrm{Binomial}(n,\epsilon)\) random variable. The paper uses Theorem 1 from the PAC prediction-set literature directly:
\[
C_{\hat\tau}\ \text{is }(\epsilon,\delta)\text{-correct}.
\]

For false positives, the method calibrates on a normal calibration set \(Z_{\text{nm}}\sim D_{\text{nm}}^n\) and uses
\[
C_{\hat\tau_{fp}}(x)= \begin{cases} \{1\}, & d(x)\ge \hat\tau_{fp},\\ \{0,1\}, & \text{otherwise}. \end{cases}
\]
The induced detector is
\[
\hat y_{fp}=\mathbf{1}(0\notin C_{\hat\tau_{fp}}(x)),
\]
with the guarantee
\[
\Pr_{Z_{\text{nm}}\sim D_{\text{nm}}^n}\!\left[ \Pr_{(x,y)\sim D_{\text{nm}}}(\hat y_{fp}=1\mid y=0)\le \epsilon_{\text{fp}} \right]\ge 1-\delta_{\text{fp}}.
\]
For false negatives, calibration is performed on anomalous data \(Z_{\text{ano}}\sim D_{\text{ano}}^n\) using
\[
C_{\hat\tau_{fn}}(x)= \begin{cases} \{0,1\}, & d(x)\ge \hat\tau_{fn},\\ \{0\}, & \text{otherwise}. \end{cases}
\]
The induced detector is
\[
\hat y_{fn}=\mathbf{1}(1\in C_{\hat\tau_{fn}}(x)),
\]
with
\[
\Pr_{Z_{\text{ano}}\sim D_{\text{ano}}^n}\!\left[ \Pr_{(x,y)\sim D_{\text{ano}}}(\hat y_{fn}=0\mid y=1)\le \epsilon_{\text{fn}} \right]\ge 1-\delta_{\text{fn}}.
\]

The two PAC sets are intersected:
\[
C(x)=C_{fp}(x)\cap C_{fn}(x).
\]
When \(\hat\tau_{fp}\ge \hat\tau_{fn}\), the paper’s combined guarantee states that with probability at least \(1-\delta_{ad}\), where
\[
\delta_{ad}=\delta_{\text{fn}}+\delta_{\text{fp}},
\]
the resulting error rate is bounded by
\[
\mathrm{ERR}(D)\le \epsilon_{ad}, \qquad \epsilon_{ad}=\max(\epsilon_{\text{fp}},\epsilon_{\text{fn}}).
\]
If \(\hat\tau_{fp}<\hat\tau_{fn}\), the paper introduces a relaxation strategy that increments the error/confidence budgets in steps of \(\Delta\) until \(\hat\tau'_{fn}\le \hat\tau'_{fp}\). It also gives the rule of thumb
\[
n \ge \frac{\log(1/\delta)}{\log(1-\epsilon)},
\]
and the example that for \(\epsilon=\delta=0.05\), at least 59 labeled normal and 59 labeled anomalous points are needed. The empirical study reports that PAC-Wrap can wrap around Isolation Forest, LOF, DevNet, and LSTM-based detectors, and it notes explicitly that distribution shift is a limitation.

## 3. Promise CSP and finite tractability

The Promise Constraint Satisfaction Problem is the closest formal object if “CSP-PAC” is intended to denote a CSP-style framework for approximation or gap problems. PCSP is defined on a template pair
\[
(\mathbf A,\mathbf B)
\]
of similar relational structures satisfying
\[
\mathbf A \to \mathbf B.
\]
The problem \(PCSP(\mathbf A,\mathbf B)\) takes as input a finite relational structure \(\mathbf X\) similar to \(\mathbf A,\mathbf B\), outputs “Yes” if \(\mathbf X \to \mathbf A\), and outputs “No” if \(\mathbf X \not\to \mathbf B\), under the promise that one of these cases holds. Ordinary CSP is the special case
\[
CSP(\mathbf A)=PCSP(\mathbf A,\mathbf A)
\]
[2010.04618].

The paper distinguishes tractability from finite tractability. \(PCSP(\mathbf A,\mathbf B)\) is **finitely tractable** if there exists a finite relational structure \(\mathbf C\) such that
\[
\mathbf A \to \mathbf C \to \mathbf B
\]
and \(CSP(\mathbf C)\) is tractable. A central motivating example is the promise problem from positive 1-in-3-SAT to NAE-3-SAT. It reduces to the infinite-domain relation
\[
x+y+z=1
\]
over the integers, so it is tractable via an infinite-domain CSP, but Barto’s result shows that no finite \(\mathbf C\) can serve this role unless \(P=NP\) [2010.04618].

The algebraic language is given by polymorphisms and minions. A minion homomorphism
\[
\xi:\mathcal M\to\mathcal N
\]
preserves arities and minors:
\[
\xi(f^\pi)=\xi(f)^\pi.
\]
The paper emphasizes that PCSP complexity depends only on the \(h1\) identities satisfied by polymorphisms, and that finite tractability also depends only on \(h1\) identities. Its main necessary condition states that if \((\mathbf A,\mathbf B)\) is a finite PCSP template that is finitely tractable, then there exists \(b\) such that for every sufficiently large prime \(p\), \((\mathbf A,\mathbf B)\) has a \(p^2\)-ary \(b\)-bounded doubly cyclic polymorphism. Within the “basic” tractable cases for symmetric Boolean PCSPs allowing negations, the paper characterizes which are finitely tractable and which are not, thereby separating problems tractable via finite CSP relaxation from problems tractable only via infinite-domain relaxation.

## 4. Constraint-satisfaction algorithmics outside PAC

In ordinary finite-domain CSP theory, the principal organizing theorem is the dichotomy theorem. For a finite constraint language \(\Gamma\subseteq R_A\), the paper proves:
\[
\boxed{ \CSP(\Gamma)\in\mathrm{P}\ \Longleftrightarrow\ \Gamma\text{ has a WNU polymorphism} }
\]
and otherwise \(\CSP(\Gamma)\) is NP-complete [1704.01914]. The key algebraic notion is a weak near-unanimity operation \(f:A^m\to A\) satisfying
\[
f(y,x,\ldots,x)=f(x,y,x,\ldots,x)=\cdots=f(x,\ldots,x,y),
\]
with idempotence
\[
f(x,x,\ldots,x)=x.
\]
The proof strategy repeatedly reduces domains through absorbing subuniverses, centers, and quotient structure, and in the final linear case converts the instance into affine systems over prime fields solved by Gaussian elimination plus recursive checking.

A different line studies exact exponential-time algorithms for a restricted CSP class. Unique \((k,2)\)-CSP assumes arbitrary constraints on pairs of \(k\)-ary variables and at most one satisfying assignment. The 2021 algorithm combines PPSZ-type search with the Beigel–Eppstein local-reduction algorithm. It processes a prefix of the variables using eligible values
\[
\mathcal A(x,\alpha_0)=\{c\in[k]: \alpha_0 \not\models_D(x\neq c)\},
\]
then solves the residual instance by an extended Beigel–Eppstein routine. The analysis uses the recurrence
\[
q_k(p)=p+(1-p)q_k(p)^{k-1}.
\]
The paper improves the best known bounds for Unique \((k,2)\)-CSP for \(k\ge 5\), including
\[
O(2.232^n)\ \text{for Unique }(5,2)\text{-CSP}, \qquad O(2.641^n)\ \text{for Unique }(6,2)\text{-CSP}
\]
[2110.03122].

Constraint-satisfaction methods also appear in planning. Graphplan’s backward plan extraction is formulated as solving a dynamic constraint satisfaction problem (DCSP), where propositions at each level are variables, supporting actions are domain values, and mutexes induce constraints. On that view, explanation based learning, dependency directed backtracking, dynamic variable ordering, forward checking, sticky values, and random-restart search strategies can be adapted to Graphplan. The paper reports that these augmentations improve Graphplan’s performance significantly, “up to 1000x speedups” on several benchmark problems, and it identifies explanation-based learning and dependency directed backtracking as empirically the most useful [1106.0230].

## 5. Process-algebra meanings of CSP

A substantial part of the literature uses CSP in the process-algebraic sense of Communicating Sequential Processes rather than constraint satisfaction. In one direction, CSP’s multi-way synchronization is encoded into asynchronous CCS with name passing and matching. Two encodings are given: a centralized encoding \(\EncCO{\cdot}\), which is correct up to weak bisimilarity but does not preserve distributability, and a decentralized encoding \(\EncDO{\cdot}\), which preserves distributability but is only correct up to coupled similarity. Both encodings share the same inner translation \(\EncCI{\cdot}\), based on announcements, Boolean locks, and coordinators [1508.06712].

Another direction studies prioritisation in \(tock\)-CSP. The paper develops a denotational definition for prioritisation in the \(tock\)-CSP model via a Galois connection with the finite-linear model:
\[
\mathbf{Pri_{TT}_{\le}(P) \;\defs\; fl2tt \circ \mathbf{Pri}_{\le} \circ tt2fl(P)
\]
for \(\mathbf{TT}\)-healthy processes \(P\). It is motivated by maximal progress, where time should only advance after internal activity has stabilised, and it formalizes the result in Isabelle/HOL. The same source states explicitly that the work is about prioritisation in timed CSP and “does **not** introduce an operator named ‘PAC’” [1907.07974].

Compensating CSP provides yet another meaning. DEcCSP extends Compensating CSP with general dynamic recovery, standard CSP operators, and channel communication. Its key innovation is the use of process variables as compensation placeholders:
\[
p \div X,
\]
together with runtime assignment
\[
((X := p,\sigma),\rho) \stackrel{\tau}{\longrightarrow} ((SKIP,\sigma),\rho[X \mapsto p]).
\]
This allows compensations to be replaced or discarded before recovery begins [1404.0073].

Behavioral refinement and concurrency are treated in still other CSP variants. Event-B refinement is captured as CSP traces-divergences-infinite-traces refinement,
\[
P \refinedby_{TDI} Q \;\defs\; traces(Q)\subseteq traces(P)\;\land\; divergences(Q)\subseteq divergences(P)\;\land\; infinites(Q)\subseteq infinites(P),
\]
with event splitting, new events, and convergence handled via renaming, \(RUN_N\), and the predicate \(CA(C,R)(u)\) [1106.4098]. Communicating Concurrent Processes modifies standard CSP so that traces contain sets of simultaneous events, for example
\[
\langle \{a,b\}, \{c\}, \{d,e,f\} \rangle,
\]
and parallel composition may produce
\[
(c\rightarrow P)\parallel(d\rightarrow Q)= (\{c,d\}\rightarrow(P\parallel Q)),\quad c\neq d
\]
[1803.02659].

## 6. Acronym collisions and practical disambiguation

A further collision arises because CSP can also mean **common spatial pattern** in signal processing. In robust common spatial pattern analysis for EEG/BCI, the minmax CSP problem is recast as an eigenvector-dependent nonlinear eigenvalue problem and solved by a self-consistent field iteration with line search. The robust objective is
\[
\min_{x\neq 0}\; \max_{\substack{\Sigma_c\in\mathcal S_c\\ \Sigma_{\bar c}\in\mathcal S_{\bar c}}}
\frac{x^T\Sigma_c x}{x^T(\Sigma_c+\Sigma_{\bar c})x},
\]
and the SCF-based solver is reported to improve motor imagery classification rates and running time relative to the existing minmax CSP algorithm [2311.13004]. This usage is unrelated to constraint satisfaction and unrelated to PAC-Wrap.

This suggests that the expression “CSP-PAC” cannot be interpreted reliably without local definition. In the arXiv literature surveyed here, the closest technically coherent readings are: PCSP as the approximation-style promise extension of CSP; PAC-Wrap as a PAC-guarantee layer for anomaly detection; and several independent CSP traditions in exact algorithms, planning, process algebra, and signal processing. A plausible implication is that the term is best reserved for contexts where the intended expansion is stated explicitly, because the underlying theories, semantics, and guarantees are otherwise incompatible.

Source: https://www.emergentmind.com/topics/csp-pac