<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Towards Invertible Semantic-Preserving Embeddings of Logical Formulae</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Gaia Saveri</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Luca Bortolussi</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Computer Science, University of Pisa</institution>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Department of Mathematics and Geosciences, University of Trieste</institution>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Logic is the main formal language to perform automated reasoning, and it is further a human-interpretable language, at least for small formulae. Learning and optimising logic requirements and rules has always been an important problem in Artificial Intelligence. State of the art Machine Learning (ML) approaches are mostly based on gradient descent optimisation in continuous spaces, while learning logic is framed in the discrete syntactic space of formulae. Using continuous optimisation to learn logic properties is a challenging problem, requiring to embed formulae in a continuous space in a meaningful way, i.e. preserving the semantics. Approaches like [1] are able to construct efective semantic-preserving embeddings via kernel methods (for linear temporal logic), but the map they define is not invertible. In this work we address this problem, learning how to invert such an embedding leveraging deep architectures based on the Graph Variational Autoencoder framework. We propose a novel model specifically designed for this setting, justifying our design choices through an extensive experimental evaluation. Reported results in the context of propositional logic are promising, and several challenges regarding learning invertible embeddings of formulae are highlighted and addressed.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Semantic-preserving Embeddings</kwd>
        <kwd>Graph Generative Models</kwd>
        <kwd>Graph Variational Autoencoders</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Logic, in its many variants, is arguably one of the most prominent languages used to represent
