# Recursive Decoding: A Situated Cognition Approach to Compositional
Generation in Grounded Language Understanding

Matthew Setzler corresponding author<EMAIL_ADDRESS>Pacific Northwest
National Laboratory  Scott Howland  Pacific Northwest National Laboratory
Lauren Phillips  Pacific Northwest National Laboratory

###### Abstract

Compositional generalization is a troubling blind spot for neural language
models. Recent efforts have presented techniques for improving a model’s
ability to encode novel combinations of known inputs, but less work has
focused on generating novel combinations of known outputs. Here we focus on
this latter “decode-side” form of generalization in the context of gSCAN, a
synthetic benchmark for compositional generalization in grounded language
understanding. We present Recursive Decoding (RD), a novel procedure for
training and using seq2seq models, targeted towards decode-side
generalization. Rather than generating an entire output sequence in one pass,
models are trained to predict one token at a time. Inputs (i.e., the external
gSCAN environment) are then incrementally updated based on predicted tokens,
and re-encoded for the next decoder time step. RD thus decomposes a complex,
out-of-distribution sequence generation task into a series of incremental
predictions that each resemble what the model has already seen during
training. RD yields dramatic improvement on two previously neglected
generalization tasks in gSCAN. We provide analyses to elucidate these gains
over failure of a baseline, and then discuss implications for generalization
in naturalistic grounded language understanding, and seq2seq more generally.

##  1 Introduction

For many years, compositional generalization – the ability to systematically
combine known linguistic elements in novel ways – has been a “holy grail” in
NLP research. This ability comes quite naturally to human language learners,
and thus appears to be a central inductive bias of the human learning system
[9, 20, 22]. However, a range of curated datasets have revealed that standard
deep neural networks struggle to generalize compositionally to novel
utterances not seen during training [30, 17, 19].

Despite a proliferation of research investigating compositional generalization
in deep networks, relatively little attention has been paid to compositional
generalization in grounded language understanding tasks. Grounding in language
is an acknowledgement that in the real-world, language is most often used in
the context of a shared physical environment. Understanding a phrase like
“hand me the big apple on the yellow table” requires an understanding of the
visual scene in which it is uttered (i.e., where is the yellow table? which
apple is big?). Grounding is known to play an important role in human language
acquisition and may favor compositional representations [31].

One dataset which highlights the combination of grounding and composition is
gSCAN (grounded SCAN) [28], which extends the popular synthetic sequence-to-
sequence (seq2seq) benchmark, SCAN [19] to include a grid-world environment.
The model is presented with an input command (e.g., “walk to the red circle”)
and a grid world comprising an agent and various objects (e.g., red circle,
green circle) with the goal of producing an output action sequence that
completes the input command. Like SCAN, gSCAN comprises a number of carefully
curated generalization tasks which have proven difficult for baseline model
architectures [28].

Approaches to gSCAN have predominantly focused on dealing with novel
combinations of known inputs – either through encoding the grid world as a
network, composing specialized modules based in the input command, or
decoupling the subtasks of identifying a target object from that of producing
an appropriate action sequence [12, 18, 14]. These innovations have boosted
performance on a subset of tasks targeted towards encoding novel combinations
of known inputs, but have offered virtually no improvement on the remaining
tasks, underscoring the notion that different techniques may be required to
address different kinds of composition [16, 11]. In this paper we focus on two
particular tasks that have not been improved by existing efforts: “novel
direction" and “length extrapolation". In contrast to other gSCAN tasks that
previous efforts successfully improved upon, these two tasks require models to
generate output sequences that are out of distribution from those produced
during training, a challenge we refer to as decode-side generalization.

To address how seq2seq models can generalize compositionally not at the input
level, but based on the output sequence, we draw inspiration from the
embodied/situated cognition paradigm in cognitive science [6]. This paradigm
offers that cognition is seldom confined to individual brains working in
isolation. Rather, humans offload cognitive processing onto the external
world; we draw diagrams and manipulate symbolic expressions on whiteboards to
solve abstract problems, record numbers and figures on paper so we don’t have
to remember them, and use our hands to perform basic arithmetic [8, 10, 24].
In so doing, we recruit the external world in our thinking process, which
alleviates working memory and representational demands, and allows us to
incrementally reason through a problem with the help of stable (but
manipulable) representations

Inspired by the situated cognition paradigm, we introduce Recursive Decoding
(RD) – a new training and inference paradigm for supervised seq2seq which we
apply to gSCAN. Whereas the standard approach is to present an initial world-
state, and ask the model to produce an entire action sequence, in RD the model
is asked to predict a single action token at a time. Based on this predicted
action, the grid-world is then updated to an intermediate state, and given to
the model as a fresh input. Instead of formulating the entire action sequence
at once, the model is asked to do the “next best thing” to move an
intermediate world-state closer to the final solution. This allows the model
to navigate without having to “imagine” what happens as it executes a path, as
this computation is effectively offloaded to the environment.

RD dramatically improves performance on the novel direction and length
extrapolation gSCAN tasks. In our analyses, we show that these two tasks are
related and pose a unique challenge to decoders in Baseline models, which are
potentially biased by misleading surface statistics in the target sequences of
training examples. RD circumvents these biased surface statistics, and
reformulates a complex, out-of-distribution (OOD) sequence generation task
into a series of smaller predictions that resemble those seen by the model
during training. After presenting our results and analyses, we discuss
implications for naturalistic grounded language understanding tasks, and
compositional generalization more broadly. We conclude by discussing
limitations of our approach and directions for future research.

##  2 Methods

###  2.1 gSCAN Overview

gSCAN is a synthetic dataset for assessing compositional generalization in a
grounded language understanding problem [28]. The model is given two inputs: a
command – specifying a high-level directive in plain english (e.g. “push the
small red square”), and a grid-world – a 2D matrix representation comprising
an agent and various objects with different properties located at different
cells. The task of the model is to predict an action sequence that adequately
fulfills the input command given a particular grid-world. The target
vocabulary consists of the following action tokens: {walk, turn right/left,
push, pull, stay}. As this is a seq2seq task, the learning signal consists in
how well predicted action sequences correspond to ground-truth action
sequences (which we refer to as target sequences).

gSCAN comprises a number of curated data splits designed to systematically
assess different compositional generalization tasks. Here we are particularly
interested in the novel direction and length extrapolation tasks, as both
require producing OOD output sequences and have shown poor performance in all
previous works. The novel direction task requires generating output sequences
that navigate the agent Southwest, whereas in training the target object was
never Southwest of the agent’s initial position (though it was located in
every other relative direction). The length extrapolation task requires
generating output sequences that are longer than those seen in training
($n<=15$ in training, $n>15$ in length). A full description of all task splits
can be found in [28].

The dataset includes 367,933 training examples, 3,716 validation examples,
19,282 (in-distribution) test examples, and 88,642 examples in the novel
direction task-split. A separate dataset is used to train models on the length
task. This contains 180,301 training examples, 1,821 validation examples,
37,784 test examples and 198,588 length-split examples.

###  2.2 Baseline Model & Recursive Decoding

We use the same baseline model architecture and hyper-parameters reported in
[28], except we use a batch size of 512 (instead of 200) for more efficient
training. At a high-level, the model consists of an LSTM encoder for the input
command and a CNN for encoding the grid-world. The decoder is an attention-
based LSTM that attends over both command and grid-world embeddings. The
models used on the novel direction and length tasks comprise 391,500 and
535,975 parameters, respectively. Additional parameters for the latter due to
a larger CNN kernel size to accommodate the larger grid world in this task.
Models were implemented using pyTorch v1.7 [26]. Code to reproduce all
experiments will be made available upon acceptance.

The only substantial difference between baseline and RD models in our study is
in how we use the model during training and inference. Rather than predicting
a complete action sequence all at once, we instead train the model to predict
one action at a time on the basis of intermediate world-states. After each
decoding time-step, we update the world state to reflect the predicted action,
and feed this intermediate world-state to the model as a fresh input (see
Figure 1). The model re-encodes this intermediate world-state, and then makes
another prediction for the subsequent action. The input command embeddings
remain fixed across decoding time, and we allow the hidden state of the
decoder LSTM to evolve as it typically would.

As in the baseline approach, we use teacher-forcing during training, such that
predictions at each time step are conditioned on ground-truth (as opposed to
predicted) action subsequences. In RD, intermediate world states are also
updated based on the ground-truth actions during training. Note that we don’t
perform separate gradient updates after each intermediate prediction; instead
gradients are accumulated over all intermediate predictions into a single
update. During inference, we update intermediate world states based on
predicted actions, and terminate RD once the model predicts an EOS token.

Figure 1: Recursive Decoding overview. Rather than predicting a full action
sequence all at once based off an initial world-state, the model predicts one
action at a time, updates the world state accordingly, and re-encodes the
intermediate world-state as if it were a fresh input. This process is repeated
until the model predicts EOS.

Models were evaluated on a validation set (comprised of in-distribution
examples) every 1,000 training batches. For RD models, we implemented an early
stopping criteria, such that training stopped if validation loss did not
decrease within five validation checks (i.e. 5,000 training batches). We
evaluated each experimental condition with three independent training/test
runs, and report all results as averages along with standard
deviations.111Baseline models trained on a single GPU in under 24 hours, and
RD models trained on a single GPU in under 72 hours. All experiments were
executed on a single 16GB P100 GPU. We estimate that altogether 1,200 GPU-
hours were required for our experiments.

##  3 Results

Table 1 presents our results across all gSCAN tasks. The RD Random column
refers to RD model trained on a dataset where the agent’s original orientation
is randomized, as described in Section 3.1. RD dramatically improves
performance over state-of-the-art (SotA) on both novel direction and length
tasks, but offers no substantial gains in other tasks.222SotA on Yellow
Squares, Relativity, Class inference, and Adverb-to-Verb tasks was achieved by
[12]; Red Squares by [14]; Novel Direction (prior to RD) and Adverb $(k=1)$ by
[18]. The baseline model presented in [28] achieved SotA for Length task
(prior to RD).

Table 1: Recursive Decoding (RD) performance across gSCAN tasks. Compared to
state-of-the-art (SotA), RD offers substantial improvement on Novel Direction
and Length tasks.
Task | Baseline | SotA | RD | RD Random
---|---|---|---|---
Random | $97.69\pm 0.22$ | $98.6\pm 0.95$ | $99.22\pm 0.16$ | $98.39\pm 0.17$
Yellow Squares | $54.96\pm 39.39$ | $99.08\pm 0.69$ | $82.28\pm 11.50$ | $62.19\pm 24.08$
Red Squares | $23.51\pm 21.82$ | $81.07\pm 10.12$ | $56.29\pm 7.42$ | $56.52\pm 29.70$
Novel Direction | $0.00\pm 0.00$ | 5.73 | $3.11\pm 0.87$ | $\mathbf{43.60\pm 6.05}$
Relativity | $35.02\pm 2.35$ | $87.32\pm 27.38$ | $57.99\pm 7.21$ | $53.89\pm 5.39$
Class inference | $92.52\pm 6.75$ | $99.33\pm 0.46$ | $98.51\pm 0.29$ | $95.74\pm 0.75$
Adverb ($k=1$) | $0.00\pm 0.00$ | 11.94 | $0.00\pm 0.00$ | $0.00\pm 0.00$
Adverb to verb | $22.70\pm 4.59$ | $33.6\pm 20.81$ | $21.94\pm 0.15$ | $21.95\pm 0.03$
Length | $2.10\pm 0.05$ | $2.10\pm 0.05$ | $\mathbf{84.42\pm 3.24}$ | $79.27\pm 0.38$

