Papers › Learning with Logical Constraints but without Shortcut Satisfaction

Learning with Logical Constraints but without Shortcut Satisfaction

1 Mar 2024arXiv:2403.00329archive 2025-07-28

Zenan Li, Zehua Liu, Yuan YAO, Jingwei Xu, Taolue Chen, Xiaoxing Ma, Jian Lü

Recent studies in neuro-symbolic learning have explored the integration of logical knowledge into deep learning via encoding logical constraints as an additional loss function. However, existing approaches tend to vacuously satisfy logical constraints through shortcuts, failing to fully exploit the knowledge. In this paper, we present a new framework for learning with logical constraints. Specifically, we address the shortcut satisfaction issue by introducing dual variables for logical connectives, encoding how the constraint is satisfied. We further propose a variational framework where the encoded logical constraint is expressed as a distributional loss that is compatible with the model's original training loss. The theoretical analysis shows that the proposed approach bears salient properties, and the experimental evaluations demonstrate its superior performance in both model generalizability and constraint satisfaction.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2403.00329")

Code

Syntology Ran 12 of 15 code samples harvested from 1 repository linked to this paper; 3 have no recorded run. Of those that ran: 3 ran · honoured contract; 2 ran · our draft was wrong; 7 ran with no contract checked.

By repository: official repository: 15 samples from 1 repository, 12 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

softwiser-group/nesy-without-shortcuts officialmentioned in paperpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

15 samples harvested; 12 ran; 3 honoured the contract we drafted; 3 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

3ran · honoured contract
2ran · our draft was wrong
7ran
3unverified

Licence: 15 of the 15 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from SoftWiser-group/NeSy-without-Shortcuts. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

ResNet18 SoftWiser-group/NeSy-without-Shortcuts/models/resnet.py official repository ran no licence file found · pointer only · 8ac07200c1c79ca8 · report
ResNet34 SoftWiser-group/NeSy-without-Shortcuts/models/resnet.py official repository ran no licence file found · pointer only · a89d570c0420fa68 · report
add_default_parser_args SoftWiser-group/NeSy-without-Shortcuts/logic_encoder/args.py official repository ran no licence file found · pointer only · 5fbba8af66a4f573 · report
conv3x3 SoftWiser-group/NeSy-without-Shortcuts/models/resnet.py official repository ran · our draft was wrong no licence file found · pointer only · 583f9780bdd00a45 · report
dataset_with_indices softwiser-group/nesy-without-shortcuts/hwf_exp/config.py official repository ran · our draft was wrong no licence file found · pointer only · 9713c177d53c82d7 · report
dataset_with_indices SoftWiser-group/NeSy-without-Shortcuts/hwf_exp/config.py official repository ran no licence file found · pointer only · c4ef929d95634177 · report
dataset_with_indices SoftWiser-group/NeSy-without-Shortcuts/image_exp/config.py official repository ran no licence file found · pointer only · 2129574ed34dcb74 · report
get_hms softwiser-group/nesy-without-shortcuts/hwf_exp/config.py official repository ran · honoured contract fingerprinted no licence file found · pointer only · 238a5c2af722aa4b · report
get_hms SoftWiser-group/NeSy-without-Shortcuts/hwf_exp/config.py official repository ran · honoured contract fingerprinted no licence file found · pointer only · bb104479d26e39c3 · report
lr_adapt softwiser-group/nesy-without-shortcuts/hwf_exp/config.py official repository ran · honoured contract fingerprinted no licence file found · pointer only · 22e236003b52f59c · report
lr_adapt SoftWiser-group/NeSy-without-Shortcuts/hwf_exp/config.py official repository ran fingerprinted no licence file found · pointer only · 487902fc411efb97 · report
vgg16 SoftWiser-group/NeSy-without-Shortcuts/models/vgg.py official repository ran no licence file found · pointer only · b77041e9b261bc8f · report
DenseNet100 SoftWiser-group/NeSy-without-Shortcuts/models/densenet.py official repository unverified no licence file found · pointer only · f7b8450b915e3b4b · report
vgg11 SoftWiser-group/NeSy-without-Shortcuts/models/vgg.py official repository unverified no licence file found · pointer only · 7a6f63db4224099a · report
vgg13 SoftWiser-group/NeSy-without-Shortcuts/models/vgg.py official repository unverified no licence file found · pointer only · 3c7955d7089b595d · report

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections