potentialpaper

Casper: A Projection-Based Neurosymbolic Layer for Scalable & Guaranteed Constraint Satisfaction

Lohith Konathala, Luca Andolfi, Eleonora Giunchiglia

NeurIPS 2026

Edit this page

Or clone it with git

Run in a terminal:

Needs Git LFS. To push, use an API key from your profile as the password.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

Abstract. Many real-world problems demand exact constraint satisfaction to be meaningfully solved, yet existing neurosymbolic methods face a stark trade-off: those that guarantee satisfaction fail to scale, while those that scale must resort to approximation. Meanwhile, traditional deep learning approaches offer no satisfaction guarantees at all. In this paper, we propose Casper, a neurosymbolic layer that simultaneously (i) guarantees constraint satisfaction, (ii) scales at inference time, (iii) is fully automated, requiring no problem-specific engineering, and (iv) is fully differentiable, making it composable with any neural predictor both at training and at inference time. Casper casts constraint satisfaction as a closed-form Euclidean projection onto the constraint-feasible region, computable in a single forward pass. Experiments across MNIST arithmetic (up to 1024 digits), Sudoku solving, and Warcraft pathfinding show that Casper is the only method that produces guaranteed-valid outputs at scale: on 30×30 Warcraft grids, exact baselines time out and approximate ones produce valid paths less than 7% of the time, while Casper produces them 100% of the time.

Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.

Claim this paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

edit · history

DateVersionSubmitted toPDFEvidence
1 May 2026NeurIPS 2026submittedNeurIPS 2026Accept (spotlight)reviews ↓[1]PDF[1]
Missing a version?

NeurIPS 2026

Accept (spotlight) · 3 reviews · OpenReview

Updated 25 Nov 2026, 03:48 UTC.

Program Chairs · DecisionOpenReview ↗
Decision
Accept (spotlight)
Read decision
Meta-review

In this work, the authors tackle a gap: neural nets are great at reading digits or tracing paths but make no promises their output obeys hard rules, and the existing fixes force a choice between correct-but-too-slow and fast-but-sometimes-invalid. In their approach, a network gives a spread of confidence across options, so when its favorite breaks a rule, CASPER nudges those scores by the smallest amount needed to make a legal option win, using a one-shot formula instead of an expensive solver. They untangle interlocking constraints in an offline precompilation step so that at runtime each variable faces a simple menu of allowed choices, and since the whole thing is just arithmetic, you can train straight through it.

Overall the work seems to provide a good and smart contribution in the field, addressing a gap in the neurosymbolic architectures. The work is backed by a theory analysis, and the experiments suggest scalability of the method.

There are some points that are required to be answered by the authors to allow discussion. The most prominent points (but not the only ones) include:

  • complexity of the offline compilation step (ie. can you bound the complexity of Π\Pi, Th. 4?),
  • clarification on the reasons of the gap between Casper and competitor scalable, approximate techniques (comment by rev. SZKx)-maube together with a better positioning in Sec. 5
  • why methods that run Dijkstra’s algorithm over the tile predictions should not be considered?
  • L2 regularizer is mentioned as "mandatory", but it is not a hard constraint - how much is the result depending on λ\lambda?
  • How is the surrogate error in (8) limiting the deployability on longer sequences?
Final justification

After rebuttal, the reviewers agree that the issues raised by the reviewers have been addressed. It is recommended that the authors include the further results in the camera-ready version of the paper.

Area Chair vcky · Meta-reviewOpenReview ↗
Read meta-review
Meta-review

In this work, the authors tackle a gap: neural nets are great at reading digits or tracing paths but make no promises their output obeys hard rules, and the existing fixes force a choice between correct-but-too-slow and fast-but-sometimes-invalid. In their approach, a network gives a spread of confidence across options, so when its favorite breaks a rule, CASPER nudges those scores by the smallest amount needed to make a legal option win, using a one-shot formula instead of an expensive solver. They untangle interlocking constraints in an offline precompilation step so that at runtime each variable faces a simple menu of allowed choices, and since the whole thing is just arithmetic, you can train straight through it.

Overall the work seems to provide a good and smart contribution in the field, addressing a gap in the neurosymbolic architectures. The work is backed by a theory analysis, and the experiments suggest scalability of the method.

There are some points that are required to be answered by the authors to allow discussion. The most prominent points (but not the only ones) include:

  • complexity of the offline compilation step (ie. can you bound the complexity of Π\Pi, Th. 4?),
  • clarification on the reasons of the gap between Casper and competitor scalable, approximate techniques (comment by rev. SZKx)-maube together with a better positioning in Sec. 5
  • why methods that run Dijkstra’s algorithm over the tile predictions should not be considered?
  • L2 regularizer is mentioned as "mandatory", but it is not a hard constraint - how much is the result depending on λ\lambda?
  • How is the surrogate error in (8) limiting the deployability on longer sequences?
Final justification

After rebuttal, the reviewers agree that the issues raised by the reviewers have been addressed. It is recommended that the authors include the further results in the camera-ready version of the paper.

Reviewer Z9BvOpenReview ↗
Rating
5/6
Confidence
4/5
Quality
4/4
Clarity
3/4
Significance
4/4
Originality
4/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

CASPER presents an efficient differentiable approach to hybridizing deep learning models with hard neurosymbolic optimization constraints. While previous methods involve either costly iterative solvers that fail to scale or approximations that forfeit validity guarantees, CASPER achieves efficient, scalable correctness guarantees. The model produces unconstrained probabilities across classes which CASPER projects through a differentiable operation into a refined distribution where the multivariate argmax is guaranteed to live in the constraint-valid region of the probability simplex. The system achieves this by decomposing a set of constraints into a sequence of dependent single-variable problems via an offline compilation step using the signed resolution rule. These single-variable steps are solved by rebalancing class probabilities among an "active set" of categories. Specifically, mass is transferred from "runner-up" classes (violators that are too close to the winner) to the constraint-valid winner, ensuring a strictly unique argmax by an epsilon margin. To maintain high efficiency on GPUs, CASPER uses a surrogate margin method to establish which categories to rebalance. This maintains the validity guarantee while making the projection computable in closed-form, bypassing the need to solve an exact fixed-point system through sorting. The paper validates the method across three benchmarks: Warcraft pathfinding, Sudoku solving, and MNIST arithmetic (up to 1K digits), which respectively demonstrate the framework's scale, correctness, and accuracy/optimality. Finally, because this rebalancing approach results in a rank-deficient Jacobian that maps a specific subspace of gradients to zero, unconstrained model outputs that lie far from the valid region can suffer from "annihilated" gradients that impede learning. CASPER leverages an L2 regularization technique to encourage model predictions to stay close to the valid set, which restores these gradients and stabilizes end-to-end training.

Strengths and weaknesses

The significance of CASPER is clear when you look at the current gap in neurosymbolic tools: you usually have to choose between hard guarantees that don't scale or approximations that don't guarantee anything. CASPER uses a clever offline compilation step to turn complex rules into a simple sequence of single-variable problems, then solves those with a "surrogate" projection that's fast on GPUs. Indeed from searching literature it seems it's the only method that guarantees validity on complex problems (30x30 warcraft) while exact baselines just time out.

The approach is elegant and the math in the appendix is very thorough, covering everything from the satisfaction guarantees to the error bounds. I think the work is high quality because it doesn't just provide a solver, it actually helps the underlying network learn better through that L2 regularizer. That said, the paper is a bit of a "glossary search" for the reader. They introduce dense math for things like the active sets, but you don't really get a verbal explanation of what they are until the appendix.

Overall, it's a strong, practical paper that solves a real scaling problem in the field.

Questions
  1. Does the user-defined order of the variables/constraints actually change the final projected results or the geometric optimality? Since it's a sequence of projections rather than one joint multivariate step, are there certain "ordering pitfalls" to avoid? For example, have you looked at heuristics like processing high-confidence variables first to minimize the ripple effect of the constraints?

  2. You describe the L2 regularizer as "mandatory" to fix the gradient issues caused by the annihilated subspace. Since this is a "soft" loss-based fix rather than a "hard" geometric one, does the model's ability to learn depend entirely on tuning that penalty weight (λ)? Also, did you consider any alternatives to regularization to keep gradients flowing, like a straight-through estimator or a different subgradient approach that wouldn't require an auxiliary loss?

  1. Since you’re doing these projections sequentially, does that "surrogate error" from Equation 8 actually start to snowball as the sequence gets longer? Like in the MNIST task with 1,024 digits, does a slightly sub-optimal "lazy" correction on the first few variables make the valid region for the later ones much smaller or harder to hit? I'm wondering if there's a practical limit to how many variables you can chain together before the surrogate approximation just gets too far away from the "perfect" closest point.
Limitations

yes

Formatting concerns

no concerns

4 comments
Authors · CommentOpenReview ↗

Sensitivity of performance on variable ordering (Part 1)

[Q1] Does the user-defined order of the variables/constraints actually change the final projected results or the geometric optimality? Since it is a sequence of projections rather than one joint multivariate step, are there certain “ordering pitfalls” to avoid? For example, have you looked at heuristics such as processing high-confidence variables first to minimise the ripple effect of the constraints?

To answer this question, we construct a synthetic benchmark that allows us to measure task accuracy as a function of the variable ordering, while controlling which variables are intrinsically easier or harder to predict. The benchmark directly tests the reviewer’s intuition: because Casper makes a sequence of discrete decisions, an incorrect decision made early can impact a decision taken later on. We therefore expect orderings that process easy-to-learn variables first to be more robust than those that place difficult variables early.

Notice that although the selected ordering does not affect whether the final output satisfies Π\Pi, it can affect which feasible output Casper selects and, consequently, its predictive accuracy and distance from the unconstrained prediction. This dependence arises because each discrete assignment conditions the feasible sets available to the subsequent variables.

This should be distinguished from the surrogate approximation error discussed above. There we saw that, for any fixed ordering, the surrogate and exact fixed-point procedures select the same sequence of discrete assignments and therefore traverse the same sequence of feasible sets. Here, instead, we investigate what happens when the variable ordering itself is changed.

To quantify this effect, we construct a synthetic benchmark in which the relative difficulty of the variables is controlled explicitly. We consider (nn) categorical variables with (kk) possible classes. For each variable (ii), the clean feature vector is sampled as

xi∼N(μci,θ2I2),\mathbf{x}_i \sim \mathcal{N}( \boldsymbol{\mu}_{c_i}, \theta^2 I_2),

where the (kk) class centroids are evenly spaced on a circle. The ground-truth labels c1,…,cnc_1,\ldots,c_n are generated so that they satisfy the constraint set Π\Pi.

A subset of the feature vectors is corrupted according to

x~i=(1−λ)xi+λϵi,ϵi∼U([0,1]2),λ∈[0,1].\tilde{\mathbf{x}}_i = (1-\lambda)\mathbf{x}_i + \lambda\boldsymbol{\epsilon}_i, \qquad \boldsymbol{\epsilon}_i \sim \mathcal{U}([0,1]^2), \qquad \lambda\in[0,1].

The corruption indicator therefore provides known easy and hard subsets, while the distance to the nearest class centroid provides a label-free proxy for confidence. Corrupted observations should be more difficult to predict correctly.

We compare four orderings: difficulty-ascending (easy variables first), difficulty-descending (hard variables first), random ordering, and the structural min-fill heuristic (that eliminates first the variables adding the fewest new edges between its neighbours - a proxy for minimising induced width - but ignoring how hard each variable is to learn). We compare the resulting constrained accuracy with that of the unconstrained classifier, thereby isolating the effect of the ordering

Authors · CommentOpenReview ↗

Sensitivity of performance on variable ordering (Part 2)

topology b n λ ordering seeds base % Δ % acc % (mean ± sd)
P - 50 0.90 min_fill 20 78.80 -0.10 78.70 ± 8.86
P - 50 0.90 difficulty_asc 20 78.80 +7.90 86.70 ± 5.48
P - 50 0.90 difficulty_desc 20 78.80 -5.00 73.80 ± 7.08
P - 50 0.90 random 20 78.80 +0.70 79.50 ± 7.89
E 2 50 0.90 min_fill 20 78.80 +4.80 83.60 ± 8.02
E 2 50 0.90 difficulty_asc 20 78.80 +13.40 92.20 ± 4.85
E 2 50 0.90 difficulty_desc 20 78.80 -5.60 73.20 ± 8.74
E 2 50 0.90 random 20 78.80 +5.10 83.90 ± 8.96
P - 100 0.90 min_fill 20 79.70 +1.00 80.70 ± 4.04
P - 100 0.90 difficulty_asc 20 79.70 +6.45 86.15 ± 2.94
P - 100 0.90 difficulty_desc 20 79.70 -4.60 75.10 ± 3.88
P - 100 0.90 random 20 79.70 +1.15 80.85 ± 4.91
E 2 100 0.90 min_fill 20 79.70 +2.00 81.70 ± 4.77
E 2 100 0.90 difficulty_asc 20 79.70 +12.95 92.65 ± 3.22
E 2 100 0.90 difficulty_desc 20 79.70 -3.55 76.15 ± 6.92
E 2 100 0.90 random 20 79.70 +4.60 84.30 ± 5.17
P - 50 1.00 min_fill 20 57.20 +0.20 57.40 ± 6.81
P - 50 1.00 difficulty_asc 20 57.20 +7.10 64.30 ± 3.80
P - 50 1.00 difficulty_desc 20 57.20 -6.20 51.00 ± 7.09
P - 50 1.00 random 20 57.20 +1.40 58.60 ± 4.50
E 2 50 1.00 min_fill 20 57.20 +3.90 61.10 ± 7.99
E 2 50 1.00 difficulty_asc 20 57.20 +18.10 75.30 ± 4.60
E 2 50 1.00 difficulty_desc 20 57.20 -8.10 49.10 ± 7.80
E 2 50 1.00 random 20 57.20 +5.80 63.00 ± 7.61
P - 100 1.00 min_fill 20 58.55 -2.40 56.15 ± 4.16
P - 100 1.00 difficulty_asc 20 58.55 +7.25 65.80 ± 2.75
P - 100 1.00 difficulty_desc 20 58.55 -5.10 53.45 ± 4.64
P - 100 1.00 random 20 58.55 +0.15 58.70 ± 4.21
E 2 100 1.00 min_fill 20 58.55 +1.70 60.25 ± 4.62
E 2 100 1.00 difficulty_asc 20 58.55 +18.05 76.60 ± 3.30
E 2 100 1.00 difficulty_desc 20 58.55 -7.60 50.95 ± 5.82
E 2 100 1.00 random 20 58.55 +0.80 59.35 ± 4.63