An experimental control confirmed that the observed performance gains were due
to the procedural innovation of RD, and not a side-effect of greater training
variability introduced by the intermediate world states. We created an
“intermediate world” dataset, which had the same variability in world states
that RD models were exposed to in training (see Section 3.2 for details). When
trained on this dataset, the baseline model achieved $95\pm 0.76$% on the in-
distribution test set, but only $0.29\pm 0.23$% on the novel direction task.

In the next sections we take a deeper dive into the novel direction and length
tasks, analyze why and how the baseline model fails, and why Recursive
Decoding exhibits such dramatic performance gains.

###  3.1 Novel Direction Task

####  3.1.1 Failure Analysis of Baseline Model

The novel direction task is comprised of held-out examples where the target
object is Southwest of the agent’s position. As stated in [28], despite
achieving 0% exact match on this task, the baseline successfully attends to
the correct target cell. Moreover, as depicted in Figure 2 (leftmost plot), we
replicate the finding that in many cases the baseline predicts action
sequences that navigate the agent to the correct row or column, but never to
the correct target cell. In other words, the model is capable of moving the
agent appropriately South or West, but never appropriately Southwest.

This could be due to biased surface-statistics in training target sequences.
In the original dataset, agents are always initially facing East, so
navigating Southwest requires a particular combination of “walking” and
“(left/right) turn” actions that the model never encountered during training.
To remedy this, we created another dataset with randomized initial agent
orientations. This randomization was designed to disrupt this training set
bias because, e.g., the same action sequence can move an agent Northeast or
Southwest depending on its starting orientation.

However, when trained and evaluated on the randomized dataset, the model
achieved only $0.28\%\pm 0.11$ exact match on novel direction examples. Like
the original baseline, the agent usually navigated to the correct row or
column, but rarely the correct target cell (Figure 2, center plot). The slight
improvement over the baseline’s $0\%\pm 0.00$ performance is potentially
notable, as it suggests that mitigating surface statistics may have had some
effect on generalization for the novel direction task.

Figure 2: Recursive decoding dramatically improves performance on the novel
direction task. Heatmaps represent the relative ending position of the agent,
as predicted by the model, with respect to the target position. Color
indicates percentage of evaluated examples ending in a particular relative
position. For simplicity, this analysis was restricted to “simple walking”
examples, in which the input commands contained no adverbs and no push/pull
commands.

####  3.1.2 Recursive Decoding performance

With these results in mind, we were motivated to apply RD to the novel
direction task. Intuitively, RD seems well suited for this kind of
generalization. The baseline model already demonstrates the ability to
navigate sufficiently South or sufficiently West. Once such an intermediate
state is reached, the problem resembles an in-distribution training example.
RD capitalizes on this by re-encoding intermediate world states as fresh
inputs, which should allow the model to simply move in the single remaining
direction to reach the target.

We trained and evaluated RD models on both the original and randomized
datasets. As indicated in Table 1, the latter yielded significant performance
gains, so we focus our discussion around this latter model. RD model achieved
an exact match of 43.60%, a substantial improvement over previous SotA (5.73%
[28]).

When visualizing the predicted ending position of the agent with respect to
the target (Figure 2, rightmost plot), it becomes clear that this exact match
statistic actually underrepresents model performance, as the model correctly
navigates to the target a high percentage of the time. This discrepancy is
accounted for by non-canonical solutions produced by the RD model. There are
many valid action sequences that can correctly satisfy a given input command,
even though models are only trained and evaluated against a single, canonical
target sequence.

We evaluated non-canonical solutions on a subset of “simple walking” examples
from the novel direction task, which had no adverbs or push/pull input
commands. The simplicity of these examples allowed us to easily identify non-
canonical solutions by determining whether the ending position of the agent
matched that of the target object. When we expand our success criteria to
include non-canonical solutions, the RD model produces valid solutions for
$86.32\pm 9.00\%$ of simple walking novel direction examples (37.45% of which
were non-canonical solutions). By contrast, the random-orientation baseline
model produced virtually no non-canonical solutions (2/3 models produced 0
non-canonical solutions, and the third produced non-canonical solutions in
0.01% of simple walking examples).

As described in Appendix A, some non-canonical solutions were “error-
correcting” – during decoding, the RD model would predict an incorrect action
leading the agent in the wrong direction, but subsequently compensate for this
error by re-orienting the agent towards the target (see Figure A.1). A null
model analysis confirmed that these error correcting solutions were more
targeted than random walks terminating once the agent happened to arrive at
the target. Thus we interpret RD models’ ability to produce non-canonical
solutions as an adaptive advantage over the baseline.

###  3.2 Experimental Control for Recursive Decoding

An inevitable side-effect of Recursive Decoding is that models are exposed to
a greater variability of inputs during training, because every example
comprises a number of intermediate world-states. Thus we tested a control
condition to confirm that the observed performance gains were due to the
procedural innovation of RD, and not a side-effect of the greater variability
of inputs seen during RD training.

We created an “intermediate world” dataset comprising the range of inputs seen
by RD models during training. For each example in the original dataset (with
randomized starting orientations), we generated all intermediate world-states
corresponding to completion of each action in the target sequence. We then
packaged up each intermediate world-state with the original input command and
the corresponding target sequence, as standalone examples.

Three instances of the Baseline model were trained for 200,000 batches on this
intermediate world dataset. The baseline achieved an average exact match of
$95.06\pm 0.76\%$ on the in-distribution test set, but only $0.29\pm 0.23\%$
on the novel direction task, confirming that the reported performance gains
were genuinely due to the procedural innovation of Recursive Decoding, and not
a side-effect of greater variability of training inputs.

###  3.3 Length Extrapolation Task

Length extrapolation is another generalization task that previous approaches
to gSCAN have either ignored, or shown poor performance on (2.10% SotA [18]).
RD yielded substantial performance gains, achieving $84.42\pm 3.24\%$ exact
match. As with novel direction, there is an intuitive explanation for why RD
is so well-suited for length extrapolation. Taken as a whole, an example from
the length task is OOD in the sense that a model is required to generate a
longer action sequence than it was trained to generate. However, RD decomposes
a length example down into a series of individual predictions, which each
resemble what the model was exposed to during training.

####  3.3.1 Template Analysis of Baseline Failure

To gain better insight into why and how the baseline model fails, we examined
model outputs using a template analysis, in which we reduced predicted and
ground-truth action sequences down into high-level template patterns (see
Appendix B for complete details). To do this, we reduce duplicated actions,
e.g. “turn left, turn left" into a single “turn" action. This allowed us to
reduce all action sequences down to a small set of templates consisting of:
“walk push/pull”, “walk turn walk” and “walk turn walk push/pull”.
Additionally, we contrasted the counts of tokens in predicted versus ground-
truth sequences, and assessed whether predicted sequences navigated agents in
the correct direction. Our analysis thus decomposed performance on the length
task in terms of whether the predicted action sequence (i) had the proper
high-level structure (ii) contained the proper counts of action tokens and
(iii) navigated agents in the proper direction.

This analysis revealed that despite its low exact match rate, outputs
generated by the baseline model often had the correct high-level structure (on
72% of examples), and navigated agents in the correct direction (80%). In most
cases, the predicted outputs differed from ground-truth sequences only in that
they contained too few action tokens (e.g., the model might predict “walk walk
turn left walk” instead of “walk walk walk walk turn left walk”), which
reflects its training on shorter target sequences (see Figure B.2 for more
information).

This type of failure suggests that the baseline model may have been properly
representing the underlying structure of length task examples, but failing to
perform the internal bookkeeping necessary to track the agent’s current
position based on its previous outputs. We hypothesize that in training, the
baseline decoder was biased to not generate too many consecutive tokens of a
given type (e.g., don’t “turn right” after predicting four “walk” tokens),
resulting in an inability to generalize to longer sequences in the length
task. By contrast, RD models did not have to keep track of token-count as they
decoded, because agent position was explicitly reflected in intermediate world
states. Thus, RD models may have avoided internalizing the biased token-count
surface statistics in training examples.

####  3.3.2 Hidden-State Analysis

A hidden state analysis of the LSTM decoders in baseline and RD models was
performed to test the above hypothesis. The analysis was driven by two
questions: (1) Is time-step explicitly encoded in decoder hidden states? and
(2) How (if at all) do hidden states corresponding to early time-steps differ
from late (OOD) time-steps? We expect that baseline models will explicitly
encode time-step and that representations for early and late time-steps will
be distinct. In contrast, we hypothesize that the decoder trained using RD
will not track time-step and thus exhibit no meaningful difference in hidden
states of early versus late time-steps.

Principal Component Analysis (PCA) was performed on the set of 100-dimensional
hidden states at each decoding time-step for all length-split examples.
Dimensional reductions are shown in Figure 3. Top and lower plots depict
states for baseline and RD decoders respectively (PCA was separately performed
on hidden states of each model). We plot the first two principal components,
which accounted for 33.2% total variance in baseline hidden states, and 35.9%
of RD states. Decoding time is indicated by color. Left plots display hidden
states corresponding to early (in domain) time-steps $(t<=15)$ and right plots
display hidden states of late (OOD) time-steps $(t>15)$. Early and late time-
steps are plotted separately for visual clarity, but they share the same
components (within each model) because PCA was conducted on the joint set of
states from all time-steps.

Figure 3: Hidden states of length extrapolation examples. The top two
principal components explain 33.2% of the variance for Baseline model (top)
and 35.9% for Recursive Decoding (bottom). Decoder time-step is indicated by
color scale. Early hidden states (in-distribution, $t<=15$) are shown on the
left, and late states (out-of-distribution, $t>15$) are shown on the right.
PCA was performed over all early and late hidden states for each model.

These plots reveal two striking differences in the behavior of baseline versus
RD decoders. First, the baseline decoder appears to encode time-step, as
hidden states corresponding to the same time-step form tight clusters. In the
RD model, although it is roughly correlated, the time-steps are widely
dispersed throughout the latent space.

This observation was quantitatively verified with a probe analysis. Multi-
layer perceptrons (MLP) were trained to predict time-step from the hidden
states of each model. MLPs consisted of two linear layers; the first projected
the original hidden states down into a 50-dimensional embedding, and the
second projected them down to a single scalar which was regressed against
time-step using Mean Squared Error. Models were separately trained on baseline
and RD data for 50 epochs, with a batch size of 512. The best-performing
models predicted time-step of held-out examples to within $\pm 1$ of ground
truth 99.54% of the time for baseline model, but only 22.43% of the time for
RD model.

The second important difference is that in the baseline decoder, OOD hidden
states (Figure 3, top-right) cluster around a small region of latent space
that is distinct from the majority of in-distribution hidden states (top-left
plot). Thus, as decoding time-step increases past training distribution, the
hidden-state of baseline decoders is pushed into a restricted OOD region of
latent space from which it is unable to escape. This is consistent with recent
demonstrations that seq2seq decoders are pulled into limited “attractor”
regions of state space when forced to generate past the length of training
sequences, precluding their ability to generate meaningful continuations [25].
Conversely, in the RD decoder, hidden-states of late OOD time-steps (bottom-
right) overlap with the same region of latent space as in-distribution states
(bottom-left).

Taken together, these results provide support for our initial hypothesis.
Baseline models explicitly encode time-step as they decode, resulting in
degenerate dynamics once decoding time extends beyond the training
distribution. Conversely, RD decoders have less explicit encoding of time-
step, allowing late time-steps to be treated similarly to early time-steps.
Baseline models are required to track their previous outputs as they decode,
because they need this information to infer the current position of an agent
relative to the target object. RD appears to offload this computation to the
external environment; RD models don’t have to infer current position of an
agent because this information is explicitly encoded in intermediate world-
states.

##  4 Related Work

