Answering complex first-order logic (FOL) queries on knowledge graphs is essential for reasoning. Symbolic methods offer interpretability but struggle with incomplete graphs, while neural approaches generalize better but lack transparency. Neural-symbolic models aim to integrate both strengths but often fail to capture the hierarchical structure of logical queries, limiting their effectiveness. We propose HYQNET, a neural-symbolic model for logic query reasoning that fully leverages hyperbolic space. HYQNET decomposes FOL queries into relation projections and logical operations over fuzzy sets, enhancing interpretability. To address missing links, it employs a hyperbolic GNN-based approach for knowledge graph completion in hyperbolic space, effectively embedding the recursive query tree while preserving structural dependencies. By utilizing hyperbolic representations, HYQNET captures the hierarchical nature of logical projection reasoning more effectively than Euclidean-based approaches. Experiments on three benchmark datasets demonstrate that HYQNET achieves strong performance, highlighting the advantages of reasoning in hyperbolic space.
Figures & tables
Figure 1: An example of logical query.
Figure 2: Overview of HyQNet .
Model
avgp
avgn
1p
2p
3p
2i
3i
pi
ip
2u
up
2in
3in
inp
pin
pni
FB15k
GQE
28.0
-
54.6
15.3
10.8
39.7
51.4
27.6
19.1
22.1
11.6
-
-
-
-
-
Q2B
38.0
-
68.0
21.0
14.2
55.1
66.5
39.4
26.1
35.1
16.7
-
-
-
-
-
BetaE
41.6
11.8
65.1
25.7
24.7
55.8
66.5
43.9
28.1
40.1
25.2
14.3
14.7
11.5
6.5
12.4
CQD-CO
46.9
-
89.2
25.3
13.4
74.4
78.3
44.1
33.2
41.8
21.9
-
-
-
-
-
CQD-Beam
58.2
-
89.2
54.3
28.6
74.4
78.3
58.2
67.7
42.4
30.9
-
-
-
-
-
Table 1: Test MRR results (%) on answering FOL queries.
Model
avgp
avgn
1p
2p
3p
2i
3i
pi
ip
2u
up
2in
3in
inp
pin
pni
FB15k
GQE
16.6
-
34.2
8.3
5.0
23.8
34.9
15.5
11.2
11.5
5.6
-
-
-
-
-
Q2B
26.8
-
52.0
12.7
7.8
40.5
53.4
26.7
16.7
22.0
9.4
-
-
-
-
-
BetaE
31.3
5.2
52.0
17.0
16.9
43.5
55.3
32.3
19.3
28.1
16.9
6.4
6.7
5.5
2.0
5.3
CQD-CO
39.7
-
85.8
17.8
9.0
67.6
71.7
34.5
24.5
30.9
15.5
-
-
-
-
-
CQD-Beam
51.9
-
85.8
48.6
22.5
67.6
71.7
51.7
62.3
31.7
25.0
-
-
-
-
-
Table 2: Test H@1 results (%) on answering FOL queries.
Model
avg
1p
2p
3p
2i
3i
pi
ip
2in
3in
inp
pin
pni
Q2B
-
0.301
0.219
0.262
0.331
0.270
0.297
0.139
-
-
-
-
-
BetaE
0.494
0.373
0.478
0.472
0.572
0.397
0.519
0.421
0.622
0.548
0.459
0.465
0.608
GNN-QE
0.952
0.971
0.967
0.926
0.987
0.936
0.937
0.923
0.992
0.985
0.880
0.940
0.991
HyQNet
0.958
0.971
0.970
0.941
0.988
0.938
0.939
0.934
0.990
0.984
0.908
0.948
0.991
Table 3: Spearman’s rank correlation between the model prediction and the number of ground truth answers on FB15k. avg is the average correlation on all 12 query types in the table.