# GraphQ IR: Unifying Semantic Parsing of Graph Query Languages
with Intermediate Representation

Lunyiu Nie1, Shulin Cao1, Jiaxin Shi2, Tian Qi2, Lei Hou1, Juanzi Li1, Jidong
Zhai1
1 Department of Computer Science and Technology, Tsinghua University
2 Huawei Cloud Computing Technologies Co., Ltd.
{nlx20<EMAIL_ADDRESS><EMAIL_ADDRESS>
<EMAIL_ADDRESS><EMAIL_ADDRESS>
###### Abstract

Subject to the semantic gap lying between natural and formal language, neural
semantic parsing is typically bottlenecked by the paucity and imbalance of
data. In this paper, we propose a unified intermediate representation (IR) for
graph query languages, namely GraphQ IR. With the IR’s natural-language-like
representation that bridges the semantic gap and its formally defined syntax
that maintains the graph structure, neural semantic parser can more
effectively convert user queries into our GraphQ IR, which can be later
automatically compiled into different downstream graph query languages.
Extensive experiments show that our approach can consistently achieve state-
of-the-art performance on benchmarks Kqa Pro, Overnight and MetaQA.
Evaluations under compositional generalization and few-shot learning settings
also validate the promising generalization ability of GraphQ IR with at most
11% accuracy improvement.

##  1 Introduction

By mapping natural language utterances to logical forms, the task of semantic
parsing has been widely explored in various applications like querying
database Zhong et al. (2017); Yu et al. (2018) or knowledge base Zhang et al.
(2018); Talmor and Berant (2018), virtual assistant conversation Campagna et
al. (2019); Fischer et al. (2021) and general-purpose code generation Ling et
al. (2016); Yin and Neubig (2017); Nan et al. (2020). Early attempts in this
field usually rely on compositional grammar such as CCG and DCS Zettlemoyer
and Collins (2005); Kwiatkowksi et al. (2010); Liang et al. (2013). Recently,
most works formulate semantic parsing as a Seq2Seq problem and adopt encoder-
decoder neural networks that only require parallel data of natural language
utterance and corresponding logical form for supervision Zhong et al. (2017);
Yu et al. (2020); Damonte and Monti (2021).

However, these neural approaches still suffer from two major challenges: (a)
Semantic gap. As shown in Figure 1, in graph query languages (e.g., SPARQL,
Cypher, and newly emerged KoPL, etc.), graph nodes and edges constitute the
key semantics of the logical forms Pérez et al. (2009), which are very
different from the expression of natural language queries. Such discrepancy
significantly hinders the learning of neural semantic parser, especially in
the era of pretrained language models Lewis et al. (2020). (b) Imbalance of
data. Due to the intensive labor and language-specific expertise required in
annotation Li et al. (2020), in spite of the various datasets prepared in
SPARQL Talmor and Berant (2018); Dubey et al. (2019); Keysers et al. (2019),
very few works target the semantic parsing of other graph query languages,
such as Cypher and Gremlin, that are commonly used in industries Seifer et al.
(2019). Moreover, datasets of different languages are also isolated since no
existing tools can support the conversion Agrawal et al. (2022). Such
imbalance and isolation of data has impeded the semantic parsing of low-
resource languages in both academia and industry.

To overcome the above challenges, many works adopt complementary forms of
supervision, such as the schema of database Hwang et al. (2019), execution
results of the logical forms Clarke et al. (2010); Wang et al. (2018, 2021),
constrained decoding algorithms Shin et al. (2021); Marion et al. (2021) and
canonical utterances Berant and Liang (2014); Su and Yan (2017); Yu et al.
(2020). Despite effective, these approaches either incur training inefficiency
or performance loss Cao et al. (2019). Besides, all these methods are tightly
coupled to a specific dataset or logical form, thus cannot be easily adapted
to other tasks or languages Kamath and Das (2018).

Figure 1: An example of a property graph extracted from Wikidata Vrandečić and
Krötzsch (2014). We present a relevant user query with its corresponding
logical forms in different languages and GraphQ IR.

In this paper, we propose a unified intermediate representation for graph
query languages, namely GraphQ IR, to resolve these issues from a novel
perspective. Instead of directly mapping the input utterance to the target
logical form, we first translate natural language into GraphQ IR, then compile
it into the target graph query language (e.g., SPARQL, KoPL, $\lambda$-DCS,
Cypher, etc.). The designs of GraphQ IR weigh up the semantics of both natural
and formal language by: (a) producing the IR sequences with word order rules
consistent to English Tomlin (2014), such that the compositional semantics of
IR can be more easily aligned with the natural language utterance so as to
close the semantic gap; and (b) capturing the fundamental graph structures
like nodes, edges and properties, such that the IR can be losslessly compiled
into any downstream graph query languages so as to unify the datasets of
different languages for alleviating the data bottleneck.

Therefore, language-specific grammar features that originally pose a huge
obstacle to semantic parsing are now explicitly handled by the compiler, and
the neural semantic parser can concentrate on the comprehension of user
queries. Additionally, with our source-to-source compiler that supports bi-
directional translation between GraphQ IR and various graph query languages,
our work also provides a novel toolkit that can be utilized as a transpiler
for unifying different datasets or as a natural language user interface for
querying graph databases.

To validate the effectiveness of GraphQ IR, we conducted extensive experiments
on benchmarks Kqa Pro, Overnight and MetaQA. Results show that our approach
can consistently outperforms the previous works by a significant margin.
Especially under the compositional generalization and few-shot learning
settings, our approach with GraphQ IR can demonstrate at most 11% increase on
accuracy over the baselines with strong generalization abilities.
Supplementary analysis further shows that GraphQ IR is easy to debug with 89%
of the errors can be fixed with simple corrections.

The main contributions of our work include:

  * •

We propose GraphQ IR for unifying the semantic parsing of graph query
languages, and present the IR design principles that are critical to the
success of semantic parsing;

  * •

Experimental results show that our approach can achieve state-of-the-art
performance across benchmarks and strong robustness even under the
compositional generalization and few-shot learning settings.

  * •

Our implemented compiler can be also utilized as a translator among different
graph query languages. We will release our code and toolkit for the uses of
the community.

Non-terminal |  Productions |  Description
---|---|---
$S$ |  $\rightarrow$ EntityQuery | AttributeQuery | RelationQuery | QualifierQuery | ValueQuery | CountQuery |  Start symbol of a query sequence
EntityQuery |  $\rightarrow$ what is EntitySet |  Query that returns certain entities
RelationQuery |  $\rightarrow$ what is the relation from EntitySet to EntitySet |  Query that returns the relationship between given entities
CountQuery |  $\rightarrow$ how many EntitySet |  Query that returns the quantity of certain entities
EntitySet |  $\rightarrow$ <ES> EntitySet LOP EntitySet </ES> | <ES> EntitySet Constraint </ES> | Concept | Entity |  A non-empty set of entities that match certain conditions
Constraint |  $\rightarrow$ whose Attribute COP Value | that Relation DIR to EntitySet | that Relation DIR to COP Value EntitySet |  Clauses that constrain the entities condition
Entity |  $\rightarrow$ <E> entity </E> |  Entity node of a specified name
Concept |  $\rightarrow$ <C> concept </C> |  Set of entities of a specified type
Attribute |  $\rightarrow$ <A> attribute </A> |  Specified property of an entity
Relation |  $\rightarrow$ <R> relation </R> |  Relationship between entities
Value |  $\rightarrow$ VTYPE <V> value </V> | Attribute of Entity |  Specified value of certain constraints
LOP |  $\rightarrow$ and | or | not |  Logical operators that perform set union, intersection or exclusion
COP |  $\rightarrow$ is | is not | larger than | smaller than | at least | at most |  Comparison operators that take value as operand
DIR |  $\rightarrow$ forward | backward |  Relationship direction constraint
VTYPE |  $\rightarrow$ string | number | year | date | time |  Value type constraint

Table 1: A subset of GraphQ IR grammar rules. We separate alternative
productions at the same level using “|” and mark the terminal nodes in
italics. A more complete set of grammar is presented in Appendix Table 7.

##  2 GraphQ IR

We propose GraphQ IR as a novel intermediate representation that aims to
bridge the semantic gap between natural and formal language as well as unify
different languages to break the data bottleneck. In this section, we define
the property graph, formalize the GraphQ IR, and summarize the key principles
in designing GraphQ IR.

###  2.1 Definition

As the top of Figure 1 demonstrates, a property graph normally includes Entity
(the graph nodes, e.g., Stanley Kubrick), Attribute (the node properties,
e.g., date of birth), Concept (the node types, e.g., film), Relationship (the
graph edges, e.g., spouse) and Qualifier (the edge properties, e.g., start
time).

Accordingly, GraphQ IR is built on top of the above key structures as terminal
nodes meantime having its productions consistent with the compositional
semantics of natural language. We formally define the context-free grammar of
GraphQ IR by a quadruple $G=(V,T,S,P)$ composed of non-terminal symbols $V$,
terminal symbols $T$, the start symbol $S$ and production rules $P$. We
specify the productions of GraphQ IR in extended Backus–Naur form Parr (2013)
and describe a subset of GraphQ IR’s grammar in Table 1. To exemplify, in
Figure 1, the production of GraphQ IR’s EntitySet is equivalent to a relative
clause involving the operations over graph elements Concept, Relation and
Entity.

###  2.2 Principles

We summarize several principles in designing GraphQ IR, concluded as:
presenting the semantics close to the natural language while preserving the
structure identical to the formal language.

####  2.2.1 Diminishing structural discrepancy

To facilitate the training of neural semantic parser, the target IR sequence
should share similar structures in correspondence to the input utterance.

To achieve this, first, the structure of IR should match how users typically
raise queries. Therefore, we simplify the triple-based structure in graph
query languages into a more natural subject-verb-object syntactic construction
Tomlin (2014). Take Figure 1’s task setting as an example, the two triples (?e
instance_of ?c) and (?c name "film") as the entity concept constraint in
SPARQL are simplified to the sentence subject “<C> film </C>” in GraphQ IR.
Multi-hop relationship and attribute queries are also formulated as relative
clauses following the English expression thus can be comfortably generated by
a language-model-based neural semantic parser.

Secondly, IR should also leave out the variables (e.g., ?e, ?c in SPARQL) and
operators (e.g., MATCH, DISTINCT, WHERE, RETURN, etc.) in graph query
languages that cannot be easily aligned to natural language. Alternatively,
human-readable operators are adopted in GraphQ IR for better comprehension by
the language models.

Figure 2: Overall implementation of our proposed framework. The user queries
are first converted to GraphQ IR sequences and subsequently translated into
the downstream graph query languages by the compiler.

####  2.2.2 Eliminating semantic redundancy and ambiguity

In formal languages it is quite common that multiple parallel implementations
may achieve the same functionalities. However, such redundancy and ambiguity
in semantics may pose challenges to the neural semantic parser.

For instance, in $\lambda$-DCS, there co-exists at least three implementations
for constraining the entities’ concept, respectively through

EventNP: `(call @getProperty (NP)` ` (call @reverse (RelNP)))`;

TypeNP: (call @getProperty (call @singleton (TypeNP)) (string !type)); and

DomainNP: `(call @getProperty ((CP)` `(call @domain (RelNP)))(RelNP))`.

When designing an IR, such redundant and ambiguous semantics should be
clarified into more definitive and orthogonal representation Campagna et al.
(2019). Thus in GraphQ IR’s, we unify all such unnecessary distinctions and
prune redundant structure in the logical forms to distill the core semantics.
In the previous example, GraphQ IR instead only requires a simple concept
constraint “<C> concept </C>” as the noun modifier. This not only makes the
language more regular and hence simpler for both the users and semantic
parser, but also facilitates the next-step compilation from IR to the
downstream formal languages.

####  2.2.3 Inducing compilation-aiding syntax

Apart from the aforementioned designs to improve the alignment with natural
language, the grammar of IR also needs to maintain the key structures in graph
queries so as to enable the subsequent automatic compilation.

Specifically, IR should keep track of the data types of graph structural
elements. We design GraphQ IR to be strong-typing by explicitly stating the
type of terminal nodes with respective special tokens, e.g., <E> for Entity,
<R> for Relation, <A> for Attribute, etc. Values of different types are also
differentiated in GraphQ IR with our pre-defined or user custom indicators,
e.g., string, number, date, time, etc.

Furthermore, IR should also preserve the hierarchical dependencies that are
critical for multi-hop queries. We induce <ES> as a scoping token in GraphQ IR
to explicitly indicate the underlying dependencies among the clauses produced
by an EntitySet, as shown in Table 1. Such scoping tokens in GraphQ IR can
facilitate the compiler to recover the hierarchical structure and finally
transform the IR sequences into one of the graph query languages
deterministically.

##  3 Implementation

We depict the whole picture of our proposed framework in Figure 2. The neural
semantic parser first translates the input natural language utterance into
GraphQ IR. Thereafter, the GraphQ IR sequence is fed into the compiler and
parsed into an abstract syntax tree for downstream graph query language code
generation.

###  3.1 Neural Semantic Parser

To verify the above principles in practice, we formulate the conversion from
natural language to our GraphQ IR as a Seq2Seq task and adopt an encoder-
decoder framework for implementing the neural semantic parser.

As shown in the left part of Figure 2, the encoder module of the semantic
parser first maps the input natural language utterance $X$ to a high
dimensional feature space with non-linear transformations for capturing the
dependencies among the input tokens. The decoder module subsequently then
interprets the hidden representations and generates the IR sequence by
factorizing the probability distribution:

$p(\textit{IR})=\prod_{i=1}^{n}p(y_{i}|X,y_{1},...,y_{i-1}),$ (1)

where $y_{i}$ is the $i$-th token of IR sequence with in total $n$ tokens.
Specifically, we implement this encoder-decoder network with BART, which has a
standard Transformer architecture that get pretrained on over 160GB of English
text corpus Lewis et al. (2020). Therefore, BART is proficient in
comprehending the diverse user utterances and generating the GraphQ IR that
has natural-language-like semantic representations.

Please note that the implementation in this part is orthogonal to our GraphQ
IR, thus can be also substituted by other semantic parsing models.

###  3.2 Compiler

The implementation of compiler comprises a front-end module that generates
abstract syntax trees from GraphQ IR and a back-end module that transforms the
tree structure into the target code.

Following the grammar rules formally defined in Section 2.1, the compiler
front-end first performs lexical analysis and syntax analysis on the IR
sequence generated in Section 3.1. The LL(*) parser that performs the leftmost
derivation of a sentence with tokens look-ahead Parr and Fisher (2011) will
automatically parse the sequence of GraphQ IR into an abstract syntax tree
that contains the dependencies and hierarchical structure. The compiler back-
end will then traverse the abstract syntax tree and restructure the elements
and dependencies into one of the downstream graph query languages (i.e.,
SPARQL, KoPL, $\lambda$-DCS, Cypher, etc) following our pre-defined
transformation rules. To illustrate this process, we present 2 examples of
generating $\lambda$-DCS and SPARQL queries respectively in Appendix Figure 3
and Figure 4.

##  4 Experiments

This section evaluates the effectiveness of GraphQ IR on several benchmarks
under different task settings.

| Multi-hop | Qualifier | Comparison | Logical | Count | Verify | Zero-shot | Overall
---|---|---|---|---|---|---|---|---
Baselines |  |  |  |  |  |  |  |
RGCN Schlichtkrull et al. (2018) | 34.00 | 27.61 | 30.03 | 35.85 | 41.91 | 65.88 | - | 35.07
BART+KoPL Cao et al. (2020b) | 85.57 | 80.57 | 93.83 | 86.33 | 84.20 | 84.94 | 86.29 | 87.17
BART+SPARQL Cao et al. (2020b) | 88.49 | 83.09 | 96.12 | 88.67 | 85.78 | 92.33 | 87.88 | 89.68
CFQ IR Herzig et al. (2021) | 87.51 | 81.32 | 95.70 | 90.33 | 86.23 | 92.20 | 87.12 | 88.96
Our Approach |  |  |  |  |  |  |  |
GraphQ IR | 90.38 | 84.90 | 97.15 | 92.64 | 89.39 | 94.20 | 94.20 | 91.70

Table 2: Experimental results on Kqa Pro dataset. Data are categorized into
Multi-hop queries with multi-hop inference, Qualifier knowledge queries,
Comparison between several entities, Logical union or intersection, Count
queries for the quantity of entities, Verify queries with a boolean answer,
and Zero-shot queries whose answer is not seen in the training set.

|  Bas. |  Blo. |  Cal. |  Hou. |  Pub. |  Rec. |  Res. |  Soc. |  Overall
---|---|---|---|---|---|---|---|---|---
Baselines |  |  |  |  |  |  |  |  |
SPO Wang et al. (2015) |  46.3 |  41.9 |  74.4 |  54.0 |  59.0 |  70.8 |  75.9 |  48.2 |  58.8
Seq2Action Chen et al. (2018a) |  88.2 |  61.4 |  81.5 |  74.1 |  80.7 |  82.9 |  80.7 |  82.1 |  79.0
DUAL Cao et al. (2019) |  84.9 |  61.2 |  78.6 |  67.2 |  78.3 |  80.6 |  78.9 |  81.3 |  76.4
2-stage DUAL* Cao et al. (2020a) |  87.2 |  65.7 |  80.4 |  75.7 |  80.1 |  86.1 |  82.8 |  82.7 |  80.1
Our Approach |  |  |  |  |  |  |  |  |
GraphQ IR |  88.2 |  64.7 |  78.6 |  72.0 |  77.6 |  83.3 |  84.9 |  81.6 |  79.5
GraphQ IR* |  88.2 |  65.4 |  81.6 |  81.5 |  82.6 |  92.9 |  89.8 |  84.1 |  82.1

Table 3: Experimental results on Overnight dataset. Methods with asterisk (*)
means that external data of other domains is utilized to enhance the
performance.

###  4.1 Datasets

For evaluation, we choose SPARQL, KoPL, $\lambda$-DCS, and Cypher as the
target graph query languages, and take Kqa Pro, Overnight, MetaQA as the
corresponding datasets.

##### KQA Pro

Kqa Pro Cao et al. (2020b) is a large-scale dataset for complex question
answering over Wikidata knowledge base Vrandečić and Krötzsch (2014). It is so
far the largest KBQA corpus that contains 117,790 natural language questions
along with the corresponded SPARQL and KoPL logical forms, covering diverse
question types, e.g., multi-hop inference, logical union and intersection,
etc. In our experiment, it is divided into 94,376 train, 11,797 dev and 11,797
test cases.

##### Overnight

Overnight Wang et al. (2015) is a semantic parsing dataset with 13,682
examples across 8 different domains extracted from Freebase Bollacker et al.
(2008). Each domain has natural language questions and pairwise $\lambda$-DCS
queries executable on SEMPRE Berant et al. (2013). It exhibits diverse
linguistic phenomena and semantic structures across domains, e.g., temporal
knowledge in Calendar domain and spatial knowledge in Blocks domain. We use
the same train/dev/test splits as in the previous work Wang et al. (2015).

##### MetaQA

MetaQA Zhang et al. (2018) is a large-scale dataset containing more than 400k
multi-hop question-answer pairs over MovieQA knowledge base Tapaswi et al.
(2016). Since previous works have achieved $\sim$100% accuracy on its SPARQL
annotation Huang et al. (2021); Shi et al. (2021), we reconstruct MetaQA into
Cypher as a few-shot learning benchmark. To the best of our knowledge, this is
also the first Cypher dataset in the research field of graph query language
parsing.

###  4.2 Metric

We adopt execution accuracy as our metric based on whether the generated
logical forms can return correct answers. For queries with multiple answers,
we require the execution results to exactly match all the ground truth
answers.

###  4.3 Configurations

For the neural semantic parser, we used the BARTbase model Lewis et al. (2020)
released by Facebook on HuggingFace111https://huggingface.co/facebook/bart-
base. 12 special tokens (e.g., <ES>) were added to the tokenizer vocabulary as
the structure indicators for GraphQ IR. We used the AdamW optimizer Loshchilov
and Hutter (2018) with the learning rate set to $3e^{-5}$ and weight decay set
to $1e^{-5}$ following the default settings.

For the compiler, we used ANTLR Parr (2013) version 4.9.2 for analyzing our
specified grammar rules and building up the corresponding lexer and parser
toolkit. For evaluation, we used
Virtuoso222https://github.com/openlink/virtuoso-opensource 7.20,
SEMPRE333https://github.com/percyliang/sempre 2.4,
Neo4j444https://github.com/neo4j/neo4j 4.4 and KoPL
0.3555https://pypi.org/project/KoPL/ as the back-ends respectively for
executing the SPARQL, $\lambda$-DCS, Cypher and KoPL queries.

Our whole experiments were performed on a single machine with 8 NVIDIA Tesla
V100 (32GB memory) GPUs on CUDA 11.

###  4.4 Results

As Table 2 illustrates, our proposed approach with GraphQ IR consistently
outperforms the previous approaches and has achieved the new state-of-the-art
results on Kqa Pro dataset. In particular, GraphQ IR exhibits even larger
improvements over the baselines under the more complex Multi-hop, Qualifier
and Zero-shot task settings. We attribute this to its natural-language-like
semantic representations that can be well accepted by the pretrained language
model and its formal-language-like syntactic structure that can be flexibly
combined or decomposed to achieve better generalization.

As for the benchmark Overnight, our approaches with GraphQ IR also
significantly surpass the baselines, as shown in Table 3. Due to the distinct
vocabulary and grammar rules, previous works usually train separate parsers
for each task domain Wang et al. (2015); Chen et al. (2018a). However, as can
be observed from the superior performance of GraphQ IR* that get trained on
the aggregated data of all eight domains, with an extra layer of IR for
unification, domain-specific grammar rules are now consolidated into one
universal representation and the training of one domain can thereby benefit
from the others’ data.

To further validate our proposed IR’s robustness, we also examine GraphQ IR
under compositional generalization and few-shot learning task settings.

| Overall | Qualifier | Comparison | Logical
---|---|---|---|---
BART | 50.58 | 21.55 | 87.66 | 50.60
CFQ IR | 50.70 | 25.33 | 93.77 | 50.73
GraphQ IR | 54.91 | 40.46 | 95.19 | 54.90

Table 4: Experimental results on Kqa Pro compositional generalization data
split.

|  1-shot |  3-shot |  5-shot
---|---|---|---
BART |  73.93 |  91.99 |  94.37
GraphQ IR |  72.05 |  93.73 |  95.16
GraphQ IR* |  84.91 |  95.31 |  96.13

Table 5: Few-shot learning results on MetaQA dataset. GraphQ IR* refers to our
model that has formerly trained on Kqa Pro dataset.

Error Type |  # |  # OSC |  Example
---|---|---|---
Inaccurate data annotation |  28 |  - |  User utterance: Out of newscasts that last 110 minutes, which is the shortest?
|  |  Gold SPARQL: SELECT ?e WHERE { ?e instance_of ?c . ?c name "newscast" . ?e duration ?pv_1 . ?pv_1 unit "minute" . ?pv_1 value ?v_1 . FILTER ( ?v_1 != "110"^^xsd:double ) . ?e duration ?pv . ?pv value ?v } ORDER BY ?v LIMIT 1
|  |  Generated IR: which one has the smallest <A> duration </A> among <ES> <C> newscast </C> whose <A> duration </A> is number <V> 110 minute </V> </ES>
|  |  Compiled SPARQL: SELECT ?e WHERE { ?e instance_of ?c . ?c name "newscast" . ?e duration ?pv_1 . ?pv_1 unit "minute" . ?pv_1 value "110"^^xsd:double . ?e duration ?pv . ?pv value ?v } ORDER BY ?v LIMIT 1
Ambiguous query expression |  27 |  27 |  User utterance: How is the kid’s movie The Spiderwick Chronicles related to John Sayles?
|  |  Gold SPARQL: SELECT DISTINCT ?p WHERE { ?e_1 name "The Spiderwick Chronicles" . ?e_1 genre ?e_3 . ?e_3 name "children’s film" . ?e_2 name "John Sayles" . ?e_1 ?p ?e_2 }
|  |  Generated IR: what is the relation from <ES> <E> The Spiderwick Chronicles </E> (<ES> ones that <R> genre </R> backward to <E> kid film </E> </ES>) </ES> to <E> John Sayles </E>
|  |  Compiled SPARQL: SELECT DISTINCT ?p WHERE { ?e_1 name "The Spiderwick Chronicles" . ?e_1 genre ?e_3 . ?e_3 name "kid film" . ?e_2 name "John Sayles" . ?e_1 ?p ?e_2 }
Unspecified graph structure |  13 |  9 |  User utterance: When did Tashkent become the capital of Uzbekistan?
|  |  Gold SPARQL: SELECT DISTINCT ?qpv WHERE { ?e_1 name "Tashkent" . ?e_2 name "Uzbekistan" . ?e_1 capital_of ?e_2 . [ fact_h ?e_1 ; fact_r capital_of ; fact_t> ?e_2 ] start_time ?qpv }
|  |  Generated IR: what is the qualifier <Q> start time </Q> of <E> Uzbekistan </E> that <R> capital </R> to <E> Tashkent </E>
|  |  Compiled SPARQL: SELECT DISTINCT ?qpv WHERE { ?e_1 name "Uzbekistan" . ?e_2 name "Tashkent" . ?e_1 capital ?e_2 . [ fact_h ?e_1 ; fact_r capital ; fact_t ?e_2 ] start_time ?qpv }
Nonequivalent semantics |  32 |  25 |  User utterance: When did Joseph L. Mankiewicz graduate from Columbia University?
|  |  Gold SPARQL: SELECT DISTINCT ?qpv WHERE { ?e_1 name "Joseph L. Mankiewicz" . ?e_2 name "Columbia University" . ?e_1 educated_at ?e_2 . [ fact_h ?e_1 ; fact_r educated_at ; fact_t ?e_2 ] end_time ?qpv }
|  |  Generated IR: what is the qualifier <Q> start time </Q> of <E> Joseph L. Mankiewicz </E> that <R> educated at </R> to <E> Columbia University </E>
|  |  Compiled SPARQL: SELECT DISTINCT ?qpv WHERE { ?e_1 name "Joseph L. Mankiewicz" . ?e_2 name "Columbia University" . ?e_1 educated_at ?e_2 . [ fact_h ?e_1 ; fact_r educated_at ; fact_t ?e_2 ] start_time ?qpv }

Table 6: The analysis of 4 error types based on the failure cases as occurred
in benchmark Kqa Pro’s test data. “# OSC” refers to the number of errors that
can be fixed with one step correction on the IR’s structure.

##### Compositional Generalization

Current neural semantic parsers often fail in reaching good compositional
generalization, i.e., the capability of generalizing from the known components
to produce novel combinations Pasupat and Liang (2015); Keysers et al. (2019);
Furrer et al. (2020). To measure our IR’s compositional generalization
ability, we create a new Kqa Pro data split based on the logical form length
and test the parsers to generate long queries based on the short query
components seen in the training data. The results are listed in Table 4.
Comparing with the plain-BART baseline and the CFQ IR Herzig et al. (2021)
that is specially designed for improving the compositional generalization on
SPARQL, GraphQ IR achieves the best performance in overall data as well as in
complex task settings, which can be again credited to our IR designs that
simplify the redundant semantics and preserve the key structural features.

##### Few-shot learning

In practice, it is important for a parser to remain robust in a novel task
domain lack of data annotations. Therefore, we reconstruct the MetaQA dataset
into Cypher, a graph query language commonly used in the industries but rarely
studied in previous semantic parsing research works Seifer et al. (2019), and
assess our models under the few-shot learning setting. We adjust the data to
ensure only 1, 3 and 5 samples of each question type appear in the training
set respectively under the 1-shot, 3-shot and 5-shot settings. The results in
Table 5 indicate that our IR can generalize well with very few labelled data.
Moreover, the GraphQ IR* model that has in advance trained on Kqa Pro data
demonstrates the most outstanding performance, especially under the hardest
1-shot setting. This further affirms the necessities of unification. With
GraphQ IR, the annotations originally prepared for other graph query languages
(e.g., SPARQL) can be now easily transferred to facilitate a novel task domain
lack of data.

##  5 Error Analysis

To investigate GraphQ IR’s potentials and bottleneck, we look into the
failures of our approach when incorrect logical forms are generated. Out of
the total 979 errors in Kqa Pro’s test set, we randomly sampled 100 cases and
categorized them into 4 types as shown in Table 6:

(1) Inaccurate data annotation (28%). The information in user utterance (e.g.,
110 minutes) is inconsistent with the gold SPARQL (e.g., v_1 != "110") as
annotated in the original dataset. We attribute this type of errors to the
dataset rather than the failure of our approach. (2) Ambiguous query
expression (27%). The semantics of the user utterance may present in more than
one way (e.g., kid film or children’s film) due to the ambiguity in natural
language, whereas the schema of knowledge base is pre-defined (e.g., only
children’s film is considered a valid entity). (3) Unspecified graph structure
(13%). Logical forms of different structures (e.g., (Uzbekistan capital
Tashkent) and (Tashkent capital_of Uzbekistan)) can convey the same semantics
in a directed cycle graph, but some of them contain structures that are absent
in a knowledge base. (4) Nonequivalent semantics (32%). The output includes
incorrect query element (e.g., string and numerical values) or structure
(e.g., edges and properties) that conveys nonequivalent semantics, such as
misinterpreting graduate to start_time.

Overall, 89% of the sampled errors can be simply fixed by the revision of data
annotation or one step correction on the GraphQ IR element, demonstrating that
our proposed approach with GraphQ IR can generate high quality logical forms
and is easy to debug.

##  6 Related Work

###  6.1 Semantic Parsing

Semantic parsing aims to translate natural language utterances into executable
logical forms, such as CCG Zettlemoyer and Collins (2005), $\lambda$-DCS Liang
(2013); Pasupat and Liang (2015); Wang et al. (2015), SQL Zhong et al. (2017);
Yu et al. (2020), AMR Banarescu et al. (2013), SPARQL Sun et al. (2020) and
KoPL Cao et al. (2020b, 2021). Most recent works take semantic parsing as a
Seq2Seq translation task via encoder-decoder framework, which is challenging
due to the semantic and structural gaps between natural utterances and logical
forms. To overcome such issues, current semantic parsers usually (1) rely on a
large amount of labeled data Cao et al. (2020b); or (2) leverage external
resources for mini the structual mismatch, e.g., injecting grammar rules
during decoding Wu et al. (2021); Shin et al. (2021); or (3) employ synthetic
data to diminish the semantic mismatch Xu et al. (2020); Wu et al. (2021).

Compared with previous works, our proposed GraphQ IR allows semantic parser
adapting to different downstream formal query languages without extra efforts
and demonstrates promising performance under the compositional generalization
and few-shot settings.

###  6.2 Intermediate Representation

Intermediate representations (IR) are usually generated for the internal use
of compilers and represent the code structure of input programs Aho et al.
(2007). Good IR designs with informative and distinctive mid-level features
can provide huge benefits for optimization, translation and downstream code
generation Lattner and Adve (2004), especially in areas like deep learning
Chen et al. (2018b); Cyphers et al. (2018) and heterogeneous computing Lattner
et al. (2020).

Recently, IR has also become common in many semantic parsing works that
include an auxiliary representation in-between natural language and logical
form. Most of them take a top-down approach and adopt IR similar to natural
language Su and Yan (2017); Herzig and Berant (2019); Shin et al. (2021),
whereas another category of works instead construct IR based on the key
structure of target logical forms in a bottom-up manner Wolfson et al. (2020);
Marion et al. (2021). For example, Herzig et al. designed CFQ IR that rewrites
SPARQL by grouping the triples of same elements (2021).

Although these works partially mitigate the mismatch between natural and
formal language, they either neglected the structural information requisite
for downstream compilation or failed in removing the formal representations
that are unnatural to the language models. In contrast, GraphQ IR can benefit
from both approaches with its natural-language-like semantic representation
and formal-language-like syntactic definition. The unification also saves the
huge costs as incurred when preparing separate IR and compiler for each graph
query languages in previous works.

##  7 Conclusion and Future Work

This paper proposes a novel intermediate representation, namely GraphQ IR, for
bridging the structural and semantic gap between natural language and graph
query languages. Evaluation results show that our approach using GraphQ IR
consistently surpasses the baselines on multiple benchmarks covering different
formal languages, i.e., SPARQL, KoPL, $\lambda$-DCS and Cypher. Moreover,
GraphQ IR also demonstrates superior generalization ability and robustness
under the compositional generalization and few-shot learning settings.

As an early step towards the unification of semantic parsing, our work opens
up a number of future directions. For example, many code optimization
techniques (e.g., common subexpression elimination) can be incorporated into
IR for extra performance boosting. By bringing in multiple levels of IR, our
framework may be also extended to support relational database query languages
like SQL. Moreover, since current design of GraphQ IR still requires non-
trivial manual efforts, the automation of such procedure, e.g., in prompt-like
manners, is definitely worth future exploration.

## References

  * Agrawal et al. (2022) Lakshya A Agrawal, Nikunj Singhal, and Raghava Mutharaju. 2022.  A sparql to cypher transpiler: Proposal and initial results.  In _5th Joint International Conference on Data Science & Management of Data (9th ACM IKDD CODS and 27th COMAD)_, pages 312–313.
  * Aho et al. (2007) Alfred V Aho, Monica S Lam, Ravi Sethi, and Jeffrey D Ullman. 2007.  _Compilers: principles, techniques, & tools_.  Pearson Education India.
  * Banarescu et al. (2013) Laura Banarescu, Claire Bonial, Shu Cai, Madalina Georgescu, Kira Griffitt, Ulf Hermjakob, Kevin Knight, Philipp Koehn, Martha Palmer, and Nathan Schneider. 2013\.  Abstract meaning representation for sembanking.  In _Proceedings of the 7th linguistic annotation workshop and interoperability with discourse_ , pages 178–186.
  * Berant et al. (2013) Jonathan Berant, Andrew Chou, Roy Frostig, and Percy Liang. 2013.  Semantic parsing on freebase from question-answer pairs.  In _Proceedings of the 2013 conference on empirical methods in natural language processing_ , pages 1533–1544.
  * Berant and Liang (2014) Jonathan Berant and Percy Liang. 2014.  Semantic parsing via paraphrasing.  In _Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_ , pages 1415–1425.
  * Bollacker et al. (2008) Kurt Bollacker, Colin Evans, Praveen Paritosh, Tim Sturge, and Jamie Taylor. 2008\.  Freebase: a collaboratively created graph database for structuring human knowledge.  In _Proceedings of the 2008 ACM SIGMOD international conference on Management of data_ , pages 1247–1250.
  * Campagna et al. (2019) Giovanni Campagna, Silei Xu, Mehrad Moradshahi, Richard Socher, and Monica S Lam. 2019.  Genie: A generator of natural language semantic parsers for virtual assistant commands.  In _Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation_ , pages 394–410.
  * Cao et al. (2019) Ruisheng Cao, Su Zhu, Chen Liu, Jieyu Li, and Kai Yu. 2019.  Semantic parsing with dual learning.  In _Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics_ , pages 51–64.
  * Cao et al. (2020a) Ruisheng Cao, Su Zhu, Chenyu Yang, Chen Liu, Rao Ma, Yanbin Zhao, Lu Chen, and Kai Yu. 2020a.  Unsupervised dual paraphrasing for two-stage semantic parsing.  In _Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics_ , pages 6806–6817.
  * Cao et al. (2020b) Shulin Cao, Jiaxin Shi, Liangming Pan, Lunyiu Nie, Yutong Xiang, Lei Hou, Juanzi Li, Bin He, and Hanwang Zhang. 2020b.  Kqa pro: A dataset with explicit compositional programs for complex question answering over knowledge base.  _arXiv preprint arXiv:2007.03875_.
  * Cao et al. (2021) Shulin Cao, Jiaxin Shi, Zijun Yao, Xin Lv, Jifan Yu, Lei Hou, Juan-Zi Li, Zhiyuan Liu, and Jinghui Xiao. 2021.  Program transfer for answering complex questions over knowledge bases.
  * Chen et al. (2018a) Bo Chen, Le Sun, and Xianpei Han. 2018a.  Sequence-to-action: End-to-end semantic graph generation for semantic parsing.  _arXiv preprint arXiv:1809.00773_.
  * Chen et al. (2018b) Tianqi Chen, Thierry Moreau, Ziheng Jiang, Lianmin Zheng, Eddie Yan, Haichen Shen, Meghan Cowan, Leyuan Wang, Yuwei Hu, Luis Ceze, et al. 2018b.  $\\{$TVM$\\}$: An automated $\\{$End-to-End$\\}$ optimizing compiler for deep learning.  In _13th USENIX Symposium on Operating Systems Design and Implementation (OSDI 18)_ , pages 578–594.
  * Clarke et al. (2010) James Clarke, Dan Goldwasser, Ming-Wei Chang, and Dan Roth. 2010.  Driving semantic parsing from the world’s response.  In _Proceedings of the fourteenth conference on computational natural language learning_ , pages 18–27.
  * Cyphers et al. (2018) Scott Cyphers, Arjun K Bansal, Anahita Bhiwandiwalla, Jayaram Bobba, Matthew Brookhart, Avijit Chakraborty, Will Constable, Christian Convey, Leona Cook, Omar Kanawi, et al. 2018.  Intel ngraph: An intermediate representation, compiler, and executor for deep learning.  _arXiv preprint arXiv:1801.08058_.
  * Damonte and Monti (2021) Marco Damonte and Emilio Monti. 2021.  One semantic parser to parse them all: Sequence to sequence multi-task learning on semantic parsing datasets.  _arXiv preprint arXiv:2106.04476_.
  * Dubey et al. (2019) Mohnish Dubey, Debayan Banerjee, Abdelrahman Abdelkawi, and Jens Lehmann. 2019.  Lc-quad 2.0: A large dataset for complex question answering over wikidata and dbpedia.  In _International semantic web conference_ , pages 69–78. Springer.
  * Fischer et al. (2021) Michael H Fischer, Giovanni Campagna, Euirim Choi, and Monica S Lam. 2021.  Diy assistant: a multi-modal end-user programmable virtual assistant.  In _Proceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation_ , pages 312–327.
  * Furrer et al. (2020) Daniel Furrer, Marc van Zee, Nathan Scales, and Nathanael Schärli. 2020.  Compositional generalization in semantic parsing: Pre-training vs. specialized architectures.  _arXiv preprint arXiv:2007.08970_.
  * Herzig and Berant (2019) Jonathan Herzig and Jonathan Berant. 2019.  Don’t paraphrase, detect! rapid and effective data collection for semantic parsing.  In _Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP)_ , pages 3810–3820.
  * Herzig et al. (2021) Jonathan Herzig, Peter Shaw, Ming-Wei Chang, Kelvin Guu, Panupong Pasupat, and Yuan Zhang. 2021.  Unlocking compositional generalization in pre-trained models using intermediate representations.  _arXiv preprint arXiv:2104.07478_.
  * Huang et al. (2021) Xin Huang, Jung-jae Kim, and Bowei Zou. 2021.  Unseen entity handling in complex question answering over knowledge base via language generation.  In _Findings of the Association for Computational Linguistics: EMNLP 2021_ , pages 547–557.
  * Hwang et al. (2019) Wonseok Hwang, Jinyeong Yim, Seunghyun Park, and Minjoon Seo. 2019.  A comprehensive exploration on wikisql with table-aware word contextualization.  _arXiv preprint arXiv:1902.01069_.
  * Kamath and Das (2018) Aishwarya Kamath and Rajarshi Das. 2018.  A survey on semantic parsing.  In _Automated Knowledge Base Construction (AKBC)_.
  * Keysers et al. (2019) Daniel Keysers, Nathanael Schärli, Nathan Scales, Hylke Buisman, Daniel Furrer, Sergii Kashubin, Nikola Momchev, Danila Sinopalnikov, Lukasz Stafiniak, Tibor Tihon, et al. 2019.  Measuring compositional generalization: A comprehensive method on realistic data.  _arXiv preprint arXiv:1912.09713_.
  * Kwiatkowksi et al. (2010) Tom Kwiatkowksi, Luke Zettlemoyer, Sharon Goldwater, and Mark Steedman. 2010.  Inducing probabilistic ccg grammars from logical form with higher-order unification.  In _Proceedings of the 2010 conference on empirical methods in natural language processing_ , pages 1223–1233.
  * Lattner and Adve (2004) Chris Lattner and Vikram Adve. 2004.  Llvm: A compilation framework for lifelong program analysis & transformation.  In _International Symposium on Code Generation and Optimization, 2004\. CGO 2004._ , pages 75–86. IEEE.
  * Lattner et al. (2020) Chris Lattner, Mehdi Amini, Uday Bondhugula, Albert Cohen, Andy Davis, Jacques Pienaar, River Riddle, Tatiana Shpeisman, Nicolas Vasilache, and Oleksandr Zinenko. 2020.  Mlir: A compiler infrastructure for the end of moore’s law.  _arXiv preprint arXiv:2002.11054_.
  * Lewis et al. (2020) Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Veselin Stoyanov, and Luke Zettlemoyer. 2020.  Bart: Denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension.  In _Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics_ , pages 7871–7880.
  * Li et al. (2020) Zhuang Li, Lizhen Qu, and Reza Haffari. 2020.  Context dependent semantic parsing: a survey.  In _International Conference on Computational Linguistics 2020_ , pages 2509–2521. Association for Computational Linguistics (ACL).
  * Liang (2013) Percy Liang. 2013.  Lambda dependency-based compositional semantics.  _arXiv preprint arXiv:1309.4408_.
  * Liang et al. (2013) Percy Liang, Michael I Jordan, and Dan Klein. 2013.  Learning dependency-based compositional semantics.  _Computational Linguistics_ , 39(2):389–446.
  * Ling et al. (2016) Wang Ling, Phil Blunsom, Edward Grefenstette, Karl Moritz Hermann, Tomáš Kočiskỳ, Fumin Wang, and Andrew Senior. 2016.  Latent predictor networks for code generation.  In _Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_ , pages 599–609.
  * Loshchilov and Hutter (2018) Ilya Loshchilov and Frank Hutter. 2018.  Fixing weight decay regularization in adam.
  * Marion et al. (2021) Pierre Marion, Pawel Nowak, and Francesco Piccinno. 2021.  Structured context and high-coverage grammar for conversational question answering over knowledge graphs.  In _Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing_ , pages 8813–8829.
  * Nan et al. (2020) Zifan Nan, Hui Guan, and Xipeng Shen. 2020.  Hisyn: human learning-inspired natural language programming.  In _Proceedings of the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering_ , pages 75–86.
  * Parr (2013) Terence Parr. 2013.  _The definitive ANTLR 4 reference_.  Pragmatic Bookshelf.
  * Parr and Fisher (2011) Terence Parr and Kathleen Fisher. 2011.  Ll (*) the foundation of the antlr parser generator.  _ACM Sigplan Notices_ , 46(6):425–436.
  * Pasupat and Liang (2015) Panupong Pasupat and Percy Liang. 2015.  Compositional semantic parsing on semi-structured tables.  _arXiv preprint arXiv:1508.00305_.
  * Pérez et al. (2009) Jorge Pérez, Marcelo Arenas, and Claudio Gutierrez. 2009.  Semantics and complexity of sparql.  _ACM Transactions on Database Systems (TODS)_ , 34(3):1–45.
  * Schlichtkrull et al. (2018) Michael Schlichtkrull, Thomas N Kipf, Peter Bloem, Rianne van den Berg, Ivan Titov, and Max Welling. 2018.  Modeling relational data with graph convolutional networks.  In _European semantic web conference_ , pages 593–607. Springer.
  * Seifer et al. (2019) Philipp Seifer, Johannes Härtel, Martin Leinberger, Ralf Lämmel, and Steffen Staab. 2019.  Empirical study on the usage of graph query languages in open source java projects.  In _Proceedings of the 12th ACM SIGPLAN international conference on software language engineering_ , pages 152–166.
  * Shi et al. (2021) Jiaxin Shi, Shulin Cao, Lei Hou, Juanzi Li, and Hanwang Zhang. 2021.  Transfernet: An effective and transparent framework for multi-hop question answering over relation graph.  In _Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing_ , pages 4149–4158.
  * Shin et al. (2021) Richard Shin, Christopher Lin, Sam Thomson, Charles Chen Jr, Subhro Roy, Emmanouil Antonios Platanios, Adam Pauls, Dan Klein, Jason Eisner, and Benjamin Van Durme. 2021.  Constrained language models yield few-shot semantic parsers.  In _Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing_ , pages 7699–7715.
  * Su and Yan (2017) Yu Su and Xifeng Yan. 2017.  Cross-domain semantic parsing via paraphrasing.  In _Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing_ , pages 1235–1246.
  * Sun et al. (2020) Yawei Sun, Lingling Zhang, Gong Cheng, and Yuzhong Qu. 2020.  Sparqa: skeleton-based semantic parsing for complex questions over knowledge bases.  In _Proceedings of the AAAI Conference on Artificial Intelligence_ , volume 34, pages 8952–8959.
  * Talmor and Berant (2018) Alon Talmor and Jonathan Berant. 2018.  The web as a knowledge-base for answering complex questions.  In _Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers)_ , pages 641–651.
  * Tapaswi et al. (2016) Makarand Tapaswi, Yukun Zhu, Rainer Stiefelhagen, Antonio Torralba, Raquel Urtasun, and Sanja Fidler. 2016.  Movieqa: Understanding stories in movies through question-answering.  In _Proceedings of the IEEE conference on computer vision and pattern recognition_ , pages 4631–4640.
  * Tomlin (2014) Russell S Tomlin. 2014.  _Basic Word Order (RLE Linguistics B: Grammar): Functional Principles_.  Routledge.
  * Vrandečić and Krötzsch (2014) Denny Vrandečić and Markus Krötzsch. 2014.  Wikidata: a free collaborative knowledgebase.  _Communications of the ACM_ , 57(10):78–85.
  * Wang et al. (2021) Bailin Wang, Mirella Lapata, and Ivan Titov. 2021.  Learning from executions for semantic parsing.  In _Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies_ , pages 2747–2759.
  * Wang et al. (2018) Chenglong Wang, Kedar Tatwawadi, Marc Brockschmidt, Po-Sen Huang, Yi Mao, Oleksandr Polozov, and Rishabh Singh. 2018.  Robust text-to-sql generation with execution-guided decoding.  _arXiv preprint arXiv:1807.03100_.
  * Wang et al. (2015) Yushi Wang, Jonathan Berant, and Percy Liang. 2015.  Building a semantic parser overnight.  In _Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers)_ , pages 1332–1342.
  * Wolfson et al. (2020) Tomer Wolfson, Mor Geva, Ankit Gupta, Matt Gardner, Yoav Goldberg, Daniel Deutch, and Jonathan Berant. 2020.  Break it down: A question understanding benchmark.  _Transactions of the Association for Computational Linguistics_ , 8:183–198.
  * Wu et al. (2021) Shan Wu, Bo Chen, Chunlei Xin, Xianpei Han, Le Sun, Weipeng Zhang, Jiansong Chen, Fan Yang, and Xunliang Cai. 2021.  From paraphrasing to semantic parsing: Unsupervised semantic parsing via synchronous semantic decoding.  In _Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers)_ , pages 5110–5121.
  * Xu et al. (2020) Silei Xu, Sina Semnani, Giovanni Campagna, and Monica Lam. 2020.  Autoqa: From databases to qa semantic parsers with only synthetic training data.  In _Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)_ , pages 422–434.
  * Yin and Neubig (2017) Pengcheng Yin and Graham Neubig. 2017.  A syntactic neural model for general-purpose code generation.  In _Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_ , pages 440–450.
  * Yu et al. (2020) Tao Yu, Chien-Sheng Wu, Xi Victoria Lin, Yi Chern Tan, Xinyi Yang, Dragomir Radev, Caiming Xiong, et al. 2020.  Grappa: Grammar-augmented pre-training for table semantic parsing.  In _International Conference on Learning Representations_.
  * Yu et al. (2018) Tao Yu, Rui Zhang, Kai Yang, Michihiro Yasunaga, Dongxu Wang, Zifan Li, James Ma, Irene Li, Qingning Yao, Shanelle Roman, et al. 2018.  Spider: A large-scale human-labeled dataset for complex and cross-domain semantic parsing and text-to-sql task.  In _Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing_ , pages 3911–3921.
  * Zettlemoyer and Collins (2005) Luke S Zettlemoyer and Michael Collins. 2005.  Learning to map sentences to logical form: structured classification with probabilistic categorial grammars.  In _Proceedings of the Twenty-First Conference on Uncertainty in Artificial Intelligence_ , pages 658–666.
  * Zhang et al. (2018) Yuyu Zhang, Hanjun Dai, Zornitsa Kozareva, Alexander J Smola, and Le Song. 2018\.  Variational reasoning for question answering with knowledge graph.  In _Thirty-second AAAI conference on artificial intelligence_.
  * Zhong et al. (2017) Victor Zhong, Caiming Xiong, and Richard Socher. 2017.  Seq2sql: Generating structured queries from natural language using reinforcement learning.  _arXiv preprint arXiv:1709.00103_.