Since its release, there has been limited work on gSCAN. Previous approaches
have focused on changes to model architecture that support more refined
representations of input commands and world state. For instance, by modeling
objects in the grid-world as a network and leveraging message-passing to
refine grid-world embeddings [12]. Another approach employed modular networks,
composed in different arrangements as a function of the input command [18].
Lastly, [14] decomposed gSCAN down into two stages: (i) identifying the target
object and (ii) navigating to said target. As reflected in the SotA column of
Table 1, these approaches have increased performance on gSCAN tasks requiring
compositional encoding of novel inputs, but offer no substantial improvement
on the novel direction and length tasks, which require decoders to generate
OOD action sequences. This underscores the point that compositionality comes
in different forms, which are amenable to different modeling approaches [15].

RD is particularly well-suited to “decode-side” generalization, because it
recursively decomposes a complex, OOD sequence generation task down into a
series of smaller predictions that each appear in-distribution from the
perspective of the model. In this spirit, RD is closely related to the
iterative decoding methodology recently introduced by [29], who trained
transformer models to compositionally “unroll” a complex seq2seq problem into
a series of sub-steps, which are iteratively solved one at a time. The primary
difference is that RD is recursive, because the output sequence at any time-
step is composed of the current predicted token appended to the history of
predicted tokens from previous RD time-steps. RD also resembles Imitation
Learning, within the Reinforcement Learning paradigm, in that both approaches
involve predicting actions in response to evolving environmental feedback, and
learning from an “expert” canonical target sequence [1]. Here we show that the
benefits of such environmental feedback can be enjoyed in the context of
supervised seq2seq.

More broadly, RD parallels current trends in open-domain multi-hop question
answering, where the state of art has moved to iteratively querying batches of
source documents from a corpus [32, 27]. While a different domain from
grounded language understanding, this reflects an emerging recognition that a
single forward-pass is often insufficient for complex, multi-stage reasoning
or planning tasks.

##  5 Discussion

This paper presented Recursive Decoding (RD), a novel approach to seq2seq. RD
was applied to gSCAN, a grounded language compositional generalization
benchmark, and dramatically improved performance on two previously neglected
tasks: novel direction and length extrapolation. These generalization tasks
pose particular challenges, as they require generating OOD output sequences,
composed of novel combinations of in-distribution output subsequences, from
in-distribution input sequences. Whereas other approaches have focused on
modifying the training objective [21, 5], model architecture [18, 12], or data
augmentation [4, 2], we use RD to reformulate and decompose a complex sequence
generation task into a series of smaller predictions that appear in-
distribution from the perspective of the model.

We draw inspiration from situated cognition in the context of grounded
language understanding, and show that intermediate states in the external
world can be leveraged to help incrementally guide models to a correct
solution. In so doing, much of the bookkeeping that traditional models have to
do (i.e., of “imagining” an agent’s current position based on its history of
predicted actions) is offloaded onto the external environment. As observed in
Section 3.3.2, this has the additional advantage of eliminating reliance on
biased surface cues, such as token count in the length task, that otherwise
deter models from generating OOD output sequences. These benefits reaffirm
recent demonstrations that disentangling seq2seq models’ underlying task
representations from the bookkeeeping necessary to track their progress in
relation to a final solution makes them more amenable to compositional
generalization [23, 33].

Unlike gSCAN, in which the model has access to a birds-eye-view map of an
idealized environment, most naturalistic grounded language tasks entail
egocentric navigation, where agents get local visual feedback based on their
position in an external environment [3, 30]. In these cases, the benefits of
environmental offloading are baked into the problem structure and don’t need
to be explicitly engineered. While not a call to action, our results suggest
this may be advantageous for future modeling approaches.

More generally, we identify the novel direction and length extrapolation gSCAN
tasks as a particular kind of compositional generalization task that requires
generating OOD output sequences. This “decode-side” flavor of compositionality
is germane to many seq2seq tasks, including visual question
answering/automated captioning, code generation, and length extrapolation in
seeded text generation [13, 7, 25]. As we show, the difficulty presented by
such tasks can sometimes be ameliorated by reformulating the problem into a
series of incremental sub-sequence generations which resemble what models see
during training. As formulated in this paper, RD is specific to gSCAN, but in
the future this general approach could be adapted to other tasks and datasets.
The key challenge to such an adaptation would be finding (or constructing) an
analogue to the gSCAN grid world; a supplemental object whose state can be
incrementally updated on the basis of predicted outputs.

##  6 Future Directions and Limitations

The most straightforward disadvantage of RD is that it is slow; a single
example requires $n$ forward passes through the model, where $n$ is the length
of the output sequence. Future work might investigate how best to retain the
benefits of RD while increasing computational efficiency.

A second limitation of our results is that we presume the ability to update
the world state based on model actions. While this might be trivial for gSCAN
because of its limited nature, more complex tasks might not support oracle
predictions of world state. In such a scenario, the model would need to be
updated either to generate its own world state predictions or to operate over
uncertain or noisy states.

## References

  * [1] Pieter Abbeel and Andrew Y Ng.  Apprenticeship learning via inverse reinforcement learning.  In Proceedings of the twenty-first international conference on Machine learning, page 1, 2004.
  * [2] Ekin Akyürek, Afra Feyza Akyürek, and Jacob Andreas.  Learning to recombine and resample data for compositional generalization.  arXiv preprint arXiv:2010.03706, 2020.
  * [3] Peter Anderson, Qi Wu, Damien Teney, Jake Bruce, Mark Johnson, Niko Sünderhauf, Ian Reid, Stephen Gould, and Anton Van Den Hengel.  Vision-and-language navigation: Interpreting visually-grounded navigation instructions in real environments.  In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3674–3683, 2018.
  * [4] Jacob Andreas.  Good-enough compositional data augmentation.  arXiv preprint arXiv:1904.09545, 2019.
  * [5] Joris Baan, Jana Leible, Mitja Nikolaus, David Rau, Dennis Ulmer, Tim Baumgärtner, Dieuwke Hupkes, and Elia Bruni.  On the realization of compositionality in neural networks.  arXiv preprint arXiv:1906.01634, 2019.
  * [6] Paco Calvo and Toni Gomila.  Handbook of cognitive science: An embodied approach.  Elsevier, 2008.
  * [7] Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, et al.  Evaluating large language models trained on code.  arXiv preprint arXiv:2107.03374, 2021.
  * [8] Hillel J Chiel and Randall D Beer.  The brain has a body: adaptive behavior emerges from interactions of nervous system, body and environment.  Trends in neurosciences, 20(12):553–557, 1997.
  * [9] Noam Chomsky.  Syntactic structures.  De Gruyter Mouton, 2009.
  * [10] Andy Clark and David Chalmers.  The extended mind.  analysis, 58(1):7–19, 1998.
  * [11] Verna Dankers, Elia Bruni, and Dieuwke Hupkes.  The paradox of the compositionality of natural language: a neural machine translation case study.  arXiv preprint arXiv:2108.05885, 2021.
  * [12] Tong Gao, Qi Huang, and Raymond J Mooney.  Systematic generalization on gscan with language conditioned embedding.  arXiv preprint arXiv:2009.05552, 2020.
  * [13] Yash Goyal, Tejas Khot, Douglas Summers-Stay, Dhruv Batra, and Devi Parikh.  Making the v in vqa matter: Elevating the role of image understanding in visual question answering.  In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6904–6913, 2017.
  * [14] Christina Heinze-Deml and Diane Bouchacourt.  Think before you act: A simple baseline for compositional generalization.  arXiv preprint arXiv:2009.13962, 2020.
  * [15] Dieuwke Hupkes, Verna Dankers, Mathijs Mul, and Elia Bruni.  Compositionality decomposed: how do neural networks generalise?  Journal of Artificial Intelligence Research, 67:757–795, 2020.
  * [16] Hans Kamp and Barbara Partee.  Prototype theory and compositionality.  Cognition, 57(2):129–191, 1995.
  * [17] Najoung Kim and Tal Linzen.  Cogs: A compositional generalization challenge based on semantic interpretation.  arXiv preprint arXiv:2010.05465, 2020.
  * [18] Yen-Ling Kuo, Boris Katz, and Andrei Barbu.  Compositional networks enable systematic generalization for grounded language understanding.  arXiv preprint arXiv:2008.02742, 2020.
  * [19] Brenden Lake and Marco Baroni.  Generalization without systematicity: On the compositional skills of sequence-to-sequence recurrent networks.  In International conference on machine learning, pages 2873–2882. PMLR, 2018.
  * [20] Brenden M Lake.  Towards more human-like concept learning in machines: Compositionality, causality, and learning-to-learn.  PhD thesis, Massachusetts Institute of Technology, 2014.
  * [21] Brenden M Lake.  Compositional generalization through meta sequence-to-sequence learning.  arXiv preprint arXiv:1906.05381, 2019.
  * [22] Brenden M Lake, Tal Linzen, and Marco Baroni.  Human few-shot learning of compositional instructions.  arXiv preprint arXiv:1901.04587, 2019.
  * [23] Chih-Yao Ma, Jiasen Lu, Zuxuan Wu, Ghassan AlRegib, Zsolt Kira, Richard Socher, and Caiming Xiong.  Self-monitoring navigation agent via auxiliary progress estimation.  arXiv preprint arXiv:1901.03035, 2019.
  * [24] Tyler Marghetis, David Landy, and Robert L Goldstone.  Mastering algebra retrains the visual system to perceive hierarchical structure in equations.  Cognitive research: principles and implications, 1(1):1–10, 2016\.
  * [25] Benjamin Newman, John Hewitt, Percy Liang, and Christopher D Manning.  The eos decision and length extrapolation.  arXiv preprint arXiv:2010.07174, 2020.
  * [26] Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala.  Pytorch: An imperative style, high-performance deep learning library.  In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems 32, pages 8024–8035. Curran Associates, Inc., 2019.
  * [27] Peng Qi, Haejun Lee, Oghenetegiri Sido, and Christopher D Manning.  Retrieve, rerank, read, then iterate: Answering open-domain questions of arbitrary complexity from text.  arXiv e-prints, pages arXiv–2010, 2020.
  * [28] Laura Ruis, Jacob Andreas, Marco Baroni, Diane Bouchacourt, and Brenden M Lake.  A benchmark for systematic generalization in grounded language understanding.  arXiv preprint arXiv:2003.05161, 2020.
  * [29] Luana Ruiz, Joshua Ainslie, and Santiago Ontañón.  Iterative decoding for compositional generalization in transformers.  arXiv preprint arXiv:2110.04169, 2021.
  * [30] Mohit Shridhar, Jesse Thomason, Daniel Gordon, Yonatan Bisk, Winson Han, Roozbeh Mottaghi, Luke Zettlemoyer, and Dieter Fox.  Alfred: A benchmark for interpreting grounded instructions for everyday tasks.  In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 10740–10749, 2020.
  * [31] Linda Smith and Michael Gasser.  The development of embodied cognition: Six lessons from babies.  Artificial life, 11(1-2):13–29, 2005.
  * [32] Wenhan Xiong, Xiang Lorraine Li, Srini Iyer, Jingfei Du, Patrick Lewis, William Yang Wang, Yashar Mehdad, Wen-tau Yih, Sebastian Riedel, Douwe Kiela, et al.  Answering complex open-domain questions with multi-hop dense retrieval.  arXiv preprint arXiv:2009.12756, 2020.
  * [33] Hao Zheng and Mirella Lapata.  Disentangled sequence to sequence learning for compositional generalization.  arXiv preprint arXiv:2110.04655, 2021.

##  Appendix A Non-Canonical Solutions to Novel Direction task