knowledge, specify requirements and explanations for complex systems, and reason in a
humancomprehensible way [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. On the other hand, Graph Neural Networks (GNN, [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]) have reached
state-of-the-art in relational learning, providing meaningful inductive biases such as permutation
invariance and sparsity awareness [
        <xref ref-type="bibr" rid="ref4 ref5">4, 5</xref>
        ]. Lately, much attention has been put on combining
symbolic knowledge representation and neural computations as performed by GNNs, towards
solving combinatorial and logical reasoning tasks [
        <xref ref-type="bibr" rid="ref6 ref7">6, 7</xref>
        ]. In this context, leveraging GNNs to
learn real-valued representations of logic formulae would open the door to the use of
gradientbased optimization techniques in the space of formulae, hence moving requirement mining from
a discrete to a continuous search problem. A key desiderata of such a model would be that of
semantic consistency, i.e. formulae which are semantically similar should be mapped to vectors
which are close in the latent space. Current state-of-the-art in this field, for Linear Temporal
Logic, is based on kernel methods, hence it learns a non-invertible function of formulae to their
embeddings [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. We address this drawback proposing a model based on the Graph Variational
Autoencoder framework (GVAE, [
        <xref ref-type="bibr" rid="ref8 ref9">8, 9</xref>
        ]), whose objective is to construct an invertible mapping
from the discrete syntactic space of logic formulae to a continuous space where semantic
similarity is preserved.
      </p>
      <p>
        Our Contribution Moving from the rationale of GVAE models for Direct Acyclic Graphs
(DAG, [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]), we formulate a model able to encode the syntactic tree of a logic formula into
a continuous discriminative representation. Towards the goal of making these embeddings
semantic-preserving, we propose a principled strategy to enrich the learned latent space with
semantic information. We show results in the context of propositional logic, which - despite
its grammatical simplicity - already poses challenges arising from the intrinsic symmetry of
propositions and from the syntax-semantic interplay, which we address via a series of justified
design choices. Experimental results are promising and should be taken as a proof-of-concept
towards extending this methodology to richer logic formalisms.
      </p>
      <p>
        Related Work Learning autoencoder models for DAGs was originally addressed via sequence
models [
        <xref ref-type="bibr" rid="ref11 ref12 ref13">11, 12, 13</xref>
        ] , then casted into a graph-related task in [
        <xref ref-type="bibr" rid="ref10 ref14 ref15">10, 14, 15</xref>
        ]. A significant body
of work in this field is dedicated to molecular generation [
        <xref ref-type="bibr" rid="ref16 ref17">16, 17, 18</xref>
        ]. Learning generative
models with either syntactic or semantic constraints is instead tackled in [19, 20], respectively.
Constructing a semantic similarity measure for logic formulae is instead in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. Background</title>
      <p>As mentioned in Section 1, in this work we restrict the investigation to the setting of propositional

logic. Denoting by {}=1 a set of propositional variables, where each  is a binary variable
that can evaluate either to true (1) or false (0), the set of propositional formulae (hereafter
referred to also as propositions or requirements) is defined recursively by the syntax  := 1 |
 | ¬ |  1 ∧  2 |  1 ∨  2. Semantics is defined recursively following the usual meaning of
Boolean operators (see Appendix A.1 for details).</p>
      <p>
        A convenient way to represent propositions in this context is by means of their abstract
syntax tree (AST), i.e. a tree representation of the syntactic structure of the formula where
internal nodes are the Boolean operators and the leaves are the propositional variables. Since
Boolean operators are at most binary, the AST arising from propositional formulae are binary
trees. This representation opens the doors to the application of Graph Neural Network (GNN,
[
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]) models, i.e. deep learning models natively able to handle graph-structured inputs.
      </p>
      <p>In this work we wish to learn both an encoder and a decoder for mapping inputs x to and from
continuous vectors z. The Variational Autorencoder (VAE, [21]) framework is designed to learn
simultaneously two parametric functions: a probabilistic generation network (decoder)  (x|z)
and an approximated posterior distribution (encoder) (z|x), by maximizing the evidence
lower bound:
ℒ(,  ; x) = Ez∼ (z|x)[log  (x|z)] − [(z|x)||(z)]
(1)
where [(· )||(· )] denotes the Kullback-Leibler divergence between (· ) and (· ) and (z)
the prior distribution over latent variables z.</p>
      <p>
        The VAE model has been generalized to graph structured data by employing a GNN as encoder
(and possibly decoder) model [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. Deep generative models for graphs are partitioned into two
classes (borrowing the terminology from [22, 23]), following the way in which nodes and edges
of the graph are produced: sequential generating if nodes and edges are processed following
a predefined order on them, one at a time; one-shot generating if the adjacency matrix of the
graph is generated all at once.
      </p>
      <p>If auxiliary information y (such as category labels or semantic context) about the input x
should be incorporated into the learning process, frameworks like the Conditional Variational
Autoencoder (CVAE, [24, 25]) allow to control the generative process by imposing a condition on
both the encoder (in this context defined as (z|y, x)), the prior ( (z|y), which is parametric)
and the decoder ( (x|y, z)). The network is trained by optimizing the following conditional
marginal log-likelihood (notation is the same of Equation 1):
ℒ(, ,  ; x, y) = Ez∼ (z|y,x)[log  (x|y, z)] − [(z|y, x)|| (z|y)]
(2)</p>
      <p>While for euclidean input formats the vector y is commonly concatenated to the input x (resp.
the latent z) before the computation of the encoding (resp. decoding) functions, in the context
of graph generative models several possibilities exist: in cases in which there is additional
information for all the nodes of the graph, it is concatenated to the initial node states [26]; when
y is a property of the whole graph, it can be either concatenated to the latent vector z before
the decoding process [27] or incorporated into the GNN decoding architecture itself [28].</p>
      <sec id="sec-2-1">
        <title>2.1. Kernel-based Logic Embeddings</title>
        <p>
          Learning embeddings of logic formulae preserving semantic similarity is addressed in [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ] by
means of the kernel trick. In more detail, the problem of finding a similarity measure between
Signal Temporal Logic (STL) formulae is tackled by defining a suitable kernel function (and a
corresponding learning algorithm for it) mapping formulae to a subspace of the continuous
Hilbert space 2, resulting in a high value for semantically similar formulae (and a low value
otherwise; we refer to Appendix B for more details). Being the Boolean operators a subset of the
operators of STL, we can restrict the definition of the kernel in [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ] to the context of propositional
logic. Considering propositions with at most  variables, the set  of the 2 possible variable
configurations and denoting  ( ) = 1 (resp.  ( ) = − 1) if the formula  evaluated on  ∈ 
returns true (resp. false), then we formulate a Boolean kernel (by restricting the definition of
Boolean STL kernel in [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]) between formulae ,  as:
∫︁
        </p>
        <p>∈
(,  ) =
 ( ) ·  ( ) 
(3)
and compute it using Monte Carlo approximation putting a uniform probability measure over
the space of configurations  . Experiments confirm that the Boolean kernel of Equation
3 maps propositional formulae in a semantic-preserving continuous space, as reported in
Appendix B, where we also show its correlation with Jaccard similarity coeficient among
propositional formulae. Moreover, reducing the dimensionality of the embedding space using
Principal Component Analysis (PCA) shows that it is sensible to consider an embedding space
of dimension much lower than the number of formulae used to construct the kernel of Equation
3. We defer to Appendix B for experimental results on dimensionality reduction.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Logic Embeddings by Graph Neural Networks</title>
      <p>The main objective of this work is to investigate algorithms for computing invertible embeddings
of propositional logic formulae, starting from their syntax and exploring methods for including
semantic information, towards the goal of learning a latent space characterising the semantic
of the logic. As every formula can be represented by its AST without any loss of information
(see Section 2 and Appendix A), architectures based on the GNN framework provide a sensible
inductive bias for our setting. Moreover, as we require to learn both an encoder and a decoder
for formulae, we find it meaningful to deploy a Graph Variational Autoencoder (GVAE) model.
Formally, given a propositional formula  sampled according to the algorithm detailed in
Appendix C.1, we design the input to our model to be the rooted tree arising from its AST, i.e.
inputs are graphs  = (, ) with set of vertices  corresponding to operators and variables
(taken with their multiplicity) appearing in  and set of directed edges  ⊆  ×  such that
(,  ) ∈  if  is a main subformula of  in  . Although normal forms exists for propositional
logic, we decided not to adopt any of them for mainly two reasons: firstly, rewriting formulae
in normal form usually involves increasing the number of terms (namely every formula in 
variables written either in conjunctive or disjunctive normal form can have up to 2 terms) and
this can yield to scalability issues when the formula is used as input for a GNN; secondly, in this
work we are using propositional logic as a proof of concept for models that we wish to deploy
for temporal logics, which in general do not admit simple normal forms.</p>
      <p>
        Commonly, GNN models (and in particular those based on the Message Passing paradigm
[29]) organize computations in a synchronous update scheme, i.e. all nodes update their state
and exchange messages simultaneously. However, the nodes of the graphs we consider in this
context have well-defined dependency relationships, hence following the approach adopted
in [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], we process nodes sequentially, i.e. we establish a topological order on the nodes of
the input graph (given by the depth-first traversal of the tree) and we perform computations
following an asynchronous scheme, by updating a node state only when all of its predecessors’
states have been updated. Possibly, this order can be reversed (i.e. we consider the input DAG
with edges in the opposite direction, adding a virtual root for the reversed graph connected to
all the leaves of the original tree) and messages can be also exchanged in a bottom up scheme,
originating what we refer to as a bidirectional architecture. In a sense, when considering the
bidirectional message passing scheme, the way in which computations are performed resembles
the way in which one would evaluate the input formula itself.
      </p>
      <sec id="sec-3-1">
        <title>3.1. Encoding</title>
        <p>
          The encoder is the network responsible for mapping the discrete input graph  to a continuous
latent representation z, and in this case consists of a GNN with a (possibly bidirectional)
asynchronous update scheme, as described earlier in this Section. In our model, the encoder is
formulated by adapting the Graph Attention Network (GAT, [30]) to the asynchronous message
passing scheme of [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ], we defer to Appendix A.2 for the mathematical details.
        </p>
        <p>The initial nodes hidden states are the one-hot-encoding of their type (note that increasing
the number of variables allowed increases the number of node types). Then, once the message
phase terminates, all nodes states are computed, and we take as output of the encoder 
the state of the node without any successor (referred to as end node; if no such node exists, a
virtual one is added to the input graph). In case of bidirectional encoding, a concatenation of
the state of the end nodes of both computation directions is taken. As approximate posterior
(· ) of Equation 1 and 2 we consider a Gaussian distribution, whose mean and variance are
obtained by feeding  to two MLPs.</p>
      </sec>
      <sec id="sec-3-2">
        <title>3.2. Decoding</title>
        <p>
          Given a real-valued latent vector z, the goal of the decoder is to convert it to a discrete graph 
representing the AST of a formula  . The main requirement for the decoder is validity, i.e. it
should produce syntactically correct formulae. Towards this objective we decided (ablations are
discussed in Section D.1) to design a decoder which implements syntactic rules architecturally,
i.e. that does not allow the generation of invalid formulae. This is integrated in a node-wise
generation procedure (derived from that of [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ]) which constructs one node  at a time and
updates its state h as (denoting by  () the set of ’s predecessors and by  the
one-hotencoding of its type):
hagg =
h =  ( , hagg)
        </p>
        <p>∑︁
∈ ()
(h ) ⊙ (h )
(4)
where  is a Gated Recurrent Unit [31] and ⊙ represents the gated sum between a mapping
network  and a gating network , implemented as MLPs.</p>
        <p>Decoding thus results in the following top-down iterative algorithm:
1. Given the initial latent vector z, the starting graph state h = h0 is produced by feeding
it to a MLP with softmax activation. By construction, the type of the first created node 0
is start, i.e. it is a synthetic starting node;
2. Each node , with 1 ≤  ≤ max (where max is an input parameter specifying the
maximum number of nodes admitted during generation), is generated as:
a) the type of  is inferred by first computing a distribution over all possible types
using an MLP with softmax activation taking as input the current graph state h,
then sampling its type from such distribution;
b) the hidden state of  is updated using Equation 4;
c) the graph state is updated as: h = h ;
3. Nodes are expanded following a depth-first traversal of the tree, taking into account the
arity of the operators represented by node types, this prevents the violation of syntactic
constraints;
4. The graph generation stops when the tree cannot grow further (i.e. all leaf nodes are
variables), or when  = max (this latter case is the only possibility of having invalid
formulae as output).</p>
        <p>In Section 2.1 (and more in detail in Appendix B) we describe an efective methodology to
compute finite-dimensional semantic embeddings of propositional formulae. We remark that,
in order to construct such representations for a formula  , it is not necessary to explicitly know
 itself, but only its valuations of a set of assignments { }=1 ⊆  . This makes it sensible
