# DAVE – A Detect-and-Verify Paradigm for Low-Shot Counting

Jer Pelhan, Alan Lukežič, Vitjan Zavrtanik, Matej Kristan
Faculty of Computer and Information Science, University of Ljubljana, Slovenia
<EMAIL_ADDRESS>
###### Abstract

Low-shot counters estimate the number of objects corresponding to a selected
category, based on only few or no exemplars annotated in the image. The
current state-of-the-art estimates the total counts as the sum over the object
location density map, but does not provide individual object locations and
sizes, which are crucial for many applications. This is addressed by
detection-based counters, which, however fall behind in the total count
accuracy. Furthermore, both approaches tend to overestimate the counts in the
presence of other object classes due to many false positives. We propose DAVE,
a low-shot counter based on a detect-and-verify paradigm, that avoids the
aforementioned issues by first generating a high-recall detection set and then
verifying the detections to identify and remove the outliers. This jointly
increases the recall and precision, leading to accurate counts. DAVE
outperforms the top density-based counters by $\sim$20% in the total count
MAE, it outperforms the most recent detection-based counter by $\sim$20% in
detection quality and sets a new state-of-the-art in zero-shot as well as
text-prompt-based counting. The code and models are available on GitHub.

##  1 Introduction

Low-shot counting considers estimating the number of target objects in an
image, based only on a few annotated exemplars (few-shot) or even without
providing the exemplars (zero-shot). Owing to the emergence of focused
benchmarks [26, 22], there has been a surge in low-shot counting research
recently. The current state-of-the-art low-shot counters are all density-based
[28, 38, 26, 6]. This means that they estimate the total count by summing over
an estimated object presence density map. Only recently, few-shot detection-
based methods emerged [22] that estimate the counts as the number of detected
objects.

Density-based methods substantially outperform the detection-based counters in
total count estimation, but they do not provide detailed outputs such as
object locations and sizes. The latter are however important in many
downstream tasks such as bio-medical analysis [41, 35], where explainability
is crucial for human expert verification as well as for subsequent analyses.
There is thus a large applicability gap between the density-based and
detection-based low-shot counters.

Figure 1:  Despite considering exemplars (yellow boxes), the state-of-the-art
(e.g., CounTR [16]) is prone to false activations on incorrect objects,
leading to corrupted counts. DAVE avoids this issue by detecting all
candidates (red and green boxes), verifying them, removing the outliers (red
boxes), and correcting the final density map, thus jointly improving detection
and count estimation.

Furthermore, both density-based and detection-based counters are prone to
failure in scenes with several object types (Figure 1). The reason lies in the
specificity-generalization tradeoff. Obtaining a high recall requires
generalizing over the potentially diverse appearances of the selected object
type instances in the image. However, this also leads to false activations on
objects of other categories (false positives), leading to a reduced precision
and count overestimation. A possible solution is to train on multiple-class
images [22], however, this typically leads to a reduced recall and
underestimated counts.

We address the aforementioned issues by proposing a low-shot counter DAVE,
which combines the benefits of density-based and detection-based formulations,
and introduces a novel detect-and-verify paradigm. DAVE tackles the
specificity-generalization issues of the existing counters by applying a two-
stage pipeline (Figure 1). In the first, detection stage, DAVE leverages
density-based estimation to obtain a high-recall set of candidate detections,
which however may contain false positives. This is addressed by the second,
verification stage, where outliers are identified and rejected by analyzing
the candidate appearances, thus increasing the detection precision. Regions
corresponding to the outliers are then removed from the location density map
estimated in the first stage, thus improving the density-based total count
estimates as well. In addition, we extend DAVE to text-prompt-based and to a
zero-shot scenario, which makes DAVE the first zero-shot as well as text-
prompt detection-capable counter.

The primary contribution of the paper is the detect-and-verify paradigm for
low-shot counting that simultaneously achieves high recall and precision. The
proposed architecture is the first to extend to all low-shot counting
scenarios. DAVE uniquely merges the benefits of both density and detection-
based counting and is the first zero-shot-capable counter with detection
output. DAVE outperforms all state-of-the-art density-based counters on the
challenging benchmark [26], including the longstanding winner [6], achieving a
relative 20% MAE and 43% RMSE total-count error reductions. It also
outperforms all state-of-the-art detection-based counters on the recent
benchmark FSCD147 [22] by $\sim$20% in detection metrics, as well as in the
total count estimation by 38% MAE. Furthermore, it sets a new state-of-the-art
in text-prompt-based counting. The zero-shot DAVE variant outperforms all
zero-shot density-based counters and delivers detection accuracy on-par with
the most recent few-shot counters. DAVE thus simultaneously outperforms both
density-based and detection-based counters in a range of counting setups.

##  2 Related Work

Object counting emerged as detection-based counting of objects belonging to
specific classes, such as vehicles [5], cells [8], people [17], and polyps
[41]. To address poor performance in densely populated regions, density-based
methods [29, 3, 30, 31, 4] emerged as an alternative.

All these methods rely on the availability of large datasets to train
category-specific models, which, however are not available in many
applications.

Class-agnostic approaches addressed this issue by test-time adaptation to
various object categories with minimal supervision. Early representatives [19]
and [37] proposed predicting the density map by applying a siamese matching
network to compare image and exemplar features. Recently, the FSC147 dataset
[26] was proposed to encourage the development of few-shot counting methods.
Famnet [26] proposed a test-time adaptation of the backbone to improve density
map estimation. BMNet+ [28] improved localization by jointly learning
representation and a non-linear similarity metric. A self-attention mechanism
was applied to reduce the intra-class appearance variability. SAFECount [38]
introduced a feature enhancement module, improving generalization
capabilities. CounTR [16] used a vision transformer [7] for image feature
extraction and a convolutional encoder to extract exemplar features. An
interaction module based on cross-attention was proposed to fuse both, image
and exemplar features. LOCA [6] proposed an object prototype extraction
module, which combined exemplar appearance and shape with an iterative
adaptation.

All few-shot counting methods require few annotated exemplars to specify the
object class. With the recent development of large language models (e.g. [23])
text-prompt-based counting methods emerged. Instead of specifying exemplars by
bounding box annotations, these methods use text descriptions of the target
object class. ZeroCLIP [36] proposed text-based construction of prototypes,
which are used to select relevant image patches acting as exemplars for
counting. CLIPCount [15] leveraged CLIP [23] for image-text alignment and
introduced patch-text contrastive loss for learning the visual representations
used for density prediction. Several works [25, 13] address the extreme case
in which no exemplars are provided and the task is to count the majority class
objects (i.e., zero-shot counting).

With minimal architectural changes, the recent few-shot methods [16, 6] also
demonstrated a remarkable zero-shot counting performance. A common drawback of
density-based counters is that they do not provide object locations.

To address the aforementioned limitation of density-based counters, the first
few shot counting and detection method [22] has been recently proposed by
extending a transformer-based object detector [2] with an ability to detect
objects specified by exemplars. However, the detection-based counter falls far
behind in total count estimation compared with the best density-based
counters.

##  3 Counting by detection and verification

Figure 2: The proposed DAVE architecture consists of two stages, (i) detection
and (ii) verification, and outputs detected objects as well as an improved
location density map. NMS denotes non-maxima suppression, FFM is a feature
fusion module, $\Omega$ is a bounding box regression head and $\phi$ is the
verification feature extraction network.

Formally, given an input image $I\in\mathbb{R}^{H_{0}\times W_{0}\times 3}$
and a set of $k$ exemplar bounding boxes
$\boldsymbol{B}^{\mathrm{E}}=\\{b_{i}\\}_{i=1:k}$ denoting object exemplars, a
low-shot detection counter is required to report bounding boxes
$\boldsymbol{B}^{P}=\\{b_{i}\\}_{i=1:N_{P}}$ of all detected objects of the
same category and their estimated count.

In the following we present the new detect-and-verify few-shot counting and
detection method (DAVE), which consists of two stages. In the first,
detection, stage (Section 3.1), candidate regions are estimated by pursuing a
high recall, potentially including false positive detections, i.e., objects
belonging to an incorrect category. In the second, verification, stage
(Section 3.2) the candidate regions are analyzed to identify and reject the
outliers, thus increasing the detection precision. The outliers are used to
update the density map, thus also improving density-based count estimation,
which may compensate for missed objects and can differ from the number of
detections $N_{P}$. A detailed DAVE architecture is shown in Figure 2.

###  3.1 Detection stage

The aim of this stage is to predict candidate bounding boxes
$\boldsymbol{B}^{C}=\\{b_{i}\\}_{i=1:N_{c}}$ with a high recall. Detection is
thus split into first estimating the object centers
$\boldsymbol{C}=\\{(x_{c}^{i},y_{c}^{i})\\}_{i=1:N_{c}}$, and then predicting
the corresponding bounding box parameters. We re-purpose the architecture of
the recent low-shot counter LOCA [6] for estimating the object location
density map $\mathbf{\tilde{G}}$, from which we obtain the center locations
$\boldsymbol{C}$ by non-maxima suppression.111The minimal distance between two
peaks in NMS is set to 1 to maximize the detection rate. Briefly, the location
density estimation architecture is the following: the input image is first
encoded by ResNet-50 [12], followed by a transformer, generating the
representation $\mathbf{f}^{I}\in\mathbb{R}^{h\times w\times d}$. Exemplar
prototypes are constructed using the OPE module [6] and correlated with
$\mathbf{f}^{I}$ resulting in a similarity tensor
$\mathbf{\tilde{R}}\in\mathbb{R}^{h\times w\times d}$. A decoder is then
applied on $\mathbf{\tilde{R}}$ to obtain the final 2D location density map
$\mathbf{\hat{G}}\in\mathbb{R}^{H_{0}\times W_{0}}$. We refer the reader to
[6] for more details.