The difference between canonical and non-canonical solutions was often
arbitrary (e.g., two right turns instead of two left turns). However, some
non-canonical solutions were “error correcting” – during decoding, RD models
would predict an incorrect action that would lead the agent in the wrong
direction, but subsequently compensate for this error by reversing the
direction of the agent back towards the target object. An example of such an
error-correcting solution is shown in Figure A.1. Red arrows depict the non-
canonical solution produced by an RD model, and blue arrows depict the
canonical action sequence.

We constructed a simple null model to ensure that non-canonical solutions to
novel direction examples produced by the RD model were more targeted than
trivial random walks terminating whenever agents coincided with the target.
The null model randomly predicted “walk”, “turn left” or “turn right” at each
time step with uniform probability, and action sequences terminated whenever
the agent reached the target cell. This was evaluated on all “simple walking”
examples in the novel direction data split.

We compared the lengths of RD-predicted non-canonical sequences to random walk
sequences (generated by the null model), with the rationale that RD sequences
should be shorter if the RD model was genuinely making sense of these
examples. Indeed, we found that RD-predicted non-canonical solutions were
significantly shorter than those produced by the null model (paired t(3238) =
-55.63, $p<0.001$). Compared to canonical target sequences, RD-predicted non-
canonical sequences were within 5 tokens of target length on average (25% were
within one token and 50% were within 4 tokens), whereas random walk sequences
were 250 tokens longer than target sequences on average (25% were within 79
and 50% were within 176).

Figure A.1: Error-correcting solution generated by the Recursive Decoding
model. Predicted action sequence is shown in red, and the canonical path is
shown in blue. The model initially misleads the agent in the wrong direction,
but subsequently compensates for this error by re-orienting the agent back
towards the target object.

##  Appendix B Template Analysis for Length Task

We performed a “template analysis” to better understand how and why the
baseline model failed on the length task. In this analysis, predicted and
target action sequences were reduced down to high-level template patterns. For
example, the action sequence “walk walk walk turn right walk walk pull pull
pull” would be reduced to “walk turn walk pull”. This allowed us to go beyond
exact match accuracy, and evaluate whether the predicted action sequence had
the proper high-level structure.

We also recorded the count of consecutive actions of a given type in a
separate data structure (e.g. “walk walk walk turn turn” would be converted to
$[3\times walk,2\times turn]$). This allowed us to assess how the counts of
predicted actions compared to the ground truth. Lastly, we assessed whether
predicted action sequences navigated agents in the proper direction (i.e.,
towards the target object). Our analysis thus decomposed performance on the
length task in terms of whether the predicted action sequence (1) had the
proper high-level structure (2) contained the proper counts of action tokens
and (3) navigated agents in the proper direction.

Steps for reducing an action sequence down into a template are as follows:

  1. 1.

Strip all initial turn actions.

  2. 2.

Substitute all remaining “turn left” and “turn right” cmds with “turn”, and
all “push” and “pull” commands to “push/pull”.

  3. 3.

Condense all consecutive action tokens of same type to a single token (e.g.
“walk walk walk turn turn” $\rightarrow[walk,turn]$)

  4. 4.

Record the number of consecutive action types in a separate data structure
(e.g. “walk walk walk turn turn” $\rightarrow[3\times walk,2\times turn]$).

Our analysis revealed that all output sequences within the length
training/test sets can be categorized into a small number of templates. Figure
B.1 displays the distributions of target sequence (i.e., ground-truth)
templates in the training set (top left) and length-split (bottom left), as
well as predicted templates for the length-split (right). This illustrates
that target sequences in training versus length splits are drawn from
different template distributions, and baseline predictions are a sort of
compromise between the two.

Figure B.1: Distributions of action sequence templates for in-distribution
targets (top), length-split targets (middle) and length-split predictions
(bottom). All model predictions correspond to well-formed templates, and the
distribution of predicted templates is a sort of comprise between the ground-
truth template distributions of length and in-distribution data splits. Figure
B.2: Baseline model predicts too few tokens. Token count distributions show
the difference in counts of predicted versus ground truth action tokens, by
template-index. Positive values indicate higher action-counts in target
sequence relative to predicted sequences. Horizontal lines depict means.
Distributions are plotted separately for each template (i.e., top plot is
“walk push/pull” template, middle is “walk turn walk”, bottom is “walk turn
walk push/pull”). Only examples where the model predicted the correct template
are included.

Overall, the baseline model predicted the correct template on 72% of all
length-split examples, and navigated to the proper direction 80% of the time
(it produced the proper template and navigated in the proper direction on 65%
of the examples). Thus, despite its poor performance in terms of exact match,
the model often produces well-formed outputs in the Length task, that match
the high-level structure of target solutions.

Given this disparity between template and exact match, we analyzed model
failure in terms of action token counts in predicted versus target sequences.
We examined all examples where the model predicted the correct template,
grouped them by template-type, and compared the relative counts in target
versus predicted sequences at each template index. Distributions of these
relative counts are plotted in Figure B.2, where positive values indicate that
the model predicted too few actions (middle horizontal line denotes average).

Figure B.2 illustrates a few important points. First, models typically produce
too few $walk$ and $push/pull$ actions, but the correct number of $turn$
actions. This makes sense because turns only ever appear at most two times
consecutively in target sequences, to re-orient an agent 180 degrees. Second,
although in aggregate the model exhibits a bias towards producing too few
actions, there are substantial modes around zero, indicating that in many
examples the model does indeed predict the correct (or close to the correct)
number of actions.


# First integrals for Finsler metrics with vanishing $\chi$-curvature

Ioan Bucataru  Faculty of Mathematics
Alexandru Ioan Cuza University
Iaşi, Romania<EMAIL_ADDRESS>http://orcid.org/0000-0002-8506-7567 ,  Oana
Constantinescu  Faculty of Mathematics
Alexandru Ioan Cuza University
Iaşi, Romania<EMAIL_ADDRESS>http://orcid.org/0000-0003-2687-2029 and
Georgeta Creţu  Department of Mathematics
Gheorghe Asachi Technical University
Iaşi, Romania<EMAIL_ADDRESS>http://orcid.org/0000-0003-4197-0268

###### Abstract.

We prove that in a Finsler manifold with vanishing $\chi$-curvature (in
particular with constant flag curvature) some non-Riemannian geometric
structures are geodesically invariant and hence they induce a set of non-
Riemannian first integrals. Two alternative expressions of these first
integrals can be obtained either in terms of the mean Berwald curvature, or as
functions of the mean Cartan torsion and the mean Landsberg curvature.

###### Key words and phrases:

Cartan torsion, Berwald curvature, $\chi$-curvature, first integral

###### 2000 Mathematics Subject Classification:

53C60, 53B40, 53D25, 70H06

##  1\. Introduction.

An important geometric structure that encodes informations about the non-
Riemannian, Finslerian setting is given by the (mean) Cartan torsion. This
structure has been used intensively to prove rigidity results in Finsler
geometry, first by Akbar-Zadeh in [2], and very recently by Álvarez-Paiva in
[1].

Another important non-Riemannian quantity in Finsler geometry is the so-called
$\chi$-curvature, which has been introduced by Shen in [19]. Sprays with
vanishing $\chi$-curvature were studied in a recent paper [20] by Shen. In
Lemmas 3.1 and 3.2 we show that Finsler metrics with vanishing
$\chi$-curvature have some geodesically invariant structures: the mean Berwald
curvature and a $1$-form $\alpha$ that depends on the mean Cartan torsion and
the mean Landsberg curvature. We use these geodesically invariant structures
to construct geodesically invariant functions and hence first integrals. One
of these first integrals has been obtained previously in [7, (1.1)] and it
reduces to the first integral obtained by Foulon and Ruggiero for $k$-basic
Finsler surfaces in [10]. The fact that the $\chi$-curvature can be expressed
in terms of the mean Cartan torsion is a key aspect for obtaining rigidity
results in Finsler geometry.

In this work we provide two alternative expressions for a set of $(n-1)$ non-
Riemannian first integrals for Finsler metrics of vanishing $\chi$-curvature,
in particular for Finsler metrics of constant flag curvature.

We fix our framework by considering a smooth $n$-dimensional manifold $M$,
with $n\geq 2$, and $TM$ its tangent bundle. A _Finsler structure_ is given by
a function $F:TM\to[0,+\infty)$ that is continuous, positively $1$-homogeneous
in the fiber coordinates, smooth on $T_{0}M=TM\setminus\\{0\\}$, and whose
metric tensor:

(1.1) $\displaystyle g_{ij}(x,y)=\frac{1}{2}\frac{\partial^{2}F^{2}}{\partial
y^{i}\partial y^{j}}(x,y)$

is non-degenerate on $T_{0}M$. Here $(x,y)\in TM$, with $x\in M$ and $y\in
T_{x}M$.

On a Finsler manifold $(M,F)$, we consider $B^{k}_{ijl}$ the Berwald
curvature, its mean Berwald curvature $E_{ij}=\frac{1}{2}B^{k}_{ijk}$, given
by (2.6), and the $0$-homogeneous, $(1,1)$-type tensor:

(1.2) $\displaystyle\mathcal{E}^{i}_{j}=2Fg^{ik}E_{kj}.$

On a Finsler manifold $(M,F)$, the Finsler structure $F$ and the contravariant
metric tensor $g^{ik}$ are covariant constant along the geodesic flow.
Therefore, the tensor (1.2) and all its geometric invariants will be constant
along the geodesic flow if the mean Berwald curvature will also have this
property.

For the $(1,1)$-type tensor (1.2), we consider its characteristic polynomial

(1.3) $\displaystyle
P(\Lambda)=\det\left(\mathcal{E}^{i}_{j}+\Lambda\delta^{i}_{j}\right)=\sum_{a=0}^{n}g_{a}\Lambda^{n-a}=\Lambda^{n}+g_{1}\Lambda^{n-1}+\cdots+g_{n-1}\Lambda.$

Since $E_{ij}y^{j}=0$, see [18, (6.11)], it follows
$\mathcal{E}^{i}_{j}y^{j}=0$ and hence
$\det\left(\mathcal{E}^{i}_{j}\right)=0$. Therefore, $P(\Lambda)$ has no free
term, $g_{n}=0$, the leading terms is $g_{0}=1$ and the other coefficients
$g_{a}$, $a\in\\{1,2...,n-1\\}$, are $0$-homogeneous functions.

We formulate now the main theorem of our work.

######  Theorem 1.1.

For a Finsler metric of vanishing $\chi$-curvature, the following $n-1$,
$0$-homogeneous functions:

(1.4) $\displaystyle f_{a}=\operatorname{Tr}\left(\mathcal{E}^{a}\right),\quad
a\in\\{1,2,...,n-1\\},$

and the coefficients functions $g_{a}$ of the characteristic polynomial (1.3)
are first integrals for the geodesic spray $G$, which means that $G(f_{a})=0$
and $G(g_{a})=0$.

In formula (1.4), $\operatorname{Tr}$ is the semi-basic trace, [23], for the
$a$-th power of the tensor (1.2). The two sets of first integrals
$\\{f_{1},...,f_{n-1}\\}$ and $\\{g_{1},...,g_{n-1}\\}$ are related by
Newton’s identities (3.6).

An important class of Finsler metrics having the first integrals (1.4) is
given by Finsler metrics of constant flag curvature, see Corollary 4.1.

Using the expression (4.1) of the mean Berwald curvature in terms of the mean
Cartan torsion and the mean Landsberg curvature, [18, (6.38)], we can
reformulate the expression of the tensor (1.2) and hence of the first
integrals (1.4) in terms of the mean Cartan torsion and the mean Landsberg
curvature, see (4.1) and (4.2). In the $2$-dimensional case, the function
$f_{1}$ becomes a function of the Cartan scalar and the Landsberg scalar, it
was known from Berwald, [3, (8.7)], and it is the first integral obtained by
Foulon and Ruggiero in [10, Theorem B].