to formulate a conditional variant of our model, i.e. a CVAE architecture using as semantic
context vector the kernel embedding y of the input formula  (obtained after performing
PCA dimensionality reduction), concatenated to the latent representation z before starting the
decoding computations.</p>
      </sec>
      <sec id="sec-3-3">
        <title>3.3. Learning</title>
        <p>Training is performed using teacher forcing, i.e. the decoder is fed with the ground truth graph
it has to reconstruct during loss computation. At each iteration of the decoding algorithm of
Section 3.2, we accumulate the negative log-likelihood by feeding the network with a vertex
having the ground truth node type, so that the network is forced to stay close to true node
sequences.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Experiments</title>
      <p>
        Experiments on a family of variations of our model pursue mainly two goals: measure VAE
reconstruction and generative abilities and qualitatively evaluate the smoothness of the latent
space. Hence, following [
        <xref ref-type="bibr" rid="ref10">10, 32</xref>
        ], we test:
• Abilities of VAE models: we conduct standard experiments to check reconstruction
accuracy, prior validity, uniqueness and novelty;
• Abilities of CVAE models: apart from reconstruction accuracy experiments as those of
the previous point, we test the capability of our model of preserving semantic similarity
in the latent space;
• Latent space visualization: we qualitatively evaluate the ability of the latent space to
capture characteristic structural features by visualizing it and interpolating it.
Code to reproduce the results is available at https://github.com/GaiaSaveri/LogicVAE.
      </p>
      <sec id="sec-4-1">
        <title>4.1. Experimental Setting</title>
        <p>We propose the following versions of our model (hereafter referred to as LogicGVAE):
• Syntax-only: given an input formula  , it encodes its AST without any additional
information, i.e. it has access only to the syntactic information of  ;
• Semantic-conditioned: given an input formula  , we evaluate its semantic-context vector
using the kernel of Section 2.1 and perform conditional decoding as described at the end
of Section 3.2;</p>
        <p>For both variants, we perform experiments on a set of diferent asynchronous encoding GNNs,
namely GRU, Graph Convolutional Networks (GCN, [33]) and GAT. Architectural and training
details of all models are specified in Appendix D.</p>
      </sec>
      <sec id="sec-4-2">
        <title>4.2. Experimental Results</title>
        <sec id="sec-4-2-1">
          <title>4.2.1. VAE and CVAE abilities</title>
          <p>(b) Results of CVAE abilities tests.
This suite of experiments aims at evaluating: (a) accuracy, i.e. ability to perfectly reconstruct the
input AST; (b) validity, i.e. ability to generate syntactically valid formulae; (c) uniqueness, i.e.
proportion of distinct graphs out of valid generations; (d) novelty, i.e. proportion of generated
graphs which are not in the training set. To evaluate accuracy, we encode each test graph 
to get mean and variance of the posterior approximation (z|), then we sample 10 latent
vectors from such distribution and decode each 10 times. Accuracy is defined as the percentage
of these 100 graphs which are identical to the input . Validity is instead computed as the
proportion of syntactically valid AST obtained by sampling 1000 latent vectors from the prior
(z) and decoding each 10 times. For what concerns the conditional variant of our architecture,
(· ) and  (· ) are those of Equation 2.</p>
          <p>In the conditional setting, we test accuracy as described above, then we test how well the
learned latent space preserves semantic-similarity by computing: (a) mean distance from the
input context vector, i.e. given a semantic vector y on which we condition the decoding, we
sample 100 vectors from the prior z ∼  (z|y) and decode each 10 times, the most commonly
decoded formula is kept for each z and its semantic embedding computed and compared with
ground truth y using 2 norm; (b) mean kernel similarity among formulae with same semantic
vector y, i.e. following the procedure of the previous point, we compute the kernel among the
most decoded formulae for each y.</p>
          <p>Table 1a reports results of the tests checking VAE abilities for diferent encoders (described
in full details in Appendix D). The first aspect to notice is that a convolution-style GNN (either
GCN or GAT) outperforms a recursive one (GRU) on all performance indices. This might be
due to the fact that convolutions exploit more local substructure patterns and they leverage
the hidden state of the node we are updating, instead of only those of its neighbors, diferently
from a GRU architecture. The reconstruction accuracy of both GCN and GAT is high and
comparable, however when encoding with a GAT we record a higher ability of the latent space
to capture structural features of data, as witnessed by a higher percentage of unique and novel
decoded formulae. These results can be leveraged in a requirement optimization scenario, by
mapping a given formula in its latent representation and optimize its structure in the continuous
embedding space.</p>
          <p>Table 1b reports results of CVAE abilities tests (using as encoding networks only the most
promising ones according to Table 1a). If we take a pool of 5000 random Boolean formulae
with 5 variables, which we use to generate the semantic context vectors for each test instance,
they have an average distance between semantic embeddings of 18.7325 and an average kernel
similarity of 0.1695. Since the semantic distances and the kernel values reported in Table 1b
are much lower (resp. higher), we observe that conditioning on a semantic vector our input
data actually maps them in a space where semantic similarity is to some extent preserved.</p>
          <p>It is worth noting that, although the reconstruction accuracy of the conditional architecture
(Table 1b) is lower than that of the unconditional architecture (Table 1a), the former might be
leveraged in a requirement-mining scenario, where only valuations of a formula in a set of
configurations are observed (thus allowing the construction of the semantic context vector)
and an explicit formula optimising a fitness function has to be found (i.e. decoded).
Essentially, in this case we need to use the CVAE as a generative model, to sample formulae which
(approximately) have the semantics specified by a given semantic context vector, obtained by
solving an optimization problem in the semantic embedding space. This task cannot even be
defined in a vanilla VAE scenario, where only syntactic information is exploited. Moreover,
the reconstruction accuracy increases significantly if we compute it considering only the most
frequently decoded formula for each test point, as reported as second row of the accuracy
column of Table 1b.</p>
          <p>More experimental results and ablation studies are reported in Appendix D, we underline in
particular the cruciality of the syntactic constraints in the decoder architecture (Section 3.2).</p>
        </sec>
        <sec id="sec-4-2-2">
          <title>4.2.2. Latent Space Visualization</title>
          <p>We use spherical interpolation (slerp, [34]) around a given latent point to qualitatively evaluate
the smoothness of the latent space. This briefly consists in interpolating points following a
great circle of a hypersphere in a space having the same dimension of the latent space. Starting
from a point z encoding a formula  , we follow a great sphere starting from z and pick 35
evenly spaced points to decode. From Figure 1 we notice that the model using a GAT encoder
produces a smoother latent space, as it changes less nodes at each step of the interpolation.</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5. Conclusions and Future Work</title>
      <p>In this work we propose LogicVAE, a configurable GVAE model built to learn a data-driven
representation for propositional logic formulae. By leveraging an asynchronous message passing
computational scheme in the encoder and ad-hoc syntactic constraints in the decoder, it is
able to learn an expressive latent space. We provide a novel way to incorporate semantic
information in the learning process, towards the goal of building an embedding space which is
semantic-preserving. The main bottleneck of this approach is scalability to datasets with more
than 5 variables, a possible solution is a hierarchical approach, sketched in Appendix D.2.</p>
      <p>As already mentioned, results reported in this paper should be taken as a proof of concept
towards extending the model to more complex formalisms, such as temporal logic, which come
with the additional challenge of learning temporal and/or threshold parameters associated to
operator (resp. variable) nodes, but which generally operates on few signals only (typically no
more than 5 [35]). Moreover, inspired by AlphaCode [36], which defines a generative model for
programs (another context in which the syntactic-semantic interplay has a fundamental role),
we plan to both incorporate a self-supervised pre-training stage in our encoder (adapting the
masked language modelling loss used in AlphaCode), and to check the viability of using large
language transformer-based models [37] to encode and decode logic formulae.</p>
    </sec>
    <sec id="sec-6">
      <title>Acknowledgments</title>
      <p>This study was carried out within the PNRR research activities of the consortium iNEST
(Interconnected North-Est Innovation Ecosystem) funded by the European Union Next-GenerationEU
(Piano Nazionale di Ripresa e Resilienza (PNRR) – Missione 4 Componente 2, Investimento
1.5 – D.D. 1058 23/06/2022, ECS_00000043). This manuscript reflects only the Authors’ views
and opinions, neither the European Union nor the European Commission can be considered
responsible for them.
December 3-8, 2018, Montréal, Canada, 2018, pp. 7806–7815.
[18] V. Kondratyev, M. Dryzhakov, T. Gimadiev, D. Slutskiy, Generative model based on junction
tree variational autoencoder for HOMO value prediction and molecular optimization, J.</p>
      <p>Cheminformatics 15 (2023) 11.
[19] M. J. Kusner, B. Paige, J. M. Hernández-Lobato, Grammar variational autoencoder, in:
Proceedings of the 34th International Conference on Machine Learning, ICML 2017, Sydney,
NSW, Australia, 6-11 August 2017, volume 70 of Proceedings of Machine Learning Research,
PMLR, 2017, pp. 1945–1954.
[20] T. Ma, J. Chen, C. Xiao, Constrained generation of semantically valid graphs via
regularizing variational autoencoders, in: Advances in Neural Information Processing Systems
31: Annual Conference on Neural Information Processing Systems 2018, NeurIPS 2018,
December 3-8, 2018, Montréal, Canada, 2018, pp. 7113–7124.
[21] D. P. Kingma, M. Welling, Auto-encoding variational bayes, in: 2nd International
Conference on Learning Representations, ICLR 2014, Banf, AB, Canada, April 14-16, 2014,
Conference Track Proceedings, 2014.
[22] Y. Zhu, Y. Du, Y. Wang, Y. Xu, J. Zhang, Q. Liu, S. Wu, A survey on deep graph generation:
Methods and applications, in: Learning on Graphs Conference, LoG 2022, 9-12 December
2022, Virtual Event, volume 198 of Proceedings of Machine Learning Research, PMLR, 2022,
p. 47.
[23] X. Guo, L. Zhao, A systematic survey on deep generative models for graph generation,</p>
      <p>CoRR abs/2007.06686 (2020). URL: https://arxiv.org/abs/2007.06686. arXiv:2007.06686.
[24] K. Sohn, H. Lee, X. Yan, Learning structured output representation using deep
conditional generative models, in: Advances in Neural Information Processing Systems 28:
Annual Conference on Neural Information Processing Systems 2015, December 7-12, 2015,
Montreal, Quebec, Canada, 2015, pp. 3483–3491.
[25] O. Ivanov, M. Figurnov, D. P. Vetrov, Variational autoencoder with arbitrary conditioning,
in: 7th International Conference on Learning Representations, ICLR 2019, New Orleans,
LA, USA, May 6-9, 2019, 2019.
[26] C. Yang, P. Zhuang, W. Shi, A. Luu, P. Li, Conditional structure generation through graph
variational generative adversarial nets, in: Advances in Neural Information Processing
Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS
2019, December 8-14, 2019, Vancouver, BC, Canada, 2019, pp. 1338–1349.
[27] Y. Li, O. Vinyals, C. Dyer, R. Pascanu, P. W. Battaglia, Learning deep generative
models of graphs, CoRR abs/1803.03324 (2018). URL: http://arxiv.org/abs/1803.03324.
arXiv:1803.03324.
[28] Y. Li, L. Zhang, Z. Liu, Multi-objective de novo drug design with conditional graph
generative model, Journal of Cheminformatics 10 (2018) 33.
[29] J. Gilmer, S. S. Schoenholz, P. F. Riley, O. Vinyals, G. E. Dahl, Neural message passing for
quantum chemistry, in: Proceedings of the 34th International Conference on Machine
Learning, ICML 2017, Sydney, NSW, Australia, 6-11 August 2017, volume 70 of Proceedings
of Machine Learning Research, PMLR, 2017, pp. 1263–1272.
[30] P. Velickovic, G. Cucurull, A. Casanova, A. Romero, P. Liò, Y. Bengio, Graph attention
networks, in: 6th International Conference on Learning Representations, ICLR 2018,
Vancouver, BC, Canada, April 30 - May 3, 2018, Conference Track Proceedings, 2018.
[31] K. Cho, B. van Merrienboer, Ç. Gülçehre, D. Bahdanau, F. Bougares, H. Schwenk, Y. Bengio,
Learning phrase representations using RNN encoder-decoder for statistical machine
translation, in: Proceedings of the 2014 Conference on Empirical Methods in Natural Language
Processing, EMNLP 2014, October 25-29, 2014, Doha, Qatar, A meeting of SIGDAT, a
Special Interest Group of the ACL, ACL, 2014, pp. 1724–1734.
[32] M. J. Kusner, B. Paige, J. M. Hernández-Lobato, Grammar variational autoencoder, in:
Proceedings of the 34th International Conference on Machine Learning, ICML 2017, Sydney,
NSW, Australia, 6-11 August 2017, volume 70 of Proceedings of Machine Learning Research,
2017, pp. 1945–1954.
[33] T. N. Kipf, M. Welling, Semi-supervised classification with graph convolutional networks,
in: 5th International Conference on Learning Representations, ICLR 2017, Toulon, France,
April 24-26, 2017, Conference Track Proceedings, 2017.
[34] T. White, Sampling generative networks: Notes on a few efective techniques, CoRR
abs/1609.04468 (2016).
[35] G. Ernst, P. Arcaini, I. Bennani, A. Donze, G. Fainekos, G. Frehse, L. Mathesen, C. Menghi,
G. Pedrielli, M. Pouzet, S. Yaghoubi, Y. Yamagata, Z. Zhang, Arch-comp 2020 category
report: Falsification, in: ARCH20. 7th International Workshop on Applied Verification of
Continuous and Hybrid Systems (ARCH20), volume 74 of EPiC Series in Computing, 2020,
pp. 140–152.
[36] Y. Li, D. Choi, J. Chung, N. Kushman, J. Schrittwieser, R. Leblond, T. Eccles, J. Keeling,
F. Gimeno, A. D. Lago, T. Hubert, P. Choy, C. de Masson d’Autume, I. Babuschkin, X. Chen,
P.-S. Huang, J. Welbl, S. Gowal, A. Cherepanov, J. Molloy, D. J. Mankowitz, E. S. Robson,
P. Kohli, N. de Freitas, K. Kavukcuoglu, O. Vinyals, Competition-level code generation
with alphacode, Science 378 (2022) 1092–1097.
[37] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, L. Kaiser, I.
Polosukhin, Attention is all you need, in: Advances in Neural Information Processing Systems
30: Annual Conference on Neural Information Processing Systems 2017, December 4-9,
2017, Long Beach, CA, USA, 2017, pp. 5998–6008.
[38] O. Maler, D. Nickovic, Monitoring temporal properties of continuous signals, in: Formal
Techniques, Modelling and Analysis of Timed and Fault-Tolerant Systems, Joint
International Conferences on Formal Modelling and Analysis of Timed Systems, FORMATS 2004
and Formal Techniques in Real-Time and Fault-Tolerant Systems, FTRTFT 2004, Grenoble,
France, September 22-24, 2004, Proceedings, volume 3253 of Lecture Notes in Computer
Science, Springer, 2004, pp. 152–166.
[39] A. Paszke, S. Gross, S. Chintala, G. Chanan, E. Yang, Z. DeVito, Z. Lin, A. Desmaison,
L. Antiga, A. Lerer, Automatic diferentiation in pytorch, in: NIPS 2017 Workshop on
Autodif, 2017.
[40] I. Higgins, L. Matthey, A. Pal, C. P. Burgess, X. Glorot, M. M. Botvinick, S. Mohamed,
A. Lerchner, beta-vae: Learning basic visual concepts with a constrained variational
framework, in: 5th International Conference on Learning Representations, ICLR 2017,
Toulon, France, April 24-26, 2017, Conference Track Proceedings, 2017.
[41] D. P. Kingma, J. Ba, Adam: A method for stochastic optimization, in: 3rd International
Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015,
Conference Track Proceedings, 2015.
[42] T. Akiba, S. Sano, T. Yanase, T. Ohta, M. Koyama, Optuna: A next-generation
hyperparameter optimization framework, in: Proceedings of the 25th ACM SIGKDD International
Conference on Knowledge Discovery and Data Mining, ACM, 2019, pp. 2623–2631.</p>
    </sec>
    <sec id="sec-7">
      <title>A. Extended Background</title>
      <sec id="sec-7-1">
        <title>A.1. Propositional Logic</title>
        <p>Propositional logic is a formal language whose grammar recursively defines well-formed