Next, features are constructed for regressing the bounding box parameters for
each detected center. The feature construction pipeline is designed to ensure
that final features reflect the objectness information specific to the class
selected by the exemplars. Features from the second, third, and fourth blocks
of the backbone are resized to $64\times 64$ pixels, concatenated along the
channel dimension and reduced to $d$ channels using a $3\times 3$ convolution,
i.e. $\mathbf{f}^{0}\in\mathbb{R}^{h\times w\times d}$. The features are then
upsampled to match the input image size
($\mathbf{f}^{1}\in\mathbb{R}^{H_{0}\times W_{0}\times d}$). Next, the
selected object category shape information is injected by fusing
$\mathbf{f}^{1}$ and the upscaled similarity tensor $\mathbf{\tilde{R}}$ using
the feature fusion module (FFM) [39], i.e.,
$\tilde{\mathbf{f}}=\mathrm{FFM}(\mathbf{f}^{1},\tilde{\mathbf{R}})$.

The constructed features $\tilde{\mathbf{f}}$ are then fed into a bounding box
regression head $\Omega(\cdot)$ akin to [40, 14], which predicts for each
location a distance to the left, right, top and bottom bounding box edge of
the underlying object. The network $\Omega(\cdot)$ consists of two $3\times 3$
convolutional layers with $d$ and $4$ channels with GroupNorm [33] and ReLU
operations in between, and predicts a dense bounding box map
$\mathbf{v}\in\mathbb{R}^{H_{0}\times W_{0}\times 4}$. The object candidate
bounding boxes $\boldsymbol{B}^{C}$ are thus obtained by reading out the
corresponding values from $\mathbf{v}$ at locations $\boldsymbol{C}$.

###  3.2 Verification stage

In practice, the candidate detections $\boldsymbol{B}^{C}$ retain a high
recall, but are also contaminated by false positives. The goal of the
verification stage is thus to increase the precision by analysing the
appearance of the detections and rejecting the outliers. First, a verification
feature vector $\mathbf{f}^{\mathrm{v}}_{i}$ is extracted for each detected
bounding box $b_{i}$ as follows. The backbone features $\mathbf{f}^{0}$ are
pooled into a feature tensor $\mathbf{f}_{i}\in\mathbb{R}^{s\times s\times d}$
and transformed by a shallow network $\phi(\cdot)$ consisting of two $1\times
1$ convolutions with $d$ channels and a BatchNorm and ReLu activation in
between. The verification features are also extracted for the annotated
exemplars, leading to $N_{C}+k$ features in total, i.e.,
$\boldsymbol{F}^{\mathrm{V}}=\\{\mathbf{f}^{\mathrm{v}}_{i}\\}_{i=1:(N_{C}+k)}$.

The verification features are then clustered by unsupervised clustering.
Specifically, spectral clustering [21] is applied to an affinity matrix
computed from cosine similarities between pairs of features in
$\boldsymbol{F}^{\mathrm{V}}$, yielding several clusters. Object candidate
detections belonging to clusters with at least one exemplar are kept, while
the other are labelled as outliers and removed, yielding the final set of
$N_{P}$ object detections $\boldsymbol{B}^{P}=\\{b_{i}\\}_{i=1:N_{P}}$.
Finally, the density map $\mathbf{\hat{G}}$ from the detection stage is
updated by setting all values outside of the detected bounding boxes to zero,
yielding $\mathbf{G}$, from which the improved density-based count is
estimated (Figure 2).

###  3.3 Zero-shot and prompt-based adaptation

Zero shot counting. DAVE is easily adapted to a zero-shot setup in which
exemplars are not provided and the task is to count and detect the majority-
class objects. First, the location density prediction part is replaced by its
zero-shot variant [6] to account for the absence of exemplars. The detection
stage and most of the verification stage remain unchanged. The only change in
the verification stage is the cluster selection method: all clusters whose
size is at least 45%222Extensive analysis shows robustness to this
hyperparameter. of the largest cluster are kept as positive detections and the
rest are identified as outliers. This is to account for the possibility that
clusters may break up due to the absence of exemplars specifying the level of
appearance similarity.

Prompt-based counting. Zero-shot DAVE is extended to the prompt-based counting
setup, in which the target object class is specified by a text prompt. The
only modification is the cluster selection protocol in the verification stage.
The text prompt embedding is extracted by CLIP and compared to the CLIP
embedding of each identified cluster. The latter is obtained by masking the
image regions outside the bounding boxes corresponding to the cluster and
computing the CLIP embedding. Cosine distances between the text embedding and
individual cluster embeddings are computed, and clusters with less than 85%2
of the highest prompt-to-cluster similarity are identified as outliers.

###  3.4 Training

Few-shot counting datasets typically contain centers of all objects annotated
and the bounding boxes available for only $k=3$ exemplars. We formulate the
training to adhere to these restrictions. The object centers can be used to
train location density prediction network. Since DAVE employs LOCA [6] for the
initial density prediction, we use the publicly available pretrained version
of LOCA, and train only the free parameters of the detection and verification
stages in two phases.

In the first phase, the detection stage (i.e., the FFM and $\Omega(\cdot)$) is
trained by a bounding box loss evaluated on the available ground truth
exemplar bounding boxes, i.e.,
$\mathcal{L}_{box}=\sum\nolimits_{i=1}^{k=3}1-\mathrm{GIoU}(\mathbf{v}(x^{c},y^{c}),b_{i}^{\mathrm{GT}})$,
where $(x^{(i)}_{c},y^{(i)}_{c})$ are locations in the central regions of the
ground truth bounding boxes $b_{i}^{\mathrm{GT}}$ and $\mathrm{GIoU}(\cdot)$
is the generalized intersection over union [27]

In the second phase, the verification feature extraction network $\phi(\cdot)$
is trained. Training examples are generated by stitching together a pair of
images with annotated exemplar objects of different classes. The stitched
image thus contains $2\times 3=6$ bounding boxes, yielding two sets of
features extracted by $\phi(\cdot)$, corresponding to the two sets of
exemplars: $\\{\mathbf{z}_{j}^{1}\\}_{j=1:3}$ and
$\\{\mathbf{z}_{j}^{2}\\}_{j=1:3}$. The verification network $\phi(\cdot)$ is
then trained by a contrastive loss [32]:

$\mathcal{L}_{cos}=\begin{cases}1-c(z_{j_{1}}^{i_{1}},z_{j_{2}}^{i_{2}}),&i_{1}=i_{2}\\\
\mathrm{max}(0,c(z_{j_{1}}^{i_{1}},z_{j_{2}}^{i_{2}})-\lambda),&\text{else},\end{cases}$

where $c(z_{j_{1}}^{i_{1}},z_{j_{2}}^{i_{2}})$ is the cosine similarity
between a pair of features, and $\lambda$ is the margin.

##  4 Experiments

###  4.1 Implementation details

Preprocessing. Following [16], the input image is resized such that the mean
of the exemplars width and height is between 50 and 10 pixels. In the zero-
shot setup, the method is bootstrapped, with applying the first pass to
estimate the object sizes and then applying the second pass with the resizing
as in the few-shot case.

Training. In the first training stage, the feature fusion module FFM and the
box regression head $\Omega(\cdot)$ are trained for 50 epochs by AdamW [18]
with learning rate $10^{-4}$, weight decay $10^{-4}$ and batch size 8. The
size of input images is kept fixed ($H_{0}=W_{0}=512$) by zero-padding. In the
second stage, the verification feature extraction network $\phi(\cdot)$ is
trained for 50 epochs by AdamW [18] with the learning rate $10^{-5}$, the
weight decay $10^{-4}$, and the batch size 64.

###  4.2 Density-based counting performance

DAVE is compared with the density-based state-of-the-art counters. For
consistent comparison, density-based count estimation is considered in DAVE as
well, i.e., the count is estimated by summation of the output location density
map ${\mathbf{G}}$ (Section 3.2). The methods are evaluated on the challenging
FSC147 [26], which contains 6135 images of 147 object classes, split into 3659
training, 1286 validation and 1190 test images. The object classes are
disjoint across the splits to reflect realistic applications where the target
object category is unseen during training. In each image, three exemplars are
annotated with bounding boxes and all target objects by point annotations. The
standard evaluation protocol [26, 28, 38] with Mean Absolute Error (MAE) and
Root Mean Squared Error (RMSE) is followed.

Few-shot counting. In few-shot counting, all three exemplars are considered as
the input. DAVE is compared with the most recent state-of-the-art density-
based counters: LOCA [6], CounTR [16], SAFECount [38], BMNet+ [28], VCN [24],
CFOCNet [37], MAML [10], FamNet [26], and CFOCNet [37]. Results are summarized
in Table 1.

DAVE outperforms all few-shot density-based counters by a large margin. It
outperforms the long-standing winner LOCA [6] by 13% and 20% in MAE on
validation and test sets, respectively. It achieves a relative improvement of
14% and a remarkable 43% RMSE on the validation and test sets, respectively,
setting a solid new state-of-the-art.

Table 1:  Few-shot density-based counting on the FSC147 [26].