As expected, difficulty ascending ordering produces a positive mean improvement over the unconstrained classifier in every tested (topology, nn, λ\lambda) configuration, with an average gain of (11.4) percentage points and cell-wise gains ranging from (6.45) to (18.10) points. Conversely, difficulty descending ordering produces a negative mean change in every configuration, averaging (-5.7) percentage points, with changes ranging from (-8.10) to (-3.55) points.

The ordering effect becomes stronger as the constraints become more tightly coupled. At matched nn and λ\lambda, the benefit of the difficulty-ascending ordering on the denser banded topology is approximately 1.7−2.551.7 - 2.55 times that observed on the sparser topology. The benefit also increases as the corruption strength rises from λ=0.9\lambda=0.9 to λ=1.0\lambda=1.0. These results confirm the reviewer’s intuition: processing the most reliable variables first can substantially reduce the effect of incorrect early decisions. Structural heuristics such as min-fill instead target compilation complexity, and therefore need not provide the best predictive ordering. In practice, an ordering heuristic may consequently need to balance predictive confidence against structural quantities such as induced width.

Authors · CommentOpenReview ↗

Ablation Study on L2 Regularisation Term

We thank the reviewer for their appreciation of the paper and for their insightful review.

[Q2] You describe the L2 regularizer as "mandatory" to fix the gradient issues caused by the annihilated subspace. Since this is a "soft" loss-based fix rather than a "hard" geometric one, does the model's ability to learn depend entirely on tuning that penalty weight (λ)? Also, did you consider any alternatives to regularization to keep gradients flowing, like a straight-through estimator or a different subgradient approach that wouldn't require an auxiliary loss?

We would first like to clarify that the L2 term is presented as ‘soft’ penalty term which we introduced with the double goal of:

  1. counteract the rank deficiency of the layer’s Jacobian as outlined in Proposition 1,
  2. lower the error between the surrogate solution and the fixed point solution as outlined in Corollary 1. In all our experiments we used λ=1\lambda = 1.

To address the question on the sensitivity to penalty weight (λ\lambda), we ran MNIST-Add at n=4n=4 and n=15n=15 with different values of λ\lambda. We report the results macro accuracy (%): the mean percentage of the n+1n+1 final output digits predicted correctly, scored per-position and the exact-match accuracy.

The results show a consistent improvement over the unregularised baseline (λ=0\lambda=0) across a range of λ\lambda, with no sharp optimum; exact-match accuracy rises by roughly 3.63.6 points (for N=15) as λ\lambda increases from 00 to 11, before very large values (λ≥3\lambda \ge 3) begin to overwhelm the supervised loss and degrade performance. This indicates that while the penalty is not free of a stability limit at the extremes, it does not require careful tuning to be beneficial, and moderate values reliably help rather than degrade task performance.

Regarding alternatives, we agree that gradient-based approaches such as a straight-through estimator or an alternative subgradient formulation are worth exploring as ways to keep gradients flowing without an auxiliary loss term, and we aim to investigate these in future work.

λ\lambda n=4n = 4 Macro (%) n=4n = 4 Exact (%) n=15n = 15 Macro (%) n=15n = 15 Exact (%)
0 98.70 ± 0.10 95.70 ± 0.33 98.32 ± 0.15 72.53 ± 1.41
0.01 98.46 ± 0.28 95.10 ± 0.73 98.33 ± 0.21 72.47 ± 1.92
0.1 98.63 ± 0.29 95.50 ± 0.75 98.36 ± 0.13 73.00 ± 1.50
0.3 98.71 ± 0.21 95.90 ± 0.45 98.46 ± 0.05 74.73 ± 0.25
1 98.50 ± 0.19 95.60 ± 0.49 98.42 ± 0.08 76.17 ± 0.84
3 98.51 ± 0.06 95.20 ± 0.16 98.31 ± 0.04 52.73 ± 0.17
10 98.69 ± 0.20 96.00 ± 0.50 98.27 ± 0.14 24.13 ± 1.59
30 98.51 ± 0.11 54.33 ± 0.05 98.24 ± 0.19 17.83 ± 1.42
Authors · CommentOpenReview ↗

Surrogate approximation propagation

[Q3] Since you’re doing these projections sequentially, does that "surrogate error" from Equation 8 actually start to snowball as the sequence gets longer? Like in the MNIST task with 1,024 digits, does a slightly sub-optimal "lazy" correction on the first few variables make the valid region for the later ones much smaller or harder to hit? I'm wondering if there's a practical limit to how many variables you can chain together before the surrogate approximation just gets too far away from the "perfect" closest point.

Thank you! This was a very interesting question and it prompted us to study formally how the surrogate approximation propagates through the sequential procedure. Our new analysis shows that the surrogate error does not snowball by altering the feasible regions encountered at later steps. Indeed, we prove that, at every projection step, the surrogate projection and the exact fixed-point projection select the same candidate:

$ \text{arg}\min_{t \in \mathcal{S}_i(\mathbf{a}_{<i})} |\tilde{\mathbf{z}}_i^{t} - \hat{\mathbf{y}}i|_2^2 = \text{arg}\min_{t \in \mathcal{S}_i(\mathbf{a}_{<i})} | \mathbf{z}_i^{t} - \hat{\mathbf{y}}_i |_2^2, $

for ϵ→0+\epsilon \to 0^+, under the deterministic tie-breaking policy already assumed in the paper. Consequently, the exact and surrogate procedures produce the same discrete assignment at each projection step. This result extends inductively to the entire sequence. In particular, the feasible set for YiY_i, Si(a<i),\mathcal{S}_i(\mathbf{a}_{<i}), depends only on the preceding discrete assignments a<i\mathbf{a}_{<i}, rather than on the precise continuous values produced by the preceding projections. Since the exact and surrogate procedures produce the same preceding assignments, they encounter exactly the same feasible set at every subsequent step. Therefore, a slightly over-corrected continuous output for an early variable cannot make the feasible set for a later variable smaller or harder to reach. Hence, there is no compounding propagation through progressively different feasible regions. For the MNIST experiment with 10241024 digits, this means that the surrogate procedure follows exactly the same sequence of discrete assignments (and therefore the same sequence of feasible sets) as the exact fixed-point procedure. Increasing the sequence length only adds the local continuous discrepancies associated with the individual projections. To verify this empirically, we measure, for each position in the predicted sum, the proportion of test examples for which Casper predicts that digit incorrectly.

Row Closed-form Exact (CVXPY) Δ (pp)
digit 1 (10010^0) err % 1.65 1.20 0.45
digit 2 (10110^1) err % 2.10 1.75 0.35
digit 3 (10210^2) err % 1.90 1.85 0.05
digit 4 (10310^3) err % 1.80 1.65 0.15
digit 5 (10410^4) err % 1.65 1.80 0.15
digit 6 (10510^5) err % 2.25 2.10 0.15
digit 7 (10610^6) err % 1.80 1.75 0.05
digit 8 (10710^7) err % 1.45 1.60 0.15
digit 9 (10810^8) err % 1.85 1.65 0.20
digit 10 (10910^9) err % 2.05 1.80 0.25
digit 11 (101010^{10}) err % 1.80 1.80 0.00
digit 12 (101110^{11}) err % 1.55 1.70 0.15
digit 13 (101210^{12}) err % 1.55 1.80 0.25
digit 14 (101310^{13}) err % 2.35 2.20 0.15
digit 15 (101410^{14}) err % 1.55 1.45 0.10
digit 16 (101510^{15}) err % 0.35 0.30 0.05
Exact match (sum) %. 73.6 ± 0.4 75.4 ± 2.1 1.80

Note: The reduced error at digit 16 (10¹⁵) is because that position is only the carry-out of the 15-digit addition, a near-deterministic 0/1 rather than a free 10-way digit, so it is far easier to get right than the interior positions. We really thank the reviewer for raising this point. It led us to a stronger theoretical characterization of the surrogate, and we will add both results and their proofs to the revised paper.

Reviewer SZKxOpenReview ↗
Rating
4/6
Confidence
4/5
Quality
3/4
Clarity
3/4
Significance
3/4
Originality
3/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

This paper introduces Casper, a neurosymbolic layer that composes with neural networks, enforcing constraint satisfaction during inference. Rather than renormalizing the predictor against the compiled constraint for every input, Casper performs an offline compilation step, reducing multi-variable satisfaction to a sequence of single-variable problems. On standard neurosymbolic learning benchmarks, Casper demonstrates superior computational efficiency, accuracy, and consistency, compared to exact and approximate baselines.

Strengths and weaknesses

Strengths

  • For MNIST arithmetic scalability experiments, Casper is on-par with or better than the most scalable approximate methods. Notably Casper scales to Sum 1024 and Add 256, attaining near-perfect (reference) accuracy while demonstrating computational efficiency.
  • Ablations and Corollary 1 justify the choice of a regularizer.The correctness theorem and empirical results both demonstrate Casper’s constraint satisfaction ability, which sets it apart from approximate methods that may scale but do not provide the same satisfaction guarantees.
  • Casper demonstrates a viable solution to exact, scalable constraint satisfaction in neurosymbolic learning. I think that some of the evaluation details could be cleared up (see questions). I’m already positive about this paper but open to increasing my score if my questions are addressed.

Weaknesses

  • Figure 2 is a bit hard to read - perhaps making the (sometimes) overlapping lines different colors (not all red) could help here.
  • It also would have been helpful to see a comparison of NeuroAcc for the MNIST-Add scalability experiments. I find that this communicates the effectiveness of the learning algorithm better than just comparing to an already-low reference value. Especially with so many baselines that come close to Casper’s overall accuracy.
  • I found some details of the baseline evaluation to be confusing (see questions)
Questions
  • I am less familiar with neurosymbolic exact-satisfaction methods than approximate methods, but it seems to me that the approximate methods are, in a sense, enforcing a similar constraint for MNIST arithmetic tasks. For example, the exact MNIST arithmetic program can be encoded in ProbLog. Similarly, program tensors in CTSketch can be composed in such a way that mirrors the exact MNIST Addition task (if sketching is not required for scalability). With this in mind, why is it that the scalable, approximate techniques do not (in general) perform as well for these MNIST arithmetic tasks compared to Casper?
  • It was also unclear to me why methods that run Dijkstra’s algorithm over the tile predictions should not be considered here. Isn’t this just another way of enforcing the valid path constraint, in some sense? What is different about Scallop/CTSketch here, and why do they demonstrate such poor consistency? Can’t a shortest-path algorithm be encoded in these frameworks, ensuring that the predicted paths are connected and start and end at the correct points?
Limitations

yes

Final justification

I thank the authors for the detailed rebuttal and additional results that helped clarify my questions. I hope that these results can be incorporated into the revised manuscript. I remain positive about this work and would recommend acceptance.

Formatting concerns

n/a

3 comments
Authors · CommentOpenReview ↗

Clarification on Neural Predictors

We thank the reviewer for their positive evaluation of the paper and for their insightful questions. We hope that the responses below address the remaining questions and clarify the relevant evaluation details.

[W1] Figure 2 is a bit hard to read

We will make sure to make Figure 2 more readable in the camera ready version of the paper in case of acceptance.

[W2] NeuroAcc for the MNIST-Add scalability experiments.

We agree that the exponentially decreasing reference accuracy does not directly reveal how effectively each method trains the neural predictor. In the Table below we therefore additionally report:

  1. The macro accuracy over the digits of the two operands (indicated as operand1_macro and operand2_macro)
  2. The exact match ratio over each of the digits of the two operands, i.e., the percentage of operands that get predicted with no errors (indicated as operand1_exact and operand2_exact )
  3. The macro accuracy over the digits of the final sum (indicated as sum_macro)
  4. The exact match ratio of the over the final sum, i.e., the percentages of sums that get predicted with no errors (sum_exact).
digits method operand1_exact operand1_macro operand2_exact operand2_macro sum_exact sum_macro
2 Casper 98.70 ± 0.00 99.35 ± 0.00 99.05 ± 0.05 99.53 ± 0.02 97.75 ± 0.05 98.93 ± 0.07
2 CTSketch 98.18 ± 0.08 99.08 ± 0.06 98.56 ± 0.17 99.28 ± 0.08 96.82 ± 0.20 98.43 ± 0.06
4 Casper 97.40 ± 0.40 99.32 ± 0.10 98.10 ± 0.10 99.53 ± 0.02 95.60 ± 0.40 98.62 ± 0.10
4 CTSketch 96.00 ± 1.13 98.96 ± 0.25 96.52 ± 0.62 99.12 ± 0.14 92.60 ± 1.75 97.88 ± 0.42
15 Casper 92.00 ± 0.80 99.45 ± 0.04 90.20 ± 0.30 99.31 ± 0.02 76.15 ± 1.25 98.35 ± 0.12
15 CTSketch 84.83 ± 3.19 98.87 ± 0.16 85.44 ± 0.21 98.96 ± 0.06 72.52 ± 2.34 97.16 ± 0.20
100 Casper 49.10 ± 0.90 99.27 ± 0.03 47.40 ± 1.90 99.27 ± 0.04 18.30 ± 0.60 97.99 ± 0.11
100 CTSketch 30.50 ± 0.71 98.90 ± 0.01 30.75 ± 4.60 98.90 ± 0.13 9.50 ± 2.95 96.88 ± 0.26
256 Casper 16.65 ± 1.35 99.25 ± 0.02 13.15 ± 0.75 99.24 ± 0.01 1.50 ± 0.20 97.89 ± 0.01
256 CTSketch 4.64 ± 2.19 98.81 ± 0.01 5.67 ± 0.73 98.93 ± 0.03 0.00 ± 0.00 96.88 ± 0.14

The table above reports, for each digit count n∈2,4,15,100,256n \in \\{2, 4, 15, 100, 256\\}, the results. We find that Casper's operands macro accuracy remains essentially constant across scales (99.35%99.35\% and 99.53%99.53\% at n=2n=2 to 99.25%99.25\% and 99.24%99.24\% at n=256n=256) and slightly exceeds CTSketch's (99.08%99.08\% and 99.28%99.28\% at n=2n=2 to 98.81%98.81\% and 98.93%98.93\% at n=256n = 256). However, a small per-digit gap compounds to a larger gap in exact-match accuracy i.e., 49.10%49.10\% and 47.70%47.70\% vs 30.50%30.50\% and 30.75%30.75\% exact-match at n=100n=100 and 16.65%16.65\% and 13.15%13.15\% vs 4.64%4.64\% and 5.67%5.67\% at n=256n=256. We will include these results (and compute the same for all baselines) in the camera-ready version in case of acceptance.

Authors · CommentOpenReview ↗

Comparison with Approximate Methods

[Q1] With this in mind, why is it that the scalable, approximate techniques do not (in general) perform as well for these MNIST arithmetic tasks compared to Casper?

The reviewer is correct that, at the level of expressiveness, the exact MNIST-arithmetic relation can be represented both as a probabilistic logic program and as a fully composed program tensor. The difference is however not which constraint can be expressed, but which information and guarantees are retained when inference is made scalable. The methods considered adopt substantially different strategies:

  • DeepProbLog performs general-purpose exact inference. It grounds the probabilistic logic program, rewrites the relevant proofs propositionally, compiles them into an arithmetic circuit, and evaluates their weighted model count. This faithfully computes the probability of the query, but exact WMC is generally exponential and knowledge compilation becomes intractable as the grounded arithmetic problem grows. DeepProbLog therefore handles small MNIST-arithmetic instances accurately, but does not scale to the larger digit counts considered here.

  • DeepSoftLog (DSL) scales on MNIST-Add by exploiting the specific structure of addition. Rather than representing all complete operand assignments jointly, DSL uses a hand-designed digit-wise recursion that propagates only the probability distribution of the carry between adjacent positions. This yields exact inference with complexity linear in the number of digits. Importantly, DSL slightly outperforms Casper on MNIST-Add in our experiments. Its limitation is simply generality: in MNIST-Sum evaluation, where the same bounded-state factorisation does not directly solve the problem, exact DSL inference already times out at 16 digits.

  • Scallop approximates probabilistic inference by retaining only the top-kk proofs. This bounds the number of explanations propagated through the program and substantially reduces the cost relative to enumerating every proof. However, discarded proofs contribute no probability mass or gradient, so the result is an approximation of the exact success probability.

  • A-NeSI replaces symbolic inference with a learned approximation, so that the prediction network approximates the result of WMC without performing it explicitly at every training step. This provides polynomial-time inference, but introduces approximation and generalisation error. This explains why it can scale beyond exact WMC while not always matching its accuracy. For MNIST-Add, the missing A-NeSI results at the largest sizes additionally arise from an integer-overflow limitation in the reference implementation, rather than a conceptual impossibility of running the method.

  • CTSketch uses program decomposition and compact tensor representations, but the relevant approximation differs between MNIST-Add and MNIST-Sum. On MNIST-Add, CTSketch decomposes addition into a chain of local digit additions and carry operations. In the evaluated configuration, these tensors are used at full rank and the intermediate categorical distributions are propagated without the RBF approximation. Our analysis (see Table above) reveals a small but persistent difference in perception accuracy: CTSketch is approximately 0.3−0.50.3 - 0.5 percentage points less accurate per operand digit. This gap remains roughly stable as nn grows, but compounds in exact-match accuracy approximately as pnp^ n . For example, at n=256n=256, CTSketch’s 98.81%98.81\% digit accuracy predicts an operand exact-match rate of 0.9881256=4.67%0.9881^{256}=4.67\%, closely matching the observed 4.64%4.64\%. On MNIST-Sum, CTSketch uses an additional approximation. Each decomposed tensor contraction returns an expected intermediate value, which is converted back into a categorical distribution using an RBF before being passed to the next program layer. This expectation-to-RBF transformation loses information about the true intermediate distribution, including its variance and multimodality, and deeper decompositions apply it repeatedly. CTSketch’s own ablation supports this explanation: Sketch and Full + RBF obtain nearly identical performance, whereas exact one-hot FULL propagation performs better.

Casper exploits a different tractability regime. It compiles the constraint offline and performs assignment-level surrogate projection through the resulting circuit. Casper is particularly effective on these tasks because their arithmetic structure admits width-bounded compilation, allowing it to retain exact assignment-level satisfaction while scaling to long inputs.

Authors · CommentOpenReview ↗

Clarification on the Baselines for Shortest Path Prediction

[Q2.1] It was also unclear to me why methods that run Dijkstra’s algorithm over the tile predictions should not be considered here. Isn’t this just another way of enforcing the valid path constraint, in some sense?

We agree that, at the level of the final system output, running Dijkstra's algorithm on neurally predicted tile costs is indeed another way of guaranteeing that the returned object is a valid path. Our reason for not including such methods in Table 2 is not that they are invalid approaches, but that they solve a different structured-prediction formulation.

In our Warcraft experiment, following the formulation used by SPL [3], the network directly predicts the per-tile path variables, and hence must learn from the image which of the feasible paths is optimal.

In contrast, Dijkstra-based approaches (e.g. A-NeSI [44]) predict a tile-cost map cθ(x)c_\theta(x) and then use a task-specific shortest-path solver to return

argmin⁡p∈P∑v∈pcθ,v(x),\text{arg}\min_{p \in \mathcal{P}}\sum_{v \in p} c_{\theta,v}(x),

where P\mathcal{P} is the set of valid paths. Thus, Dijkstra performs not only feasibility enforcement but also the combinatorial optimization that selects the path; the neural component learns the costs rather than directly predicting the structured output.

The two formulations consequently differ in their neural output space, optimization objective, and division of labour between the neural and symbolic components. Dijkstra-based decoding is an important and strong task-specific alternative which does not study though whether a generic differentiable layer, given only a declarative constraint specification, can enforce arbitrary categorical constraints on direct neural predictions without requiring a problem-specific solver.

We will revise Section 4.1 to make this distinction explicit and describe Dijkstra-based pipelines as a complementary formulation rather than suggesting that they are not relevant.

[Q2.2] What is different about Scallop/CTSketch here, and why do they demonstrate such poor consistency? Can’t a shortest-path algorithm be encoded in these frameworks, ensuring that the predicted paths are connected and start and end at the correct points?

Scallop encodes the constraint as a differentiable Datalog program: the network's per-node outputs give per-edge probabilities, from which the engine derives the valid-path (source-to-sink reachability) and training minimizes −\log P(\text{valid_path}) alongside the supervised loss. Internally each proof is one full-connected valid route, whose probability is the product of its edge probabilities generated by the network; per the default settings we set top-k proofs to 3 i.e. retain only the top-3 highest-probability routes per fact. The signal is a soft, approximate penalty applied during training rather than a hard constraint. At inference, the path is decoded by taking each node's most likely local configuration independently, so nothing couples these choices into a connected route. The constraint acts on the probability of reachability during training, not on this independent decoding, and therefore does not transfer well to inference-time hence the low observed consistency.

CTSketch performs poorly on path consistency in the Warcraft setting because the symbolic component only provides a local connectivity prior, not an exact global shortest-path solver. Concretely, the CTS tensor checks, for each grid cell, whether the predicted pattern of the neighboring path edges looks locally valid, encouraging valid local configurations. However it does not by itself enforce that all predicted positive edges form one connected path from the start cell to the goal cell. This limitation is especially severe in the grid-partitioned variant: each tile is on within-tile edges, while cross-tile edges are not predicted by the network directly and are instead added afterward by a greedy symbolic solver, so zero or near-zero global consistency is expected even when within-tile predictions are reasonable. When we remove this decomposition and predict all edges from the full image, consistency improves substantially, which matches the rank-30 results, but even then CTSketch still remains a soft local regularizer rather than a hard combinatorial constraint.

