Paper commentary
Synthetic Neurosymbolic Task Generation with Controlled Constraint Complexity
- Problem Neurosymbolic benchmarks are hard to build at scale, and existing ones either fix their constraints or keep them simple, so systematic study of how logical structure affects learning is limited.
- Method NeSySy generates a constraint with a chosen clause-to-variable ratio, certifies its satisfiability with SAT and SMT solvers, and aligns a neural generator's samples to the constraint by filtering or by exact MaxSAT and OMT repair.
- Results With the Base learner on φOB, filtering reached accuracy 0.9071 and fixing reached 0.7082 at hidden size 128, and Base difficulty peaked around cvr ≈ 2.

Fig. 1 .The two learning tasks; D is the training dataset, shaded nodes are observed. (a)Learning with constraints (Example 1): the model maps inputito targeto, each target lies in the region of the output space Om where φ(i,· ) holds.(b)Learning from distant supervision (Example 2): the model’s outputois latent (dashed); the target is the queryQ↔φ(o), i.e.Qis true iffosatisfiesφ.
Original paper · CC BY 4.0 · Mykhailo Buleshnyi, Zsolt Zombori, Michael Benedikt · Synthetic Neurosymbolic Task Generation with Controlled Constraint Complexity · Original paper figure · Extracted the figure area from page 2 of the original PDF.Why neurosymbolic benchmarks are hard to scale
Progress in neurosymbolic learning is slowed by a shortage of benchmarks that are both flexible and able to scale to many tasks. Real-world benchmarks are typically assembled by hand, which leaves their constraints fixed and comparatively simple. Synthetic benchmarks such as MNISTadd reduce each task to independent digit classifications, so they cannot probe richer logical interaction.
A logical formula can enter learning in two ways: as a constraint that limits which predictions are admissible, or as indirect supervision in which only query answers are observed. NeSySy is designed to produce tasks for both of these settings from one parameterised pipeline. The first figure places the two settings side by side: constraint learning maps an input to a target inside the admissible region, while distant supervision observes only the query value derived from a latent output.
How constraints, generators and alignment fit together
For Boolean outputs, the constraint is a CNF skeleton whose difficulty is set by the clause-to-variable ratio cvr, and CNFgen produces satisfiable k-CNF formulas at the requested ratio. For real outputs, the atoms are bounded intervals or general linear inequalities, and the coefficients of the inequalities are capped by coeffmax. Satisfiability is checked with Z3, and for an input-dependent constraint the check requires \(\forall I.\ \exists O.\ \varphi\) to hold.
Input-dependent constraints can also be built region by region, so each of the ncon disjoint input regions has its own output constraint and satisfiability holds per region.
The generator is a neural network trained on uniformly sampled inputs with a weighted sum of losses, including a diversity loss and a constraint loss. Filtering draws inputs, keeps the pairs that satisfy the constraint and discards the rest, so the generator's distribution is preserved but finding valid samples can be slow. Fixing keeps each input and replaces an inconsistent output with the nearest satisfying one, which guarantees a valid output for every input at the cost of distorting the generator's distribution.
For real-valued constraints, the repaired points lie on the feasible boundary, so Gaussian perturbations are added and only those that still satisfy the constraint are kept.
The nearest valid output is defined as \(\mathrm{repair}(\hat{o}, i)=\arg\min_{o':\varphi(i,o')=1}\lVert o'-\hat{o}\rVert_1\), minimising over outputs that satisfy the constraint for the fixed input i. For Boolean outputs the minimisation is done by the weighted MaxSAT solver RC2, which flips the fewest variables, and for real outputs by Z3.
Which generator parameters change task difficulty
These sweeps use the Base learner, which ignores the constraint, and report means and standard errors over 25 runs formed from 5 dataset seeds and 5 training seeds. The clause-to-variable ratio was swept from 0.5 to 5 in steps of 0.5 for output-only constraints.
On Boolean output-only constraints, Base difficulty peaks around cvr ≈ 2. At low cvr the constraint barely restricts the generator, and at high cvr only a few outputs stay feasible, so prediction becomes nearly trivial.
For real-valued output-only constraints, infinitely many outputs stay feasible even at large cvr, so these tasks never become trivial. Increasing cvr lowers MAE while raising MCD, which shows that a better fit to the feasible region need not mean better predictions.
Splitting the input space into more regions with different constraints raises the violation ratio and lowers accuracy across all constraint types at cvr = 3. This makes the number of constraint regions a simple handle on task hardness.
Filtering gives easier tasks than fixing: at hidden size 128 the Base learner reaches accuracy 0.9071 with filtering and 0.7082 with fixing on φOB. Fixing also produces more distinct outputs, with 328.6 unique outputs against 140.0 for filtering at hidden size 128. Increasing the hidden dimension of the generator makes the task harder under both strategies.
The authors describe the parameters as largely independent controls over task difficulty. In their reading, cvr governs how many satisfying assignments exist, the number of regions governs input dependence, and the alignment strategy governs target diversity.
Whether enforcing constraints helps
The learners share a base-integrator layout in which base models give marginal predictions and an integrator combines them. Base assumes independent outputs, BaseSolver applies the repair operator at inference, and BaseCCN+ and BaseDRL correct outputs through differentiable layers during training. BaseSeq adds a sequential model that predicts each output from earlier outputs and base predictions, and it is constraint-unaware during training.
On φOB, BaseSolver gains +3.16, +3.86, +2.90 and +1.60 (%) in accuracy over Base at cvr 1 to 4.
BaseSeq's gain falls from +8.36 at 80 samples to +3.91 at 16000, and BaseCCN+ drops below Base from 4000 samples on. The authors suggest that the falling BaseCCN+ gains may reflect shortcut learning, citing prior work.
BaseDRL instead increases MAE by +0.203 at cvr 1 and +0.381 at cvr 2, and its precompilation timed out for cvr above 2. Base MCD values are 0.051, 0.078, 0.088 and 0.115 for cvr 1 to 4.
DeepProbLog under distant supervision
The reimplemented DeepProbLog uses a Base network to give independent predicate probabilities, which a precompiled circuit combines into the query probability. The baseline has the same architecture but predicts the query probability directly, and both are trained to maximise log-likelihood on positive and negative query labels.
Across the sweeps, DeepProbLog outperforms the baseline at intermediate cvr, where the Base learner finds the task hardest, while both models perform similarly at low and high cvr. The second figure reads the same comparison against the weight of the constraint loss, and the third and fourth against generator and base model depth. The figure reason for this paragraph is grounded in the caption of the figure showing these four sweeps.
Raising the constraint loss weight during generation shrinks the region that yields negative samples, and both models benefit. Deeper generators degrade the neural baseline but leave DeepProbLog largely unaffected. Deeper base models narrow the gap, so DeepProbLog is strongest with small networks and comparable to the baseline at higher capacity.
Limits of the present evidence
The authors also say they have no theory that explains the observed trends.
Constraints that relate multiple inputs, such as constraints across samples, are not supported. Integer data types and their theories are also not supported, and the authors note that cross-sample constraints matter for fairness and sequential or temporal data.
BaseSeq offers no satisfaction guarantee, so the authors suggest combining it with solver-based repair at inference. BaseDRL's compilation step did not scale beyond cvr = 2, whereas solver-based repair ran in every configuration tested.
Only DeepProbLog was used for distant supervision, and constraint loss functions and circuits over sequential inputs were not evaluated on the benchmark. The authors did not run a broad evaluation across the systems available in the field.
Paper info
- Authors
- Mykhailo Buleshnyi, Zsolt Zombori, Michael Benedikt
- Venue
- arXiv · Preprint
- First published
- 2026-11-14
- Added
- 2026-11-17
- Updated
- 2026-11-14
- Version
- v1
- arXiv
- 2611.19597
- Category
- cs.LG · cs.AI · cs.LO · cs.NE · cs.SC
- Original paper terms
- CC BY 4.0
- What we show
- Paper info, commentary and permitted figures from the original paper
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Abstract
We introduce NeSySy, a synthetic generator for neurosymbolic learning tasks that jointly produces logical constraints and consistent datasets. Unlike existing benchmarks, NeSySy provides fine-grained control over key properties such as constraint structure, tightness, input dependence, and data generation and alignment strategies. In particular, it allows the use of rich constraints over infinite domains, and uses solvers to ensure that the constraints are meaningful and that generated samples satisfy the constraints. We design NeSySy to support both learning with declarative constraints and learning from distant supervision. Across a range of constraint families, we provide evidence that its parameters induce systematic and largely independent effects on task difficulty. Using NeSySy, we study constraint-aware learning methods, identifying regimes where explicit constraint enforcement is beneficial and where expressive unconstrained models can instead learn constraint structure directly from data. Our results establish NeSySy as a controlled testbed for analysing the interaction between learning and logical structure. NeSySy is built around a pipeline that incorporates solvers. Satisfiability checkers (CNFgen and Z3) generate and certify constraints. Constrained optimizers (RC2 for MaxSAT, Z3 for OMT) compute optimal repairs that guarantee every generated sample is consistent.
Quote from the paper
Mykhailo Buleshnyi, Zsolt Zombori, Michael Benedikt (2026). Synthetic Neurosymbolic Task Generation with Controlled Constraint Complexity. arXiv:2611.19597v1. https://arxiv.org/abs/2611.19597v1
BibTeX
@misc{buleshnyi2026synthetic,
title = {{Synthetic Neurosymbolic Task Generation with Controlled Constraint Complexity}},
author = {Mykhailo Buleshnyi and Zsolt Zombori and Michael Benedikt},
year = {2026},
eprint = {2611.19597},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2611.19597v1}
}