for
mulae by combining variables {}=1 and logical operators ¬ (negation), ∧ (conjunction) and
∨ (disjunction) . More precisely, variables are valid formulae (also called atomic sentences), and
given valid sentences  and  it holds that ¬ ,  ∧  and  ∨  are valid sentences as well.</p>
        <p>Semantics of propositional logic is defined starting from assignments  of truth values to
each propositional variable  then recursively applying the following rules to each sub-formula
 (the valuation of  on  is denoted by  ( )): ¬ ( ) = 1 if  ( ) = − 1, ( ∧  )( ) = 1 if
both  ( ) = 1 and  ( ) = 1, ( ∨  )( ) = 1 if either  ( ) = 1 or  ( ) = 1.</p>
        <p>As mentioned in Section 2, every propositional formula  can be represented by its Abstract
Syntax Tree (AST), as showed in Figure 2.</p>
      </sec>
      <sec id="sec-7-2">
        <title>A.2. Graph Neural Networks</title>
        <p>
          Graph Neural Networks (GNNs, [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]) are deep learning architectures that operate in the graph
domain, i.e. they are built to solve graph related tasks in an end-to-end manner.
        </p>
        <p>Arguably the most common framework for GNN is the so called Message Passing Neural
Network framework (MPNN, [29]), which abstracts many commonalities between existing GNN
models. As the name suggests, the defining characteristic of MPNNs is that they use a form of
neural message passing in which real-valued vector messages are exchanged between nodes (in
particular between 1-hop neighboring vertices), for a fixed number of iterations.
where  (the readout function) needs again to be a diferentiable function, invariant to
permutations of the node states.</p>
        <p>Hence, the intuition behind MPNNs is that at each iteration every node aggregates information
from its immediate graph neighbors, so as iterations progress each node embedding contains
information from further reaches of the graph.</p>
        <p>A way to instantiate the message and update functions of Equation 5 is the Graph
Convolutional Network (GCN, [33]) model, which generalizes the convolution operation to graph
structured data by updating the representation h of each node  as:</p>
        <p>y = ({h( )| ∈ })
h(+1) = 
︂(</p>
        <p>∑︁
∈ ()</p>
        <p>1</p>
        <p>ℎ() (+1)︂)
h(+1) = (h(),</p>
        <p>(h(), h()))
∑︁
∈ ()
where  is called message function and  is called message update function: both are arbitrary
diferentiable functions (typically implemented as neural networks).</p>
        <p>After running  iterations of this message passing procedure, a readout phase is executed to
compute the final embedding
y of each node  as:
(5)
(6)
(7)
(8)</p>
        <p>In detail, during each message passing iteration  in a MPNN, the hidden representation h()
of each node  is updated according to the information m() aggregated from its neighborhood
 () as:
being  a non-linear activation function, a a vector of learnable parameters and || a node-wise
operation like concatenation or sum. Possibly GAT uses a multi-head attention mechanism
to increase the model capabilities, by replicating the operations of Equation 8 multiple times
independently and aggregating the results.</p>
        <p>
          In its original version, the MPNN model is expected to exchange messages between nodes
synchronously, however when the input graph is directed it is sensible to follow a partial order
among nodes, as observed in [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ]. In this asynchronous message passing scheme, each iteration 
of Equation 5 is performed following the topological order established for the nodes of the input
graph: in this scheme a node  must wait for all of its predecessors’ updates before computing
with  non-linear activation function and  = { 2 ( + ) 2 } being  and  the
adjacency and node-degree matrix of the input graph, respectively, and  the identity matrix.
        </p>
        <p>Another possible computation scheme for the operations of Equation 5 is the Graph Attention
Network (GAT , [30]) which uses self-attention to learn relative weights between neighboring
1
1
nodes. It consists in:</p>
        <p>∑︁
∈ ()∪
h(+1) =  (</p>
        <p>(+1) (+1)h())
 (+1) = softmax(LeakyReLU(a [ (+1)h()|| (+1)h()]))
its new hidden state h(), i.e. it uses the current layer representation of its direct neighbors
{h()}∈ () before updating its state, instead of the one of the previous layer.</p>
      </sec>
    </sec>
    <sec id="sec-8">
      <title>B. Kernel Trick for Logic Formulae</title>
      <p>
        A kernel function for Signal Temporal Logic The kernel we start from when defining
a semantic similarity measure for logic formulae is defined in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. It is originally developed
for Signal Temporal Logic (STL [38]), which is a linear-time temporal logic suitable to express
properties over real-valued trajectories. A trajectory in this context is a function  :  → 
where  ⊆ R≥ 0 is a time domain and  ⊆ R,  ∈ N is a state space (we also denote by 
the space of trajectories). A key characteristic of STL is that it can be given both a qualitative
(or Boolean) and a quantitative notion of satisfaction (the latter called robustness). More in
detail, given a STL formula  , a trajectory  and a time-point , for the qualitative satisfaction
we denote by (, ,  ) = 1 (resp. (, ,  ) = − 1) if  at time  satisfies (resp. unsatisfies)
 , while for the quantitative satisfaction we denote by  (, ,  ) ∈ R the robustness of  for
