<!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>LogiX-Me: Logic-based Self-Explainable Message Passing GNN</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Simone Palumbo</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Alessio Ragno</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Roberto Capobianco</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Marc Plantevit</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Céline Robardet</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Declaration on Generative AI</string-name>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>EPITA Research Laboratory</institution>
          ,
          <addr-line>LRE</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>INSA Lyon</institution>
          ,
          <addr-line>CNRS, LIRIS UMR 5205</addr-line>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Sapienza University of Rome</institution>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2026</year>
      </pub-date>
      <abstract>
        <p>Graph Neural Networks (GNNs) have achieved state-of-the-art performance in learning from relational data, yet their decision-making processes remain largely opaque. While recent logic-based self-explainable approaches like LogiX-GIN have advanced transparency by grounding logical rules in the model's architecture, they are fundamentally restricted to unary predicates, limiting their ability to capture edge features and complex relational dependencies. To overcome this limitation, we present LogiX-Me, a novel self-explainable GNN grounded in Polyadic Graded Modal Logic. Unlike its predecessor, LogiX-Me employs a hierarchical dual-layer design that learns ternary predicates to explicitly model edge attributes and their interactions with node features. Extensive experiments demonstrate that LogiX-Me achieves predictive performance competitive with black-box baselines while significantly outperforming monadic logic-based models on edge-sensitive tasks.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;explainability</kwd>
        <kwd>graph neural networks</kwd>
        <kwd>logic</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>Graph Neural Networks (GNNs) have emerged as powerful models for learning from relational data,
capturing complex patterns in molecular structures, social networks, protein interactions, and knowledge
graphs. Despite their success, GNNs inherit the black-box nature of deep learning, making their
decisionmaking processes dificult to understand.</p>
      <p>Explainable AI (XAI) seeks to make complex models more transparent through two main avenues:
post-hoc and self-explainable approaches. Post-hoc methods analyze trained black-box models to
highlight the most influential nodes or subgraphs, yet their explanations often fail to capture the
model’s true reasoning [1]. In contrast, self-explainable GNNs embed interpretability within their
architectures, using strategies like prototypes [2], concepts [3], or information bottlenecks [4]. However,
their focus on topology alone limits insight into the model’s underlying logic. Logic-based models
aim to overcome these limits by grounding explanations in formal reasoning. Early eforts, such as
DC-GNNs [5], combine self-explainable GNNs with logic operators (e.g., LENs), introducing symbolic
reasoning but still relying on purely topological representations. Building on this direction, LogiX-GIN
[6] enables direct translation of its layers into Graded Modal Logic (GML) [7], marking a major advance
toward logical transparency. Yet, its logic remains restricted: it excludes edge features, supports only
unary predicates, and captures reasoning at a single neighborhood scale.</p>
      <p>We present LogiX-Me, a new self-explainable GNN that extends LogiX-GIN with a dual-layer design
and a polyadic logical foundation. LogiX-Me uses two complementary transformation stages: the first
operates before aggregation to learn edge-level rules, capturing binary (, ) or ternary (, , )
predicates that describe relational properties between connected nodes; the second acts after aggregation
to derive node-level rules, expressing neighborhood patterns such as “a node has k neighbors satisfying
condition P.” This hierarchical design mirrors human reasoning from local relations to global structures
and naturally supports edge features within message passing. To formalize this expressiveness, we
introduce Polyadic Graded Modal Logic (PGML), extending GML with polyadic predicates and counting
quantifiers over nodes and edges, enabling statements like “there exist at least N neighbors y such
that (, , ) holds.” Overall, LogiX-Me is the first GNN to integrate polyadic logic-based reasoning
directly into its architecture, enabling explicit, edge-aware, and human-intuitive explanations.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Background</title>
      <p>This section establishes the mathematical framework linking GNNs, GML and the specific architectural
choices in LogiX-GIN that enable faithful logical extraction.</p>
      <p>GNNs operate on graph-structured data  = (, ℰ , X), where  is the set of nodes, ℰ ⊆  × 
