Papers › Teaching Temporal Logics to Neural Networks

Teaching Temporal Logics to Neural Networks

6 Mar 2020ICLR 2021 1arXiv:2003.04218archive 2025-07-28

Christopher Hahn, Frederik Schmitt, Jens U. Kreber, Markus N. Rabe, Bernd Finkbeiner

We study two fundamental questions in neuro-symbolic computing: can deep learning tackle challenging problems in logics end-to-end, and can neural networks learn the semantics of logics. In this work we focus on linear-time temporal logic (LTL), as it is widely used in verification. We train a Transformer on the problem to directly predict a solution, i.e. a trace, to a given LTL formula. The training data is generated with classical solvers, which, however, only provide one of many possible solutions to each formula. We demonstrate that it is sufficient to train on those particular solutions to formulas, and that Transformers can predict solutions even to formulas from benchmarks from the literature on which the classical solver timed out. Transformers also generalize to the semantics of the logics: while they often deviate from the solutions found by the classical solvers, they still predict correct solutions to most formulas.

PaperPDFConference PDFCodeCode 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="2003.04218")

Code

Syntology Ran 5 of 24 code samples harvested from 2 repositories linked to this paper; 19 have no recorded run. Of those that ran: 2 ran · honoured contract; 3 ran · our draft was wrong.

By repository: official repository: 13 samples from 1 repository, 5 ran; community (archive-listed): 11 samples from 1 repository, 0 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

reactive-systems/deepltl officialmentioned in papermentioned on GitHubtfMIT report
necrashter/deepltl-pytorch mentioned on GitHubpytorchMIT 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

24 samples harvested; 5 ran; 2 honoured the contract we drafted; 19 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.

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

Licence: 0 of the 24 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 2 repositories linked to this paper, official or community; each sample names its own and says which. “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.

create_look_ahead_mask reactive-systems/deepltl/deepltl/models/transformer.py official repository ran · honoured contract MIT (permissive) · 1bfc281ca0cb23d6 · report
create_padding_mask reactive-systems/deepltl/deepltl/models/transformer.py official repository ran · honoured contract MIT (permissive) · 09cfa39c1a945b25 · report
expand_to_same_rank reactive-systems/deepltl/deepltl/models/beam_search.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · 4d12c68827c9e049 · report
get_shape_keep_last_dim reactive-systems/deepltl/deepltl/models/beam_search.py official repository ran · our draft was wrong MIT (permissive) · e8a54793bb205026 · report
shape_list reactive-systems/deepltl/deepltl/models/beam_search.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · e092e8e3a00bcec6 · report
abbrev_count reactive-systems/deepltl/deepltl/utils/utils.py official repository unverified MIT (permissive) · 16bdc764a81d1f5a · report
checkpoint_path reactive-systems/deepltl/deepltl/train/common.py official repository unverified MIT (permissive) · bd594cfa2fd652e7 · report
dataset_name reactive-systems/deepltl/deepltl/utils/utils.py official repository unverified MIT (permissive) · 3e033cf884fa1ed7 · report
get_angles reactive-systems/deepltl/deepltl/layers/positional_encoding.py official repository unverified MIT (permissive) · 370c1f3fe2690649 · report
positional_encoding reactive-systems/deepltl/deepltl/layers/positional_encoding.py official repository unverified MIT (permissive) · ab5aea947fca2ea9 · report
prepare_dataset_no_tf reactive-systems/deepltl/deepltl/train/common.py official repository unverified MIT (permissive) · 2f3557097c940388 · report
run_with_timeout reactive-systems/deepltl/deepltl/utils/utils.py official repository unverified MIT (permissive) · 817e786e14f0e285 · report
scaled_dot_product_attention reactive-systems/deepltl/deepltl/layers/attention.py official repository unverified MIT (permissive) · 6ac8c2e8189b5ab7 · report
create_look_ahead_mask necrashter/deepltl-pytorch/deepltl/models/transformer.py community (archive-listed) unverified MIT (permissive) · 4bc2b746faf71e08 · report
create_padding_mask necrashter/deepltl-pytorch/deepltl/models/transformer.py community (archive-listed) unverified MIT (permissive) · f1c292f469811841 · report
flatten_beam_dim necrashter/deepltl-pytorch/deepltl/models/beam_search.py community (archive-listed) unverified MIT (permissive) · b35303fb7949670e · report
get_activation necrashter/deepltl-pytorch/deepltl/models/transformer.py community (archive-listed) unverified MIT (permissive) · 6959fcf2fd01f0db · report
get_ass necrashter/deepltl-pytorch/deepltl/train/common.py community (archive-listed) unverified MIT (permissive) · c2928e09d7c3cd10 · report
get_latest_checkpoint necrashter/deepltl-pytorch/deepltl/train/common.py community (archive-listed) unverified MIT (permissive) · 981652cdff73c2e9 · report
get_run_path necrashter/deepltl-pytorch/deepltl/train/common.py community (archive-listed) unverified MIT (permissive) · d6df88fd6fc1d452 · report
get_shape_keep_last_dim necrashter/deepltl-pytorch/deepltl/models/beam_search.py community (archive-listed) unverified MIT (permissive) · 0fb71688c64be6e5 · report
map_structure necrashter/deepltl-pytorch/deepltl/models/beam_search.py community (archive-listed) unverified MIT (permissive) · fba9be9ba7c1e0e0 · report
positional_encoding necrashter/deepltl-pytorch/deepltl/layers/positional_encoding.py community (archive-listed) unverified MIT (permissive) · f3d335e856a3e9e4 · report
scaled_dot_product_attention necrashter/deepltl-pytorch/deepltl/layers/attention.py community (archive-listed) unverified MIT (permissive) · 73b90c22738f0032 · report

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Absolute Position EncodingsAdamAttentionBPEDense ConnectionsDropoutLabel SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerReLUResidual ConnectionSoftmaxTransformer

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