Reviewer G9ZqOpenReview ↗
Rating
6/6
Confidence
3/5
Quality
4/4
Clarity
4/4
Significance
3/4
Originality
3/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

The paper proposes CASPER, a differentiable neurosymbolic layer that guarantees constraint satisfaction, while scaling at inference time using only the constraint specification. As prior works are generally able to do one or the other, CASPER resolves this trade-off by casting constraint satisfaction as a closed-form Euclidean projection onto the argmax-feasible region of the probability simplex. In the single-variable case, this yields a fixed-point system solvable in O(log h) sequential GPU operations via a closed-form surrogate with exactly characterised error and gradient behaviour. The general multi-variable case is handled by an offline compilation step based on signed resolution that reduces the problem to a sequence of single-variable projections. Experiments across Warcraft pathfinding, MNIST-Sum/-Add, and Sudoku solving demonstrate the efficacy of CASPER.

Strengths and weaknesses

Strengths

  • The paper addresses a gap in the neurosymbolic architectures, alleviating the limitations of prior works in guaranteeing satisfaction and scaling at the same time. The efficacy of CASPER in doing both is established both theoretically, and empirically across three qualitatively different benchmarks.
  • The theoretical work demonstrates the satisfaction guarantees. Theorems 1-3 establish the fixed-point projection, its satisfaction guarantee, and an exact error decomposition for the closed-form surrogate. The progression from single-variable to multi-variable via signed resolution and the full proofs in Appendices B-J appear to be correct.
  • An ablation study is provided to explain the contribution of different components of CASPER.
  • Extensive experiments are conducted, comparing to major baselines, demonstrating the improvements of CASPER. Results are statistically significant, with mean and standard deviation reported over 5 seeds on Warcraft and MNIST and 10 seeds on Sudoku.

Major Weaknesses

  • The complexity of the offline compilation step is not analyzed. For constraint families with large conflict clause sets, the compilation could produce exponentially many clauses, potentially undermining scalability at the compilation stage even if inference remains fast. The paper does not characterize which constraint families admit polynomial compilation, nor does it report compilation times for any of the benchmarks. This is an important question the authors should discuss it
  • The variable ordering in the multi-variable inference step is user-specified and the paper states it does not affect correctness, but it may significantly affect the optimality of the projected output. On Sudoku in particular, early greedy assignments could cascade into suboptimal downstream projections. The paper does not analyze ordering sensitivity.

Minor Weaknesses

  • The broader impacts section is marked N/A, but I believe that given that CASPER's stated application domains include clinical decision making and medication prescribing, it may be worth discussing some of these downstream broader impacts.
Questions

Overall, I believe the broader community can benefit from the paper, and would recommending a rating of accept. I ask the authors to address the weaknesses note above in the rebuttal / camera ready. Mainly:

  • How can compilation complexity become a scaling blocker? Did you complete any analysis on this front?
  • How does variable ordering impact results?
Limitations

There is a discussion of limitations of CASPER in the Appendix, although depending on how adequately the authors address the weaknesses noted, it may be helpful to further call out compilation complexity and variable ordering as potential limitations in CASPER as well.

Final justification

The authors have adequately answered my questions / concerns. As a result, I'm raising my rating form a 5 to 6 acceptance. The authors should include the empirical results and analysis from their rebuttal in the final camera ready version of the paper.

Formatting concerns

There are no major paper formatting concerns.

3 comments
Authors · CommentOpenReview ↗

Complexity Analysis of the Compilation Step

We thank the reviewer for appreciating the value of the paper and for the very constructive feedback. We address their concerns below.

[W1+Q1] Complexity of the offline compilation step is not analyzed

Below we (i) characterize the compilation cost through a reduction to Dechter's bucket-elimination algorithm in [A], (ii) identify which constraint families admit polynomial-time compilation, and (iii) we include compile-time measurements of both MNIST-Add and MNIST-Sum, validating the analysis.

1. Compilation complexity via a reduction to bucket elimination

We reduce the bucket elimination algorithm of [A] (Fig. 4.5) to CASPER's resolution. To this end, we first define the notion of induced width for the graph we associate to our constraint set and then carry out the reduction.

Interaction graph. Given a signed-CNF constraint set Π\Pi, its interaction graph is GΠ=(X,E)G_\Pi=(X,E), where XX is the set of variables and Xi,Xj∈E\\{X_i,X_j\\} \in E iff XiX_i and XjX_j occur together in at least one clause. For an ordering dd, the induced width w∗(d)w^{\ast}(d) is the maximum number of earlier neighbours, according to dd, in the induced graph.

Reduction. We encode each signed clause CC by the relation RCR_C, containing the tuples over the variables in CC that satisfy it. Under this encoding, signed resolution corresponds to the belief-updating algorithm BE-bel (Fig. 4.5 of [A]), instantiated over the Boolean (relational) semiring rather than the sum–product one: bucket combination is the natural join ⋈\bowtie (instead of the product ∏\prod) and bucket marginalization is a π\pi projection (instead of the sum ∑\sum). This is still a commutative semiring, so the bucket-elimination schema of [B] applies. Concretely, BE-bel's per-bucket message λp=∑Xpψp∏iλSi\lambda_p=\sum_{X_p}\psi_p\prod_i\lambda_{S_i} becomes our conflict set Conflp=πUp(⋈C∈bucketpRC)Confl_p=\pi_{U_p}\big(\bowtie_{C\in\mathrm{bucket}_p}R_C\big), where pp denotes the bucket. For a bucket (or a clause) we call its scope simply the set of variables occurring in it. Joining the bucket pp and projecting its variable XpX_p out records the tuples over the remaining scope UpU_p admitting no consistent value of XpX_p. Then the two algorithms coincide on bucket partitioning by highest variable, backward elimination and re-filing of the constraints into a lower bucket.

Cost transfer. Eliminating a variable costs the size of the combined bucket over its scope, namely at most k∣scope∣k^{|\mathrm{scope}|}, where kk is the maximum size of the domain of each variable, i.e., k=max⁡(h1,…hn)k = \max(h_1, \ldots h_n). This is independent of the semiring and proving Theorem 4.5 (Complexity of BE-bel [A])) uses only this fact and the number of buckets; it therefore transfers, yielding

time O(r⋅k,w∗(d)+1),space O(n⋅k,w∗(d)),\textbf{time } O\big(r\cdot k^{\\,w^{\ast}(d)+1}\big),\qquad \textbf{space } O\big(n\cdot k^{\\,w^{\ast}(d)}\big),

where rr is the number of input clauses and nn the number of buckets. Therefore, each eliminated variable records a single constraint over its ≤w∗(d)\le w^{\ast}(d) earlier neighbours — a relation of at most k,w∗(d)k^{\\,w^{\ast}(d)} tuples — so the whole compiled theory occupies O(n⋅k,w∗(d))O(n\cdot k^{\\,w^{\ast}(d)}) space, and producing it takes O(r⋅k,w∗(d)+1)O(r\cdot k^{\\,w^{\ast}(d)+1}) time. The exponentially many conflict clauses the reviewer rightly worries about becomes a bottleneck only when the induced width is large. It is the same worst case as adaptive consistency and directional resolution and it is controlled by w∗(d)w^{\ast}(d).

2. Which families admit polynomial compilation

