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

*Lohith Konathala, Luca Andolfi, Eleonora Giunchiglia*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/149782) · [Open on the map](../papers.html#p149782)

Category: [Optimization & Federated Learning](../pcat/13.md) › [Multi-Task Learning Optimization](../pgroup/573.md) · Type: new method · Keywords: neurosymbolic AI, constraint satisfaction, projection, scalable neurosymbolic layer, differentiable constraints

Areas: [Model Architectures & Sequence Modeling](../areas/architectures.md) › Dynamic and relational architectures › Constraint Solving

## Summary
Casper introduces a projection-based neurosymbolic layer that guarantees exact constraint satisfaction while scaling to large problems and being fully differentiable and automated.

## Explained to a 5-year-old
Some problems need computers to follow very exact rules, like puzzles. Old methods either always follow the rules but are too slow, or are fast but sometimes break the rules. This paper adds a new piece inside computer programs that makes them follow the rules perfectly and quickly. It works like a magic checker that looks at all the rules at once and fixes the answer in just one step. This helps solve big puzzles such as giant number games and maze navigation.

## Explained to a 5-year-old, longer
Many real-world problems need computers to give answers that obey strict rules, like a puzzle. Right now, some computer methods always obey the rules, but they become very slow when the problem gets big. Other methods are fast, but they sometimes give answers that break the rules. Traditional deep learning never guarantees the rules are followed at all. This paper introduces a new layer that can be added to any computer program to fix both problems. The layer works by turning the problem of following rules into a simple math operation called a projection. A projection is like sliding a point until it lands exactly where all the rules meet. Because it is a single calculation, it can be done quickly even for huge problems. The layer is fully automatic, so developers do not need to design special code for each new puzzle. It can be trained together with the rest of the program, just like any other part of the code. Experiments show that this layer always produces correct answers for big puzzles like giant number grids and maze navigation. This makes it possible to use reliable, rule-following AI in many important tasks.

## For a technical reader
The paper addresses the trade-off between exact constraint satisfaction and scalability in neurosymbolic AI. It proposes a differentiable layer that reformulates constraint satisfaction as a closed-form Euclidean projection onto the feasible region, computable in a single forward pass. This projection can be inserted into any neural network, requires no problem-specific engineering, and can be trained end-to-end. Experiments demonstrate that the layer consistently produces valid solutions on large-scale benchmarks where exact and approximate baselines fail.

## Problem
Many neurosymbolic approaches either guarantee exact constraint satisfaction but do not scale, or scale but sacrifice correctness, while standard deep learning offers no guarantees. This creates a trade-off between correctness and scalability in solving real-world constraint problems.

## Method
The approach casts constraint satisfaction as a Euclidean projection onto the feasible region, which can be computed analytically in a single forward pass. This projection is fully differentiable and can be inserted as a layer into any neural network, enabling end-to-end training without problem-specific engineering. The layer is automated, requiring no manual tuning of constraints.

## Results
On large 30×30 Warcraft grids, exact baselines timed out and approximate methods produced valid paths less than 7% of the time, whereas the approach produced valid paths 100% of the time. Across MNIST arithmetic, Sudoku, and Warcraft, the method achieved guaranteed-valid outputs at scale where prior methods failed.

## Contributions
A fully automated, differentiable neurosymbolic layer that guarantees exact constraint satisfaction while scaling to large problems, without requiring problem-specific engineering. It provides a closed-form projection formulation that can be composed with any neural predictor.

## Research questions this paper is counted under

- [How can neural constraint solvers guarantee exact solutions while remaining scalable and data-efficient across diverse problem formulations?](../q/535.md)

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/149782)