Non-terminal |  Productions
---|---
$S$ |  $\rightarrow$ EntityQuery | AttributeQuery | RelationQuery | QualifierQuery | CountQuery | VerifyQuery | ValueQuery
EntityQuery |  $\rightarrow$ what is EntitySet
AttributeQuery |  $\rightarrow$ what is the attribute Attribute of EntitySet
RelationQuery |  $\rightarrow$ what is the relation from EntitySet to EntitySet
QualifierQuery |  $\rightarrow$ what is the qualifier Qualifier of EntitySet Constraint
CountQuery |  $\rightarrow$ how many EntitySet
VerifyQuery |  $\rightarrow$ whether EntitySet Constraint
ValueQuery |  $\rightarrow$ what is Value
EntitySet |  $\rightarrow$ <ES> EntitySet LOP EntitySet </ES> | <ES> EntitySet Constraint </ES> | <ES> Concept EntitySet </ES> | Concept | Entity
Constraint |  $\rightarrow$ AttributeConstraint QualifierConstraint? | RelationConstraint QualifierConstraint?
AttributeConstraint |  $\rightarrow$ whose Attribute COP Value | that have SOP Attribute
RelationConstraint |  $\rightarrow$ that Relation DIR to (COP Value)? EntitySet | that Relation DIR to SOP EntitySet
QualifierConstraint |  $\rightarrow$ Qualifier COP Value
Entity |  $\rightarrow$ <E> entity </E>
Concept |  $\rightarrow$ <C> concept </C>
Attribute |  $\rightarrow$ <A> attribute </A>
Relation |  $\rightarrow$ <R> relation </R>
Value |  $\rightarrow$ VTYPE <V> Value LOP Value | VOP of Value | Attribute of Entity | VTYPE <V> value </V>
LOP |  $\rightarrow$ and | or | not
VOP |  $\rightarrow$ sum | average | maximum | minimum
COP |  $\rightarrow$ is | is not | larger than | smaller than | at least | at most
SOP |  $\rightarrow$ largest | smallest
DIR |  $\rightarrow$ forward | backward
VTYPE |  $\rightarrow$ string | number | year | date | time

Table 7: A more complete set of GraphQ IR grammar rules that covers the common
graph query patterns. Italic words refer to the terminal symbols. For
simplicity, here we omit the special production rules for handling the corner
cases.

Figure 3: A user query in Overnight. As aforementioned in Section 3, the
neural semantic parser first translate the input utterance into the GraphQ IR.
The front-end of compiler then parses the GraphQ IR sequence into an abstract
syntax tree, which is subsequently transformed into the corresponding
$\lambda$-DCS sequence by the compiler back-end.

Figure 4: A user query in KQA Pro. Similarly, the compiler parses the
generated GraphQ IR sequence into an abstract syntax tree, then transform its
tree structure into the corresponding SPARQL sequence.


# The curvature of convex sum of metrics and applications

Leonardo F. Cavenaghi  Department of Mathematics – University of Fribourg, Ch.
du musée 23, CH-1700 Fribourg, Switzerland<EMAIL_ADDRESS><EMAIL_ADDRESS>Llohann D. Sperança  Instituto de Ciência e
Tecnologia – Unifesp, Avenida Cesare Mansueto Giulio Lattes, 1201, 12247-014,
São José dos Campos, SP, Brazil<EMAIL_ADDRESS>
###### Abstract

In this paper we explore the curvature of convex sums of Riemannian metrics
$g(t)=(1-t)g_{0}+tg_{1}$, and study whether such a deformation can increase
the curvature of an immersed totally geodesic flat tori. We obtain necessary
and sufficient conditions for $g(t)$ to have average positive $r$-order
variation ($r\geq 2)$ along the torus and apply them for paths joining $g_{0}$
to known classical deformations.

##  1 Introduction

There are only few known theorems concerning manifolds with positive sectional
curvature. For instance, in the compact setting, Synge’s Theorem asserts that:

######  Theorem 1.1 (Synge’s Theorem).

Let $(M,g)$ be a compact manifold with positive sectional curvature. Then,

  1. 1.

If $M$ is even-dimensional and orientable, then it is simply-connected,

  2. 2.

If $M$ is odd-dimensional, then it is orientable.

On the other hand, the Soul Conjecture (proved by Perelman [Per94]) implies
that every complete non-compact positively curved manifold is diffeomorphic to
the Euclidean space.

Apart from the previous obstructions theorems, there is no result
distinguishing the class of closed simply-connected manifolds with non-
negative sectional curvature from that of positive sectional curvature.
Consequently, at least in this setting, one one might expect to perform some
kind of metric deformation on a non-negatively curved manifold and obtain a
positively curved metric.

However, there is a great discrepancy between the amount of examples in these
classes (see for instance [Zil14, Zil07]) which shows that, even with the
knowledge of a reasonable large range of metric deformations, there is no
systematic way to approach the problem.

In many examples of non-negatively curved manifolds, such as $S^{n}\times
S^{m}$, the flat planes are concentrated in totally geodesic tori. Moreover,
[Wil02] presents another class of such examples that a priori do not admit
metrics of positive sectional curvature. These are particularly interesting
since they are counter-examples to the so called Deformation Conjecture:

######  Conjecture 1.2.

Suppose that $(M,g)$ is a complete manifold with non-negative sectional
curvature with a point $p\in M$ whose two-planes have positive sectional
curvature. Then $M$ carries a metric of positive sectional curvature.

In this paper we study the curvature behavior of metrics joined to $g_{0}$ in
a convex way. To motivate its aim, recall that Strake [Str87, Proposition 4.3,
p. 641] proves that no metric deformation increases the average curvature of a
totally geodesic flat tori in first order. Here we take advantage of a new (to
the author’s knowledge) formula for the curvature of a convex sum to study the
average of its higher order variations.

The idea is to search for a convex combination (on a small neighbourhood of
$g_{0}$), $g(t):=(1-t)g_{0}+tg_{1}$, such that the sectional curvature along
the torus increases in average, i.e,

$\int_{\mathbb{T}^{2}}\dfrac{d^{r}}{dt^{r}}R_{0}(X,Y,Y,X)>0,~{}r\geq 2.$ (1)

When equation (1) holds we say that $g_{0}$ has average positive $r$-order
variation.

Motivated by the fact that one can reach every other metric by a convex sum
with $g_{0}$, we give an easily computable method to verify if $g(t)$ has
average positive variation. Precisely, define

$S^{P}_{r}(X,Y):=g_{1}(P(1-P)^{r-2}\mathcal{D}_{X}X,\mathcal{D}_{Y}Y)\\\
-g_{1}(P(1-P)^{r-2}\mathcal{D}^{1}_{X}Y,\mathcal{D}^{1}_{X}Y),$ (2)

where $g_{0}(PX,Y)=g_{1}(X,Y)$ and
$\mathcal{D}_{X}Y=\nabla^{1}_{X}Y-\nabla^{0}_{X}Y$. We prove:

######  Theorem A.

Suppose that $\mathbb{T}^{2}$ is a totally geodesic flat tori in $g(t)$ and
denote by $R_{t}$ the Riemann curvature tensor of $g(t)$. Assume that
$R_{0}^{\prime}(X,Y,Y,X)=0$ for every $X,Y\in T\mathbb{T}$. Then,

$\int_{\mathbb{T}^{2}}\dfrac{d^{r}}{dt^{r}}R_{0}(X,Y,Y,X)>0\Leftrightarrow\int_{\mathbb{T}^{2}}S^{P}_{r}(X,Y)<0,~{}r\geq
2.$ (3)

The hypothesis of $R_{0}^{\prime}(X,Y,Y,X)=0$ is implied by Strake’s result
whenever the path joining the metrics is curvature non-decreasing. Therefore,
to our aims, it is a natural supposition. Our expectation is that Theorem A
might point out to metric deformations that are effective in improving the
curvature of flat planes.

We also studied condition (3) for paths joining a fixed Riemannian metric
$g_{0}$ to several of its classical deformations. Let us fix some notations,
before proceeding. Given a metric foliation $\mathcal{F}$ on $M$ we denote by
$X^{\mathcal{V}}$ the component of $X$ tangent to the leaves and by
$X^{\mathcal{H}}$ the component on the orthogonal complement. Recall that the
shape operator of a leaf is defined by
$\sigma(X^{\mathcal{V}},Y^{\mathcal{V}}):=\nabla^{\mathcal{H}}_{X^{\mathcal{V}}}Y^{\mathcal{V}}.$

The O’Neill tensor, defined as
$A_{X^{\mathcal{H}}}Y^{\mathcal{H}}=\dfrac{1}{2}[X^{\mathcal{H}},Y^{\mathcal{H}}]^{\mathcal{V}}$
has, for each fixed $X^{\mathcal{H}}$ and metric $g$, a dual,
$A^{*}_{X^{\mathcal{H}}}:\mathcal{V}\to\mathcal{H}$,

$g(A_{X^{\mathcal{H}}}Y^{\mathcal{H}},V^{\mathcal{V}})=g(A_{X^{\mathcal{H}}}V^{\mathcal{V}},y^{\mathcal{H}}).$

The metric foliation is said to be integrable if $A\equiv 0.$ In this case, if
one further assumes that $\mathcal{F}$ is regular, $M$ is topologically a
finite quotient of a product manifold. If $\sigma\equiv 0$ we say that the
foliation has totally geodesic leaves. An integrable foliation with totally
geodesic leaves is locally isometric to a product.

######  Theorem B.

Let $(M,g_{0})$ be closed Riemannian manifold and $\mathbb{T}^{2}\subset M$ an
isometrically immersed totally geodesic flat tori. For items $(ii)-(iv)$,
assume that $M$ is equipped with a metric foliation $\mathcal{F}.$ Then,

  1. $(i)$

Conformal change. If $g_{1}=e^{2h}g_{0}$ then

$\int_{\mathbb{T}^{2}}\dfrac{d^{r}}{dt^{r}}R_{0}(X,Y,Y,X)\geq 0,~{}\forall
r\geq 2.$

  2. $(ii)$

General vertical warping. Assume that $X\in\mathcal{H},Y\in\mathcal{V}$ and
consider a general vertical warping
$g_{1}=g_{0}\Big{|}_{\mathcal{H}}+e^{2f}g_{0}\Big{|}_{\mathcal{V}}$ by a
smooth basic function $f:M\to\mathbb{R}$. Then

$\int_{\mathbb{T}^{2}}\dfrac{d^{r}}{dt^{r}}R_{0}(X,Y,Y,X)>0\Leftrightarrow\int_{\mathbb{T}^{2}}e^{4f}(1-e^{2f})^{r-2}\|df(X)Y\|_{0}^{2}\neq
0,~{}\forall r>2.$

  3. $(iii)$

Canonical variation. Let $g_{s}$ be the canonical variation of $g_{0}$, i.e,
$g^{s}=g\Big{|}_{\mathcal{H}}+e^{2s}g\Big{|}_{\mathcal{V}},~{}s\in(-\infty,\infty).$
Consider $g^{s}_{t}=(1-t)g_{0}+tg_{s}$. Then

$\int_{\mathbb{T}^{2}}\dfrac{d^{r}}{dt^{r}}R^{s}_{0}(X,Y,Y,X)=0,~{}\forall
s\in(-\infty,\infty),~{}\forall r>2.$

  4. $(iv)$

Cheeger deformations. Assume that the foliation $\mathcal{F}$ is generated by
the orbits of an isometric action by a compact Lie group $G$ with a
biinvariant metric $Q$. Let $g_{s}$ be the Cheeger deformation of $g_{0}$ and
let $O$ be the orbit tensor, i.e,
$g(X^{\mathcal{V}},Y^{\mathcal{V}})=Q(OX^{\mathcal{V}},Y^{\mathcal{V}})$. Let
$g^{s}_{t}=(1-t)g_{0}+tg_{s}$ and $P_{s}=(1+sO)^{-1}$. Then

$\lim_{s\to\infty}\int_{\mathbb{T}^{2}}\dfrac{d^{r}}{dt^{r}}R_{0}(P_{s}^{-1}X,P_{s}^{-1}Y,P_{s}^{-1}Y,P_{s}^{-1}X)>0\Leftrightarrow\\\
\int_{\mathbb{T}^{2}}Q(O^{-1}(\nabla^{Q}_{OX^{\mathcal{V}}}OX^{\mathcal{V}}),\nabla^{Q}_{OY^{\mathcal{V}}}OY^{\mathcal{V}})-Q(O^{-1}(\nabla^{Q}_{OX^{\mathcal{V}}}OY^{\mathcal{V}}),\nabla^{Q}_{OX^{\mathcal{V}}}OY^{\mathcal{V}})<0,\\\
\forall r>2.$

Theorem B is particularly interesting since it is a common belief that a
metric deformation cannot remove flat planes along a totally geodesic flat
torus. However, Theorem B states that almost arbitrary conformal change and/or
general vertical warping have positive average $r$-order variation.

Therefore, in order to possibly construct a metric of positive sectional
curvature in a product manifold, we could, for instance, take a warped product
(a particular type of general vertical warping). It is worth pointing out
that, even though we were able to increase the curvature at every point in the
torus, an arbitrary general vertical warping may produce planes with negative
sectional curvature (see [Spe16], for example).

The hope, however, is that given the lack of obstructions considering simply
connected manifolds, it is possible to combine some classical deformations
subsequently and obtain metrics of positive variation along the torus that may
fix the possibly originated directions of negative sectional curvature. The
same reasoning applies to combining other different deformations.

Furthermore, it was known that Cheeger deformations do not fix curvature along
a totally geodesic tori provided one of the directions is horizontal. Item
(iv) extends this result by, somehow, replacing the Cheeger deformation with a
straight line between $g$ and $g^{\infty}$.

To compute the sectional curvature of $g(t)$, we present a new general formula
for the convex sum of metrics, simply obtained by considering the immersion

$F:(M\times M,(1-t)g_{0}\times tg_{1})\to M$ $F(x)=(x,x)$

and recognizing the shape operator associated to $F$ (see Proposition 2.2).

##  2 Any order variations of linear convex combinations of metrics

Consider two Riemannian metrics $g_{0},g_{1}$ in $M$ and denote

$g_{0}(PX,Y)=g_{1}(X,Y).$ (4)

We start with the proof the following general result:

######  Proposition 2.1.

The curvature operator $R_{t}$ associated to the convex sum
$g_{t}:=(1-t)g_{0}+tg_{1}$ is given by:

$R_{t}(X,Y,Y,X)=(1-t)R_{0}(X,Y,Y,X)+tR_{1}(X,Y,Y,X)\\\
+t(1-t)g_{1}\left(\left(1-t(1-P)\right)^{-1}\mathcal{D}_{X}X,\mathcal{D}_{Y}Y\right)\\\
-t(1-t)g_{1}\left((\left(1-t(1-P)\right)^{-1}\mathcal{D}_{X}Y,\mathcal{D}_{X}Y\right),$
(5)

where

$\displaystyle\mathcal{D}_{X}Y=\nabla^{1}_{X}Y-\nabla^{0}_{X}Y.$ (6)

We prove it by relying in a more general result about the curvature of graphs.
To understand how to relate it with Proposition 2.1, note that there is a
natural isometric immersion:

$\displaystyle F:(M,g_{t})$ $\displaystyle\to(M\times M,(1-t)g_{0}\times
tg_{1})$ $\displaystyle x$ $\displaystyle\mapsto(x,x).$

Let $f:(M,g_{0})\to(N,g_{1})$ be a smooth map and $P$ be as in (4). Define the
Hessian of $f$ at a point $p$ as the symmetric bilinear form
$\operatorname{\mathrm{d}}^{2}f:T_{p}M\times T_{p}M\to T_{f(p)}N$ defined by

$\operatorname{\mathrm{d}}^{2}f(X,Y)=\nabla^{1}_{\operatorname{\mathrm{d}}f(X)}\operatorname{\mathrm{d}}f(Y)-\operatorname{\mathrm{d}}f(\nabla^{0}_{X}Y),$

where the first term can be thought as an induced connection in the pull-back
bundle $f^{*}TN$. In particular, if $M=N$ and $f$ is the identity, we conclude
that $\operatorname{\mathrm{d}}^{2}f=\mathcal{D}$.

######  Proposition 2.2.

The shape operator $\mathrm{I\\!I}$ associated to the immersion $F$ satisfy

$\displaystyle
g_{0}{\times}g_{1}\\!\left(\operatorname{\mathrm{I\\!I}}_{(X,X)}(Y,Y),\operatorname{\mathrm{I\\!I}}_{(X^{\prime},X^{\prime})}(Y^{\prime},Y^{\prime})\right)=g_{1}\left(\left(1+P\right)^{-1}\operatorname{\mathrm{d}}^{2}f(X,Y),\operatorname{\mathrm{d}}^{2}f({X^{\prime}},{Y^{\prime}})\right).$

###  2.1 The shape operator of a convex sum

Here we aim to prove Proposition 2.2. We mostly refer to [Spe12, Chapter 6, p.
49].

Let $(M^{m},g_{M}),~{}(N^{n},g_{N})$ be Riemannian manifolds and $r:M\to N$ be
a smooth map. Denote by

$\Gamma_{r}:=\\{(p,r(p))\in M\times N\\}$

the graphic of $r$, that is a submanifold of $M\times N$.

Let $\Xi:M\to\Gamma_{r}$ be defined by

$p\mapsto(p,r(p)).$

Then it holds that $\Xi$ is an embedding whose image is $\Gamma_{r}.$
Moreover, $\Gamma_{r}$ is diffeomorphic to $M$. Indeed, such identification is
given by the map $\pi:\Gamma_{r}\to M$ defined by $(p,r(p))\mapsto p$.

Let $M=N$, $r=\mathrm{Id}_{M}$ and $f:M\to[0,1]$ be a smooth function and
consider the Riemannian metrics $(1-f)g_{M},~{}fg^{\prime}_{M}$ in $M$. Since
$\Gamma_{r}$ is a submanifold of $(M\times M,(1-f)g_{M}\times
g^{\prime}_{M}),$ it is possible to induce a Riemannian metric in $M$ via the
composition

$M\to\left(M\times M,(1-f)g_{M}+fg^{\prime}_{M}\right)\to(M,(1-f)g_{M})$
$p\mapsto\Xi(p)\mapsto\pi\circ\Xi(p)=p$

We claim that such induced metric is precisely the convex sum
$(1-f)g_{M}+fg^{\prime}_{M}.$ Indeed,

$\displaystyle\left(\pi\circ\Xi\right)^{\ast}\left((1-f)g_{M}\right)$
$\displaystyle=\Xi^{\ast}\circ\pi^{\ast}\left((1-f)g_{M}\right)$
$\displaystyle=\Xi^{\ast}\left((1-f)g_{M}\times fg_{M}^{\prime}\right)$
$\displaystyle=(1-f)g_{M}+fg_{M}^{\prime},$

where the last equality follows since $\Xi(p)=(p,p).$

Therefore, with the intention of calculate the curvature of the convex sum
$(1-f)g_{M}+fg^{\prime}_{M}$ it suffices to recognize the shape operator of
the immersion $\Gamma_{r}\hookrightarrow(M\times M,(1-f)g_{M}\times
fg^{\prime}_{M})$ being $r=\mathrm{Id}_{M}.$

We proceed with a few lemmas. The general procedure can be applied to compute
the non-reduced sectional curvature of any graphic. We however focus in the
particular case of $r=\mathrm{Id}_{M}:M\to M$ since we are mostly concerned
with the Riemannian curvature of a convex sum.

Let

$\mathrm{Id}_{M}:(M,(1-f)g_{M})\mapsto(M,fg^{\prime}_{M}).$

Note that since $g_{M}$ e $g^{\prime}_{M}$ are Riemannian metrics in $M$, then
there exists a symmetric and positive-definite tensor $P$ such that

$(1-f)g_{M}(PX,Y)=fg^{\prime}_{M}(X,Y),~{}\forall X,Y\in T_{p}M,~{}\forall
p\in M.$ (7)

######  Lemma 1.

The tangent space $T_{(p,p)}\Gamma_{\mathrm{Id}_{M}}$ and the normal space
$\nu_{(p,p)}\Gamma_{(p,p)}$to a point $(p,p)\in\Gamma_{\mathrm{Id}_{M}}$ are
identified with the tangent spaces to $(M,(1-f)g_{M})$ andto $(M,fg_{M}),$
respectively, according to the isomorphisms

$\chi:(T_{p}M,(1-f)g_{M})\to T_{(p,p)}\Gamma_{\mathrm{Id}_{M}}$
$X\mapsto(X,X)$
$\chi^{\prime}:(T_{p}M,fg^{\prime}_{M})\to\nu_{(p,p)}\Gamma_{\mathrm{Id}_{M}}$
$X\mapsto(-PX,X)$

where $P$ is given by equation (7). Moreover, the inverse

$\chi\times\chi^{\prime}(X,Y):=\chi(X)+\chi^{\prime}(Y)$

is given by

$(\chi\times\chi^{\prime})^{-1}\begin{pmatrix}X\\\
Y\end{pmatrix}=\begin{pmatrix}(1+P)^{-1}&P(1+P)^{-1}\\\
-(1+P)^{-1}&(1+P)^{-1}\end{pmatrix}\begin{pmatrix}X\\\ Y\end{pmatrix}$

###### Proof.

Note that $\chi$ is precisely the derivative of $\Xi,$ being therefore an
isomorphism. Moreover, fixed $p\in M$ and given $X\in T_{p}M,~{}Y\in
T_{\mathrm{Id}_{M}(p)}M$ we have

$\displaystyle(1-f)g_{M}\times fg^{\prime}_{M}((X,X),(-PY,Y))$
$\displaystyle=(1-f)g_{M}(X,-PY)+fg^{\prime}_{M}(X,Y)$
$\displaystyle=-(1-f)g_{M}(X,PY)+fg^{\prime}_{M}(X,Y)$
$\displaystyle=-fg^{\prime}_{M}(X,Y)+fg^{\prime}_{M}(X,Y)$ $\displaystyle=0,$

that is, the images of $\chi$ e $\chi^{\prime}$ are always orthogonal. On the
other hand, since $\chi$ ir surjective it follows that the image of
$\chi^{\prime}$ is contained in $\nu_{(p,p)}\Gamma_{\mathrm{Id}_{M}}.$ But
once $\dim M\times M=2m$ and $\dim\Gamma_{\mathrm{Id}_{M}}=m,$ it follows that
$\dim\nu_{(p,p)}\Gamma_{\mathrm{Id}_{M}}=m.$ Once $\chi^{\prime}$ is injective
the claim follows.

The final part of the statement follows via a direct computation since
$(\chi\times\chi^{\prime})$ is given by

$(\chi\times\chi^{\prime})(X,Y)=\begin{pmatrix}1&-P\\\
1&1\end{pmatrix}\begin{pmatrix}X\\\ Y\end{pmatrix}=\begin{pmatrix}X-PY\\\
X+Y\end{pmatrix}=\begin{pmatrix}X\\\ X\end{pmatrix}+\begin{pmatrix}-PY\\\
Y\end{pmatrix}.$

∎

######  Lemma 2.

Let

$\Pi:(T_{p}M,(1-f)g_{M})\times(T_{p}M,fg^{\prime}_{M})\to(T_{p}M,fg^{\prime}_{M})$

given by $\Pi(X,Y):=Y-dId_{M}(X)\in\mathrm{Id}_{M}^{\ast}(TM)$ e
$O=(1+P)^{-1}.$ Then,

$\mathrm{proj}_{\nu\Gamma_{\mathrm{Id}_{M}}}=\begin{pmatrix}\Pi\left(POX,POY\right)\\\
-\Pi\left(OX,OY\right)\end{pmatrix},$ (8)

where $\mathrm{proj}_{\nu\Gamma_{\mathrm{Id}_{M}}}$ stands for the projection
in the normal space to the graphic.

###### Proof.

Note that since $(\chi\times\chi^{\prime})^{\ast}((1-f)g_{M}\times
fg^{\prime}_{M})$ it follows that for each $p\in M,$ the tangent spaces
$(T_{p}M,(1-f)g_{M}),~{}(T_{p}M,fg_{M})$ are orthogonal (this is the content
of Lemma 1). Moreover, since
$\chi^{\prime}(\cdot)=(\chi\times\chi^{\prime})(0,\cdot)$ is an isomorphism,
the orthogonal projection in the normal space of $\Gamma_{\mathrm{Id}_{M}}$
can be written as

$\mathrm{proj}_{\nu\Gamma_{\mathrm{Id}_{M}}}(X,Y)=\chi^{\prime}\circ\mathrm{proj}_{(T_{p}M,fg^{\prime}_{M})}\circ(\chi\times\chi^{\prime}),$
(9)

where $\mathrm{proj}_{(T_{p}M,fg^{\prime}_{M})}$ denotes the orthogonal
projection (with respect to the metric $(1-f)g_{M}\times fg^{\prime}_{M}$) in
the tangent space t o $\\{p\\}\times(M,fg^{\prime}_{M}).$ In particular, it
follows that $\mathrm{proj}_{\nu\Gamma_{\mathrm{Id}_{M}}}=$

$\begin{pmatrix}0&-P\\\ 0&1\end{pmatrix}\begin{pmatrix}0&0\\\
0&1\end{pmatrix}\begin{pmatrix}(1+P)^{-1}&P(1+P)^{-1}\\\
-(1+P)^{-1}&(1+P)^{-1}\end{pmatrix}\\\ =\begin{pmatrix}0&-P\\\
0&1\end{pmatrix}\begin{pmatrix}0&0\\\ -(1+P)^{-1}&(1+P)^{-1}\end{pmatrix},$

that is,

$\mathrm{proj}_{\nu\Gamma_{\mathrm{Id}_{M}}}=\begin{pmatrix}P(1+P)^{-1}&-P(1+P)^{-1}\\\
-(1+P)^{-1}&(1+P)^{-1}\end{pmatrix}=\begin{pmatrix}PO&-PO\\\
-O&O\end{pmatrix}.$ (10)

Hence,

$\begin{pmatrix}PO&-PO\\\ -O&O\end{pmatrix}\begin{pmatrix}X\\\
Y\end{pmatrix}=\begin{pmatrix}POX-POY\\\
-OX+OY\end{pmatrix}=\begin{pmatrix}\Pi\left(POX,POY\right)\\\
-\Pi\left(OX,OY\right)\end{pmatrix},$

what finishes the proof. ∎

Considering the introduced terminology, Proposition 2.2 follows from Lemma 3.

######  Lemma 3 (The shape operator of a convex sum).

Denote by $\sigma_{\Gamma_{\mathrm{Id}_{M}}}$ the shape operator of the
graphic $\Gamma_{\mathrm{Id}_{M}}$ and define
$\operatorname{\mathrm{d}}^{2}Id_{M}(X,Y):=\nabla^{\prime}_{X}Y-\nabla_{X}Y,$
where $\nabla^{\prime}$ denotes the connection of the Riemannian metric
$fg^{\prime}_{M}$ and $\nabla$ denotes the coonection of the Riemannian metric
$(1-f)g_{M}.$ Then,

$\left((1-f)g_{M}\times
fg^{\prime}_{M}\right)\left(\sigma_{\Gamma_{\mathrm{Id}_{M}}}(\operatorname{\mathrm{d}}\Xi(X),\operatorname{\mathrm{d}}\Xi(Y)),\sigma_{\Gamma_{\mathrm{Id}_{M}}}(\operatorname{\mathrm{d}}\Xi(X^{\prime}),\operatorname{\mathrm{d}}\Xi(Y^{\prime})\right)\\\
=fg^{\prime}_{M}\left((1+P)^{-1}\operatorname{\mathrm{d}}^{2}Id_{M}(X,Y),\operatorname{\mathrm{d}}^{2}Id_{M}(X^{\prime},Y^{\prime})\right).$
(11)

###### Proof.

This result follows via a straightforward computation:

$\displaystyle\sigma_{\Gamma_{\mathrm{Id}_{M}}}(\operatorname{\mathrm{d}}\Xi(X),\operatorname{\mathrm{d}}\Xi(Y))$
$\displaystyle:=\mathrm{proj}_{\nu\Gamma_{\mathrm{Id}_{M}}}\left(\nabla_{X}Y,\nabla^{\prime}_{X}Y\right)$
$\displaystyle=\begin{pmatrix}\Pi\left(PO\nabla_{X}Y,PO\nabla^{\prime}_{X}Y\right)\\\
-\Pi\left(O\nabla_{X}Y,O\nabla^{\prime}_{X}Y\right)\end{pmatrix}$
$\displaystyle=\begin{pmatrix}PO\nabla_{X}Y-\nabla^{\prime}_{X}Y\\\
-O\nabla_{X}Y+O\nabla^{\prime}_{X}Y\end{pmatrix}$
$\displaystyle=\begin{pmatrix}POd^{2}Id_{M}(X,Y)\\\
-Od^{2}Id_{M}(X,Y)\end{pmatrix}$

Analogously,

$\sigma_{\Gamma_{\mathrm{Id}_{M}}}(\operatorname{\mathrm{d}}\Xi(X^{\prime}),\operatorname{\mathrm{d}}\Xi(Y^{\prime}))=\begin{pmatrix}PO\nabla_{X^{\prime}}Y^{\prime}-PO\nabla^{\prime}_{X^{\prime}}Y^{\prime}\\\
-O\nabla_{X^{\prime}}Y+O\nabla^{\prime}_{X^{\prime}}Y^{\prime}\end{pmatrix}=\begin{pmatrix}POd^{2}Id_{M}(X^{\prime},Y^{\prime})\\\
-Od^{2}Id_{M}(X^{\prime},Y^{\prime})\end{pmatrix}$

Hence,

$\left((1-f)g_{M}\times
fg^{\prime}_{M}\right)\left(\sigma_{\Gamma_{\mathrm{Id}_{M}}}(\operatorname{\mathrm{d}}\Xi(X),\operatorname{\mathrm{d}}\Xi(Y)),\sigma_{\Gamma_{\mathrm{Id}_{M}}}(\operatorname{\mathrm{d}}\Xi(X^{\prime}),\operatorname{\mathrm{d}}\Xi(Y^{\prime})\right)\\\
=(1-f)g_{M}\left(POd^{2}Id_{M}(X,Y),POd^{2}Id_{M}(X^{\prime},Y^{\prime})\right)\\\
+fg^{\prime}_{M}\left(Od^{2}Id_{M}(X,Y),Od^{2}Id_{M}(X^{\prime},Y^{\prime})\right)\\\
=fg^{\prime}_{M}\left(O\operatorname{\mathrm{d}}^{2}Id_{M}(X,Y),PO\operatorname{\mathrm{d}}^{2}Id_{M}(X^{\prime},Y^{\prime})\right)\\\
+fg^{\prime}_{M}\left(O\operatorname{\mathrm{d}}^{2}Id_{M}(X,Y),O\operatorname{\mathrm{d}}^{2}Id_{M}(X^{\prime},Y^{\prime})\right)\\\
fg^{\prime}_{M}\left((1+P)O\operatorname{\mathrm{d}}^{2}Id_{M}(X,Y),O\operatorname{\mathrm{d}}^{2}Id_{M}(X^{\prime},Y^{\prime})\right)=\\\
fg^{\prime}_{M}\left(\operatorname{\mathrm{d}}^{2}Id_{M}(X,Y),O\operatorname{\mathrm{d}}^{2}Id_{M}(X^{\prime},Y^{\prime})\right),$
(12)

what finishes the proof.∎

###  2.2 The curvature of a convex sum and any order variations

The proof of Proposition 2.1 follows via a straightforward application of the
Gauss–Codazzi immersion formula and Lemma 3. We proceed by expanding (5) as a
Taylor series with respect to $t$.

######  Lemma 4.

Denote by $\nabla^{t},~{}R_{t},~{}R^{\mathbb{T}}_{t}$ the Riemannian
connection and curvature of $g_{t}$ and the intrinsic curvature of
$\mathbb{T}^{2}$ with the metric induced by $g_{t}$. Denote by $\perp$ the
$g_{1}$-orthogonal projection to $T\mathbb{T}^{2}$. Then, for small $t$,

$R_{t}(X,Y,Y,X)=(1-t)R_{0}(X,Y,Y,X)+tR_{1}(X,Y,Y,X)\\\
+t\left\\{g_{1}((\nabla^{1}_{X}X)^{\perp},(\nabla^{1}_{Y}Y)^{\perp})-g_{1}((\nabla^{1}_{X}Y)^{\perp},(\nabla^{1}_{X}Y)^{\perp})\right\\}\\\
+t\left\\{g_{1}((\nabla^{1}_{X}X)^{\top},(\nabla^{1}_{Y}Y)^{\top})-g_{1}((\nabla^{1}_{X}Y)^{\top},(\nabla^{1}_{X}Y)^{\top})\right\\}\\\
-t^{2}\sum_{n=1}^{\infty}\left\\{g_{1}\left(P(t(1-P))^{n-1}\nabla^{1}_{X}X,\nabla^{1}_{Y}Y\right)-g_{1}\left(P(t(1-P))^{n-1}\nabla^{1}_{X}Y,\nabla^{1}_{X}Y\right)\right\\}.$
(13)

###### Proof.

Assume that

$\left\|t(1-P)\right\|_{\infty}<1,$

then

$\displaystyle\left(1+\dfrac{t}{1-t}P\right)^{-1}$
$\displaystyle=(1-t)\left((1-t)+tP\right)^{-1}$
$\displaystyle=(1-t)\left(1-t(1-P)\right)^{-1}$
$\displaystyle=(1-t)\sum_{n=0}^{\infty}t^{n}(1-P)^{n}$
$\displaystyle=(1-t)+(1-t)\sum_{n=1}^{\infty}t^{n}(1-P)^{n}.$ (14)

Furthermore,

$\displaystyle t(1-t)\sum_{n=1}^{\infty}t^{n}(1-P)^{n}$
$\displaystyle=\sum_{n=1}^{\infty}t^{n+1}(1-P)^{n}-\sum_{n=1}^{\infty}t^{n+2}(1-P)^{n}$
$\displaystyle=\sum_{n=1}^{\infty}t^{n+1}(1-P)^{n}-\sum_{m=2}^{\infty}t^{m+1}(1-P)^{m-1}$
(15) $\displaystyle=\sum_{n=1}^{\infty}t^{n+1}(1-P)^{n-1}[(1-P)-1]+t^{2}$
$\displaystyle=-P\sum_{n=1}^{\infty}t^{n+1}(1-P)^{n-1}+t^{2}.$ (16)

Therefore, combining equations (14) and (16) one gets

$t\left(1+\frac{t}{1-t}P\right)^{-1}=t-P\sum_{n=1}^{\infty}t^{n+1}(1-P)^{n-1}.$
(17)

Writing

$\nabla^{1}_{X}Y=\left(\nabla^{1}_{X}Y\right)^{\perp}+\left(\nabla^{1}_{X}Y\right)^{\top},$

where $\perp$ stands for the projection in the orthogonal complement to the
tangent to torus, and $\top$ stands for its orthogonal complement, both with
respect to $g_{1}$ we conclude the result. ∎

Define

$S^{P}_{r}(X,Y):=g_{1}(P(1-P)^{r-2}(\nabla^{1}_{X}X-\nabla^{0}_{X}X),\nabla^{1}_{Y}Y-\nabla^{0}_{Y}Y)\\\
-g_{1}(P(1-P)^{r-2}(\nabla^{1}_{X}Y-\nabla^{0}_{X}Y),\nabla^{1}_{X}Y-\nabla^{0}_{X}Y).$
(18)

Then, one has:

######  Theorem 2.3.

Assume that $\nabla^{0}_{X}Y=\nabla^{0}_{X}X=\nabla^{0}_{Y}Y=0$ and denote by
$\dfrac{d}{dt}\Big{|}_{t=0}R_{t}(X,Y,Y,X):=R_{0}^{\prime}(X,Y,Y,X).$ Then,

$\int_{\mathbb{T}^{2}}\dfrac{1}{\|X\wedge
Y\|_{1}^{2}}R^{\prime}_{0}(X,Y,Y,X)\\\
=\int_{\mathbb{T}^{2}}\dfrac{1}{\|X\wedge
Y\|_{1}^{2}}\left\\{g_{1}((\nabla^{1}_{X}X)^{\top},(\nabla^{1}_{Y}Y)^{\top})-g_{1}((\nabla^{1}_{X}Y)^{\top},(\nabla^{1}_{X}Y)^{\top})\right\\}.$
(19)

Moreover, if $R_{0}^{\prime}(X,Y,Y,X)=0$, then

$\int_{\mathbb{T}^{2}}\dfrac{d^{r}}{dt^{r}}R_{0}(X,Y,Y,X)>0\Leftrightarrow\int_{\mathbb{T}^{2}}S^{P}_{r}(X,Y)<0,~{}r\geq
2.$ (20)

###### Proof of Theorem 2.3.

The result is a straightforward consequence of Lemma 4.

Indeed, observe that

$R_{t}^{\prime}(X,Y,Y,X)\Big{|}_{t=0}=R_{1}(X,Y,Y,X)+g_{1}((\nabla^{1}_{X}X)^{\perp},(\nabla^{1}_{Y}Y)^{\perp})-\\\
g_{1}((\nabla^{1}_{X}Y)^{\perp},(\nabla^{1}_{X}Y)^{\perp})+g_{1}((\nabla^{1}_{X}X)^{\top},(\nabla^{1}_{Y}Y)^{\top})-g_{1}((\nabla^{1}_{X}Y)^{\top},(\nabla^{1}_{X}Y)^{\top})\\\
=K^{1}_{\mathbb{T}^{2}}\|X\wedge
Y\|_{1}^{2}+g_{1}((\nabla^{1}_{X}X)^{\top},(\nabla^{1}_{Y}Y)^{\top})-g_{1}((\nabla^{1}_{X}Y)^{\top},(\nabla^{1}_{X}Y)^{\top}).$

Now since $X,Y$ are tangent to $\mathbb{T}^{2}$, the Gauss–Bonnet Theorem
implies that

$\int_{\mathbb{T}^{2}}R_{0}^{\prime}(X,Y,Y,X)\dfrac{1}{\|X\wedge
Y\|_{1}^{2}}=\\\ \int_{\mathbb{T}^{2}}\dfrac{1}{\|X\wedge
Y\|_{1}^{2}}\left\\{g_{1}((\nabla^{1}_{X}X)^{\top},(\nabla^{1}_{Y}Y)^{\top})-g_{1}((\nabla^{1}_{X}Y)^{\top},(\nabla^{1}_{X}Y)^{\top})\right\\}.$
(21)

Condition (20) is similarly obtained from Lemma 4.∎

##  3 Curvature variations along paths joining a metric to some classical
metric deformation

In what follows we consider a closed Riemannian manifold $(M,g_{0})$ with a
totally geodesic flat torus $\mathbb{T}^{2}\subset M$. We always denote by
$\\{X,Y\\}$ vectors tangent to $\mathbb{T}^{2}.$ In addition, we shall assume
that $\nabla^{0}_{X}Y=\nabla^{0}_{X}X=\nabla^{0}_{Y}Y=0$ and that
$R^{\prime}_{0}(X,Y,Y,X)=0$.

######  Proposition 3.1 (Conformal class).

If $g_{1}=fg_{0}=e^{2h}g_{0}$ then

$\int_{\mathbb{T}^{2}}\dfrac{d^{r}}{dt^{r}}R_{0}(X,Y,Y,X)\geq 0,~{}\forall
r\geq 2.$

###### Proof.

If one assumes that there is a function $f:M\to\mathbb{R}$ such that

$g_{1}=fg_{0},$

then

$P=f.$

By writing $f=e^{2h},$ we have (see [Wal92, p. 144])

$\displaystyle\nabla^{f}_{X}Y=\mathcal{D}_{X}Y$
$\displaystyle=dh(X)Y+dh(Y)X-g_{0}(X,Y)\nabla^{0}h.$

Hence,

$\displaystyle
g_{0}(\mathcal{D}_{X}X,\mathcal{D}_{Y}Y)-\|\mathcal{D}_{X}Y\|_{g_{0}}^{2}=-2\|\nabla^{0}h^{\top}\|^{2}_{0}+\|\nabla^{0}h^{\perp}\|^{2}_{0}.$
(22)

By assuming $R_{0}^{\prime}(X,Y,Y,X)=0$ Theorem 2.3 implies that

$\int_{\mathbb{T}^{2}}\|(\nabla^{0}\sqrt{f})^{\top}\|^{2}_{0}=0,$

thus $f|_{\mathbb{T}^{2}}$ is constant. Moreover,

$\int_{\mathbb{T}^{2}}f(1-f)^{r-2}\left\\{g_{1}(\nabla^{f}_{X}X,\nabla^{f}_{Y}Y)-\|\nabla^{f}_{X}Y\|_{1}^{2}\right\\}\\\
=2c(1-c)^{r-2}\int_{\mathbb{T}^{2}}\|\nabla^{0}h^{\perp}\|_{0}^{2}\geq 0.\qed$

From now on we assume that $(M,g_{0})$ is endowed with some kind of metric
foliation $\mathcal{F}.$ Moreover, for the sake of brevity we restrict the
analysis to $r>2$ since in this cases $S^{P}_{r}$ (eq. (2)) is only described
by the vertical components of the covariant derivatives in its definition.

######  Proposition 3.2 (Canonical variation).

Let $g_{s}$ be the canonical variation of $g_{0}$. Consider
$g^{s}_{t}=(1-t)g_{0}+tg_{s}$. Then,

$\int_{\mathbb{T}^{2}}\dfrac{d^{r}}{dt^{r}}R^{s}_{0}(X,Y,Y,X)=0,~{}r\geq 2.$

###### Proof.

Recall that the canonical variation of $g_{0}$ is defined by

$g_{s}(X,Y)=g_{0}(X^{\mathcal{H}},Y^{\mathcal{H}})+e^{2s}g_{0}(X^{\mathcal{V}},Y^{\mathcal{V}}),~{}s\in(-\infty,\infty).$

Hence, $P_{s}|_{\mathcal{V}}=e^{2s}1$ and $P_{s}|_{\mathcal{H}}=1$. In
particular, $\nabla^{s}_{X}Y-\nabla^{0}_{X}Y$ is horizontal and
$(1-P)\nabla^{s}_{X}Y=(1-P)\nabla^{0}_{X}Y$. Hence,

$\displaystyle(1-P)\nabla_{X}^{s}Y=(\nabla^{0}_{X}Y)^{\mathcal{V}}.$ (23)

Indeed, this can be seen since (see [GW09, Chpater 2, p. 45–47]),

$\displaystyle\nabla^{s}_{X^{\mathcal{H}}}Y^{\mathcal{H}}$
$\displaystyle=\nabla^{0}_{X^{\mathcal{H}}}Y^{\mathcal{H}},$ (24)
$\displaystyle\nabla^{s}_{X^{\mathcal{H}}}Y^{\mathcal{V}}$
$\displaystyle=\nabla^{0}_{X^{\mathcal{H}}}Y^{\mathcal{V}}+(1-e^{2s})A^{*}_{X^{\mathcal{H}}}Y^{\mathcal{V}},$
(25) $\displaystyle\nabla^{s}_{X^{\mathcal{V}}}Y^{\mathcal{H}}$
$\displaystyle=\nabla^{0}_{Y^{\mathcal{H}}}X^{\mathcal{H}}+(1-e^{2s})A^{*}_{Y^{\mathcal{H}}}X^{\mathcal{V}},$
(26) $\displaystyle\nabla^{s}_{X^{\mathcal{V}}}Y^{\mathcal{V}}$
$\displaystyle=\nabla^{0}_{X^{\mathcal{V}}}Y^{\mathcal{V}}+(e^{2s}-1)\sigma^{0}(X^{\mathcal{V}},Y^{\mathcal{V}}).$
(27)

Therefore, one concludes that for $r>2$,

$\int_{\mathbb{T}^{2}}g_{s}(P_{s}(1-P_{s})^{r-2}\nabla^{s}_{X}X,\nabla^{s}_{Y}Y)-g_{s}(P_{s}(1-P_{s})^{r-2}\nabla^{s}_{X}Y,\nabla^{s}_{X}Y)\\\
=e^{2(r-1)s}(e^{-2s}-1)^{r-2}\left[\int_{\mathbb{T}^{2}}g_{0}\left((\nabla^{0}_{X}X)^{\mathcal{V}},(\nabla^{0}_{Y}Y)^{\mathcal{V}}\right)-\|(\nabla^{0}_{X}Y)^{\mathcal{V}}\|^{2}_{g_{0}}\right].$
(28)

Moreover, since $\nabla^{0}_{X}X=\nabla^{0}_{Y}Y=\nabla^{0}_{X}Y=0$ we
conclude the proof. ∎

######  Proposition 3.3 (General Vertical Warping).

Assume that the flat planes $\\{X,Y\\}$ concentrated in a totally geodesic
torus consists in: a horizontal vector $X$ and a vertical vector $Y$. Also
assume that $g_{f}$ is a general vertical warping of $g,$ i.e,

$g_{f}=g\Big{|}_{\mathcal{H}}+e^{2f}g\Big{|}_{\mathcal{V}},$

where $f$ is a basic function. Then,

$\int_{\mathbb{T}^{2}}\dfrac{d^{r}}{dt^{r}}R_{0}(X,Y,Y,X)>0\Leftrightarrow\int_{\mathbb{T}^{2}}e^{4f}(1-e^{2f})^{r-2}\|df(X)Y\|_{0}^{2}\neq
0,~{}\forall r\geq 2.$

######  Remark.

Note that Proposition 3.3 recovers Proposition 3.2 when the tangent vectors
$\\{X,Y\\}\subset T\mathbb{T}^{2}$ are as in it hypothesis.

###### Proof of Proposition 3.3.

Consider $g_{t}^{f}:=(1-t)g_{0}+tg_{f}.$ Then
$P_{f}X^{\mathcal{V}}=e^{2f}X^{\mathcal{V}}$ and
$(1-P_{f})^{r-2}|_{\mathcal{V}}=(1-e^{2f})^{r-2}$ and hence

$P_{f}(1-P_{f})^{r-2}|_{\mathcal{V}}=e^{2f}(1-e^{2f})^{r-2}.$

Recall that [GW09, Chapter 2, p. 45–47]

$\displaystyle\nabla^{f}_{X^{\mathcal{H}}}Y^{\mathcal{H}}$
$\displaystyle=\nabla^{0}_{X^{\mathcal{H}}}Y^{\mathcal{H}},$ (29)
$\displaystyle\nabla^{f}_{X^{\mathcal{V}}}Y^{\mathcal{H}}$
$\displaystyle=\nabla^{0}_{X^{\mathcal{V}}}Y^{\mathcal{H}}+(1-e^{2f})A^{*}_{Y^{\mathcal{H}}}X^{\mathcal{V}}+df(Y^{\mathcal{H}})X^{\mathcal{V}}$
(30) $\displaystyle\nabla^{f}_{X^{\mathcal{H}}}Y^{\mathcal{V}}$
$\displaystyle=\nabla^{0}_{X^{\mathcal{H}}}Y^{\mathcal{V}}+(1-e^{2f})A^{*}_{X^{\mathcal{H}}}Y^{\mathcal{V}}+df(X^{\mathcal{H}})Y^{\mathcal{V}}$
(31) $\displaystyle\nabla^{f}_{X^{\mathcal{V}}}Y^{\mathcal{V}}$
$\displaystyle=\nabla^{0}_{X^{\mathcal{V}}}Y^{\mathcal{V}}+(e^{2f}-1)\sigma^{0}(X^{\mathcal{V}},Y^{\mathcal{V}})-e^{2f}\langle
X^{\mathcal{V}},Y^{\mathcal{V}}\rangle_{0}\nabla^{0}f.$ (32)

Since we assume that $X=X^{\mathcal{H}}$,
$Y=Y^{\mathcal{V}},\|X\|_{0}=\|Y\|_{0}=1$; once $P_{f}|_{\mathcal{H}}=1$ we
conclude that for $r>2$

$g_{1}\left(P_{f}(1-P_{f})^{r-2}\nabla^{f}_{X}X,\nabla^{f}_{Y}Y\right)-g_{1}\left(P_{f}(1-P_{f})^{r-2}\nabla^{f}_{X}Y,\nabla^{f}_{X}Y\right)\\\
=e^{4f}(1-e^{2f})^{r-2}\left\\{g_{0}\left((\nabla^{f}_{X}X)^{\mathcal{V}},(\nabla^{f}_{Y}Y)^{\mathcal{V}}\right)-g_{0}\left((\nabla^{f}_{X}Y)^{\mathcal{V}},(\nabla^{f}_{X}Y)^{\mathcal{V}}\right)\right\\}.$
(33)

Therefore, equations (29)-(32) imply that

$g_{1}\left(P_{f}(1-P_{f})^{r-2}\nabla^{f}_{X}X,\nabla^{f}_{Y}Y\right)-g_{1}\left(P_{f}(1-P_{f})^{r-2}\nabla^{f}_{X}Y,\nabla^{f}_{X}Y\right)\\\
=e^{4f}(1-e^{2f})^{r-2}\left\\{g_{0}\left((\nabla^{0}_{X}X)^{\mathcal{V}},(\nabla^{0}_{Y}Y)^{\mathcal{V}}\right)-\left\|(\nabla^{0}_{X}Y)^{\mathcal{V}}+df(X)Y\right\|_{0}^{2}\right\\}.$
(34)

Finally, once $\nabla^{0}_{X}X=\nabla^{0}_{Y}Y=\nabla^{0}_{X}Y=0$ one gets

$\int_{\mathbb{T}^{2}}\dfrac{d^{r}}{dt^{r}}R_{0}(X,Y,Y,X)>0\Leftrightarrow\int_{\mathbb{T}^{2}}e^{4f}(1-e^{2f})^{r-2}\|df(X)Y\|_{0}^{2}\neq
0,$

concluding the proof. ∎

Next we consider the so-called Cheeger deformations. Let $(M,g_{0})$ be a
Riemannian manifold where a Lie group $G$ acts by isometries. Let $Q$ be a bi-
invariant metric on $G$ and $O$ be the orbit tensor of $g_{0}$. That is,

$g(X^{\mathcal{V}},Y^{\mathcal{V}})=Q(OX^{\mathcal{V}},Y^{\mathcal{V}}).$

The Cheeger deformation of $g_{0}$ at time $s$ is the metric $g_{s}$
satisfying

$g_{t}(X,Y)=g_{0}(P_{s}X,Y),$

where $P_{s}|_{\mathcal{H}}=1$ and $P_{s}|_{\mathcal{V}}=(1+sO)^{-1}$.

For other basics and results on Cheeger deformation, we refer to [Zil].

######  Proposition 3.4 (Cheeger deformations).

Let $g_{t}^{s}=(1-t)g_{0}+tg_{s}$. Then for any $r>2$ it holds that

$\lim_{s\to\infty}\int_{\mathbb{T}^{2}}\dfrac{d^{r}}{dt^{r}}R_{0}(P_{s}^{-1}X,P_{s}^{-1}Y,P_{s}^{-1}Y,P_{s}^{-1}X)>0\Leftrightarrow\\\
\int_{\mathbb{T}^{2}}Q(O^{-1}(\nabla^{Q}_{OX^{\mathcal{V}}}OX^{\mathcal{V}}),\nabla^{Q}_{OY^{\mathcal{V}}}OY^{\mathcal{V}})-Q(O^{-1}(\nabla^{Q}_{OX^{\mathcal{V}}}OY^{\mathcal{V}}),\nabla^{Q}_{OX^{\mathcal{V}}}OY^{\mathcal{V}})<0.$

###### Proof.

Since $P_{s}|_{\mathcal{V}}=(1+sO)^{-1}$ then

$1-P_{s}=sO(1+sO)^{-1}.$

Therefore,

$\displaystyle P^{2}_{s}(1-P_{s})^{r-2}$
$\displaystyle=(1+sO)^{-2}s^{r-2}O^{r-2}(1+sO)^{2-r}$
$\displaystyle=\dfrac{1}{s^{2}}(1/s+O)^{-2}O^{r-2}(1/s+O)^{2-r}$ (35)

and hence

$s^{2}P^{2}_{s}(1-P_{s})^{r-2}\to O^{-2}~{}\text{as $s\to\infty$}.$

On the one hand, following Müter [M8̈7], if one considers
$P_{s}^{-1}X,P_{s}^{-1}Y$, then

$\lim_{s\to\infty}g_{0}(P^{2}_{s}(1-P_{s})^{r-2}(\nabla^{s}_{P_{s}^{-1}X}P_{s}^{-1}X)^{\mathcal{V}},(\nabla^{s}_{P_{s}^{-1}Y}P_{s}^{-1}Y)^{\mathcal{V}})\\\
-g_{0}\left(P^{2}_{s}(1-P_{s})^{r-2}(\nabla^{s}_{P_{s}^{-1}X}P_{s}^{-1}Y)^{\mathcal{V}},(\nabla^{s}_{P_{s}^{-1}X}P_{s}^{-1}Y)^{\mathcal{V}}\right)\\\
=\lim_{s\to\infty}s^{2}g_{0}(O^{-2}(\nabla^{s}_{OX^{\mathcal{V}}}OX^{\mathcal{V}})^{\mathcal{V}},(\nabla^{s}_{OY^{\mathcal{V}}}OY^{\mathcal{V}})^{\mathcal{V}})\\\
-\lim_{s\to\infty}s^{2}g_{0}(O^{-2}(\nabla^{s}_{OX^{\mathcal{V}}}OY^{\mathcal{V}})^{\mathcal{V}},(\nabla^{s}_{OX^{\mathcal{V}}}OY^{\mathcal{V}})^{\mathcal{V}}).$
(36)

######  Claim.

$\lim_{s\to\infty}s^{2}\\{g_{0}(O^{-2}(\nabla^{s}_{OX^{\mathcal{V}}}OX^{\mathcal{V}})^{\mathcal{V}},(\nabla^{s}_{OY^{\mathcal{V}}}OY^{\mathcal{V}})^{\mathcal{V}})\\\
-s^{2}g_{0}(O^{-2}(\nabla^{s}_{OX^{\mathcal{V}}}OY^{\mathcal{V}})^{\mathcal{V}},(\nabla^{s}_{OX^{\mathcal{V}}}OY^{\mathcal{V}})^{\mathcal{V}})\\}\\\
=\lim_{s\to\infty}s^{2}\left\\{Q(O^{-1}(\nabla^{Q}_{OX^{\mathcal{V}}}OX^{\mathcal{V}}),\nabla^{Q}_{OY^{\mathcal{V}}}OY^{\mathcal{V}})-Q(O^{-1}(\nabla^{Q}_{OX^{\mathcal{V}}}OY^{\mathcal{V}}),\nabla^{Q}_{OX^{\mathcal{V}}}OY^{\mathcal{V}})\right\\}.$
(37)

Furthermore, if one drops $P_{s}^{-1}$ in each entry, then for $r\geq 2$

$\lim_{s\to\infty}g_{0}\left(P^{2}_{s}(1-P_{s})^{r-2}(\nabla^{s}_{X}X)^{\mathcal{V}},(\nabla^{s}_{Y}Y)^{\mathcal{V}}\right)=0.$
(38)

Therefore, for any $r>2,$

$\int_{\mathbb{T}^{2}}\dfrac{d^{r}}{dt^{r}}R_{0}(X,Y,Y,X)>0$

if, and only if,

$\int_{\mathbb{T}^{2}}Q(O^{-1}(\nabla^{Q}_{OX^{\mathcal{V}}}OX^{\mathcal{V}}),\nabla^{Q}_{OY^{\mathcal{V}}}OY^{\mathcal{V}})-Q(O^{-1}(\nabla^{Q}_{OX^{\mathcal{V}}}OY^{\mathcal{V}}),\nabla^{Q}_{OX^{\mathcal{V}}}OY^{\mathcal{V}})<0,$

what shall concludes the proof after verifying the Claim.

###### Proof of Claim.

To prove it, note that according to the Koszul formula, if
$X,Y,Z\in\mathcal{V}$, then

$2g((\tfrac{1}{s}+O)^{-1}\nabla^{s}_{X}Y,Z)=2sg(P_{s}\nabla^{s}_{X}Y,Z)=\\\
X(g(sP_{s}Y,Z))+Y(g(sP_{s}X,Z))-Z(g(sP_{s}X,Y))\\\
+g([X,Y],sP_{s}Z)-g([X,Z],sP_{s}Y)-g([Y,Z],sP_{s}X).$ (39)

Taking the limity of $s\to\infty$ on both sides of equation (39), since
$sP_{s}\to O^{-1}$ one gets

$\lim_{s\to\infty}2g(O^{-1}\nabla^{s}_{X}Y,Z)=X(g(O^{-1}Y,Z))+Y(g(O^{-1}X,Z))-Z(g(O^{-1}X,Y))\\\
+g([X,Y],O^{-1}Z)-g([X,Z],O^{-1}Y)-g([Y,Z],O^{-1}X).$ (40)

In particular, equations (35) and (40) imply the last assertion in the Claim
since equation (40) shows that the vertical component of connection
$\nabla^{s}$ restricted to vertical vectors is bounded in $s$.

More interesting, note that since $g(O^{-1}X,Y)=Q(X,Y)$, then the right-hand-
side of equation (40) is precisely $Q(\nabla^{Q}_{X}Y,Z)$, where $\nabla^{Q}$
denotes the Levi–Civita connection of $Q$. Therefore,

$\lim_{s\to\infty}\nabla^{s}_{X}Y=\nabla^{Q}_{X}Y,$

proving the Claim. ∎

∎

## Acknowledgments

The first named author was supported by the SNSF-Project 200020E_193062 and
the DFG-Priority programme SPP 2026.

## References

  * [GW09] D. Gromoll and G. Walshap.  Metric Foliations and Curvature.  Birkhäuser Verlag, Basel, 2009.
  * [M8̈7] M. Müter.  Krummüngserhöhende deformationen mittels gruppenaktionen.  PhD thesis, Westfälischen Wilhelms-Universität Münster, 1987.
  * [Per94] G. Perelman.  Proof of the soul conjecture of Cheeger and Gromoll.  J. Differential Geom., 40(1):209–212, 1994.
  * [Spe12] L. Sperança.  Geometria e Topologia de Cobordos.  PhD thesis, Universidade Estadual de Campinas, 2012.
  * [Spe16] Llohann Sperança.  On Riemannian foliations over positively curved manifolds.  arXiv:1602.01046, 2016.
  * [Str87] M. Strake.  Curvature increasing metric variations.  Mathematische Annalen, 276(4):633–641, Dec 1987.
  * [Wal92] G. Walschap.  Metric foliations and curvature.  J. Geom. Anal., 2:373–381, 1992.
  * [Wil02] B. Wilking.  Manifolds with positive sectional curvature almost everywhere.  Inventiones mathematicae, 148(1):117–141, 2002.
  * [Zil] W. Ziller.  http://www.math.upenn.edu/ wziller/research.html.
  * [Zil07] W. Ziller.  Examples of Riemannian manifolds with non-negative sectional curvature.  Surveys in differential geometry, 11:63–102, 2007.
  * [Zil14] W. Ziller.  Riemannian manifolds with positive sectional curvature.  Lecture Notes in Mathematics, 2110, 2014.