Two structural conditions together bound the exponent w∗(d)w^{\ast}(d) by a constant:

  • (i) Polytree structure. When the interaction graph is a polytree (Definition 5.32 of [A]) — a graph whose underlying undirected graph is acyclic — elimination introduces no new edges among the remaining variables then w(d)=w∗(d)w(d) = w^{\ast}(d), and both equal the largest clause scope minus one.
  • (ii) Bounded scope. When every clause has scope ≤a\le a for a constant aa, the largest scope is aa.

Together w∗=a−1w^{\ast}=a-1 (excluding the eliminated variable itself), giving

time O(r⋅k,a),space O(n⋅k,a−1),\textbf{time } O\big(r\cdot k^{\\,a}\big),\qquad \textbf{space } O\big(n\cdot k^{\\,a-1}\big),

polynomial in n,r,kn,r,k. For binary clauses over a tree this is O(r,k2)O(r\\,k^2) time and O(n,k)O(n\\,k) space.

Both conditions are necessary. If we drop acyclicity, a single loop forces a new coupling (fill-in) between two previously-unlinked variables; in a dense interaction graph (such as a bandwidth-bb band, where two distinct variables share an edge iff their positions in the ordering differ by at most bb) this drives w∗w^{\ast} up to bb, so compilation is k,b+1k^{\\,b+1}. If instead we drop the scope bound, a single clause of scope nn (one variable jointly constrained with n−1n-1 others) is still a polytree, yet its scope is nn and compilation becomes k,nk^{\\,n}.

Authors · CommentOpenReview ↗

Benchmarking Complexity Analysis and Sudoku Orderings

3. Benchmark validating the claim

We add a synthetic benchmark that isolates compilation cost as a function of the constraint structure. We fix nn categorical variables each ranging over kk classes whose features are sampled from kk Gaussian clusters (with a noise-injected "hard" subset), and draw ground-truth labels that satisfy Π\Pi. We place two constraint sets that differ only in their interaction graph:

  • (E) exponential — a bandwidth-bb banded graph, whose induced width equals bb;
  • (P) polynomial — a polytree, whose clauses have bounded scope aa.

We report compilation time confirming exponential growth in the induced width for (E) and polynomial growth for (P).

topology b n k r w seeds compile (s, mean ± sd)
P - 20 6 38 1 5 0.0018 ± 0.0001
P - 50 6 98 1 5 0.0098 ± 0.0002
P - 100 6 198 1 5 0.0392 ± 0.0007
P - 200 6 398 1 5 0.1490 ± 0.0118
E 1 20 6 38 1 5 0.0014 ± 0.0000
E 1 50 6 98 1 5 0.0081 ± 0.0001
E 1 100 6 198 1 5 0.0319 ± 0.0002
E 1 200 6 398 1 5 0.1515 ± 0.0017
E 2 20 6 74 2 5 0.0049 ± 0.0009
E 2 50 6 194 2 5 0.0259 ± 0.0013
E 2 100 6 394 2 5 0.0884 ± 0.0052
E 2 200 6 794 2 5 0.3280 ± 0.0237
E 3 20 6 108 3 15 0.0271 ± 0.0117
E 3 50 6 288 3 15 0.0885 ± 0.0158
E 3 100 6 588 3 15 0.2558 ± 0.0269
E 3 200 6 1,188 3 15 0.8086 ± 0.0764
E 4 20 6 140 4 15 0.1363 ± 0.0967
E 4 50 6 380 4 15 0.3591 ± 0.1116
E 4 100 6 780 4 15 0.8349 ± 0.2120
E 4 200 6 1,580 4 15 2.0125 ± 0.3559
E 5 20 6 170 5 15 0.3153 ± 0.1960
E 5 50 6 470 5 15 0.5206 ± 0.2517
E 5 100 6 970 5 15 1.0645 ± 0.3289
E 5 200 6 1,970 5 15 2.7291 ± 0.5987

Compilation times on real tasks. We measure compilation time on MNIST-Add and MNIST-Sum for varying numbers of input digits NN.

NN Compile (s)
1 0.04
2 0.07
4 0.13
15 0.49
100 5.96
256 30.36

Compilation time on MNIST-Add.

NN Compile (s)
2 0.04
16 0.064
64 5.34
256 68.65
1,024 1,027.70

Compilation time on MNIST-Sum.

[W2+Q2] Impact of the variable ordering on the results.

For this question we perform two evaluations:

  1. A study on the impact of the ordering on the Sudoku task
  2. A study on the impact of the ordering on the synthetic benchmark described above.

1. Sudoku

Setup. We re-evaluated CASPER on Sudoku under 10 distinct variable orderings, each averaged over the same 10 seeds used in the paper. We report the same Sudoku metrics from the paper. The checkpoint, data, and seeds are fixed across all runs, to isolate the ordering effect.

Observation no static ordering is inherently better than another as there is no cell/square/row/column that is easier than another in all sudokus. We hence expect that the ordering will have no impact on the results.

Result. The ordering has a negligible effect. The mean over the 10 orderings coincides with the reported numbers, and the standard deviation across orderings is at or below the seed-level std reported in the paper (e.g. 0.30.3 vs. 0.90.9 for PipeAcc). Over all 10 orderings the full range is only 66.066.0–67.067.0\\% for NeuroAcc, 93.793.7–94.594.5\\% for RecRate, and 83.783.7–84.984.9\\% for PipeAcc. This empirically confirms that the projected output is not sensitive to the ordering.

Configuration NeuroAcc RecRate PipeAcc
CASPER (10 seeds) 66.0 ± 0.0 94.3 ± 0.8 84.4 ± 0.9
CASPER (10 orderings) 66.5 ± 0.3 94.1 ± 0.2 84.4 ± 0.3

The reported std is taken across the 10 orderings. We will add this ordering-sensitivity analysis to the paper.

Authors · CommentOpenReview ↗

More on Benchmarking the Impact of the Ordering

2. Synthetic

In our synthetic dataset the datapoints for some variables are injected with a uniformly distributed noise ϵ\epsilon, making them harder to learn: each such datapoint xx is corrupted as

x^=(1−λ) x+λ ϵ,ϵ∼U(0,1),λ∈[0.9,1.0]\hat{x} = (1-\lambda)\,x + \lambda\,\epsilon,\qquad \epsilon \sim \mathcal{U}(0,1), \lambda \in [0.9,1.0]

Observation We expect the ordering to have a high impact on the performance as by construction we have some variables that are much more complex to learn (up to full noise) than others. In this case we expect that:

  1. With the best ordering (high-confidence first), i.e., one that puts the easy variables first, then CASPER will improve the performance wrt to the baseline;
  2. With a random ordering CASPER will have performance similar to the baseline;
  3. With a greedy heuristic (min-fill) that eliminates first the variables adding the fewest new edges between its neighbours - a proxy for minimising induced width - but ignoring how hard each variable is to learn. We expect CASPER to perform similarly to the random ordering;
  4. With the worst ordering (low-confidence first), i.e, one that puts all the difficult variables first, then CASPER will perform worse than the baseline.