We provide two proofs for the Theorem 1.1. For the first proof, where we show
that the functions $f_{a}$ are first integrals, the key aspect that we will
use relies on the fact that for a Finsler metric of vanishing
$\chi$-curvature, the mean Berwald curvature is covariant constant along the
geodesic flow (its dynamical covariant derivative vanishes). Therefore, the
tensor (1.2) and all its powers are covariant constant and consequently the
functions (1.4) are first integrals.

We will prove a more general result in Lemma 3.1, by providing necessary and
sufficient conditions for $\nabla E_{ij}=0$. One of these conditions can be
expressed in terms of the $\chi$-curvature and was obtained by Li and Shen in
[14, Theorem 1.2].

For the second proof of the Theorem 1.1, where we show that the functions
$g_{a}$ are first integrals, we will use a $1$-form $\alpha$, (3.2), which is
geodesically invariant (it is a dynamical symmetry) if and only if the Finsler
metric has vanishing $\chi$-curvature, see Lemma 3.2. The $1$-form $\alpha$
depends on the mean Cartan torsion and the mean Landsberg curvature and can be
used to provide rigidity results in Finsler geometry. For a $k$-basic Finsler
surfaces, this $1$-form has been introduced by Foulon and Ruggiero and it is
invariant by the geodesic flow, [10, Lemma 2.2]. Using similar techniques
developed in [4], we will use the $0$-homogeneous $1$-form $\alpha$ to
construct a set of $(2n-1)$-forms $\Omega_{a}$, $a\in\\{1,...,n\\}$, on the
projective sphere bundle $SM$. These $(2n-1)$-forms are geodesically invariant
and hence their proportionality factors $g_{a}$, which are also the
coefficients of the characteristic polynomial (1.3), are first integrals if
the the $\chi$-curvature vanishes.

The second proof of Theorem 1.1 has been inspired from the techniques that
were used in [4] to obtain a set of first integrals for geodesically
equivalent Finsler metrics. For projectively equivalent Riemannian or
Finslerian metrics there are various methods that can be used to obtain first
integrals, see [16, 17, 22].

##  2\. Finsler metrics and induced geometric structures.

For a Finsler manifold $(M,F)$, the metric tensor (1.1) and its regularity
condition can be expressed in terms of the angular metric $h_{ij}$:

$\displaystyle g_{ij}=h_{ij}+\frac{\partial F}{\partial y^{i}}\frac{\partial
F}{\partial y^{j}}=h_{ij}+F_{y^{i}}F_{y^{j}},\quad
h_{ij}=F\frac{\partial^{2}F}{\partial y^{i}\partial y^{j}}=FF_{y^{i}y^{j}}.$

The metric tensor $g_{ij}$ is non-degenerate if and only if the angular metric
$h_{ij}$ has rank $n-1$.

For a Finsler manifold $(M,F)$, its geometric setting can be derived from its
geodesic spray $G\in\mathfrak{X}(T_{0}M)$. The spray $G$ is uniquely
determined by the Euler-Lagrange equation:

(2.1) $\displaystyle\mathcal{L}_{G}d_{J}F^{2}-dF^{2}=0.$

Here $J=\frac{\partial}{\partial y^{i}}\otimes dx^{i}$ is the tangent
structure (vertical endomorphism), $d_{J}$ is the induced derivation of degree
$1$ and $\mathcal{L}_{G}$ is the Lie derivative with respect to the geodesic
spray $G$. Throughout this work we will use the Frölicher-Nijenhuis theory of
derivations to describe the geometric setting on a Finsler manifold [8, 11,
12, 21, 23].

The geodesic spray $G$ is positively $2$-homogeneous, which means that it
satisfies $[\mathcal{C},G]=S$, for $\mathcal{C}=y^{i}\frac{\partial}{\partial
y^{i}}$ the Liouvile (dilation) vector field. Locally, the spray $G$ can be
expressed as:

$\displaystyle G=y^{i}\frac{\partial}{\partial
x^{i}}-2G^{i}(x,y)\frac{\partial}{\partial y^{i}},$

where the $2$-homogeneous functions $G^{i}$ can be deduced from the Euler-
Lagrange equations (2.1), and they are given by:

(2.2) $\displaystyle
G^{i}(x,y)=\frac{1}{4}g^{ij}(x,y)\left(\frac{\partial^{2}F^{2}}{\partial
y^{j}\partial x^{k}}(x,y)y^{k}-\frac{\partial F^{2}}{\partial
x^{j}}(x,y)\right).$

The spray $G$ induces a nonlinear connection (horizontal distribution) on
$T_{0}M$, with the horizontal and vertical projectors given by [11]:

$\displaystyle h=\frac{1}{2}\left(\operatorname{Id}-[G,J]\right),\quad
v=\frac{1}{2}\left(\operatorname{Id}+[G,J]\right).$

Locally, the two projectors can be expressed as follows:

$\displaystyle h=\frac{\delta}{\delta x^{i}}\otimes dx^{i},\
v=\frac{\partial}{\partial y^{i}}\otimes\delta y^{i},\textrm{ \ where \
}\frac{\delta}{\delta x^{i}}=\frac{\partial}{\partial
x^{i}}-N^{j}_{i}\frac{\partial}{\partial y^{j}},\ \delta
y^{i}=dy^{i}+N^{i}_{j}dx^{j},\ N^{j}_{i}=\frac{\partial G^{j}}{\partial
y^{i}}.$

The local frame $\\{\frac{\delta}{\delta x^{i}},\frac{\partial}{\partial
y^{i}}\\}$ is adapted to the horizontal and vertical distributions. The
geodesic spray $G$ of a Finsler metric $F$ is a horizontal vector field, which
means that $hG=G=y^{i}\frac{\delta}{\delta x^{i}}$.

From the Euler-Lagrange equations (2.1) we obtain that the Finsler metric $F$
is geodesically invariant, $G(F)=0$, and $d_{h}F=0$, which means:

$\displaystyle dF=d_{v}F=\frac{\partial F}{\partial y^{i}}\delta y^{i}.$

For a Finsler manifold $(M,F)$, we consider the projective sphere bundle
$SM=T_{0}M/\mathbb{R}_{+}$ that can be identified with the indicatrix bundle
$IM=F^{-1}\\{1\\}$. The Hilbert $1$ and $2$-forms:

$\displaystyle d_{J}F=\frac{\partial F}{\partial y^{i}}dx^{i},\quad
dd_{J}F=\frac{1}{F}h_{ij}\delta y^{i}\wedge dx^{j}$

can be restricted to the sphere bundle $SM$, $d_{J}F\in\Lambda^{1}(SM)$,
$dd_{J}F\in\Lambda^{2}(SM)$, since they are $0$-homogeneous,
$i_{\mathcal{C}}d_{J}F=0$ and $i_{\mathcal{C}}dd_{J}F=0$. Moreover,

$\displaystyle\operatorname{rank}(dd_{J}F)=2\operatorname{rank}(h_{ij})=2(n-1).$

The regularity condition of a Finsler metric $F$ ensures that its Hilbert
$1$-form is a contact structure on $SM$, which means that
$d_{J}F\wedge\left(dd_{J}F\right)^{(n-1)}\neq 0$. Therefore, a Finsler metric
induces a canonical volume form on $SM$:

(2.3)
$\displaystyle\Omega_{F}=\frac{(-1)^{(n-1)(n-2)/2}}{(n-1)!}d_{J}F\wedge\left(dd_{J}F\right)^{(n-1)}\in\Lambda^{2n-1}(SM).$

The regularity condition of a Finsler metric $F$ ensures also that the
following $2$-form is a symplectic form on $T_{0}M$:

(2.4) $\displaystyle\frac{1}{2}dd_{J}F^{2}=g_{ij}\delta y^{i}\wedge
dx^{j}=Fdd_{J}F+dF\wedge d_{J}F=Fdd_{J}F+d_{v}F\wedge d_{J}F.$

The symplectic form (2.4) induces a canonical volume form on $T_{0}M$:

(2.5)
$\displaystyle\Omega^{\prime}_{F}=\frac{(-1)^{n(n+1)/2}}{n!}\left(\frac{1}{2}dd_{J}F^{2}\right)^{(n)}=\det
g\ dx\wedge dy\in\Lambda^{2n}(T_{0}M).$

Using formulae (2.3), (2.4) and (2.5), we have that the two volume forms
$\Omega_{F}\in\Lambda^{2n-1}(SM)$ and
$\Omega^{\prime}_{F}\in\Lambda^{2n}(T_{0}M)$ are related by:

$\displaystyle\Omega^{\prime}_{F}=(-1)^{n-1}F^{n-1}dF\wedge\Omega_{F}=(-1)^{n-1}F^{n-1}d_{v}F\wedge\Omega_{F},\quad\Omega_{F}=\frac{(-1)^{n-1}}{F^{n}}i_{\mathcal{C}}\Omega^{\prime}_{F}.$

Among the many curvature tensors that exist in Finsler geometry, we recall
first the Jacobi endomorphism and the curvature of the nonlinear connection.

The Jacobi endomorphism is the $(1,1)$-type tensor field:

$\displaystyle\Phi=v\circ[G,h]=R^{i}_{j}\frac{\partial}{\partial y^{i}}\otimes
dx^{j},\quad R^{i}_{j}=2\frac{\partial G^{i}}{\partial
x^{j}}-G\left(N^{i}_{j}\right)-N^{i}_{k}N^{k}_{j}.$

The curvature of the nonlinear connection can be defined as the Nijenhuis
tensor of the horizontal projector $h$, which gives the obstruction to the
integrability of the horizontal distribution:

$\displaystyle
R=\frac{1}{2}[h,h]=\frac{1}{2}R^{i}_{jk}\frac{\partial}{\partial y^{i}}\otimes
dx^{k}\wedge dx^{j},\quad R^{i}_{jk}=\frac{\delta N^{i}_{j}}{\delta
x^{k}}-\frac{\delta N^{i}_{k}}{\delta x^{j}}.$

A Finsler metric has scalar flag curvature if there exists a function
$\kappa\in C^{\infty}(T_{0}M)$ such that its Jacobi endomorphism has the form:

$\displaystyle\Phi$ $\displaystyle=$
$\displaystyle\kappa\left(F^{2}J-Fd_{J}F\otimes\mathcal{C}\right)\Longleftrightarrow
R^{i}_{j}=\kappa\left(\delta^{i}_{j}g_{sl}-\delta^{i}_{s}g_{jl}\right)y^{s}y^{l}.$

When the $0$-homogeneous function $\kappa$ is constant, we say that the
Finsler metric has constant flag curvature. A Schur’s Lemma for Finsler
metrics is true: in dimension $n>2$, if the scalar flag curvature $\kappa$
does not depend on the fibre coordinates $y$ then $\kappa$ is constant and the
Finsler metric has constant flag curvature, [6, Theorem 3.1], [21, Theorem
9.4.1].

While the Jacobi endomorphism and the curvature of the nonlinear connection
have Riemannian correspondents (depend quadratic and respectively linear on
the Riemannian curvature tensor), the Berwald curvature $B^{i}_{jkl}$ and the
mean Berwald curvature $E_{ij}$ are purely non-Riemannian tensors, and they
are given by:

(2.6) $\displaystyle B^{i}_{jkl}=\frac{\partial^{3}G^{i}}{\partial
y^{j}\partial y^{k}\partial y^{l}},\quad
E_{ij}=\frac{1}{2}B^{k}_{ijk}=\frac{1}{2}\frac{\partial^{3}G^{k}}{\partial
y^{i}\partial y^{j}\partial y^{k}}.$

The mean Berwald curvature can be expressed in terms of the $S$-function,
introduced by Shen, [18, §5.2]. For a fixed vertically invariant volume form
$\sigma(x)dx\wedge dy$ on TM, [21, p.490], we consider the $S$-_function_ and
the _distortion_ $\tau$:

(2.7) $\displaystyle S=G(\tau),\quad\tau=\frac{1}{2}\ln\frac{\det g}{\sigma}.$

The mean Berwald curvature can be expressed as follows, [18, (6.13)]:

(2.8) $\displaystyle E_{ij}=\frac{1}{2}\frac{\partial^{2}S}{\partial
y^{i}\partial y^{j}},\ \textrm{hence \ }2E_{ij}\delta y^{i}\wedge
dx^{j}=d_{v}d_{J}S.$

Another important non-Riemannian quantity, the $\chi$-curvature, was
introduced by Shen, [19, (1.10)]. This can be defined as:

(2.9) $\displaystyle\chi=\frac{1}{2}\delta_{G}S,\quad\textrm{where \
}\delta_{G}S=\mathcal{L}_{G}d_{J}S-dS=\left\\{G\left(\frac{\partial
S}{\partial y^{i}}\right)-\frac{\partial S}{\partial x^{i}}\right\\}dx^{i},$

is the Euler-Lagrange semi-basic $1$-form associated to the spray $G$ and the
$S$-function.

The dynamical covariant derivative $\nabla$ is a derivation of degree zero
along the geodesic spray. It can be defined through its action on functions
and vector fields and then extended to arbitrary tensor fields and forms, [8]:

$\displaystyle\nabla f=G(f),\forall f\in C^{\infty}(T_{0}M),\quad\nabla
X=h[G,hX]+v[G,vX],\forall X\in\mathfrak{X}(T_{0}M).$

For a Finsler structure $F$, the dynamical covariant derivative of its metric
tensor vanishes, $\nabla g_{ij}=0$, [8, (44)] and the same happens to the
Finsler function $\nabla F=G(F)=0$. Therefore, the tensor (1.2) and all its
geometric invariants are covariant constant along the geodesic flow if $\nabla
E_{ij}=0$.

##  3\. Proofs of Theorem 1.1.

The most important aspects that we will use in the proof of Theorem 1.1 are
based on the geodesic invariance of some geometric structures on Finsler
manifolds with vanishing $\chi$-curvature. For the first proof we will use the
fact that the mean Berwald curvature is covariant constant, $\nabla E_{ij}=0$,
and therefore the tensor (1.2) is covariant constant along the geodesic flow
if the $\chi$-curvature vanishes. For the second proof we show in Lemma 3.2
that a $1$-form (3.2) is geodesically invariant if and only if the
$\chi$-curvature vanishes. We use the form $\alpha$ to construct a set of
$(2n-1)$-forms on the projective sphere bundle $SM$ that are geodesically
invariant, and whose proportionality factors are first integrals.

###  3.1. First proof of Theorem 1.1

For the first proof, we provide in Lemma 3.1 necessary and sufficient
conditions for the mean Berwald curvature, and hence for the tensor (1.2), to
be covariant constant along the geodesic flow. These conditions will allow to
obtain various characterisations for a class of Finsler metrics (that includes
Finsler metrics of constant flag curvature) which have the functions (1.4) as
a set of first integrals.

######  Lemma 3.1.

On a Finsler manifold $(M,F)$, the following conditions are equivalent:

  * i)

$\nabla E_{ij}=0$;

  * ii)

$d_{h}d_{J}S$ is a basic $2$-form;

  * iii)

there exists a basic $2$-form $\omega\in\Lambda^{2}(M)$ such that
$2\chi=i_{G}\omega$.

###### Proof.

We prove i) $\Longrightarrow$ ii). Using the expression (2.8) of the mean
Berwald curvature in terms of the $S$-function, the assumption $\nabla
E_{ij}=0$ reads $\nabla d_{v}d_{J}S=0$. To this equation we apply derivation
$d_{J}$ and use the commutation rule [5, (2.11)], which gives:

$\displaystyle 0=d_{J}\nabla d_{v}d_{J}S=\nabla
d_{J}d_{v}d_{J}S+d_{h}d_{v}d_{J}S+2i_{R}d_{v}d_{J}S=-d_{v}d_{h}d_{J}S.$

Here we made use of the following $d_{J}d_{v}=-d_{v}d_{J}$ and $d^{2}_{J}=0$
which gives $d_{J}d_{v}d_{J}S=0$. We also used that
$2R=[h,h]=[h,\operatorname{Id}-v]=-[h,v]$ and hence
$d_{h}d_{v}d_{J}S+d_{v}d_{h}d_{J}S=-2d_{R}d_{J}S=-2i_{R}d_{v}d_{J}S$. The fact
that $d_{v}d_{h}d_{J}S=0$ implies that $d_{h}d_{J}S$ is a basic $2$-form
($d_{h}d_{J}S$ is already a semi-basic $2$-form).

We prove ii)) $\Longrightarrow$ iii). We assume that there is a basic $2$-form
$\omega\in\Lambda^{2}(M)$ such that $d_{h}d_{J}S=\omega$. We apply the inner
product $i_{G}$ to both sides of this equality and use the commutation rule
for the two derivations $i_{G}$ and $d_{h}$, [12, p.205],

$\displaystyle i_{G}\omega$ $\displaystyle=$ $\displaystyle
i_{G}d_{h}d_{J}S=-d_{h}i_{G}d_{J}S+\mathcal{L}_{hG}d_{J}S+d_{[h,G]}d_{J}S$
$\displaystyle=$ $\displaystyle-
d_{h}S+\mathcal{L}_{G}d_{J}S-d_{v}S=\mathcal{L}_{G}d_{J}S-dS\stackrel{{\scriptstyle\eqref{chi}}}{{=}}2\chi.$

The equality of the first and the last terms is the condition iii).

We prove the last implication iii) $\Longrightarrow$ i). Formula (2.9) allows
to write our assumption as $\delta_{G}S=i_{G}\omega$. Using formulae [5,
(2.13)], which provide alternative expressions for the Euler-Lagrange
$1$-form, we can rewrite this assumption as $\nabla
d_{J}S-d_{h}S=i_{G}\omega$. If we apply the derivation $d_{J}$ to both sides
of the last formula and use again the commutation rule [5, (2.11)], we obtain:

$\displaystyle\nabla
d_{J}^{2}S+d_{h}d_{J}S+2i_{R}d_{J}S-d_{J}d_{h}S=d_{J}i_{G}\omega\Longleftrightarrow
d_{h}d_{J}S=\omega.$

We apply the differential operator $d$ to both sides of our assumption and
then:

$\displaystyle\mathcal{L}_{G}dd_{J}S=di_{G}\omega\Longleftrightarrow\mathcal{L}_{G}d_{h}d_{J}S+\mathcal{L}_{G}d_{v}d_{J}S=\mathcal{L}_{G}\omega-
i_{G}d\omega\Longleftrightarrow\mathcal{L}_{G}d_{v}d_{J}S=-i_{G}d\omega.$

We replace the Lie derivative $\mathcal{L}_{G}$ in terms of the covariant
derivative $\nabla$, [8, (27)] and get:

$\displaystyle\nabla d_{v}d_{J}S-d_{\Phi}d_{J}S=-i_{G}d\omega.$

In the above equation, we separate the semi-basic part from the non-semi-basic
part. This implies $\nabla d_{v}d_{J}S=0$ (the non-semi-basic part), which in
view of formula (2.8) gives $\nabla E_{ij}=0$ and hence the condition i) is
true. We also obtain the equality of the semi-basic parts
$d_{\Phi}d_{J}S=i_{G}d\omega$. ∎

The equivalence of i) and iii) has been established by Li and Shen in [14,
Theorem 1.2].

The first proof of Theorem 1.1 follows immediately from Lemma 3.1. For a
Finsler metric of vanishing $\chi$-curvature, formula (2.9) and the condition
iii) of Lemma 3.1 show that the assumption $\chi=0$ implies the condition i)
of Lemma 3.1, $\nabla E_{ij}=0$. Therefore, the tensor (1.2) and all its
powers are covariant constant, $\nabla\mathcal{E}^{a}=0$, $\forall
a\in\mathbb{N}$. Since the dynamical covariant derivative commutes with the
semi-basic trace, it follows that

$\displaystyle
G(f_{a})=\nabla(f_{a})=\nabla\left(\operatorname{Tr}\mathcal{E}^{a}\right)=\operatorname{Tr}\left(\nabla\mathcal{E}^{a}\right)=0,\forall
a\in\\{1,...,n-1\\},$

which means that all the $0$-homogeneous functions
$f_{a}=\operatorname{Tr}\mathcal{E}^{a}$ are first integrals for the geodesic
spray $G$.

###  3.2. Second proof of Theorem 1.1

For a Finsler metric $F$, its reducibility to a Riemannian metric is encoded
into its mean Cartan torsion, [9, Deicke’s Theorem]:

$\displaystyle I_{k}=\frac{1}{2}g^{ij}\frac{\partial g_{ij}}{\partial
y^{k}}=\frac{\partial}{\partial y^{k}}\left(\ln\sqrt{\det
g}\right)=\frac{\partial\tau}{\partial y^{k}},\quad
I=I_{k}dx^{k}=d_{J}\left(\ln\sqrt{\det g}\right)=d_{J}\tau.$

The $0$-homogeneity of the distortion function $\tau$ implies
$i_{G}I=y^{i}I_{i}=\frac{\partial\tau}{\partial y^{i}}y^{i}=0$.

An important ingredient we will use for the second proof of Theorem 1.1 is the
following $1$-form:

$\displaystyle\alpha$ $\displaystyle=$ $\displaystyle
i_{[J,G]}\mathcal{L}_{G}I=\nabla I_{k}dx^{k}-I_{k}\delta y^{k}=\nabla
d_{J}\tau-d_{v}\tau$ $\displaystyle=$ $\displaystyle d_{J}\nabla\tau-
d_{h}\tau-d_{v}\tau=d_{J}\nabla\tau-d\tau=d_{J}S-d\tau,$

which in the $2$-dimensional case has been introduced in [10, §2]. We can
easily see that $i_{\mathcal{C}}\alpha=y^{i}I_{i}=0$ and
$i_{G}\alpha=y^{i}\nabla I_{i}=0$.

######  Lemma 3.2.

On a Finsler manifold $(M,F)$, the $\chi$-curvature vanishes if and only if
one of the following equivalent conditions is satisfied:

  * i)

$\mathcal{L}_{G}\alpha=0$: the $1$-form $\alpha$ is geodesically invariant (it
is a dual symmetry);

  * ii)

$d_{h}d_{J}S=0$: the $S$-function is a Hamel function;

  * iii)

$d\alpha=2E_{ij}\delta y^{i}\wedge dx^{j}$: the horizontal and vertical
distributions are Lagrangian distributions for $d\alpha$.

###### Proof.

Formulae (3.2) allow to express the geodesic variation of the $1$-form
$\alpha$ in terms of the $\chi$-curvature:

(3.2)
$\displaystyle\mathcal{L}_{G}\alpha=\mathcal{L}_{G}d_{J}S-\mathcal{L}_{G}d\tau=\mathcal{L}_{G}d_{J}S-d\mathcal{L}_{G}\tau\stackrel{{\scriptstyle\eqref{sgt}}}{{=}}\mathcal{L}_{G}d_{J}S-dS\stackrel{{\scriptstyle\eqref{chi}}}{{=}}2\chi,$

and hence $\chi=0$ if and only if $\mathcal{L}_{G}\alpha=0$.

The expression of the $\chi$-curvature, given by formula (2.9), can be
reformulated using the dynamical covariant derivative, [5, (2.13)], as
follows:

$\displaystyle 2\chi=\nabla d_{J}S-d_{h}S.$