| Validation set | Test set
---|---|---
Method | MAE | RMSE | MAE | RMSE
GMN [20] | 29.66 | 89.81 | 26.52 | 124.57
MAML [10] | 25.54 | 79.44 | 24.90 | 112.68
FamNet [26] | 23.75 | 69.07 | 22.08 | 99.54
CFOCNet [37] | 21.19 | 61.41 | 22.10 | 112.71
BMNet+ [28] | 15.74 | 58.53 | 14.62 | 91.83
VCN [24] | 19.38 | 60.15 | 18.17 | 95.60
SAFECount [38] | 15.28 | 47.20 3 | 14.32 | 85.54 3
CounTR [16] | 13.13 3 | 49.83 | 11.95 3 | 91.23
LOCA [6] | 10.24 2 | 32.56 2 | 10.79 2 | 56.97 2
DAVE | 8.91 1 | 28.08 1 | 8.66 1 | 32.36 1

To verify the source of performance improvements, we visualize DAVE density
predictions and compare them with the recent state-of-the-art methods (Figure
3). We observe that other methods often count objects of an incorrect category
(columns 1, 2, 3, 4, 5, 6, 7) or structures in the background texture (columns
8, 9, 10). This indicates that related methods over-generalize localization
features, which increases the recall at the cost of reduced precision. DAVE,
however, retains the high recall, while successfully identifying the outliers
and suppressing the corresponding activations in the density map, thus
improving precision. This indicates the strong benefits of the proposed
detect-and-verify paradigm for density-based counting.

Figure 3: Qualitative comparison of DAVE with LOCA [6], SAFECount [38] and
CounTR [16]. The first two columns show the input images and the ground truth
(GT), while the predicted densities are shown in the rest.

One-shot counting. In the one-shot counting setup, a single exemplar is
considered. Comparison with the recent state-of-the-art methods GMN [20],
CFOCNet [37], FamNet [26], BMNet+ [28], CounTR [16], and LOCA [6] is reported
in Table 2. DAVE excels in one-shot counting, surpassing the previous best-
performing methods by 5% and 10% MAE, and 9% and 12% RMSE on the validation
and test set, respectively. Results indicate that the detect-and-verify
paradigm helps to fully utilize the meaningful information from the only
available exemplar, leading to performance improvements.

Table 2:  One-shot density-based counting on the FSC147 [26].

| Validation set | Test set
---|---|---
Method | MAE | RMSE | MAE | RMSE
GMN [20] | 29.66 | 89.81 | 26.52 | 124.57
CFOCNet [37] | 27.82 | 71.99 | 28.60 | 123.96
FamNet [26] | 26.55 | 77.01 | 26.76 | 110.95
BMNet+ [28] | 17.89 | 61.12 | 16.89 | 96.65
CounTR [16] | 13.15 3 | 49.72  3 | 12.06 2 | 90.01 3
LOCA [6] | 11.36 2 | 38.04 2 | 12.53 3 | 75.32 2
DAVE | 10.79 1 | 34.55 1 | 11.29 1 | 66.36 1

Prompt-based counting. The prompt-based modification of DAVE from Section 3.3
(denoted here as DAVE${}_{\text{prm}}$) is compared with the recent state-of-
the-art prompt-based counters ZeroClip [36], CounTX [1] and CLIP-Count [15].
Results in Table 3 show that DAVE${}_{\text{prm}}$ outperforms the best
counter (CounTX [1]) by 12% and 5% MAE and 17% and 3% RMSE on validation and
test sets, respectively. DAVE thus sets a solid new state-of-the-art in this
setup.

Table 3:  Prompt-based counting on the FSC147 [26].

| Validation Set | Test Set
---|---|---
Method | MAE | RMSE | MAE | RMSE
ZeroClip [36] | 26.93 | 88.63 | 22.09 | 115.17
CLIP-Count [15] | 18.79 3 | 61.18 2 | 17.78 3 | 106.62 2
CounTX [1] | 17.70 2 | 63.61 3 | 15.73 2 | 106.88 3
DAVE${}_{\text{prm}}$ | 15.48 1 | 52.57 1 | 14.90 1 | 103.42 1

Zero-shot counting. The zero-shot modification of DAVE from Section 3.3
(denoted here as DAVE${}_{\text{0-shot}}$) is compared with the best zero-shot
counters LOCA [6], CounTR [16], RepRPN-C [25] and RCC [13]. The results in
Table 4 show that DAVE${}_{\text{0-shot}}$ outperforms the state-of-the-art
method LOCA [6], by a significant margin of 11% and 7% MAE on validation and
test set, respectively, and outperforms all state-of-the-art in RMSE.

Table 4: Zero-shot density-based counting on the FSC147 [26].

| Validation Set | Test Set
---|---|---
Method | MAE | RMSE | MAE | RMSE
RepRPN-C [25] | 29.24 | 98.11 | 26.66 | 129.11
RCC [13] | 17.49 | 58.81 3 | 17.12 | 104.53 3
CounTR [16] | 17.40 2 | 70.33 | 14.12 1 | 108.01
LOCA [6] | 17.43 3 | 54.96 2 | 16.22 3 | 103.96 2
DAVE${}_{\text{0-shot}}$ | 15.54 1 | 52.67 1 | 15.14 2 | 103.49 1

###  4.3 Detection performance

Few-shot detection. Few-shot detectIon performance is evaluated on the FSCD147
[22] dataset, which has been recently extended from FSC147 [26] by annotating
all objects with bounding boxes. We follow the standard evaluation protocol
[22] with Average Precision (AP) and Average Precision at IoU=$50$ (AP50) as
the main performance measures. DAVE is compared with the most recent few-shot
detection-based counter C-DETR [22] as well as adapted few-shot detectors
FSDetView [34], AttRPN [9] from [22].

Table 5: Detection performance on FSCD147 [22].

| Validation Set | Test Set
---|---|---
Method | AP | AP50 | AP | AP50
FSDetView-PB [34] | - | - | 13.41 | 32.99
FSDetView-RR [34] | - | - | 17.21 | 33.70
AttRPN-RR [9] | - | - | 18.53 | 35.87
AttRPN-PB [9] | - | - | 20.97 3 | 37.19 3
C-DETR [22] | 17.27 2 | 41.90 2 | 22.66 2 | 50.57 2
DAVE | 24.20 1 | 61.08 1 | 26.81 1 | 62.82 1

Results in Table 5 show that DAVE sets a new state-of-the-art in all measures
on both validation and test splits. On the validation split, DAVE outperforms
the most recent C-DETR [22] by 40% and 45% in AP and AP50, respectively, and
outperforms C-DETR on the test split by 18% and 24% in AP and AP50,
respectively.

The high AP50 and AP indicate that DAVE retrieves more objects with less false
positives, and that localization of the detected objects is more accurate (see
Figure 4, rows 1 and 2). DAVE also performs comparatively well in high-density
regions with small objects, which are very challenging for the current state-
of-the-art (Figure 4, rows 3 and 4). Compared to the best methods, DAVE better
learns the appearance of targets composed of fine-grained objects, leading to
improved detections (e.g., bowls of pills in Figure 4, row 5). These results
speak of a substantial potential of the detect-and-verify approach for
accurate localization.

We further evaluate DAVE on two recent datasets FSCD-LVIS [22] and FSCD-
LVISuns [22]. Both datasets are created from the LVIS [11] dataset containing
6196 images with 377 classes. In FSCD-LVIS [22] dataset, some classes in test
set appear also in the training set. The second dataset, FSCD-LVISuns [22]
ensures that test set does not contain classes observed during training.
Results in Table 6 show that DAVE outperforms the top method C-DETR by 37% and
55% w.r.t. AP and AP50, respectively on the FSCD-LVIS. On FSCD-LVISuns, DAVE
also substantially outperforms the best method by 7% and 25% in AP and AP50,
respectively.

Table 6: Detection on FSCD-LVIS/FSCD-LVISuns [22] test sets.

| FSCD-LVIS | FSCD-LVISuns
---|---|---
Method | AP | AP50 | AP | AP50
FSDetView-RR [34] | 1.96 | 6.70 | 0.89 | 2.38
FSDetView-PB [34] | 2.72 | 7.57 | 1.03 | 2.89
AttRPN-RR [9] | 3.28 | 9.44 | 2.52 | 7.86
AttRPN-PB [9] | 4.08 3 | 11.15 3 | 3.15 3 | 7.87 3
C-DETR [22] | 4.92 2 | 14.49 2 | 3.85 2 | 11.28 2
DAVE | 6.75 1 | 22.51 1 | 4.12 1 | 14.16 1

Figure 4: DAVE localization performance in challenging situations compared
with the current best method C-DETR [22].

Zero-shot detection. To the best of our knowledge, DAVE${}_{\text{0-shot}}$ is
the first zero-shot method capable of counting and detection. We thus compare
it with the best counting and detection method C-DETR [22], which however is
not zero-shot, since it requires three input exemplars. Results in Table 7
reveal excellent performance of DAVE${}_{\text{0-shot}}$. On the validation
split, it outperforms C-DETR [22] by 12% in AP50 and delivers comparable
performance on the test split. While it achieves equally robust detection
(AP50) as C-DETR, the localization is slightly less accurate (lower AP).
Nevertheless, this is a remarkable result, considering C-DETR requires
annotated exemplars as input, while DAVE${}_{\text{0-shot}}$ does not. The
experiment validates the generality of the proposed detect-and-verify paradigm
for all low-shot counting tasks (few- and zero-shot).

Table 7:  Without requiring exemplars, DAVE${}_{\text{0-shot}}$ performs on
par or better than C-DETR with three input exemplars.

| Validation Set | Test Set
---|---|---
Method | AP | AP50 | AP | AP50
C-DETR (3-shot) [22] | 17.27 1 | 41.90 2 | 22.66 1 | 50.57 1
DAVE${}_{\text{0-shot}}$ | 16.31 2 | 46.87 1 | 18.55 2 | 50.08 2

Few-shot detection counting. The previous experiments analyzed the accuracy of
detections. To further analyze the detection capability, we measure the
accuracy of count estimation when approximated by the number of detected
bounding boxes. In the following, we use the superscript DAVE${}^{\text{box}}$
to distinguish the results from the density-based count estimation. Results
are reported in Table 8. DAVE${}^{\text{box}}$ outperforms all state-of-the-
art by a significant margin, in particular, it outperforms C-DETR by 38% in
MAE and 40% in RMSE. This further confirms the remarkable detection
performance compared to the most recent detection-based methods. Note that the
DAVE${}^{\text{box}}$ not only outperforms all detection-based counters, but
also all published density-based counters in terms of MAE, including LOCA [6]
(Table 1), which have been up to now unchallenged by the detection-based
counters.

Table 8: Few-shot detection-based counting on FSC147 [26].

| Validation Set | Test Set
---|---|---
Method | MAE | RMSE | MAE | RMSE
FSDetView-RR [34] | - | - | 37.83 | 146.56
FSDetView-PB [34] | - | - | 37.54 | 147.07
AttRPN-RR [9] | - | - | 32.70 | 141.07 3
AttRPN-PB [9] | - | - | 32.42 3 | 141.55
C-DETR [22] | 20.38 2 | 82.45 2 | 16.79 2 | 123.56 2
DAVE${}^{\text{box}}$ | 9.75 1 | 40.30 1 | 10.45 1 | 74.51 1

###  4.4 Ablation study

Impact of mixed-class training. We first verify whether false positives in
state-of-the-art methods could be reduced by simply training on images with
multiple object categories. The current top low-shot counter LOCA [6] is thus
retrained on multi-class images, in which a FSCD147 [22] training image is
concatenated with another image containing objects from a different class for
hard negative training examples, as described in Section 3.4. We denote this
version by LOCA${}_{\text{mul}}$ and also include CounTR [16] in the
comparison since it already applies such a training setup. We also construct a
subset of FSCD147 composed of images containing objects from different
classes333Images were obtained from the test and evaluation splits of FSCD147.
(denoted as FSCD147mul), to expose the sensitivity of a counting method to
other-class objects. Table 9 shows that the counting performance of LOCA on
FSCD147mul is significantly lower compared to FSCD147, confirming that multi-
class images are highly challenging. Training LOCA on multi-class images
(LOCAmul) substantially reduces the average error on FSCD147mul by 43%, but
increases it by 28% on FSC147. This is likely due to LOCA${}_{\text{mul}}$
compensating for the improved multi-class performance by a reduced overall
performance. However, DAVE demonstrates excellent performance on both datasets
and also consistently outperforms both LOCA versions and CounTR by large
margins.

Impact of cluster selection. We compare the prompt-based DAVE${}_{\text{prm}}$
with DAVE${}_{\text{0-shot}}$ to demonstrate the impact of the cluster
selection method. Notably, DAVE${}_{\text{prm}}$ selects the clusters by
comparing them with text prompts, while DAVE${}_{\text{0-shot}}$ applies
majority voting (Section 3.3). While the performance of the two methods is
comparable on average, DAVE${}_{\text{prm}}$ substantially outperforms on
FSCD147${}_{\text{mul}}$. This result is presented in Table 9 (bottom) and
indicates that prompt-based cluster selection is particularly important on
images with multiple classes to resolve the object category ambiguity.

Table 9:  Performance in presence of objects from multiple classes.

| FSCD147 | FSCD147${}_{\text{mul}}$
---|---|---
| MAE($\downarrow$) | RMSE($\downarrow$) | AP50($\uparrow$) | MAE($\downarrow$) | RMSE($\downarrow$)
LOCA [6] | 10.79 2 | 56.97 2 | - | 21.28 | 43.67
LOCA${}_{\text{mul}}$ [6] | 12.63 | 78.95 | - | 13.25 2 | 22.57 2
CounTR [16] | 11.95 3 | 91.23 3 | - | 14.56 3 | 27.41 3
DAVE | 8.66 1 | 32.36 1 | 61.08 1 | 3.05 1 | 4.94 1
DAVE${}_{\text{0-shot}}$ | 15.54 | 103.49 | 50.08 | 12.86 | 23.21
DAVE${}_{\text{prm}}$ | 14.90 | 103.42 | 50.24 | 6.46 | 10.72

Table 10:  DAVE architecture analysis on FSCD147 [26].

| MAE($\downarrow$) | RMSE($\downarrow$) | AP($\uparrow$) | AP50($\uparrow$)
---|---|---|---|---
DAVE | 8.91 | 28.08 | 24.19 | 61.08
DAVE${}_{\overline{\phi}}$ | 9.41 | 29.91 | 24.11 | 60.85
DAVE${}_{\overline{\text{R}}}$ | 8.97 | 28.12 | 19.50 | 53.57
DAVE${}_{\text{cat}}$ | 8.99 | 28.18 | 18.49 | 51.72
DAVE${}_{\text{sum}}$ | 8.95 | 28.13 | 20.74 | 55.54

Architecture design. Finally, we evaluate the DAVE architectural design
decisions. First, we analyze the impact of using the prototype correlation
response tensor $\tilde{R}$ in the box regression step. Table 10 shows that
removing $\tilde{R}$ (DAVE${}_{\overline{\text{R}}}$) results in a substantial
drop of 12% and 9% in AP and AP50. This verifies the importance of fusion with
$\tilde{R}$, which contains size and shape information of the selected
objects, considerably improving the localization accuracy of DAVE detections.
In particular, for target objects composed of smaller objects, this
information is crucial for accurate bounding box prediction (Figure 4, last
row). To evaluate the importance of the feature fusion module (FFM), we
replace it with sum (DAVE${}_{{\text{sum}}}$), and concatenation
(DAVE${}_{{\text{cat}}}$). Both replacements result in a detection performance
drop of 9% and 15% AP, respectively. To validate the importance of robust
appearance features in the verification stage, we remove the feature
projection network $\phi(\cdot)$ and perform clustering directly on the
backbone features (DAVE${}_{\overline{\phi}}$). The errors of
DAVE${}_{\overline{\phi}}$ increase by 6% in MAE and 7% RMSE.

Limitations. DAVE outputs detections (i.e., bounding boxes), as well as total
counts estimated from the density. To expose limitations, we inspect the
discrepancy between the total count estimates and the number of detections
with respect to the number of objects in the image (Figure 5). The discrepancy
is most apparent for images with very large object counts, which typically
contain many small objects packed together (i.e., extremely dense regions).
Further error reductions are thus expected by improving DAVE detection stage
in the presence of extreme density. The limitation is common to all low-shot
counters, and we defer this to future research.

Figure 5: DAVE density-based and box-count accuracy with respect to the number
of objects in the image.

##  5 Conclusion

We presented a novel low-shot object counting and detection method DAVE, that
narrows the performance gap between density-based and detection-based
counters. DAVE spans the entire low-shot spectrum, also covering text-prompt
setups, and is the first method capable of zero-shot detection-based counting.
This is achieved by the novel detect-and-verify paradigm, which increases the
recall as well as precision of the detections.

Extensive analysis demonstrates that DAVE sets a new state-of-the-art in total
count estimation, as well as in detection accuracy on several benchmarks with
comparable complexity to related methods, running 110ms/image. In particular,
DAVE outperforms the long-standing top low-shot counter [6], as well as the
recent detection-based counter [22]. In a zero-shot setup, DAVE outperforms
all density-based counters and delivers detections on par with the most recent
few-shot counter that requires at least few annotations. DAVE also sets a new
state-of-the-art in prompt-based counting. In our future work, we plan to
explore interactive counting with the human in the loop and improve detection
in extremely dense regions.

Acknowledgements. This work was supported by Slovenian research agency program
P2-0214 and projects J2-2506, L2-3169 and Z2-4459.

## References

  * Amini-Naieni et al. [2023] N. Amini-Naieni, K. Amini-Naieni, T. Han, and A. Zisserman.  Open-world text-specified object counting.  In _BMVC_ , 2023.
  * Carion et al. [2020] Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko.  End-to-end object detection with transformers.  In _European conference on computer vision_ , pages 213–229. Springer, 2020.
  * Cheng et al. [2022] Zhi-Qi Cheng, Qi Dai, Hong Li, Jingkuan Song, Xiao Wu, and Alexander G Hauptmann.  Rethinking spatial invariance of convolutional networks for object counting.  In _CVPR_ , pages 19638–19648, 2022.
  * Cholakkal et al. [2019] Hisham Cholakkal, Guolei Sun, Fahad Shahbaz Khan, and Ling Shao.  Object counting and instance segmentation with image-level supervision.  In _CVPR_ , 2019.
  * Dai et al. [2019] Zhe Dai, Huansheng Song, Xuan Wang, Yong Fang, Xu Yun, Zhaoyang Zhang, and Huaiyu Li.  Video-based vehicle counting framework.  _IEEE Access_ , 7:64460–64470, 2019.
  * Djukic et al. [2023] Nikola Djukic, Alan Lukezic, Vitjan Zavrtanik, and Matej Kristan.  A low-shot object counting network with iterative prototype adaptation.  In _ICCV_ , 2023.
  * Dosovitskiy et al. [2021] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby.  An image is worth 16x16 words: Transformers for image recognition at scale.  In _ICLR_ , 2021.
  * Falk et al. [2019] Thorsten Falk, Dominic Mai, Robert Bensch, Özgün Çiçek, Ahmed Abdulkadir, Yassine Marrakchi, Anton Böhm, Jan Deubner, Zoe Jäckel, Katharina Seiwald, et al.  U-net: deep learning for cell counting, detection, and morphometry.  _Nature methods_ , 16(1):67–70, 2019.
  * Fan et al. [2020] Qi Fan, Wei Zhuo, Chi-Keung Tang, and Yu-Wing Tai.  Few-shot object detection with attention-rpn and multi-relation detector.  In _CVPR_ , pages 4013–4022, 2020.
  * Finn et al. [2017] Chelsea Finn, Pieter Abbeel, and Sergey Levine.  Model-agnostic meta-learning for fast adaptation of deep networks.  In _International conference on machine learning_ , pages 1126–1135. PMLR, 2017.
  * Gupta et al. [2019] Agrim Gupta, Piotr Dollar, and Ross Girshick.  Lvis: A dataset for large vocabulary instance segmentation.  In _Proceedings of the IEEE/CVF conference on computer vision and pattern recognition_ , pages 5356–5364, 2019.
  * He et al. [2016] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun.  Deep residual learning for image recognition.  In _Proceedings of the IEEE conference on computer vision and pattern recognition_ , pages 770–778, 2016.
  * Hobley and Prisacariu [2022] Michael Hobley and Victor Prisacariu.  Learning to count anything: Reference-less class-agnostic counting with weak supervision.  _arXiv preprint arXiv:2205.10203_ , 2022.
  * Huang et al. [2015] Lichao Huang, Yi Yang, Yafeng Deng, and Yinan Yu.  Densebox: Unifying landmark localization with end to end object detection.  _arXiv preprint arXiv:1509.04874_ , 2015.
  * Jiang et al. [2023] Ruixiang Jiang, Lingbo Liu, and Changwen Chen.  Clip-count: Towards text-guided zero-shot object counting.  _ACM Multimedia 2023_ , 2023.
  * Liu et al. [2022] Chang Liu, Yujie Zhong, Andrew Zisserman, and Weidi Xie.  Countr: Transformer-based generalised visual counting.  In _BMVC_. BMVA Press, 2022.
  * Liu et al. [2019] Weizhe Liu, Mathieu Salzmann, and Pascal Fua.  Context-aware crowd counting.  In _CVPR_ , 2019.
  * Loshchilov and Hutter [2019] Ilya Loshchilov and Frank Hutter.  Decoupled weight decay regularization.  _ICLR_ , 2019.
  * Lu et al. [2018] Erika Lu, Weidi Xie, and Andrew Zisserman.  Class-agnostic counting.  In _ACCV_ , pages 669–684. Springer, 2018.
  * Lu et al. [2019] Erika Lu, Weidi Xie, and Andrew Zisserman.  Class-agnostic counting.  In _Computer Vision–ACCV 2018: 14th Asian Conference on Computer Vision, Perth, Australia, December 2–6, 2018, Revised Selected Papers, Part III 14_ , pages 669–684. Springer, 2019.
  * Ng et al. [2001] Andrew Ng, Michael Jordan, and Yair Weiss.  On spectral clustering: Analysis and an algorithm.  _NeurIPS_ , 14, 2001.
  * Nguyen et al. [2022] Thanh Nguyen, Chau Pham, Khoi Nguyen, and Minh Hoai.  Few-shot object counting and detection.  In _ECCV_ , pages 348–365. Springer, 2022.
  * Radford et al. [2021] Alec Radford, Ilya Sutskever, Jong Wook Kim, Gretchen Krueger, and Sandhini Agarwal.  Clip: connecting text and images.  _OpenAI. https://openai. com/blog/clip/_ , 2021.
  * Ranjan and Hoai [2022] Viresh Ranjan and Minh Hoai.  Vicinal counting networks.  In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops_ , pages 4221–4230, 2022.
  * Ranjan and Nguyen [2022] Viresh Ranjan and Minh Hoai Nguyen.  Exemplar free class agnostic counting.  In _Proceedings of the Asian Conference on Computer Vision_ , pages 3121–3137, 2022.
  * Ranjan et al. [2021] Viresh Ranjan, Udbhav Sharma, Thu Nguyen, and Minh Hoai.  Learning to count everything.  In _CVPR_ , pages 3394–3403, 2021.
  * Rezatofighi et al. [2019] Hamid Rezatofighi, Nathan Tsoi, JunYoung Gwak, Amir Sadeghian, Ian Reid, and Silvio Savarese.  Generalized intersection over union.  In _CVPR_ , 2019.
  * Shi et al. [2022] Min Shi, Hao Lu, Chen Feng, Chengxin Liu, and Zhiguo Cao.  Represent, compare, and learn: A similarity-aware framework for class-agnostic counting.  In _CVPR_ , pages 9529–9538, 2022.
  * Shu et al. [2022] Weibo Shu, Jia Wan, Kay Chen Tan, Sam Kwong, and Antoni B Chan.  Crowd counting in the frequency domain.  In _CVPR_ , pages 19618–19627, 2022.
  * Wan and Chan [2020] Jia Wan and Antoni Chan.  Modeling noisy annotations for crowd counting.  _NeurIPS_ , 33:3386–3396, 2020.
  * Wang et al. [2020] Boyu Wang, Huidong Liu, Dimitris Samaras, and Minh Hoai Nguyen.  Distribution matching for crowd counting.  _NeurIPS_ , 33:1595–1607, 2020.
  * Wang and Liu [2021] Feng Wang and Huaping Liu.  Understanding the behaviour of contrastive loss.  In _CVPR_ , pages 2495–2504, 2021.
  * Wu and He [2018] Yuxin Wu and Kaiming He.  Group normalization.  In _ECCV_ , pages 3–19, 2018.
  * Xiao et al. [2022] Yang Xiao, Vincent Lepetit, and Renaud Marlet.  Few-shot object detection and viewpoint estimation for objects in the wild.  _IEEE TPAMI_ , 45(3):3090–3106, 2022.
  * Xie et al. [2018] Weidi Xie, J Alison Noble, and Andrew Zisserman.  Microscopy cell counting and detection with fully convolutional regression networks.  _Computer methods in biomechanics and biomedical engineering: Imaging & Visualization_, 6(3):283–292, 2018.
  * Xu et al. [2023] Jingyi Xu, Hieu Le, Vu Nguyen, Viresh Ranjan, and Dimitris Samaras.  Zero-shot object counting.  In _CVPR_ , pages 15548–15557, 2023.
  * Yang et al. [2021] Shuo-Diao Yang, Hung-Ting Su, Winston H Hsu, and Wen-Chin Chen.  Class-agnostic few-shot object counting.  In _WACV_ , pages 870–878, 2021.
  * You et al. [2023] Zhiyuan You, Kai Yang, Wenhan Luo, Xin Lu, Lei Cui, and Xinyi Le.  Few-shot object counting with similarity-aware feature enhancement.  In _WACV_ , pages 6315–6324, 2023.
  * Yu et al. [2018] Changqian Yu, Jingbo Wang, Chao Peng, Changxin Gao, Gang Yu, and Nong Sang.  Bisenet: Bilateral segmentation network for real-time semantic segmentation.  In _ECCV_ , pages 325–341, 2018.
  * Yu et al. [2016] Jiahui Yu, Yuning Jiang, Zhangyang Wang, Zhimin Cao, and Thomas Huang.  Unitbox: An advanced object detection network.  In _ACM MM_ , pages 516–520, 2016.
  * Zavrtanik et al. [2020] Vitjan Zavrtanik, Martin Vodopivec, and Matej Kristan.  A segmentation-based approach for polyp counting in the wild.  _Engineering Applications of Artificial Intelligence_ , 88:103399, 2020.


# Nonlocal constants of motion
in Lagrangian Dynamics of any order

Gianluca Gorni  ID
Università di Udine, Dipartimento di
Scienze Matematiche, Informatiche e Fisiche
via delle Scienze 208, 33100 Udine, Italy
<EMAIL_ADDRESS>Mattia Scomparin  ID
Mogliano Veneto 31021, Italy
https://orcid.org/0000-0002-2795-5929
<EMAIL_ADDRESS>Gaetano Zampieri  ID
Università di Verona, Dipartimento di Informatica
strada Le Grazie 15, 37134 Verona, Italy
<EMAIL_ADDRESS>
###### Abstract

We describe a recipe to generate “nonlocal” constants of motion for ODE
Lagrangian systems. As a sample application, we recall a nonlocal constant of
motion for dissipative mechanical systems, from which we can deduce global
existence and estimates of solutions under fairly general assumptions. Then we
review a generalization to Euler-Lagrange ODEs of order higher than two,
leading to first integrals for the Pais-Uhlenbeck oscillator and other
systems. Future developments may include adaptations of the theory to Euler-
Lagrange PDEs.

Keywords: Higher-order Lagrangians, nonlocal constants, first integrals,
dissipative mechanical systems, Pais-Uhlenbeck oscillator.

Dedicated to prof. Chaudry Masood Khalique

on the occasion of his retirement

##  1 Introduction

We are interested in constants of motion for the _Euler-Lagrange equation_

$\frac{d}{dt}\partial_{\dot{q}}L\bigl{(}t,q(t),\dot{q}(t)\bigr{)}-\partial_{q}L\bigl{(}t,q(t),\dot{q}(t)\bigr{)}=0,$
(1.1)

where $L(t,q,\dot{q})$ is a smooth scalar valued Lagrangian function,
$t\in\mathbb{R}$, $q,\dot{q}\in\mathbb{R}^{n}$. In the paper [5] the first and
the last author revisited Noether’s Theorem, which links first integrals with
symmetries of the Lagrangian $L$. Leaving aside asynchronous perturbations and
boundary terms and other issues, here we single out the following simple
result. (Notation: the central dot is the scalar product in $\mathbb{R}^{n}$).

######  Theorem 1.1.

Let $q(t)$ be a solution to the Euler-Lagrange equation and let
$q_{\lambda}(t)$, $\lambda\in\mathbb{R}$, be a smooth family of perturbed
motions, such that $q_{0}(t)\equiv q(t)$. Then the following function of $t$
is constant

$\partial_{\dot{q}}L\bigl{(}t,q(t),\dot{q}(t)\bigr{)}\cdot\partial_{\lambda}q_{\lambda}(t)\big{|}_{\lambda=0}-\int_{t_{0}}^{t}\frac{\partial}{\partial\lambda}L\bigl{(}s,q_{\lambda}(s),\dot{q}_{\lambda}(s)\bigr{)}\big{|}_{\lambda=0}ds\,.$
(1.2)

The proof is straightforward: we just take the derivative of the function in
(1.2) and use the Euler-Lagrange equation and reverse the order of a double
derivative.

We call (1.2) the _constant of motion associated to the family_
$q_{\lambda}(t)$. For a random family, we may expect the constant of motion to
be trivial or inconsequential. In general it is _nonlocal_ , which means that
its value at a time $t$ depends not only on the current state
$(t,q(t),\dot{q}(t))$ at time $t$, but also on the whole history between
$t_{0}$ and $t$.

In the original spirit of Noether’s theorem we can concentrate the attention
to families $q_{\lambda}(t)$ which make the integrand in (1.2) vanish whenever
$L$ enjoys an invariance property. For instance, for the Lagrangian of a
particle in the plane under a central force field

$L(t,q,\dot{q}):=\frac{1}{2}m\lVert\dot{q}\rVert^{2}-U\bigl{(}t,\lVert
q\rVert\bigr{)},\quad q=(q_{1},q_{2})\in\mathbb{R}^{2},$ (1.3)

the rotation family

$q_{\lambda}(t):=\begin{pmatrix}\cos\lambda&-\sin\lambda\\\
\sin\lambda&\cos\lambda\end{pmatrix}\begin{pmatrix}q_{1}(t)\\\
q_{2}(t)\end{pmatrix}$ (1.4)

exploits the invariance of $L$ under rotations when plugged into (1.2), and
leads to the conservation of the angular momentum $\det(q(t),\dot{q}(t))$,
which is definitely a _local_ first integral.

In a series of papers we have used Theorem 1.1 to find numerous _nonlocal_
constants of motion which are useful. Here is a partial list.

  * •

Consider a particle moving in a time-independent potential field
$U(q),q\in\mathbb{R}^{n}$ and _viscous_ , i.e., linear, fluid resistance. We
see at once that we have global existence in the future of the solutions to
the Euler-Lagrange equation. What about the existence in the past? For a quite
natural choice of the family $q_{\lambda}(t)$, after an integration by parts
the integrand in (1.2) becomes negative, provided we assume $U\geq 0$. Under
these conditions the first term in (1.2) is an increasing function of time,
which permits to prove the _global existence in the past_. The paper [6] also
obtains other estimates for the solutions for this system and for some Lane-
Emden equation for which global existence is proved too. We have picked this
example for a detailed exposition in Section 2 below, as an illustration of
one way of using our nonlocal constants of motion.

  * •

General time-independent homogeneous potentials of degree $-2$, for instance
Calogero’s potential for the one dimensional $n$-body problem with inversely
quadratic pair potentials, taken from [5], for which an explicit formula of
the time-dependence of the distance from the origin is proved, even though we
do not know the shape of the orbit.

  * •

The Maxwell-Bloch equations for conservative laser dynamics taken from [7],
where (1.2) by derivation permits to separate the equations (in a nonstandard
way) into a system exhibiting “fish dynamics” and a system with central force.

Theorem 1.1 can be generalized to _nonvariational_ Lagrange equations, as we
do in [8], among other results on Killing-type equations, and applications
for:

  * •

A particle under a time-independent potential field $U(q),q\in\mathbb{R}^{n}$,
and _hydraulic_ , i.e. quadratic, fluid resistance, a result taken from Gorni-
Zampieri [10], for which the result in dynamics is: if $0\leq U\leq
U_{\sup}<+\infty$, all the solutions for which the initial kinetic energy is
strictly greater than $U_{\sup}$ explode in the past in finite time.

  * •

The dissipative Maxwell-Bloch equations for laser dynamics, taken from Gorni-
Residori-Zampieri [9], for which a quite natural family $q_{\lambda}(t)$
yields a constant of motion (1.2) which, for a special choice of the
parameters, turns out to be a genuine first integral $N(t,q,\dot{q})$ since
the integral term vanishes. The first integral permits some kind of separation
of variables.

The paper [10] presents the result on hydraulic fluid resistance and gives a
survey on all other applications we mentioned till now. The novelty in the
present survey is the introduction of Scomparin’s generalization of Theorem
1.1 to higher-order Lagrangian systems, which recently appeared in [18].

For $N=1,2,\ldots$ consider the _higher-order Euler-Lagrange equation_

$\sum_{k=0}^{N}(-1)^{k}\frac{d^{k}}{dt^{k}}\,\partial_{q^{\scriptscriptstyle(k)}\displaystyle}L(t,q,\ldots,q^{\scriptscriptstyle(N)}\displaystyle)=0,$
(1.5)

where the $N^{\text{\tiny th}}$-order Lagrangian $L$ is a smooth function with
$t\in\mathbb{R}$, and
$q,\ldots,q^{\scriptscriptstyle(N)}\displaystyle\in\mathbb{R}^{n}$. We use
$q^{\scriptscriptstyle(k)}\displaystyle\equiv d^{k}q/dt^{k}$.

Within the higherer-order framework, a first integral is a smooth function

$K(t,q,q^{\scriptscriptstyle(1)}\displaystyle,q^{\scriptscriptstyle(2)}\displaystyle,\ldots)$

that is constant along all solutions of the Euler-Lagrange equation (1.5). The
celebrated Noether’s Theorem establishes a relation between invariance
proprieties of a Lagrangian and its first integrals [2, 4].

Scomparin’s paper[18] generalizes Theorem 1.1 to
$N^{\scriptscriptstyle\mathrm{th}}$-order Lagrangians:

######  Theorem 1.2.

Let $t\mapsto q(t)$ be a solution to the Euler-Lagrange equation for smooth
$L(t,q,\ldots,q^{\scriptscriptstyle(N)}\displaystyle)$, and let
$q_{\lambda}(t)$, $\lambda\in\mathbb{R}$, be a smooth family of perturbed
motions, such that $q_{0}(t)\equiv q(t)$. Then the following function of t is
constant:

$\sum_{j=1}^{N}\sum_{k=0}^{j-1}(-1)^{k}\frac{d^{k}}{dt^{k}}\,\partial_{q^{\scriptscriptstyle(j)}\displaystyle}L(t,q,\ldots,q^{\scriptscriptstyle(N)}\displaystyle)\cdot\partial_{\lambda}q_{\lambda}^{\scriptscriptstyle(j-k-1)}\displaystyle\big{\rvert}_{\lambda=0}-\\\
-\int_{t_{0}}^{t}\\!\frac{\partial}{\partial\lambda}\\!L(s,q_{\lambda},\ldots,q_{\lambda}^{\scriptscriptstyle(N)}\displaystyle)\big{\rvert}_{\lambda=0}ds.$
(1.6)

A basic higher-order mechanical system is the _Pais-Uhlenbeck oscillator_
[17], whose Lagrangian function is

$L^{\scriptscriptstyle\mathrm{PU}}=\tfrac{1}{2}q^{\scriptscriptstyle(2)}{}^{2}-\tfrac{1}{2}(w_{1}^{2}+w_{2}^{2})\,q^{\scriptscriptstyle(1)}{}^{2}+\tfrac{1}{2}w_{1}^{2}w_{2}^{2}q^{2},$
(1.7)

with $w_{1},w_{2}>0$. Its Euler-Lagrange equation is

$q^{\scriptscriptstyle(4)}\displaystyle+(w_{1}^{2}+w_{2}^{2})q^{\scriptscriptstyle(2)}\displaystyle+w_{1}^{2}w_{2}^{2}\,q=0.$
(1.8)

Higher-order Lagrangians provide a very large class of models for modified
gravity theories [11], quantum-loop cosmologies [12], and string theories
[14]. Approaching higher-order mechanics from a new nonlocal point of view
provides new perspectives to identify novel first integrals without
necessarily requiring invariance proprieties on the already difficult to
investigate structure of higher-order Lagrangians. Hopefully Theorem 1.2 will
provide a valuable tool to give a novel insight into stability proprieties of
higher-order models and boundedness of related solutions as is done for second
order equations in Kaparulin [16, 15] and in the papers mentioned above.

Section 3 below summarizes the main results in Scomparin’s paper [18].

##  2 An application to dissipative dynamics

The results in this section are taken from Gorni-Zampieri [6].

Let us consider the first integral of _energy_ which is generally derived in
Noether’s framework by the use of asynchronous perturbations but can also be
treated by means of Theorem 1.1. For a time independent Lagrangian function
$L(t,q,\dot{q})=\mathcal{L}(q,\dot{q})$, and the _time-shift_ family
$q_{\lambda}(t)=q(t+\lambda)$ we have

$\partial_{\lambda}L\bigl{(}t,q_{\lambda}(t),\dot{q}_{\lambda}(t)\bigr{)}\big{|}_{\lambda=0}=\partial_{q}\mathcal{L}\cdot\dot{q}(t)+\partial_{\dot{q}}\mathcal{L}\cdot\ddot{q}(t)=\frac{d}{dt}\mathcal{L}(q(t),\dot{q}(t)).$
(2.1)

Thus the constant of motion (1.2) is

$\partial_{\dot{q}}\mathcal{L}\cdot\dot{q}(t)-\int_{t_{0}}^{t}\frac{d}{ds}\mathcal{L}(q(s),\dot{q}(s))ds=\\\
=\partial_{\dot{q}}\mathcal{L}\bigl{(}q(t),\dot{q}(t)\bigr{)}\cdot\dot{q}(t)-\mathcal{L}\bigr{(}q(t),\dot{q}(t)\bigl{)}+\mathcal{L}\bigl{(}q(t_{0}),\dot{q}(t_{0})\bigr{)}$

which is energy

$E(q,\dot{q})=\partial_{\dot{q}}\mathcal{L}(q,\dot{q})\cdot\dot{q}-\mathcal{L}(q,\dot{q})$
(2.2)

up to the trivial additive constand $\mathcal{L}(q(t_{0}),\dot{q}(t_{0}))$.

Now, we turn to dissipation. Consider $k>0$, a smooth potential function
$U:\mathbb{R}^{n}\to\mathbb{R}$ defined on the whole space. The equation of
motion of a particle of mass $m>0$ under this potential and viscous
dissipation is

$m\ddot{q}=-k\dot{q}-\nabla U(q),\quad q\in\mathbb{R}^{n}.$ (2.3)

The energy first integral (2.2) for $k=0$ is

$E(q,\dot{q})=\textstyle{\frac{1}{2}}m\lVert\dot{q}\rVert^{2}+U(q).$ (2.4)

For $k>0$ this function decreases along solutions

$\dot{E}=m\dot{q}\cdot\frac{1}{m}\bigl{(}-k\dot{q}-\nabla U(q)\bigr{)}+\nabla
U(q)\cdot\dot{q}=-k\lVert\dot{q}\rVert^{2}\leq 0.$

In the sequel we assume that _the potential is bounded from below_ , say
$U\geq 0$. Then, for any solution $q(t)$ the velocity $\dot{q}(t)$ is bounded
in the future:

$\frac{1}{2}m\bigl{\|}\dot{q}(t)\bigr{\|}^{2}\leq\frac{1}{2}m\bigl{\|}\dot{q}(t)\bigr{\|}^{2}+U\bigl{(}q(t)\bigr{)}\leq\frac{1}{2}m\bigl{\|}\dot{q}(t_{0})\bigr{\|}^{2}+U\bigl{(}q(t_{0})\bigr{)},\quad
t\geq t_{0},$

so $q(t)$ is bounded for bounded intervals of time and we get _global
existence in the future_. What about the past?

Notice that for $k=0$, with no dissipation, we have global existence since the
above argument holds in the past too.

Our (2.3) can be seen as the Euler-Lagrange equation for the Lagrangian

$L=e^{kt/m}\Bigl{(}\frac{1}{2}m\lVert\dot{q}\rVert^{2}-U(q)\Bigr{)}.$ (2.5)

It is quite natural to consider the family
$q_{\lambda}(t):=q(t+\lambda\,e^{at})$ with $a\in\mathbb{R}$ new parameter and
$q(t)$ solution. Indeed for $a=0$ the family reduces to the time-shift used
for energy conservation as $k=0$ and the exponential function is easily
inspired by the one in (2.5).

Then

$\frac{\partial}{\partial\lambda}L\bigl{(}t,q_{\lambda}(t),\dot{q}_{\lambda}(t)\bigr{)}\Big{|}_{\lambda=0}=\\\
=\frac{d}{dt}\left(-2e^{(a+\frac{k}{m})t}U\bigl{(}q(t)\bigr{)}\right)+e^{(a+\frac{k}{m})t}\Bigl{(}\bigl{(}a-\textstyle{\frac{k}{m}\bigr{)}m\bigl{\|}\dot{q}(t)\bigr{\|}^{2}+2\bigl{(}a+\frac{k}{m}\bigr{)}}U\bigl{(}q(t)\bigr{)}\Bigr{)}$

where we eliminated $\ddot{q}(t)$ using the differential equation. For $a=k/m$
it simplifies and we have the constant of motion

$t\mapsto\partial_{\dot{q}}L\bigl{(}t,q(t),\dot{q}(t)\bigr{)}\cdot\partial_{\lambda}q_{\lambda}(t)\big{|}_{\lambda=0}-\int_{t_{0}}^{t}\frac{\partial}{\partial\lambda}L\bigl{(}s,q_{\lambda}(s),\dot{q}_{\lambda}(s)\bigr{)}\Big{|}_{\lambda=0}ds=\\\
=e^{2kt/m}\Bigl{(}m\lVert\dot{q}(t)\rVert^{2}+2U\bigl{(}q(t)\bigr{)}\Bigr{)}+4\,\frac{k}{m}\int^{t_{0}}_{t}e^{2ks/m}U\bigl{(}q(s)\bigr{)}ds.$
(2.6)

Since we assumed $U\geq 0$, the last integral decreases for $t\leq t_{0}$ and
the function

$t\mapsto e^{2kt/m}\Bigl{(}m\bigl{\|}\dot{q}(t)\bigr{\|}^{2}+2U(q(t))\Bigr{)}$
(2.7)

_increases with $t$ for all $t\leq t_{0}$_.

Finally, we have the estimate for $t\leq t_{0}$:

$m\bigl{\|}\dot{q}(t)\bigr{\|}^{2}\leq
e^{2k(t_{0}-t)/m}\Bigl{(}m\bigl{\|}\dot{q}(t_{0})\bigr{\|}^{2}+2U\bigl{(}q(t_{0})\bigr{)}\Bigr{)}.$
(2.8)

In a bounded interval $(t_{1},t_{0}]$ the velocity $\dot{q}(t)$ is bounded, so
also $q(t)$ and we have global existence of solutions. Summing up:

######  Theorem 2.1.

If $k>0$ and $U$ is a smooth potential on $\mathbb{R}^{n}$ which is bounded
from below, then all solutions of the dissipative equation
$\ddot{q}=-k\dot{q}-\nabla U(q)$ are defined for all $t\in\mathbb{R}$.

##  3 First integrals for higher-order Lagrangians

Generally, we cannot expect that Theorem 1.2 yields true first integrals for a
random choice of the family $q_{\lambda}(t)$. However, few and precious
Lagrangians make our machinery work. The simplest example is for autonomous
Lagrangians:

######  Theorem 3.1.

Let $t\mapsto q(t)$ be a solution to the Euler-Lagrange equation for smooth
time-independent
$\mathcal{L}(q,\ldots,q^{\scriptscriptstyle(N)}\displaystyle)$. Then the
following function is a first integral:

$K_{1}(q,\ldots,q^{\scriptscriptstyle(2N-1)}\displaystyle)=\\\
=\sum_{i=1}^{N}\sum_{k=0}^{i-1}(-1)^{k}\frac{d^{k}}{dt^{k}}\partial_{q^{\scriptscriptstyle(i)}\displaystyle}\mathcal{L}(q,\ldots,q^{\scriptscriptstyle(N)}\displaystyle)\cdot
q^{\scriptscriptstyle(i-k)}\displaystyle-\mathcal{L}(q,\ldots,q^{\scriptscriptstyle(N)}\displaystyle)\,.$
(3.1)

It is important to notice that Theorem 3.1 recovers the Noetherian result of
[13] for $N=2$ Lagrangians.

Since the Pais-Uhlenbeck Lagrangian $L^{\scriptscriptstyle\mathrm{PU}}$ of
formula (1.7) is time-independent, we deduce the following first integral:

$2K^{\scriptscriptstyle\mathrm{PU}}_{1}=q^{\scriptscriptstyle(2)}{}^{2}-(w_{1}^{2}+w_{2}^{2})q^{\scriptscriptstyle(1)}{}^{2}-2q^{\scriptscriptstyle(3)}\displaystyle
q^{\scriptscriptstyle(1)}\displaystyle-w_{1}^{2}w_{2}^{2}q^{2}.$ (3.2)

In [5] the authors proved energy conservation for the canonical harmonic
oscillator starting from nonlocal space-changes. Consequently, using Theorem
1.2, we deduce that first integrals are easy to be found if
$\partial_{q^{\scriptscriptstyle(j)}\displaystyle}L\\!\propto
d^{j}\partial_{q}L/dt^{j}$ for all $j=1,\ldots,N$:

######  Theorem 3.2.

Consider a smooth Lagrangian
$L(t,q,\ldots,q^{\scriptscriptstyle(N)}\displaystyle)$ for which there exists
a set of constant parameters $\rho_{1}\ldots\rho_{N}\in\mathbb{R}$ such that

$\partial_{q^{\scriptscriptstyle(i)}\displaystyle}L=\rho_{i}\frac{d^{i}}{dt^{i}}\partial_{q}L\qquad\text{for
all motions and }i\in\\{1,\ldots,N\\}.$ (3.3)

Let $t\mapsto q(t)$ be a solution to the Euler-Lagrange equation, and define
$F^{\scriptscriptstyle(0)}=\sum_{j=1}^{N}(-1)^{j+1}d^{j-1}\partial_{\partial
q^{\scriptscriptstyle(j)}\displaystyle}L/dt^{j-1}$. Then
$F^{\scriptscriptstyle(\ell)}=d^{\ell-1}\partial_{q}L/dt^{\ell-1}$ with
$\ell\in\\{1,\ldots,2N\\}$, and the following function is a first integral:

$K_{2}(t,q,\ldots,q^{\scriptscriptstyle(3N-1)}\displaystyle)=\\\
=\sum_{i=1}^{N}\rho_{i}\Biggl{[}\sum_{k=0}^{i-1}(-1)^{k}F^{\scriptscriptstyle(i+k+1)}\displaystyle\cdot
F^{\scriptscriptstyle(i-k-1)}\displaystyle-\frac{1}{2}\lVert
F^{\scriptscriptstyle(i)}\displaystyle\rVert^{2}\Biggr{]}-\frac{1}{2}\lVert
F^{\scriptscriptstyle(0)}\displaystyle\rVert^{2}.$ (3.4)

Notice that $L^{\scriptscriptstyle\mathrm{PU}}$ satisfies Theorem 3.2 with
$\rho_{1}=-(w_{1}^{2}+w_{2}^{2})w_{1}^{-2}w_{2}^{-2}$ and
$\rho_{2}=w_{1}^{-2}w_{2}^{-2}$. Hence,
$F^{\scriptscriptstyle(0)}\displaystyle=-(w_{1}^{2}+w_{2}^{2})q^{\scriptscriptstyle(1)}\displaystyle-q^{\scriptscriptstyle(3)}\displaystyle$
and
$F^{\scriptscriptstyle(\ell)}\displaystyle=w_{1}^{2}w_{2}^{2}q^{\scriptscriptstyle(\ell-1)}\displaystyle$
($\ell=0,1,2$) give

$2K^{\scriptscriptstyle\mathrm{PU}}_{2}=\bigl{(}w_{1}^{4}+w_{1}^{2}w_{2}^{2}+w_{2}^{4}\bigr{)}q^{\scriptscriptstyle(1)}{}^{2}+q^{\scriptscriptstyle(3)}{}^{2}+2w_{1}^{2}w_{2}^{2}\,qq^{\scriptscriptstyle(2)}\displaystyle+\\\
+(w_{1}^{2}+w_{2}^{2})\bigl{(}2q^{\scriptscriptstyle(3)}\displaystyle
q^{\scriptscriptstyle(1)}\displaystyle+w_{1}^{2}w_{2}^{2}q^{2}\bigr{)}$ (3.5)

If combined, $K_{1}^{\scriptscriptstyle\mathrm{PU}}$ and
$K_{2}^{\scriptscriptstyle\mathrm{PU}}$ recover the two first integrals
recently proposed by [15].

Another interesting situation generating first integrals arises when the
Lagrangian, evaluated on a perturbed motion $q_{\lambda}(t)$, has constant
derivative at $\lambda=0$.

######  Theorem 3.3.

Consider a smooth Lagrangian, and suppose that for a given family of perturbed
motions $q_{\lambda}$ there exists a constant $\mu\in\mathbb{R}$ such that
$\partial_{\lambda}L(t,q_{\lambda},\ldots,q_{\lambda}^{\scriptscriptstyle{(N)}})\big{\rvert}_{\lambda=0}\\!=\\!\mu\,.$
Then, the following function is a first integral:

$K_{3}(t,q,\ldots,q^{\scriptscriptstyle(2N-1)}\displaystyle)=\\\
=\sum_{i=1}^{N}\sum_{k=0}^{i-1}(-1)^{k}\frac{d^{k}}{dt^{k}}\partial_{q^{\scriptscriptstyle(i)}\displaystyle}L(t,q,\ldots,q^{\scriptscriptstyle(N)}\displaystyle)\cdot\partial_{\lambda}q_{\lambda}^{\scriptscriptstyle(i-k-1)}\displaystyle\big{|}_{\lambda=0}-\mu
t\,.$ (3.6)

Let $q=(q_{1},q_{2})\in\mathbb{R}^{2}$ and consider the rotation family
$q_{\lambda}(t)$ in (1.4). When evaluated on $q_{\lambda}(t)$,
$L^{\scriptscriptstyle\mathrm{PU}}$ does not depend on $\lambda$, hence
Theorem 3.3 gives the new angular-momentum-like first integral

$K^{\scriptscriptstyle\mathrm{PU}}_{3}=(w_{1}^{2}+w_{2}^{2})\det\bigl{(}q^{\scriptscriptstyle(1)}\displaystyle,q\bigr{)}+\det\bigl{(}q^{\scriptscriptstyle(1)}\displaystyle,q^{\scriptscriptstyle(2)}\displaystyle\bigr{)}+\det\bigl{(}q^{\scriptscriptstyle(3)}\displaystyle,q\bigr{)}.$
(3.7)

In Scomparin [18], the machinery is also applied to analyze a higher-order
generalization of the Pais-Uhlenbeck oscillator [1, 3], and a simple
Degenerate Higher-Order model of Scalar-Tensor (DHOST) theory that, in these
last years, inspired many modified gravity theories [11]. Again, the full
consistency of the machinery is confirmed.

## Acknowledgments

Paper written under the auspices of INdAM (Istituto Nazionale di Alta
Matematica).

## References

  * [1] Andrzejewski K.:  Hamiltonian formalisms and symmetries of the Pais-Uhlenbeck oscillator.  Nucl. Phys. B 889, 333–350 (2014).
  * [2] Borneas M.:  Principle of action with higher derivatives.  Phys. Rev. 186, 1299–1303 (1969).
  * [3] Boulanger N., Buisseret F., Dierick F., White O.:  Higher-derivative harmonic oscillators: stability of classical dynamics and adiabatic invariants.  Eur. Phys. J. C 79, 60–68 (2019).
  * [4] Constantelos G.C.:  Integrals of motion for Lagrangians including higher-order derivatives.  Il Nuovo Cimento B 21, 279–288 (1974).
  * [5] Gorni G., Zampieri G.:  Revisiting Noether’s theorem on constants of motion.  Journal of Nonlinear Mathematical Physics 21 (1), 43–73 (2014).
  * [6] Gorni G., Zampieri G.:  Nonlocal variational constants of motion in dissipative dynamics.  Differential Integral Equations 30 (7/8), 631–640 (2017).
  * [7] Gorni G., Zampieri G.:  Nonstandard separation of variables for the Maxwell-Bloch conservative system.  São Paulo J. Math. Sci., 12, 146–169 (2018).
  * [8] Gorni G., Zampieri G.:  Nonlocal and nonvariational extensions of Killing-type equations.  _Discrete Contin. Dyn. Syst. Ser. S_ , 11 (4), 675–689 (2018).
  * [9] Gorni G., Residori S., Zampieri G.:  A quasi separable dissipative Maxwell-Bloch system for laser dynamics.  _Qual. Theory Dyn. Syst._ , 18 (2), 371–381 (2019).
  * [10] Gorni G., Zampieri G.:  Lagrangian dynamics by nonlocal constants of motion.  Discrete Contin. Dyn. Syst. Ser. S 13 (10), 2751–2759 (2020).
  * [11] Langlois D., Noui K.:  Degenerate higher derivative theories beyond Horndeski: evading the Ostrogradski instability.  JCAP 2016 (02), 34–56 (2016).
  * [12] Langlois D., Liu H., Noui K., Wilson-Ewing E.:  Effective loop quantum cosmology as a higher-derivative scalar-tensor theory.  Class. Quant. Grav. 34 (22), 1361–6382 (2017).
  * [13] Logan, J.D., Blakeslee J.S.:  An invariance theory for second-order variational problems.  Journal of Mathematical Physics 16, 1374–1379 (1975).
  * [14] Jonathan Z.S.:  Higher Derivative Lagrangians, Nonlocality, Problems and Solutions.  Phys. Rev. D 41, 3720–3733 (1990).
  * [15] Kaparulin D.S.:  Conservation Laws and Stability of Field Theories of Derived Type.  Symmetry 11 (5), 642–660 (2019).
  * [16] Kaparulin D.S., Lyakhovich S.L.:  Energy and Stability of the Pais Uhlenbeck Oscillator.  Geometric Methods in Physics, 127–134 (2015).
  * [17] Pais A., Uhlenbeck G.E.:  On field theories with non-localized action.  Phys. Rev. 79, 145–165 (1950).
  * [18] Scomparin M.:  Nonlocal constants of motion and first integrals in higher-order Lagrangian Dynamics.  Rend. Istit. Mat. Univ. Trieste 53, 1–17 (2021).