topology b m λ ordering base % acc % (mean ± sd) Δ % seeds
P - 50 0.90 min_fill 72.60 73.40 ± 7.76 +0.80 20
P - 50 0.90 high_conf 72.60 79.30 ± 4.69 +6.70 20
P - 50 0.90 low_conf 72.60 68.50 ± 8.28 -4.10 20
P - 50 0.90 random 72.60 74.10 ± 5.64 +1.50 20
E 2 50 0.90 min_fill 72.60 76.70 ± 7.87 +4.10 20
E 2 50 0.90 high_conf 72.60 87.00 ± 4.28 +14.40 20
E 2 50 0.90 low_conf 72.60 68.10 ± 9.19 -4.50 20
E 2 50 0.90 random 72.60 78.00 ± 7.31 +5.40 20
P - 100 0.90 min_fill 73.25 71.90 ± 6.11 -1.35 20
P - 100 0.90 high_conf 73.25 80.25 ± 4.31 +7.00 20
P - 100 0.90 low_conf 73.25 67.15 ± 6.14 -6.10 20
P - 100 0.90 random 73.25 72.15 ± 4.63 -1.10 20
E 2 100 0.90 min_fill 73.25 77.10 ± 6.65 +3.85 20
E 2 100 0.90 high_conf 73.25 86.70 ± 3.05 +13.45 20
E 2 100 0.90 low_conf 73.25 68.00 ± 6.61 -5.25 20
E 2 100 0.90 random 73.25 74.95 ± 7.61 +1.70 20
P - 50 1.00 min_fill 58.40 58.00 ± 5.19 -0.40 20
P - 50 1.00 high_conf 58.40 67.00 ± 4.92 +8.60 20
P - 50 1.00 low_conf 58.40 52.50 ± 6.42 -5.90 20
P - 50 1.00 random 58.40 59.30 ± 5.16 +0.90 20
E 2 50 1.00 min_fill 58.40 62.00 ± 6.93 +3.60 20
E 2 50 1.00 high_conf 58.40 77.20 ± 5.13 +18.80 20
E 2 50 1.00 low_conf 58.40 53.30 ± 9.36 -5.10 20
E 2 50 1.00 random 58.40 62.10 ± 9.98 +3.70 20
P - 100 1.00 min_fill 59.35 57.00 ± 5.13 -2.35 20
P - 100 1.00 high_conf 59.35 66.40 ± 4.19 +7.05 20
P - 100 1.00 low_conf 59.35 52.55 ± 5.46 -6.80 20
P - 100 1.00 random 59.35 58.00 ± 3.81 -1.35 20
E 2 100 1.00 min_fill 59.35 63.30 ± 5.28 +3.95 20
E 2 100 1.00 high_conf 59.35 76.25 ± 4.17 +16.90 20
E 2 100 1.00 low_conf 59.35 54.40 ± 5.04 -4.95 20
E 2 100 1.00 random 59.35 60.50 ± 5.89 +1.15 20

The results show that high-conf (the order CASPER uses) is the best in every configuration (mean +11.6% over base, up to +18.8%), low-conf is consistently worst (mean −5.3%, dropping below base), while min-fill and random are near-neutral (mean +1.5%).

[W3] The broader impacts section is marked N/A

A discussion of CASPER's broader impacts will be included in the final version of the paper.


References. [A] R. Dechter, Reasoning with Probabilistic and Deterministic Graphical Models, Chapters 4–5 (Algorithm/Fig. 4.5 and Theorem 4.5, Complexity of BE-bel; Definition 5.32, Polytree). [B] R. Dechter, "Bucket elimination: A unifying framework for reasoning," Artificial Intelligence 113 (1999) 41–85.

Comments on the paper

2 comments
Area Chair vcky · CommentOpenReview ↗

Dear reviewers,

This is a final reminder that the Phase 2 author-reviewer-AC discussion ends today. Before that, you are invited to read the rebuttal and post a reply, stating whether your concerns were addressed is very helpful for the final evaluation.

Thank you in advance for your cooperation.

Best,

Your AC

Authors · CommentOpenReview ↗

Final Remarks: Summary of Responses to the Area Chair’s Questions

We thank once again the Area Chair and the Reviewers for their appreciation of our work and the valuable feedback, which has further strengthened our paper.

As the Author+Reviewer+AC discussion period is coming to an end, we summarize below our responses to the five questions raised by the Area Chair. Full derivations, results, and additional reviewer-specific responses are provided in the corresponding discussion threads.

[Complexity of the offline compilation step — Reviewer G9Zq] For an ordering dd, the resulting time complexity is O(rkw∗(d)+1)O(rk^{w^*(d)+1}), while the space complexity is O(nkw∗(d))O(nk^{w^*(d)}), where

  • rr is the number of input clauses,
  • nn is the number of categorical variables,
  • k=max⁡ihik=\max_i h_i is the largest variable-domain size, and
  • w∗(d)w^*(d) is the induced width of the constraint interaction graph under dd.

Thus, compilation complexity primarily depends on how strongly the variables are structurally coupled: bounded-induced-width constraint families admit polynomial compilation, whereas highly interconnected constraints may lead to exponential growth.

[Gap between Casper and scalable approximate methods — Reviewer SZKx] The difference does not arise from which arithmetic relations the methods can express, but from the different strategies they use to achieve tractability. DeepProbLog retains exact inference but does not scale; Scallop truncates the propagated proofs; A-NeSI learns an approximation of symbolic inference; and CTSketch can lose information through its intermediate representations. The gap is not universal: DSL exploits an addition-specific exact factorization and outperforms Casper for n=100n=100 on MNIST-Add. Casper instead exploits width-bounded offline compilation to retain hard assignment-level satisfaction while scaling at inference. We will incorporate this method-by-method analysis into Section 5 to better position Casper.

[Why Dijkstra-based methods were not considered — Reviewer SZKx] In our Warcraft formulation the neural network directly predicts the path variables and must learn which feasible path is optimal. Dijkstra-based pipelines instead predict tile costs and delegate the combinatorial path optimization to a task-specific shortest-path solver. They are therefore valid and important complementary approaches, but they change the division of labour between the neural and symbolic components. Casper studies whether arbitrary declarative categorical constraints can be imposed on direct neural predictions without requiring a problem-specific solver. We will clarify this distinction in the paper.

[Dependence on the L2L_2 term — Reviewer Z9Bv] The L2L_2 term is not required for correctness or constraint satisfaction; it is a soft training regularizer introduced to (i) counteract the rank deficiency of the layer's Jacobian, as characterized in Proposition 1, and (ii) reduce the discrepancy between the surrogate and fixed-point projections, as characterized in Corollary 1. All reported experiments use λ=1\lambda=1. Our new study over λ∈0,0.01,0.1,0.3,1,3,10,30\lambda\in\\{0,0.01,0.1,0.3,1,3,10,30\\} shows that performance is robust across moderate values and does not require fine tuning, although very large values can dominate the supervised objective and degrade performance.

[Deployability on longer sequences — Reviewer Z9Bv] The surrogate error does not impose a sequence-length limit through cascading discrete decisions. For any fixed ordering and deterministic tie-breaking policy, we prove that the surrogate and exact fixed-point projections select the same candidate at every step. They therefore produce the same discrete assignments and encounter the same sequence of feasible sets, so an early continuous over-correction cannot restrict the feasible sets available later. Longer sequences only accumulate non-compounding local continuous discrepancies, whose squared error grows at most linearly with sequence length. This characterization applies directly to the 10241024-digit experiment, and our positional analysis shows no systematic degradation toward later positions.

We hope that these responses have addressed all the questions and clarified the contributions and limitations of our work. We thank the Area Chair and the Reviewers once again for their careful consideration and constructive feedback.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Missing a submission?

Loading the discussion…