If we apply to both sides of this formula the derivation $d_{J}$ and use the
commutation rule [5, (2.11)], we obtain:

$\displaystyle 2d_{J}\chi=d_{J}\nabla d_{J}S-d_{J}d_{h}S=\nabla
d^{2}_{J}S+d_{h}d_{J}S+2i_{R}d_{J}S-d_{J}d_{h}S=2d_{h}d_{J}S.$

Above formulae give $d_{J}\chi=d_{h}d_{J}S$. We apply to these semi-basic
$2$-forms the inner product $i_{G}$. Therefore, if we use the commutation rule
for the derivations $i_{G}$ and $d_{h}$, [12, p.205], we have:

$\displaystyle
i_{G}d_{J}\chi=i_{G}d_{h}d_{J}S=-d_{h}i_{G}S+\mathcal{L}_{hG}d_{J}S+d_{[h,G]}S=-d_{h}S+\mathcal{L}_{G}d_{J}S-d_{v}S=\mathcal{L}_{G}d_{J}S-dS=2\chi.$

The last formulae allow to conclude that $\chi=0$ if and only if $d_{J}\chi=0$
if and only if $d_{h}d_{J}S=0$.

From formulae (3.2) and (2.8) we obtain:

$\displaystyle
d\alpha=dd_{J}S=d_{h}d_{J}S+d_{v}d_{J}S=d_{h}d_{J}S+2E_{ij}\delta y^{i}\wedge
dx^{j}.$

Therefore, $d\alpha=2E_{ij}\delta y^{i}\wedge dx^{j}$ if and only if
$d_{h}d_{J}S=0$ if and only if $\chi=0$. ∎

For a Finsler surface, the $\chi$-curvature vanishes if and only if we have a
$k$-basic Finsler structure, [15, Theorem 1.1]. Therefore, Lemma 3.2 allows to
recover the geodesic invariance of the $1$-form $\alpha$ for $k$-basic Finsler
surfaces obtained in [10, Lemma 2.2].

For the second proof of Theorem 1.1 we use the characterizations established
in Lemma 3.2 for Finsler metrics of vanishing $\chi$-curvature.

The $1$-form $\alpha$ is $0$-homogeneous and satisfies
$i_{\mathcal{C}}\alpha=0$, which means that it can be viewed as a form on
$SM$, $\alpha\in\Lambda^{1}(SM)$. Using similar ideas from [4, §3], we will
use this form and the Hilbert $1$ and $2$-forms $d_{J}F\in\Lambda^{1}(SM)$ and
$dd_{J}F\in\Lambda^{2}(SM)$ to construct, for each $a\in\\{1,...,n\\}$, an
invariant $(2n-1)$-form on $SM$:

(3.3)
$\displaystyle\Omega_{a}=\frac{(-1)^{(n-1)(n-2)/2}}{(a-1)!(n-a)!}d_{J}F\wedge\left(dd_{J}F\right)^{(a-1)}\wedge\left(d\alpha\right)^{(n-a)}\in\Lambda^{2n-1}(SM).$

We can seen that $\Omega_{n}=\Omega_{F}$ is the canonical volume (2.3) of the
contact manifold $(SM,d_{J}F)$.

The Reeb vector field of the contact manifold $(SM,d_{J}F)$ is the normalized
geodesic field $G/F$. Using [4, Lemma 4.1] it follows that the Hilbert $1$ and
$2$-forms $d_{J}F$ and $dd_{J}F$ are preserved by the action of the Reeb
vector field $G/F$:

$\displaystyle\mathcal{L}_{G/F}d_{J}F=\frac{1}{F}\left(\mathcal{L}_{G}d_{J}F-dF\right)=0\
\textrm{and}\ \mathcal{L}_{G/F}dd_{J}F=0.$

Since $i_{G}\alpha=y^{i}\nabla I_{i}=0$, we also have:

$\displaystyle\mathcal{L}_{G/F}\alpha=\frac{1}{F}\mathcal{L}_{G}\alpha+i_{G}\alpha\
d\left(\frac{1}{F}\right)=\frac{1}{F}\mathcal{L}_{G}\alpha\stackrel{{\scriptstyle\eqref{lgalpha}}}{{=}}0,$

which means that the form $\alpha$ is also invariant by the action of the Reeb
vector field. Consequently, all the $(2n-1)$-forms (3.3) are invariant as
well:

$\displaystyle\mathcal{L}_{G/F}\Omega_{a}=0,\quad\forall a\in\\{1,...,n\\}.$

It follows that the proportionality factors of these $(2n-1)$-forms:

(3.4) $\displaystyle\Omega_{a}=g_{n-a}\Omega_{n},\quad\forall
a\in\\{1,...,n-1\\},$

are also preserved by the action of the Reeb vector field. Therefore, the
functions $g_{a}\in C^{\infty}(SM)$, $a\in\\{1,...,n-1\\}$, are first
integrals for the Reeb vector field and hence for the geodesic spray,
$G(g_{a})=0$.

We prove now that the first integrals $g_{a}$, given by formula (3.4), are the
coefficients of the characteristic polynomial (1.3).

Together with the $(2n-1)$ forms (3.3) on $SM$, we consider the following
$2n$-forms on $T_{0}M$:

(3.5)
$\displaystyle\Omega^{\prime}_{a}=(-1)^{n-1}F^{n-1}dF\wedge\Omega_{a}=(-1)^{n-1}F^{n-1}d_{v}F\wedge\Omega_{a},\quad
a\in\\{1,...,n\\}.$

It is easy to see that $\Omega^{\prime}_{n}=\Omega^{\prime}_{F}$ is the volume
form (2.5) and the functions $g_{a}$ are uniquelly determined also by
$\Omega^{\prime}_{a}=g_{a}\Omega^{\prime}_{n}$, $\forall a\in\\{1,...,n-1\\}$.
First, we can write the characteristic polynomial (1.3) as follows:

$\displaystyle
P(\Lambda)=\det\left(g^{ik}2FE_{kj}+\Lambda\delta^{i}_{j}\right)=\frac{1}{{\det
g}}\det\left(2FE_{kj}+\Lambda g_{kj}\right).$

Therefore, we have:

$\displaystyle P(\Lambda)\Omega^{\prime}_{n}$
$\displaystyle\stackrel{{\scriptstyle\eqref{o'n}}}{{=}}$
$\displaystyle\frac{1}{{\det g}}\det\left(2FE_{kj}+\Lambda g_{kj}\right)\det
g\ dx\wedge dy$ $\displaystyle=$
$\displaystyle\frac{(-1)^{n(n+1)/2}}{n!}\left(\left(2FE_{kj}+\Lambda
g_{kj}\right)\delta y^{k}\wedge dx^{j}\right)^{(n)}$
$\displaystyle\stackrel{{\scriptstyle\eqref{ddjf2}}}{{=}}$
$\displaystyle\frac{(-1)^{n(n+1)/2}}{n!}\left(2FE_{kj}\delta y^{k}\wedge
dx^{j}+\Lambda\frac{1}{2}dd_{J}F^{2}\right)^{(n)}$
$\displaystyle\stackrel{{\scriptstyle(a)}}{{=}}$
$\displaystyle\frac{(-1)^{n(n+1)/2}}{n!}\left(Fd\alpha+\Lambda\left(Fdd_{J}F+dF\wedge
d_{J}F\right)\right)^{(n)}$ $\displaystyle\stackrel{{\scriptstyle(b)}}{{=}}$
$\displaystyle\frac{(-1)^{n(n+1)/2}}{n!}\left(\sum_{a=0}^{n}\frac{n!}{a!(n-a)!}\Lambda^{a}\left(Fdd_{J}F+dF\wedge
d_{J}F\right)^{(a)}\wedge(Fd\alpha)^{(n-a)}\right)$
$\displaystyle\stackrel{{\scriptstyle(c)}}{{=}}$
$\displaystyle(-1)^{n(n+1)/2}\left(\sum_{a=1}^{n}\frac{\Lambda^{a}}{(a-1)!(n-a)!}dF\wedge
d_{J}F\wedge\left(Fdd_{J}F\right)^{(a-1)}\wedge\left(Fd\alpha\right)^{(n-a)}\right)$
$\displaystyle=$
$\displaystyle(-1)^{n-1}F^{n-1}dF\wedge\left(\sum_{a=1}^{n}\Lambda^{a}\frac{(-1)^{(n-1)(n-2)/2}}{(a-1)!(n-a)!}d_{J}F\wedge\left(dd_{J}F\right)^{(a-1)}\wedge\left(d\alpha\right)^{(n-a)}\right)$
$\displaystyle\stackrel{{\scriptstyle\eqref{oa}}}{{=}}$
$\displaystyle(-1)^{n-1}F^{n-1}dF\wedge\left(\sum_{a=1}^{n}\Lambda^{a}\Omega_{a}\right)\stackrel{{\scriptstyle\eqref{ga}}}{{=}}(-1)^{n-1}F^{n-1}dF\wedge\left(\Lambda^{n}+\sum_{a=1}^{n-1}\Lambda^{a}g_{n-a}\right)\Omega_{n}$
$\displaystyle\stackrel{{\scriptstyle\eqref{o'a}}}{{=}}$
$\displaystyle\left(\Lambda^{n}+\sum_{a=1}^{n-1}g_{n-a}\Lambda^{a}\right)\Omega^{\prime}_{n}.$

It follows that the proportionality functions (3.4) are the coefficients of
the characteristic polynomial (1.3).

In the above calculations, we used the following arguments:

(a) For vanishing $\chi$-curvature, the expression $d\alpha=2E_{kj}\delta
y^{k}\wedge dx^{j}$ is given by iii) of Lemma 3.2. We also note here that
$\operatorname{rank}(d\alpha)\leq 2\operatorname{rank}(E_{kj})\leq 2(n-1)$.

(b) Since $2$-forms commute under the wedge product, we can use a binomial
Newton-type formula for the wedge power.

(c) We use again a binomial Newton-type formula for the wedge power to expand

$\displaystyle\left(Fdd_{J}F+dF\wedge
d_{J}F\right)^{(a)}=\left(Fdd_{J}F\right)^{(a)}+a\ dF\wedge
d_{J}F\wedge\left(Fdd_{J}F\right)^{(a-1)}.$

However, the following $2n$-form vanishes,
$\left(Fdd_{J}F\right)^{(a)}\wedge\left(Fd\alpha\right)^{(n-a)}=0$, since
$\operatorname{rank}(dd_{J}F)=2(n-1)$ and $\operatorname{rank}(d\alpha)\leq
2(n-1)$.

The two sets of first integrals $\\{f_{1},...,f_{n-1}\\}$ and
$\\{g_{1},...,g_{n-1}\\}$ from Theorem 1.1 can be related using Newton’s
identities, [13]:

(3.6) $\displaystyle
g_{a}=\frac{1}{a!}\begin{vmatrix}f_{1}&1&0&\cdots&\cdots&\cdots&0\\\
f_{2}&f_{1}&2&0&\cdots&\cdots&0\\\ f_{3}&f_{2}&f_{1}&3&0&\cdots&0\\\
\cdots&\cdots&\cdots&\cdots&\cdots&\cdots&\cdots\\\
f_{a-1}&f_{a-2}&f_{a-3}&\cdots&\cdots&f_{1}&a-1\\\
f_{a}&f_{a-1}&f_{a-2}&\cdots&\cdots&f_{2}&f_{1}\end{vmatrix},\quad\forall
a\in\\{1,...,n-1\\}.$

It is easy to see that
$f_{1}=g_{1}=\operatorname{Tr}\left(\mathcal{E}\right)$, and general linear
recurrence formulae between the sets of first integrals
$\\{f_{1},...,f_{a}\\}$ and $\\{g_{1},...,g_{a}\\}$ can be established, for
any $a\in\\{1,..,n-1\\}$, [13].

##  4\. Particular cases, alternative expressions for the first integrals and
examples

###  4.1. Particular cases.

Since for Finsler metrics of constant curvature, the $\chi$-curvature
vanishes, [15, Theorem 1.1], we obtain the following corollary.

######  Corollary 4.1.

Consider $F$ a Finsler metric of constant curvature. Then the functions (1.4)
and the coefficients of the characteristic polynomial (1.3) are constant along
the geodesics of the Finsler metric $F$.

We will show now that the first integral $g_{n-1}$ coincides with the first
integral [7, (1.1)]. Indeed, using formulae (3.3) and (3.5), for $a=1$, we
have:

$\displaystyle\Omega^{\prime}_{1}$ $\displaystyle=$
$\displaystyle\frac{(-1)^{n(n+1)/2}}{(n-1)!}dF\wedge
d_{J}F\wedge\left(Fd\alpha\right)^{(n-1)}$ $\displaystyle=$
$\displaystyle\frac{(-1)^{n(n+1)/2}}{n!}\left(d_{v}F\wedge
d_{J}F+Fd\alpha\right)^{(n)}$ $\displaystyle=$
$\displaystyle\frac{(-1)^{n(n+1)/2}}{n!}\left(\left(2FE_{ij}+\frac{\partial
F}{\partial y^{i}}\frac{\partial F}{\partial y^{j}}\right)\delta y^{i}\wedge
dx^{j}\right)^{(n)}$ $\displaystyle=$
$\displaystyle\det\left(2FE_{ij}+\frac{\partial F}{\partial
y^{i}}\frac{\partial F}{\partial y^{j}}\right)dx\wedge dy=\frac{1}{\det
g}\det\left(2FE_{ij}+\frac{\partial F}{\partial y^{i}}\frac{\partial
F}{\partial y^{j}}\right)\Omega^{\prime}_{n}.$

These arguments and formula (3.3) for $a=1$ give the first integral:

$\displaystyle g_{n-1}=\frac{1}{\det g}\det\left(2FE_{ij}+\frac{\partial
F}{\partial y^{i}}\frac{\partial F}{\partial y^{j}}\right)=\frac{-1}{\det
g}\begin{vmatrix}2FE_{ij}&\displaystyle\frac{\partial F}{\partial
y^{i}}\vspace{2mm}\\\ \displaystyle\frac{\partial F}{\partial
y^{j}}&0\end{vmatrix},$

which is the first integral [7, (1.1)].

###  4.2. Alternative expressions for the first integrals.

The mean Berwald curvature can be expressed in terms of the mean Cartan
torsion and the mean Landsberg curvature, [18, Lemma 6.2.4]:

(4.1) $\displaystyle E_{ij}=\frac{1}{2}\left\\{I_{j;i}+J_{i\cdot j}\right\\},$

where: $J_{i}=\nabla I_{i}$ is the mean Landsberg curvature, $J_{i\cdot
j}=\frac{\partial J_{i}}{\partial y^{j}}$ is the vertical covariant derivative
of the mean Landsberg curvature and

$\displaystyle I_{j;i}=\frac{\delta I_{j}}{\delta
x^{i}}-I_{l}\frac{\partial^{2}G^{l}}{\partial y^{i}\partial y^{j}}$

is the horizontal covariant derivative of the mean Cartan torsion with respect
to the Berwald connection.

It follows that the function

(4.2) $\displaystyle g_{1}=f_{1}=\frac{1}{2}g^{ij}\left\\{I_{j;i}+J_{i\cdot
j}\right\\}$

is a first integral for a Finsler metric of vanishing $\chi$-curvature. For a
$k$-basic Finsler surface, the first integral (4.2) reduces to the first
integral obtained in [10, Theorem B] as a function of the Cartan scalar $I$
and the Landsberg scalar $J$.

###  4.3. Example.

In this section we present an example of a Finsler metrics of constant
curvature and the corresponding first integrals obtained using Theorem 1.1.
Due to the complexity of the calculations, these were obtained in dimension
$3$ using a software package.

Consider $B^{3}$ the open unit ball in $\mathbb{R}^{3}$ and
$F:B^{3}\times\mathbb{R^{*}}^{3}\to\mathbb{R}$ the Berwald metric:

$\displaystyle F(x,y)=\frac{\left(\sqrt{|y|^{2}-(|x|^{2}|y|^{2}-\langle
x,y\rangle^{2})}+\langle
x,y\rangle\right)^{2}}{\left(1-|x|^{2}\right)^{2}\sqrt{|y|^{2}-(|x|^{2}|y|^{2}-\langle
x,y\rangle^{2})}}.$

The Finsler metric $F$ is $R$-flat and projectively flat, with the projective
factor:

$\displaystyle P(x,y)=\frac{\sqrt{|y|^{2}-(|x|^{2}|y|^{2}-\langle
x,y\rangle^{2})}}{1-|x|^{2}}+\frac{\langle x,y\rangle}{1-|x|^{2}},\ y\in
T_{x}B^{3},$

being the Funk metric, [18, (2.48)]. The spray coefficients (2.2) are given by
$G^{i}(x,y)=P(x,y)y^{i}$ and hence the mean Berwald curvature (2.6) is give
by:

$\displaystyle E_{ij}=\frac{1}{2}\frac{\partial^{3}G^{l}}{\partial
y^{i}\partial y^{j}\partial y^{l}}=\frac{n+1}{2}\frac{\partial^{2}P}{\partial
y^{i}\partial y^{j}}.$

Therefore, the tensor (1.2) is given by

$\displaystyle\mathcal{E}^{i}_{j}=(n+1)Fg^{ik}\frac{\partial^{2}P}{\partial
y^{k}\partial y^{j}},$

and its characteristic polynomial (1.3) gives the following $2$ first
integrals:

$\displaystyle g_{1}$ $\displaystyle=\dfrac{\left(-2\langle
x,y\rangle\sqrt{|y|^{2}-|x|^{2}|y|^{2}+\langle x,y\rangle^{2}}-2\langle
x,y\rangle^{2}-|y|^{2}(1-|x|^{2})\right)\cdot\left(|y|^{2}-|x|^{2}|y|^{2}+\langle
x,y\rangle^{2}\right)^{2})}{8\left(\frac{1}{2}|y|^{2}+|x|^{2}|y|^{2}-2\langle
x,y\rangle^{2}\right)|y|^{2}\left(\langle
x,y\rangle+\sqrt{|y|^{2}-|x|^{2}|y|^{2}+\langle x,y\rangle^{2}}\right)^{2}},$
$\displaystyle g_{2}$
$\displaystyle=1+\dfrac{\left(2|y|^{2}+|x|^{2}|y|^{2}-\langle
x,y\rangle^{2}\right)\cdot\left(|x|^{2}|y|^{2}-\langle
x,y\rangle^{2}\right)}{2|y|^{2}\left(-\frac{1}{2}|y|^{2}+|y|^{2}(1+|x|^{2})-\langle
x,y\rangle^{2}\right)}.$

To compute the Poisson bracket of these two first integrals, we use the
software package, to obtain:

$\displaystyle\left\\{g_{1},g_{2}\right\\}=\frac{1}{2}g^{ij}\dfrac{\partial
g_{1}}{\partial y^{j}}\dfrac{\delta g_{2}}{\delta
x^{i}}-\frac{1}{2}g^{ij}\dfrac{\partial g_{2}}{\partial y^{j}}\dfrac{\delta
g_{1}}{\delta x^{i}}=0.$

Therefore, the two first integrals $g_{1}$ and $g_{2}$ Poisson commute with
respect to the flat metric and also with respect to the Berwald metric.

## References

  * [1] Álvarez-Paiva, J.C.: _Rigidity results for geodesically reversible Finsler metrics_ , arXiv:2106.10095
  * [2] Akbar-Zadeh, H.: _Sur les espaces de Finsler à corbures sectionelles constantes_ , Acad. Roy. Belg. Bull. Sci., 74 (5) (1988), 281-322.
  * [3] Berwald, L.: _On Finsler and Cartan geometries. III. Two-dimensional Finsler spaces with rectilinear extremals_ , Ann. of Math., 42 (1) (1941), 84–112.
  * [4] Bucataru, I.,: _Invariant volume forms and first integrals for geodesically equivalent Finsler metrics_ , Proc. Amer. Math. Soc., https://doi.org/10.1090/proc/15961
  * [5] Bucataru, I., Constantinescu, O.: _Generalized Helmholtz conditions for non-conservative Lagrangian systems_ , Math. Phys. Anal. Geom., 18 (1) (2015), Art. 25, 24 pp.
  * [6] Bucataru, I., Creţu, G.: _A general version of Beltrami’s theorem in Finslerian setting_ , Publ. Math. Debrecen, 97(3-4)(2020), 439–447.
  * [7] Bucataru, I., Constantinescu, O.A., Creţu, G.: _A class of Finsler metrics admitting first integrals_ , J. Geom Phys., 166 (2021), 104254.
  * [8] Bucataru, I., Dahl, M.: _Semi-basic 1-forms and Helmholtz conditions for the inverse problem of the calculus of variations_ , J. Geom. Mech., 1(2) (2009), 159–-180.
  * [9] Deicke, A.: _Über die Finsler-Rüme mit $A_{i}=0$_, Arch. Math., 4(1953), 45–51.
  * [10] Foulon, P., Ruggiero, R.O.: _A first integral for $C^{\infty}$, $k$-basic Finsler surfaces and applications to rigidity_, Proc. Amer. Math. Soc.,144 (9) (2016), 3847–3858.
  * [11] Grifone, J.: _Structure presque-tangente et connexions I_ , Ann. Inst. Fourier, 22 (1972), 287–334.
  * [12] Grifone, J., Muzsnay, Z.: _Variational Principles for Second Order Differential Equations. Application of the Spencer Theory to Characterize Variational Sprays_ , World Scientific, 2000.
  * [13] Krishnapriyan, H.K.: _On evaluating the characteristic polynomial through symmetric functions_ , J. Chem. Inf. Comput. Sci., 35 (1995), 196–198.
  * [14] Li, B., Shen, Z.: _Ricci curvature tensor and non-Riemannian quantities_ , Canad. Math. Bull. 58(3) (2015), 530–537.
  * [15] Li, B., Shen, Z.: _Sprays of isotropic curvature_ , Internat. J. Math., 29(1) (2018), 1850003, 12 pp.
  * [16] Matveev, V. S., Topalov, P. I.: _Trajectory equivalence and corresponding integrals_ , Regul. Chaotic Dyn., 3(2) (1998), 30–45.
  * [17] Sarlet, W.: _A recursive scheme of first integrals of the geodesic flow of a Finsler manifold_ , SIGMA Symmetry Integrability Geom. Methods Appl., 3 (2007), Paper 024, 9 pp.
  * [18] Shen, Z.: _Differential geometry of spray and Finsler spaces_ , Springer, 2001.
  * [19] Shen, Z.: _On some non-Riemannian quantities in Finsler geometry_ , Canad. Math. Bull., 56 (1) (2013), 184–193.
  * [20] Shen, Z.: _On sprays with vanishing $\chi$-curvature_, Internat. J. Math., 32(10) (2021),Paper No. 2150069, 12 pp.
  * [21] Szilasi, J., Lovas, R., Kertész, D.: _Connections, sprays and Finsler structures_ , World Scientific, 2014\.
  * [22] Tabachnikov, S.: _Projectively equivalent metrics, exact transverse line fields and the geodesic flow on the ellipsoid_ , Comment. Math. Helv., 74(1999), 306–321.
  * [23] Youssef, N.L.: _Semi-projective changes_ , Tensor, N.S. 55(1994), 131–141.