represents edges, and X ∈ R||× in contains node feature vectors. For a node , we denote its feature
vector x and neighborhood  () = { ∈  : (, ) ∈ ℰ }. GNNs process graphs via iterative message
passing, updating node representations at each layer :
h() =  () (︁ h(−1) ,  () (︁ {h(−1) :  ∈  ()}︁)
where  () is a permutation-invariant aggregation function and  () is a learnable update function.
While general GNNs may use mean or max aggregation, LogiX-Me specifically employs sum aggregation
() encodes the structure of the
( () = ∑︀) to enable counting-based reasoning. After  layers, h
-hop neighborhood.</p>
      <p>GML ofers a formal language that matches the expressivity of message passing by using counting
constraints. We define GML formulas () over binary edge relations (, ) and unary node predicates
() inductively:
LogiX-GIN LogiX-GIN operationalizes this link by processing binary node features through three
sequential stages at each layer: sum aggregation, Fourier binarization, and logical transformation.</p>
      <p>First, the model aggregates the features of neighboring nodes using sum aggregation. This step
()
produces integer-valued messages (counts) a ∈ N representing how many neighbors satisfy specific
properties:</p>
      <p>The key operator is the graded existential quantifier ∃≥ , which asserts that “there exist at least 
distinct neighbors  such that property () holds.” The satisfaction relation is defined locally:
() ::= () | ¬() | 
| ∃≥  ((, ) ∧ ())
,  |= ∃≥  ((, ) ∧ ()) ⇐⇒
|{ ∈  () : ,  |= ()}| ≥ 
(1)
(2)
(3)
(4)</p>
      <p>Since the counts a() need to be processed by the logic layer, which requires binary inputs, LogiX-GIN
employs a periodic and parametric Fourier step function  () to map these counts to binary literals based
on learnable intervals:
a˜() =  ()(a()) =
⎛</p>
      <p>1
clamp ⎝ 2 ·
∑︀=0 sin((2+1)(a2(+)⊙ 1˜ ()+˜()))</p>
      <p>sin((2+1) 2 )
∑︀=0 2+1</p>
    </sec>
    <sec id="sec-3">
      <title>3. Polyadic Graded Modal Logic (PGML)</title>
      <p>While GML provides foundations for expressing node-level properties with counting, it is fundamentally
limited to unary predicates and cannot express edge properties explicitly. Our work extends this
framework through PGML, which augments GML with polyadic predicates.</p>
      <p>Consider a molecular graph where we wish to express “atom  is a carbon connected to at least 3
carbons by single bonds”. In standard GML, we can only write:
•  is a finite set of nodes
• ℰ ⊆  ×  is the edge relation
(5)
(6)
(7)
(8)
(9)
This function activates (a˜()[] = 1) only when the neighbor count falls within specific learned intervals
 () :
a˜()[] = 1 ⇐⇒ a()[] ∈
∈Z
⋃︁ [︂ 2− ˜() , (2+)−
˜() ˜()
˜() ]︂

.</p>
      <p>This efectively creates literals representing graded properties like “the number of neighbors with
property  is between 2 and 4.”</p>
      <p>() are processed by a Transparent Explainable Logic Layer</p>
      <p>Finally, the binarized count features a˜
(TELL) [8] to compute the node’s updated binary representation h(). This layer computes activations
based on a weighted sum and bias, identifying minimal subsets of active inputs suficient to trigger an
output:
h()[] = 1 ⇐⇒
∑︁ W[, ] · a˜()[] &gt; −b[].</p>
      <p>∈
This structure allows for the extraction of complex rules in Disjunctive Normal Form (DNF),  =
⋁︀∈ (⋀︀∈ ˜), combining the interval-based counting literals into higher-order logical formulas.</p>
      <p>() ∧ ∃≥3  ((, ) ∧ ()),
which states that  has at least 3 carbon atoms in its neighborhood, but this only formalizes that 
should be a carbon and that the neighbor nodes should be carbons, missing the information on the single
bonds. GML fundamentally cannot express properties that depend on edge features or relationships
between node pairs. In molecular property prediction, the outcome often depends on specific bond types
(single, double, ...) connecting atoms, not just atom types. GML cannot distinguish “carbon connected
to an oxygen via double bond” from “carbon connected to an oxygen via single bond” so it is a critical
limitation for chemistry applications, as well as many others.</p>
      <p>In PGML, we introduce ternary predicates (, , ), where  and  are nodes and  represents the
edge feature vector of the edge connecting them. This enables direct expression:</p>
      <p>∃≥3  ((, ) ∧ () ∧ () ∧ ())),