trajectory  , i.e. how robust is the satisfaction of  w.r.t. perturbations in the signal. It holds that
 (, ,  ) &gt; 0 → (, ,  ) = 1 and  (, ,  ) &lt; 0 → (, ,  ) = − 1 (completeness property).
      </p>
      <p>
        The definition of quantitative satisfaction allows to consider STL predicates  as functionals
mapping trajectories to their robustness, i.e.  (, · ) :  → R, hence a formula can be embedded
into a (possibly infinite-dimensional) Hilbert space. In this space we can consider as ‘scalar
product‘ between pairs of formulae ,  the following:
(, 
) =
∫︁
 ∈
 (,  ) ·  (,  )  0
(9)
being  0 a probability measure over trajectories. It can be proved that (· , · ) of Equation 9 is a
proper kernel function, and Probably Approximate Correct (PAC) bounds can be provided to
give probabilistic bounds on the error committed when using the kernel for learning in formulae
space. Experiments carried out in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] confirms that the kernel of Equation 9 eficiently captures
semantic similarity between STL requirements.
      </p>
      <p>A kernel function for propositional logic Building upon the idea of the STL kernel defined
above, we define a similarity measure between propositional formulae as detailed in Section 2.1.</p>
      <p>The Jaccard index (or similarity coeficient) measures the similarity between two sets  and
 as  (, ) = ||∩∪|| ; given two propositions ,  and the sets of their assignment valuations
 ,  resp. over variable configurations  , the Jaccard index  (,  ) = || ∩∪ || denotes
the proportion of configurations in which the two formulae agree, hence measuring semantic
similarity between its inputs. On the other hand, the value of (,  ) represents the normalized
diference between the set of configurations  ∈  on which  and  agree and disagree, being
1 in the case of semantically equivalent formulae. This quantity is positively correlated to the
Jaccard index as (,  ) = 2 (,  ) − 1, corroborating the claim that Equation 3 can be used
as a measure of semantic similarity between formulae. Putting all together, we get that the
kernel is an interpretable measure of similarity between formulae, for example a kernel of 0.8
can be understood as formulae agreeing on 90% of configurations.</p>
      <p>Moreover, we can give a deeper insight on the performance of the Boolean kernel in
measuring semantic similarity between propositional formulae by showing the results of kernel
classification on the satisfaction of assignments to formulae, reported in Figure 3.</p>
      <p>As the dimensionality of the embeddings computed by the kernel is equal to the number of
training formulae used to evaluate the kernel itself (i.e. it is the vector of kernel evaluations
according to Equation 3 of the input formula against all the formulae in the training set), we
verify if it can be reduced without significant information loss by performing dimensionality
reduction in the embedding space using Kernel Principal Component Analysis (kernel PCA).
We answer this question afirmatively by showing that keeping 100 components for formulae
having at most 5 variables and 500 components for formulae with 6 to 10 variables retains
much of the variance of the original dataset made of 5000 formulae, as shown in Figure 4.</p>
    </sec>
    <sec id="sec-9">
      <title>C. More Experimental Details</title>
      <sec id="sec-9-1">
        <title>C.1. Dataset Generation Algorithm</title>
        <p>
          In order to construct synthetic datasets of propositional formulae we adapt the algorithm
defined in [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ] to our framework. It results in the recursive growing scheme for the syntax tree
of each formula described in Algorithm 1, where leaf is the probability for a node to be a leaf
node,  is the max number of variable indexes allowed and Catleaf ({∧, ∨, ¬, VAR}) denotes the
categorical probability distribution assigning leaf probability to the outcome VAR (i.e. leaf node
of the syntax tree) and 1− leaf to each operator node (i.e. internal nodes of the syntax tree).
        </p>
        <p>3
Algorithm 1 Syntax-tree random recursive growing scheme
.index ← 
()
◁ Queue of uncomplete nodes
◁ Root is an operator node
◁ Next node to expand
◁  is a variable node
◁ Variable index is sampled randomly</p>
      </sec>
      <sec id="sec-9-2">
        <title>C.2. More Training Details</title>
        <p>All the models described in Section 4 have been implemented in Python exploiting the PyTorch
[39] library for leveraging GPU acceleration.</p>
        <p>Then, the loss function we optimize via mini-batch gradient descent is that of Equation 1
or its variant of Equation 2 in the conditional version of our architecture. We allow the 
term of such losses to be weighted by a tunable hyperparameter  &gt; 0, i.e. using the loss of the
so-called  -VAE [40] model.</p>
        <p>Each architecture has been trained with Stochastic Gradient Descent (SGD) on a set of 4000
diferent propositional formulae (generated as described in Section C.1) divided in minibatches
of size 32 with an initial learning rate of 10− 3, using the Adam optimizer [41] and early stopping
to regulate the number of training epochs (we put a validation step every 30 epochs and stop the
training if validation loss does not significantly improve with a patience of 3 checkpoints; this
resulted on having the non-conditional models trained for ∼ 300 epochs and the conditional
ones for ∼ 600 epochs).</p>
        <p>Datasets for training and testing the models have been generated following algorithm 1,
ifxing leaf = 0.4 and varying  ∈ {3, 4, 5}. This resulted in sets having an average of
[10.2955, 13.6632, 17.7475] nodes and average depth of [5.4687, 8.5132, 9.4419] for increasing
. We remark that increasing the number of variable indexes allowed increases the number of
node types the network has to learn (hence further increasing the complexity of the datasets).</p>
        <p>
          We tested three diferent encoder architectures, each consisting on a GNN with the following
distinctive features:
• GRU, same as [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ]: the encoder is a MPNN where, using the notation of Equation 5, 
is a GRU and  a gated sum (i.e. it follows the same update scheme of the decoder in
Equation 4);
• GCN: the encoder is a GCN (Equation 7) with 2 layers, unless diferently specified;
• GAT: the encoder is a GAT with 3 layers having (3, 3, 4) heads resp., using sum as
nodewise operation of Equation 8 and concatenation as aggregator of single heads results in
the internal layers and average in the final layer, unless diferently specified.
        </p>
        <p>All of them implement the asynchronous message passing scheme. For all the encoders, we
report results for the bidirectional setting, as justified by ablation studies in Appendix D.1.
To compute the mean and covariance of the approximate latent distribution (· ) we use two
1-layer MLPs.</p>
        <p>
          The hidden size of the models is set to 250 and the latent size to 56, these hyperparameters as
well the ones listed above have been tuned with the hyperparameter optimization framework
Optuna [42]. As noted in [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ], we also find that setting  &gt; 0.001 as weight for the KL
divergence in the loss function causes a significant drop in reconstruction accuracy.
        </p>
        <p>For what concerns the semantic context vector used in the CVAE version of our model, we
computed it by kernel PCA as described in Section B. Since our train and test datasets contain
formulae having at most 5 variables, we keep 100 components, as justified by Figure 4.</p>
      </sec>
    </sec>
    <sec id="sec-10">
      <title>D. More Experimental Results</title>
      <p>In Tables 2 and 3 we report more VAE and CVAE abilities results on diferent datasets of
