{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/deepstochlog-neural-stochastic-logic","title":"DeepStochLog: Neural Stochastic Logic Programming","arxiv_id":"2106.12574","date":"2021-06-23","proceeding":null,"authors":["Thomas Winters","Giuseppe Marra","Robin Manhaeve","Luc De Raedt"],"abstract":"Recent advances in neural symbolic learning, such as DeepProbLog, extend probabilistic logic programs with neural predicates. Like graphical models, these probabilistic logic programs define a probability distribution over possible worlds, for which inference is computationally hard. We propose DeepStochLog, an alternative neural symbolic framework based on stochastic definite clause grammars, a type of stochastic logic program, which defines a probability distribution over possible derivations. More specifically, we introduce neural grammar rules into stochastic definite clause grammars to create a framework that can be trained end-to-end. We show that inference and learning in neural stochastic logic programming scale much better than for neural probabilistic logic programs. Furthermore, the experimental evaluation shows that DeepStochLog achieves state-of-the-art results on challenging neural symbolic learning tasks.","url_abs":"https://arxiv.org/abs/2106.12574v1","url_pdf":"https://arxiv.org/pdf/2106.12574v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"deepstochlog-neural-stochastic-logic","repo_url":"https://github.com/ML-KULeuven/deepstochlog","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"deepstochlog-neural-stochastic-logic","repo_url":"https://github.com/ML-KULeuven/deepstochlog-lm","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2106.12574","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2106.12574"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ML-KULeuven/deepstochlog","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ML-KULeuven/deepstochlog-lm","reach":null}],"summary":{"ran_draft_wrong":2,"unverified":3},"by_repo_kind":{"listed":{"samples":3,"ran":0,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"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"},"n_pointer_only_for_licence":2,"samples":[{"code_sha256_prefix":"abcf216a0f054de7","entry":"build_prompt","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"abcf216a0f054de7"}},{"code_sha256_prefix":"487252da3c521e4a","entry":"get_domain","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"487252da3c521e4a"}},{"code_sha256_prefix":"5fd539557557afe3","entry":"multiply","repo":"ML-KULeuven/deepstochlog","repo_kind":"listed","path":"deepstochlog/inferences.py","file_url":"https://github.com/ML-KULeuven/deepstochlog/blob/HEAD/deepstochlog/inferences.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5fd539557557afe3"}},{"code_sha256_prefix":"a6bdd0c32e65a952","entry":"multiply_iterable","repo":"ML-KULeuven/deepstochlog","repo_kind":"listed","path":"deepstochlog/inferences.py","file_url":"https://github.com/ML-KULeuven/deepstochlog/blob/HEAD/deepstochlog/inferences.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a6bdd0c32e65a952"}},{"code_sha256_prefix":"ad964077a558661f","entry":"process_body","repo":"ML-KULeuven/deepstochlog","repo_kind":"listed","path":"deepstochlog/parser.py","file_url":"https://github.com/ML-KULeuven/deepstochlog/blob/HEAD/deepstochlog/parser.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ad964077a558661f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}