which unambiguously states that  has at least 3 C-C edges, cleanly distinguishing edge-level from
node-level predicates. Formally, a PGML graph structure is a tuple  = (, ℰ , {}=1, { }=1)
where:
•  ⊆  are unary predicates (node properties)
•  ⊆  ×  × ℰ are ternary predicates (edge properties)</p>
      <p>PGML formulas are a syntactic restriction of first-order logic with exactly one free variable . The
language includes:
• Unary predicate symbols {1(), . . . ,  ()} representing node properties
• Ternary relation symbols {1(, , ), . . . ,  (, , )} representing edge properties, where
 denotes the edge between  and 
• Binary relation (, ) representing graph adjacency
PGML formulas () with free variable  are defined inductively:
() ::=  () | ¬() | 
| ∃≥  ((, ) ∧ (, , ))
The key extension beyond GML is the inclusion of ternary predicate (, , ) in the quantifier,
enabling counting conditioned simultaneously on source node , target node , and edge features .</p>
    </sec>
    <sec id="sec-4">
      <title>4. LogiX-Me</title>
      <p>This section presents the LogiX-Me architecture, detailing its dual-layer components and training
procedures.</p>
      <p>LogiX-Me consists of a layer made of two distinct logical transformation components, both
implemented as Transparent Explainable Logic Layers (TELL), that process information at diferent levels:
 () operates at the edge level to learn relational predicates, while  () operates at the node level to
learn neighborhood counting patterns.</p>
      <p>⎛ ⎛
h() =  () ⎝ () ⎝</p>
      <p>⎞⎞
∑︁  ()([h(−1) ‖ h(−1) ‖ e])⎠⎠
∈()</p>
      <p>For each edge (, ) in the graph, LogiX-Me computes a message by first concatenating features,
then applying   :
z = [h(−1)
‖ h(−1)
‖ e]
where h(−1) ∈ R are source node features, h(−1) ∈ R are target node features, and z ∈ R2+
are concatenated features. If edge features are not present, z = [h(−1) ‖ h(−1) ]. The concatenated
features pass through   :</p>
      <p>m = (z  · W +() + b())
where W+() ∈ R≥(02+)× ′ is a non-negative weight matrix, b() ∈ R′ is bias vector,  is sigmoid
activation function and m ∈ [0, 1]′ is the message from  to . Each output dimension  of m
corresponds to a learned ternary predicate  (, , e). The message m[] ≈ 1 indicates that
the triple (, , e) satisfies predicate  . This directly corresponds to PGML’s ternary predicates
(, , ). Then, the messages from all neighbors are summed:
where a() ∈ R′ are the aggregated messages and each dimension a()[] ≈ count of neighbors  such
()[]
that  (, , e) holds. Since m values are approximately binary (due to steep sigmoid), a
(10)
(11)
(12)
(13)
represents the number of edges (, ) satisfying predicate  (, , e). This directly corresponds to
PGML’s counting quantifiers over ternary predicates
aggregation, counts are re-binarized using the Fourier-based step function. The binarized finally counts
a()[] ≈ |{ ∈  () : (, , e ) ∈  }|. After
pass through   :</p>
      <p>h() = ( a˜() · W +() + b())
where a˜
() =  ()(a()) ∈ [0, 1]′ are the binarized counts, W+()
∈ R0′× is a non-negative weight
≥
matrix, b() ∈ R is the bias vector and h
()</p>
      <p>∈ [0, 1] is the output node embedding. Each output
dimension  of h
() corresponds to a PGML formula combining multiple counting conditions:
⋁︁</p>
      <p>︃(
∈ ∈
⋀︁ ∃≥   ((, ) ∧ (, , ))
h()[] = 1 ⇐⇒ ,  |=
)︃
(14)
(15)
().
(16)
where  is the set of minimal activating sets for the -th output and  are predicates learned by</p>
      <p>LogiX-Me requires binary or approximately binary features to enable faithful logical interpretation.
However, many real-world datasets contain continuous node or edge features. To handle this, LogiX-Me
introduces optional binarization layers that apply the Fourier step function before passing through the
ifrst convolution layer.</p>
      <p>To increase model expressiveness, LogiX-Me optionally concatenates negated features:
haug = [h ‖ (1 − h)]
This enables learning rules with explicit negation, e.g., “NOT carbon”. The rationale stems from the
non-negative weight constraint in TELL layers: with W+
∈ R≥0 , the model can only learn positive
conjunctions. To express a negated literal ¬(, , ) in a rule, the model would need negative weights,
which are not permitted in the TELL formulation. Negative concatenation circumvents this limitation
by explicitly providing both (, , ) and ¬(, , ) = 1 − (, , )
allowing the model to select whichever is needed through positive weights. Three modes are available:
no negative concatenation (model limited to only positive conjunctions), negative concatenation at the
ifrst layer ( it enables negation at the input level (e.g., “NOT carbon”), but higher layers cannot negate
learned patterns from previous layers) and negative concatenation at all layers ( it enables complex
rules like “node does NOT have pattern A” where pattern A itself was learned in previous layers). The
last mode is used in LogiX-GIN. We experimented with these modes in order to see if negation is truly
as separate input features,
necessary and in order to reduce the weights of the model.</p>
      <p>We also control whether edge features are reused at every layer or only at the first layer. Unlike
node features, which are updated at each layer to encode increasingly abstract patterns, edge features
remain static throughout the network. Since edge features are constant across layers, any edge property
expressible using e at layer  &gt; 1 could equivalently be learned at layer 1. If layer 1 learns all relevant
ternary predicates (, , ) over the edge features, subsequent layers can reference these learned
predicates through node embeddings without requiring direct access to the raw edge features. In other
words, the information in e should already be encoded in the patterns learned by earlier layers</p>
      <p>In our implementation,  LogiX-Me layers are stacked (typically  = 5) to enable hierarchical
feature composition: the first layers learns atomic ternary predicates over node pairs and edges that
are then combined into higher-order patterns. Since each layer’s predicates can reference previous
layers’ predicates, the final rules can be recursively expanded back to input features, providing complete
explanations.</p>
      <p>For graph-level tasks, node embeddings from each layer are aggregated using three readout functions
(sum, mean and max) and then are passed through a final TELL layer. In node classification, node
embeddings from each layer are directly passed as the input of a final TELL layer. For link prediction,
we compute the element-wise product of the embeddings of the two endpoint nodes from each layer
and pass the resulting representation to a TELL layer. This final layer also produces interpretable rules
explaining how graph-level or node-level features combine to predict classes.</p>
      <p>Training deep logic-constrained networks presents significant challenges due to vanishing gradients
from multiple sigmoid activations and the constraint of non-negative weights in TELL layers. LogiX-Me
employs a 3-phase training strategy with knowledge distillation at both node-level and message-level
representations. The first phase is knowledge distillation pretraining, where we train an unconstrained
model with an identical architecture, but with arbitrary MLPs (no non-negative weight constraints),
Gumbel-Sigmoid activations to encourage binary-like representations, and standard cross-entropy loss
for the classification task. We use this model as a teacher to supervise the logic-constrained student
model. For each LogiX-Me layer , we distill both the post-aggregation output and the intermediate
message output.</p>
      <p>The second phase is fine-tuning, where the logic model is trained end-to-end on the actual task labels.
We use a hyperparameter to regulate whether we want to maintain the distillation loss also in this
phase. In this phase, the Fourier step function increases its value  , encouraging sharp binarization.</p>
      <p>The third phase is a post-training pruning where we apply Hoyer regularization to further reduce
rule complexity. For each layer individually (in reverse order  → 1) we use ℒHoyer = ||W+||1 . This
||W+||2
technique encourages the use of a few large weights while pushing the remaining ones toward zero.</p>
    </sec>
    <sec id="sec-5">
      <title>5. Experiments</title>
      <p>We evaluate LogiX-Me across 13 diverse graph learning tasks, comparing it against the teacher model
and LogiX-GIN. We evaluate across four distinct domains: Synthetic tasks include BA2Motifs and
BAMultiShapes (graph classification), plus BAShapes, BACommunity, and TreeGrid (node classification).
Molecular benchmarks comprise MUTAG, Mutagenicity, NCI1, and BBBP for property prediction,
alongside PROTEINS. We also include Social networks (Reddit-Binary) and Citation networks (Cora, CiteSeer)
for link prediction. We report accuracy for classification and AUC-ROC for link prediction (averaged
over 5 seeds).</p>
      <p>Table 1 presents the complete performance comparison. For graph classification, LogiX-Me matches
the teacher on synthetic tasks and substantially improves on MUTAG and PROTEINS, though it sees
moderate decay on social networks. Notably, in link prediction tasks, LogiX-Me significantly outperforms
the teacher on both Cora and CiteSeer.</p>
      <p>LogiX-Me also consistently outperforms LogiX-GIN, with dramatic improvements on BACommunity,