increasing complexity. We remark that GAT is the best performing encoder, both for the
syntactic and the semantic-conditioned task. In particular in the conditional case it is able to
better capture the multimodality of each y w.r.t. to formulae  and give a better characterization
of the semantics in the latent space.</p>
      <p>Concerning the latter, Figure 5 gives an insight on the relation between kernel similarity
value between a formulae (,  ) and distance between their kernel PCA embeddings. Being the
kernel evaluated between two formulae an interpretable measure of their semantic similarity
(more on this in Section B), this reported inverse correlation justifies the metrics used for
evaluating CVAE abilities.</p>
      <p>For what concerns the validity of formulae, we recall that the only case in which our decoding
algorithm can produce invalid formulae is when it reaches the maximum number of nodes
max allowed in the produced graphs, in our experiments set to 30, as described in Section 3.2.
25
e
c
n
ta20
s
i
D
g
ind15
d
e
b
Em10
A
C
P
K 5</p>
      <p>0
Acc.
5
8</p>
      <p>For what concerns the accuracy of reconstructed formulae, we also notice that it increases if
we consider, for each of the test formulae, only the most common decoded one (which is a more
realistic scenario). Accuracy in this scenario for GAT and GCN encoders is reported as second
line of the corresponding model in Tables 2 and 3 for the conditioned and unconditioned case,</p>
      <p>Median
respectively.</p>
      <p>In Figure 6 we show the distributions of kernel values and semantic distances computed as
described earlier for LogicVAE with both GAT and GCN encoder, when trained on a dataset of
5 variables. Moreover, in Table 4 we report their first, second and third quantiles.</p>
      <sec id="sec-10-1">
        <title>D.1. Ablations</title>
        <p>In Table 5 we report the results of several ablation studies we perform on LogicVAE. They
consists in the following:
1. Non-constrained decoding: this represents the most important design choice. We kept the
encoding and objective function as described earlier, but we remove from the decoder the
constraints imposing to follow logic syntactic rules (i.e. the ones described in Section 3.2).
This leads to a dramatic decrease in reconstruction accuracy, highlighting the fundamental
importance of this inductive bias.
2. Unidirectional message passing: messages are exchanged only following the original
direction of the edges of the input DAG (i.e. without reverting them). For both GCN and
DAG encoders, this decreases the reconstruction accuracy, but not dramatically.
3. Number of convolutional/attentional layers: we get the highest accuracy with 2-layer</p>
        <p>
          GCN encoder and 3-layer GAT encoder.
While performing experiments, we noticed that LogicVAE struggled in learning variable indexes,
i.e. its reconstruction accuracy increases (and the architectures converge faster) if we provide
as input a simplified AST for each input formula  . This graph is constructed by removing
variable indexes from the input described in Figure 2 and Section 3. The idea is then to build
a hierarchical learning model, which first learns to reconstruct the simplified tree using the
syntactic version of LogicVAE, then recovers variable indexes by a GNN architecture. We
instantiated this latter model using a MPNN architecture, akin to that described in Section
C.2, with node-level readout function on the leaves. We trained the model to minimize a loss
involving both a classification term (namely cross-entropy loss over  classes, being  the
maximum number of variable indexes allowed) and a semantic term measuring the square loss
between the semantic vector y of the ground-truth formula  (as described in Section C.2) and
the one of the reconstructed formula ^, denoted by y^^ at each step of the training algorithm.
Formally we minimize the following (for a formula  having  leaves over  possible indexes):
 
1 ∑︁(∑︁  log ^) +  ||y − y^^ ||2
ℒ(,  ^) = − 
=1 =1
(10)
where , ^ represent the true (resp. reconstructed) probability of leaf  to have index
, and  ∈ R≥ 0 is a tunable parameter weighting the semantic term of the loss w.r.t. the
classification one. Interestingly, we found that the loss of Equation 10 reaches a plateau in
correspondence of low values of the semantic term. Indeed, we verified that the true formula
 and the reconstructed one ^ evaluated in correspondence of the learning plateau difer on
the [10.34%, 12.29%, 12.48%, 16.85%] of possible configurations with  ∈ [
          <xref ref-type="bibr" rid="ref10 ref3 ref4 ref5">3, 4, 5, 10</xref>
          ] (results
with  = 0.7 found with hyperparameter optimization, removing either the classification
or the semantic term in the loss does not ameliorate the results). Hence, to some extent, a
node-level MPNN learns to focus on semantically relevant parts of the input formula. We
consider this results interesting towards a better understanding of the learning dynamics of
GNN architectures in the context of learning logic formulae and we plan to investigate it deeper
in the future.
        </p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>L.</given-names>
            <surname>Bortolussi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G. M.</given-names>
            <surname>Gallo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Kretínský</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Nenzi</surname>
          </string-name>
          ,
          <article-title>Learning model checking and the kernel trick for signal temporal logic on stochastic processes, in: Tools and Algorithms for the Construction and Analysis of Systems -</article-title>
          28th International Conference, TACAS 2022,
          <article-title>Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2022</article-title>
          , Munich, Germany, April 2-
          <issue>7</issue>
          ,
          <year>2022</year>
          , Proceedings,
          <string-name>
            <surname>Part</surname>
            <given-names>I</given-names>
          </string-name>
          , volume
          <volume>13243</volume>
          of Lecture Notes in Computer Science, Springer,
          <year>2022</year>
          , pp.
          <fpage>281</fpage>
          -
          <lpage>300</lpage>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>030</fpage>
          -99524-9\_
          <fpage>15</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>S.</given-names>
            <surname>Russell</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Norvig</surname>
          </string-name>
          , Artificial Intelligence:
          <article-title>A Modern Approach (4th Edition)</article-title>
          , Pearson,
          <year>2020</year>
          . URL: http://aima.cs.berkeley.edu/.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>F.</given-names>
            <surname>Scarselli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Gori</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. C.</given-names>
            <surname>Tsoi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Hagenbuchner</surname>
          </string-name>
          ,
          <string-name>
            <surname>G. Monfardini,</surname>
          </string-name>
          <article-title>The graph neural network model</article-title>
          ,
          <source>IEEE Trans. Neural Networks</source>
          <volume>20</volume>
          (
          <year>2009</year>
          )
          <fpage>61</fpage>
          -
          <lpage>80</lpage>
          . doi:
          <volume>10</volume>
          .1109/TNN.
          <year>2008</year>
          .
          <volume>2005605</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Z.</given-names>
            <surname>Wu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Pan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Long</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P. S.</given-names>
            <surname>Yu</surname>
          </string-name>
          ,
          <article-title>A comprehensive survey on graph neural networks</article-title>
          ,
          <source>IEEE Trans. Neural Networks Learn. Syst</source>
          .
          <volume>32</volume>
          (
          <year>2021</year>
          )
          <fpage>4</fpage>
          -
          <lpage>24</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>P. W.</given-names>
            <surname>Battaglia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. B.</given-names>
            <surname>Hamrick</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Bapst</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Sanchez-Gonzalez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V. F.</given-names>
            <surname>Zambaldi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Malinowski</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Tacchetti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Raposo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Santoro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Faulkner</surname>
          </string-name>
          , Ç. Gülçehre,
          <string-name>
            <given-names>H. F.</given-names>
            <surname>Song</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. J.</given-names>
            <surname>Ballard</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Gilmer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G. E.</given-names>
            <surname>Dahl</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Vaswani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K. R.</given-names>
            <surname>Allen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Nash</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Langston</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Dyer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Heess</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Wierstra</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Kohli</surname>
          </string-name>
          ,
          <string-name>
            <surname>M. M. Botvinick</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          <string-name>
            <surname>Vinyals</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          <string-name>
            <surname>Li</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          <string-name>
            <surname>Pascanu</surname>
          </string-name>
          ,
          <article-title>Relational inductive biases, deep learning, and graph networks</article-title>
          , CoRR abs/
          <year>1806</year>
          .01261 (
          <year>2018</year>
          ). URL: http://arxiv. org/abs/
          <year>1806</year>
          .01261. arXiv:
          <year>1806</year>
          .01261.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>L. C.</given-names>
            <surname>Lamb</surname>
          </string-name>
          , A. S.
          <string-name>
            <surname>d'Avila Garcez</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Gori</surname>
            ,
            <given-names>M. O. R.</given-names>
          </string-name>
          <string-name>
            <surname>Prates</surname>
            ,
            <given-names>P. H. C.</given-names>
          </string-name>
          <string-name>
            <surname>Avelar</surname>
            ,
            <given-names>M. Y.</given-names>
          </string-name>
          <string-name>
            <surname>Vardi</surname>
          </string-name>
          ,
          <article-title>Graph neural networks meet neural-symbolic computing: A survey and perspective</article-title>
          ,
          <source>in: Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence, IJCAI</source>
          <year>2020</year>
          ,
          <year>2020</year>
          , pp.
          <fpage>4877</fpage>
          -
          <lpage>4884</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Bengio</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Lodi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Prouvost</surname>
          </string-name>
          ,
          <article-title>Machine learning for combinatorial optimization: A methodological tour d'horizon, Eur</article-title>
          .
          <source>J. Oper. Res</source>
          .
          <volume>290</volume>
          (
          <year>2021</year>
          )
          <fpage>405</fpage>
          -
          <lpage>421</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>T. N.</given-names>
            <surname>Kipf</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Welling</surname>
          </string-name>
          ,
          <article-title>Variational graph auto-encoders</article-title>
          ,
          <source>CoRR abs/1611</source>
          .07308 (
          <year>2016</year>
          ). URL: http://arxiv.org/abs/1611.07308. arXiv:
          <volume>1611</volume>
          .
          <fpage>07308</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>X.</given-names>
            <surname>Guo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Zhao</surname>
          </string-name>
          ,
          <article-title>A systematic survey on deep generative models for graph generation</article-title>
          , CoRR abs/
          <year>2007</year>
          .06686 (
          <year>2020</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>M.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Jiang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Cui</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Garnett</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <surname>D-VAE</surname>
          </string-name>
          :
          <article-title>A variational autoencoder for directed acyclic graphs</article-title>
          ,
          <source>in: Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems</source>
          <year>2019</year>
          ,
          <article-title>NeurIPS 2019</article-title>
          , December 8-
          <issue>14</issue>
          ,
          <year>2019</year>
          , Vancouver, BC, Canada,
          <year>2019</year>
          , pp.
          <fpage>1586</fpage>
          -
          <lpage>1598</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>K. S.</given-names>
            <surname>Tai</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Socher</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C. D.</given-names>
            <surname>Manning</surname>
          </string-name>
          ,
          <article-title>Improved semantic representations from tree-structured long short-term memory networks</article-title>
          ,
          <source>in: Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing of the Asian Federation of Natural Language Processing, ACL 2015, July 26-31</source>
          ,
          <year>2015</year>
          , Beijing, China, Volume
          <volume>1</volume>
          :
          <string-name>
            <surname>Long</surname>
            <given-names>Papers</given-names>
          </string-name>
          , The Association for Computer Linguistics,
          <year>2015</year>
          , pp.
          <fpage>1556</fpage>
          -
          <lpage>1566</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>B.</given-names>
            <surname>Shuai</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Zuo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <surname>G.</surname>
          </string-name>
          <article-title>Wang, Dag-recurrent neural networks for scene labeling</article-title>
          ,
          <source>in: 2016 IEEE Conference on Computer Vision</source>
          and Pattern Recognition,
          <string-name>
            <surname>CVPR</surname>
          </string-name>
          <year>2016</year>
          ,
          <string-name>
            <surname>Las</surname>
            <given-names>Vegas</given-names>
          </string-name>
          ,
          <string-name>
            <surname>NV</surname>
          </string-name>
          , USA, June 27-30,
          <year>2016</year>
          , IEEE Computer Society,
          <year>2016</year>
          , pp.
          <fpage>3620</fpage>
          -
          <lpage>3629</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>L.</given-names>
            <surname>Mou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Jin</surname>
          </string-name>
          ,
          <article-title>Convolutional neural networks over tree structures for programming language processing</article-title>
          ,
          <source>in: Proceedings of the Thirtieth AAAI Conference on Artificial Intelligence, February 12-17</source>
          ,
          <year>2016</year>
          , Phoenix, Arizona, USA, AAAI Press,
          <year>2016</year>
          , pp.
          <fpage>1287</fpage>
          -
          <lpage>1293</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>V.</given-names>
            <surname>Thost</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <article-title>Directed acyclic graph neural networks</article-title>
          ,
          <source>in: 9th International Conference on Learning Representations, ICLR</source>
          <year>2021</year>
          ,
          <string-name>
            <given-names>Virtual</given-names>
            <surname>Event</surname>
          </string-name>
          , Austria, May 3-
          <issue>7</issue>
          ,
          <year>2021</year>
          ,
          <year>2021</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Vinyals</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Dyer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Pascanu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P. W.</given-names>
            <surname>Battaglia</surname>
          </string-name>
          ,
          <article-title>Learning deep generative models of graphs</article-title>
          , CoRR abs/
          <year>1803</year>
          .03324 (
          <year>2018</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>W.</given-names>
            <surname>Jin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Barzilay</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T. S.</given-names>
            <surname>Jaakkola</surname>
          </string-name>
          ,
          <article-title>Junction tree variational autoencoder for molecular graph generation</article-title>
          ,
          <source>in: Proceedings of the 35th International Conference on Machine Learning</source>
          ,
          <string-name>
            <surname>ICML</surname>
          </string-name>
          <year>2018</year>
          , Stockholmsmässan, Stockholm, Sweden,
          <source>July 10-15</source>
          ,
          <year>2018</year>
          , volume
          <volume>80</volume>
          <source>of Proceedings of Machine Learning Research, PMLR</source>
          ,
          <year>2018</year>
          , pp.
          <fpage>2328</fpage>
          -
          <lpage>2337</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>Q.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Allamanis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Brockschmidt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. L.</given-names>
            <surname>Gaunt</surname>
          </string-name>
          ,
          <article-title>Constrained graph variational autoencoders for molecule design</article-title>
          ,
          <source>in: Advances in Neural Information Processing Systems 31: Annual Conference on Neural Information Processing Systems</source>
          <year>2018</year>
          , NeurIPS
          <year>2018</year>
          ,
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>