PROTEINS, and MUTAG. These gains confirm that edge-aware predicates capture relational patterns
(e.g., specific bond types or community roles) that are inexpressible in LogiX-GIN’s monadic framework.</p>
      <p>To explain the quantitative performance gap, we analyse the logical formulas extracted by both
models. On the MUTAG dataset, which classifies mutagenic nitroaromatic compounds, LogiX-GIN is
constrained to unary predicates. It identifies patterns by nesting modal operators, typically generating
rules like:
(17)
(18)
∃&gt;0 ((, ) ∧ () ∧ ∃&gt;0 ((, ) ∧  ()∧</p>
      <p>∃&gt;1 ((, ) ∧ ())))
This formula describes a topological structure (Carbon connected to Nitrogen, connected to Oxygens)
but fails to specify the nature of these connections (single vs. double bonds), which is chemically
vital. In contrast, LogiX-Me, leveraging PGML, utilizes ternary predicates (, , ) to explicitly
incorporate edge features. Our analysis indicates that it successfully extracts rules capturing precise
bond information, such as:</p>
      <p>∃≥1  ((, ) ∧ () ∧  () ∧ single())
∧ ∃≥1  ((, ) ∧  () ∧ () ∧ double())
This enhanced expressivity allows LogiX-Me to distinguish between chemically distinct substructures
(e.g., actual nitro groups vs. generic C-N-O chains) that appear topologically identical to the monadic
baseline, directly contributing to its higher accuracy.</p>
      <p>We further evaluate whether this increased expressiveness comes at the cost of interpretability. We
define complexity as the length of the induced logical rule (number of literals and operators). Despite
the richer semantics of PGML, LogiX-Me does not produce significantly more complex rules. In fact,
the introduction of polyadic predicates often leads to more concise explanations. Where LogiX-GIN
requires deep nesting of modal operators to approximate a relational pattern, LogiX-Me can express the
same pattern with a shallower formula using explicit edge constraints. Empirically, while the average
rule length is slightly higher due to the inclusion of edge predicates, the efective depth required to
achieve peak performance is lower. This suggests that PGML primitives are more semantically dense
for graph tasks, allowing the model to provide explanations that are easier for domain experts.</p>
    </sec>
    <sec id="sec-6">
      <title>6. Conclusions</title>
      <p>We introduced LogiX-Me, a self-explainable GNN that integrates Polyadic Graded Modal Logic (PGML)
into its architecture to capture edge-aware and relational patterns. By employing a dual-layer
design, the model explicitly learns ternary predicates (, , ) and neighborhood counting constraints,
overcoming the expressivity limits of prior monadic approaches.</p>
      <p>Our experiments demonstrate that LogiX-Me achieves competitive performance with black-box
baselines while significantly outperforming the LogiX-GIN baseline on tasks requiring edge
diferentiation. Crucially, this expressiveness yields concise, human-readable logical rules without sacrificing
interpretability. LogiX-Me thus ofers a robust framework for transparent graph learning, proving that
self-explanation can coexist with high predictive accuracy.
[1] C. Rudin, Stop explaining black box machine learning models for high stakes decisions and use
interpretable models instead, Nature Machine Intelligence (2019).
[2] A. Ragno, B. La Rosa, R. Capobianco, Prototype-based interpretable graph neural networks, IEEE</p>
      <p>Transactions on Artificial Intelligence (2022).
[3] T. Bui, W. Li, Toward interpretable graph neural networks via con cept matching model, ICDM
(2023).
[4] J. Yu, T. Xu, Y. Rong, Y. Bian, J. Huang, R. He, Graph information bottleneck for subgraph recognition,</p>
      <p>ICLR (2021).
[5] S. Azzolin, S. Malhotra, A. Passerini, S. Teso, Beyond topological self-explainable gnns: A formal
explainability perspective, in: ICML, 2025.
[6] A. Ragno, M. Plantevit, C. Robardet, On logic-based self-explainable graph neural networks, NeurIPS
(2025).
[7] M. De Rijke, A note on graded modal logic, Studia Logica (2000).
[8] A. Ragno, M. Plantevit, C. Robardet, R. Capobianco, Transparent explainable logic layers, ECAI
(2024).</p>
    </sec>
  </body>
  <back>
    <ref-list />
  </back>
</article>