# Hyperbolicity of the sub-Riemannian affine-additive group

Zoltán M. Balogh  Elia Bubani  Ioannis D. Platis

###### Abstract

We consider the affine-additive group as a metric measure space with a
canonical left-invariant measure and a left-invariant sub-Riemannian metric.
We prove that this metric measure space is locally 4-Ahlfors regular and it is
hyperbolic, meaning that it has a non-vanishing 4-capacity at infinity. This
implies that the affine-additive group is not quasiconformally equivalent to
the Heisenberg group or to the roto-translation group in contrast to the fact
that both of these groups are globally contactomorphic to the affine-additive
group. Moreover, each quasiregular map, from the Heisenberg group to the
affine-additive group must be constant.

Dedicated to Hans Martin Reimann

††August 31, 2024†† $2020$ Mathematics Subject Classifications. 53C17, 30L10
†† Key words and phrases. Quasiconformal maps, Sub-Riemannian metric,
Heisenberg group ††This research was supported by the Swiss National Science
Foundation, Grants Nr. 191978 and 228012

###### Contents

  1. 1 Introduction and statement of the main result
  2. 2 Preliminaries on metric measure spaces
  3. 3 The affine-additive group as a metric measure space
  4. 4 Proof of the main result

##  1 Introduction and statement of the main result

Due to work of Heinonen and Koskela, [12] the theory of quasiconformal
mappings has been developed in the setting of general metric measure spaces
satisfying some mild regularity properties. For the related analytic machinery
including upper gradients, capacities and Sobolev spaces we refer to the book
of Heinonen, [11], or the book of Heinonen, Koskela, Shanmungalingam and Tyson
[13].

An important class of examples where these results apply is the geometric
setting of sub-Riemannian spaces, including Heisenberg groups. Motivated by
Mostow rigidity [18], the theory of quasiconformal mappings in the Heisenberg
group has been developed by Pansu [20] and Korányi and Reimann in [15] and
[16]. This theory is rather advanced, examples of non-trivial quasiconformal
maps acting between Heisenberg groups have been constructed as flows of
contact vector fields by Korányi and Reimann [15], [16] and by lifting of
planar symplectic maps by Capogna and Tang [6]. Extremal quasiconformal maps
that are similar to the planar stretch map, acting between Heisenberg groups
were found by Balogh, Fässler and Platis [3]. Using the flow method of Korányi
and Reimann, Balogh established in [1] the existence of quasiconformal maps
between Heisenberg groups distorting the Hausdorff dimension of Cantor sets in
a rather arbitrary fashion.

By a theorem of Darboux, [19] every contact manifold is locally bi-Lipschitz
to the Heisenberg group, one would expect that the results of quasiconformal
maps could be transposed from the Heisenberg setting to general contact
manifolds endowed with a sub-Riemannian metric. However, this turns out not to
be the case as contact manifolds are not globally quasiconformal to the
Heisenberg group. A remarkable example of this has been found by Fässler,
Koskela and Le Donne [8] who proved that the sub-Riemannian roto-translation
group is not globally quasiconformal to the Heisenberg group, in contrast to
the fact, that there exists a global contactomorphism between these spaces.

In the present paper we consider another natural three dimensional Lie group:
the affine-additive group endowed with a sub-Riemannian metric. We prove that
it is also globally contactomorphic to both, the Heisenberg group and (by [8])
also to the roto-translation group. Howewer, the affine-additive group is not
globally quasiconformal to neither the Heisenberg, nor to the roto-translation
group. The reason for the non-existence of a global quasiconformal map between
these groups is their behaviour at infinity as formulated by Zorich in [23]
(see also [14], [10]). We prove that the affine additive groups has a non-
vanishing 4-capacity at infinity, thus it is hyperbolic in the terminology of
[23], while both the Heisenberg and the roto-translation groups are parabolic,
having a vanishing 4-capacity at infinity.

To be more precise we define the affine-additive group $(\mathcal{AA},\star)$
as the Cartesian product of $\mathbb{R}$ and the hyperbolic right half plane:

$\mathcal{AA}=\mathbb{R}\times\mathbf{H}_{\mathbb{C}}^{1}\ \text{where}\
\mathbf{H}_{\mathbb{C}}^{1}:=\\{(\lambda,t):\lambda>0,t\in\mathbb{R}\\}\ $

together with the group law

$(a^{\prime},\lambda^{\prime},t^{\prime})\star(a,\lambda,t)=(a^{\prime}+a,\lambda^{\prime}\lambda,\lambda^{\prime}t+t^{\prime})$

and the contact $1$-form

$\vartheta=\frac{dt}{2\lambda}-da.$

For a detailed presentation of the geometric structure of the the affine-
additive group $\mathcal{AA}$ we refer to Section 3 of this paper. At this
point, we can say that the Carnot-Carathéodory distance $d_{\mathcal{AA}}$
will be defined as the sub-Riemannian distance on $\mathcal{AA}$ generated by
the horizontal vector fields

$U=\partial_{a}+2\lambda\partial_{t},\ V=2\lambda\partial_{\lambda},$

and a sub-Riemannian metric making $\\{U,V\\}$ an orthonormal frame. The left-
invariant Haar measure on the group $\mathcal{AA}$ is given by
$d\mu_{\mathcal{AA}}=\frac{da\,d\lambda\,dt}{\lambda^{2}}.$ The main result of
the paper is the following:

######  Theorem 1.1.

The metric measure space $(\mathcal{AA},d_{\mathcal{AA}},\mu_{\mathcal{AA}})$
is a locally $4-$Ahlfors regular space. It is globally contactomorphic to the
first Heisenberg group $\mathbb{H}$. The sub-Riemannian manifold,
$(\mathcal{AA},d_{\mathcal{AA}},\mu_{\mathcal{AA}})$ is $4$ hyperbolic, in
particular there is no non-trivial quasiregular map
$F:\mathbb{H}\to\mathcal{AA}$.

The paper is organized as follows: in the Section 2 we fix notation, recall
preliminaries on metric measure spaces and give a sufficient condition on the
parabolicity of a metric measure space. In Section 3 we consider the sub-
Riemannian metric of the affine-additive groups in greater detail. Here we
prove that the affine-additive group is globally contactomorphic to the
Heisenberg group. In Section 4 we prove the main result of this paper about
the hyperbolicity of the affine-additive group and discuss its consequences.

##  2 Preliminaries on metric measure spaces

We start by recalling some concepts and results on the theory quasiconformal
(QC) maps in the setting of general metric measure spaces. For more details we
refer to the paper of Heinonen and Koskela [12], the book of Heinonen [11] and
the book of Heinonen, Koskela, Shanmugalinga and Tyson [13].

Let us recall that a homeomorphism $f:X\rightarrow Y$ between two metric
spaces $(X,d_{X})$ and $(Y,d_{Y})$ is called quasiconformal if there exists
$K\geq 1$ such that

$\limsup_{r\rightarrow 0}\frac{\sup_{d_{X}(p,q)\leq
r}d_{Y}(f(p),f(q))}{\inf_{d_{X}(p,q)\geq r}d_{Y}(f(p),f(q))}:=H_{f}(p)\leq K,$
(1)

for all $p$ in $X$.

A metric measure space is a triple $(X,d_{X},\mu_{X})$ comprising a non empty
set $X$, a distance function $d_{X}$ and a regular Borel measure $\mu_{X}$
such that $(X,d_{X})$ is a complete, and separable metric space and every
metric ball has positive and finite measure. This setting will be our standing
assumption throughout this paper.

Given a point $p\in X$ and a radius $r>0$, we employ the following notation
for balls:

$B_{d_{X}}(p,r)=\\{q\in X:d_{X}(p,q)<r\\}\text{ and
}\overline{B}_{d_{X}}(p,r)=\\{q\in X:d_{X}(p,q)\leq r\\}.$

Where it will not cause confusion, we will replace $B_{d_{X}}(p,r)$ by
$B(p,r)$.

A metric measure space $(X,d_{X},\mu_{X})$ is called Ahlfors $Q$-regular,
$Q>1$, if there exists a constant $C\geq 1$ such that for all $p\in X$ and
$0<r\leq\operatorname{\text{diam}}X$, we have

$C^{-1}r^{Q}\leq\mu_{X}(\overline{B}_{d_{X}}(p,r))\leq Cr^{Q}.$ (2)

Further, we say that $(X,d_{X},\mu_{X})$ is locally Ahlfors $Q$-regular, if
for every compact subset $V\subset X$, there is a constant $C\geq 1$ and a
radius $r_{0}>0$ such that for each point $p\in V$ and each radius $0<r\leq
r_{0}$ we have

$C^{-1}r^{Q}\leq\mu_{X}(\overline{B}_{d_{X}}(p,r))\leq Cr^{Q}.$ (3)

An important geometric quantity in the theory of quasiconformal mappings is
the $Q$-modulus of a curve family. Let us recall, that if $\Gamma$ be a family
of curves in the metric measure space $(X,d_{X},\mu_{X})$, a Borel function
$\rho:X\rightarrow[0,\infty]$ is said to be admissible for $\Gamma$ if for
every rectifiable $\gamma\in\Gamma$, we have

$1\leq\int_{\gamma}\rho\,d\ell_{X}\,.$

Such a $\rho$ shall be also called a density and the set of all densities
shall be denoted by ${\rm Adm}(\Gamma)$. If $Q>1$ then the $Q$-modulus of
$\Gamma$ is

$\mathrm{Mod}_{Q}(\Gamma)=\inf_{\rho\in{\rm
Adm}(\Gamma)}\int_{X}\rho^{Q}\,d\mu_{X}.$

It follows immediately from this definition that if $\Gamma_{0}$ and $\Gamma$
are two curve families such that each curve $\gamma\in\Gamma$ has a sub-curve
$\gamma_{0}\in\Gamma_{0}$, then

$\mathrm{Mod}_{Q}(\Gamma)\leq\mathrm{Mod}_{Q}(\Gamma_{0}).$ (4)

Let us recall that by Theorem 3.8 in [17], if $(X,d_{X},\mu_{X})$ and
$(Y,d_{Y},\mu_{Y})$ are separable, locally finite metric measure spaces that
are both locally Ahlfors $Q$-regular for some given $Q>1$ and $f:X\rightarrow
Y$ is a quasiconformal map then there exists $H\geq 1$ such that

$\mathrm{Mod}_{Q}(\Gamma)\leq H\,\mathrm{Mod}_{Q}(f(\Gamma)),$ (5)

for every curve family $\Gamma$ in $X$, i.e., the $\mathrm{Mod}_{Q}$ is quasi-
preserved by quasiconformal maps.

For two disjoint compact sets $E,F\subset X$ we consider the number
$\mathrm{Mod}_{Q}(E,F)=\mathrm{Mod}_{Q}(\Gamma)$ where $\Gamma$ is the set of
all rectifiable curves connecting $E$ and $F$. If $x_{0}\in X$ is a fixed
point and $0<r<R<\operatorname{\text{diam}}X$, $E=\partial B(x_{0},r)$ and
$F=\partial B(x_{0},R)$ then the quantity
$\mathrm{Mod}_{Q}(E,F)=\mathrm{Mod}_{Q}(\mathcal{D}(r,R))$ is the so called
modulus of the ring domain

$\mathcal{D}(r,R)=\\{x\in X:r<d(x,x_{0})<R\\}.$

The following definition is a reformulation in the setting of metric spaces of
the corresponding concept by Zorich [23]. For related results we refer also to
Holopainen and Rickman [14], Coulhon, Holopainen and Saloff-Coste [7],
Fässler, Lukyanenko and Tyson [10].

######  Definition 2.1.

The metric measure spaces $(X,d_{X},\mu_{X})$ is $Q$-parabolic if and only if
for some $x_{0}\in X$ and $R_{0}>0$ we have

$\lim_{R\to\infty}\mathrm{Mod}_{Q}(\mathcal{D}(R_{0},R))=0.$ (6)

Otherwise we call $(X,d_{X},\mu_{X})$ $Q$-hyperbolic.

Let us note, that parabolicity of a metric measure space is a property about
the behaviour of the space at infinity. In particular, $(X,d_{X},\mu_{X})$ is
$Q$-parabolic if and only if for any $x_{0}\in X$ and $R_{0}>0$ (6) holds. We
remark that $Q$-parabolicity of a metric measure space can be defined
equivalently by capacity of condensers (see Section 7 in [23] and Definition
4.5.4 in [10]).

The following sufficient condition seems to be known to experts, however we
could not locate a precise reference and we include it for the sake of
completeness.

######  Proposition 2.2.

Let $Q>1$ and $(X,d_{X},\mu_{X})$ be a metric measure space such that there
exists $x_{0}\in X$, $R_{0}>0$ and $K>0$ such that for all $R>R_{0}$ we have

$\mu_{X}(B(x_{0},R))\leq KR^{Q}.$ (7)

Then $(X,d_{X},\mu_{X})$ is $Q^{\prime}$-parabolic for any $Q^{\prime}\geq Q$.

###### Proof.

We shall consider the ring domain $\mathcal{D}(R_{0},R)=\\{x\in
X:R_{0}<d_{X}(x,x_{0})<R\\}$ for $R>R_{0}$. Our purpose is to show that

$\lim_{R\to\infty}\mathrm{Mod}_{Q^{\prime}}(\mathcal{D}(R_{0},R))=0.$

To do this, we consider the integer $N\in\mathbb{N}$ defined by the property
that $2^{N}R_{0}\geq R>2^{N-1}R_{0}$. Note, that if $R\to\infty$, then
$N\to\infty$. Consider the density

$\rho_{N}(x)=\left\\{\begin{matrix}\frac{3}{N}\cdot\frac{1}{d_{X}(x_{0},x)}&&\text{
if }\;x\in\mathcal{D}(R_{0},R)\\\ \\\ 0&&\text{otherwise}.\end{matrix}\right.$

Let us check that the $\rho_{N}$ is an admissible density for the curve family
$\Gamma$ connecting $\partial B(x_{0},R_{0})$ and $\partial B(x_{0},R)$. To do
so we consider the integers $1<k<N$ and denote by $B_{k}=B(x_{0},2^{k}R_{0})$
and $D_{k}=B_{k}\setminus B_{k-1}$. For $\gamma\in\Gamma$ denote by
$\gamma_{k}=D_{k}\cap\gamma$. By this notation, we observe that the length of
$\gamma_{k}$, $\ell_{X}(\gamma_{k})\geq 2^{k-1}R_{0}$ and if $x\in\gamma_{k}$,
then $\rho_{N}(x)\geq\frac{3}{N}\cdot\frac{1}{2^{k}R_{0}}$. Using this
information we can write

$\int_{\gamma}\rho_{N}\,d\ell_{X}\geq\sum_{k=2}^{N-1}\int_{\gamma_{k}}\rho_{N}\,d\ell_{X}\geq\sum_{k=2}^{N-1}\frac{3}{N}\cdot\frac{1}{2^{k}R_{0}}\ell(\gamma_{k})\geq\frac{3(N-2)}{2N}\geq
1,$

if $N\geq 6$. Note, that by our assumption on the upper of the measure (7) we
have that $\mu_{X}(B_{k})\leq K2^{kQ}R_{0}^{Q}$. Using this upper estimate on
the measure of $B_{k}$, the assumption $Q^{\prime}\geq Q$ and the fact that
for $x\in B_{k}$ we have $\rho(x)\leq\frac{3}{N}\frac{1}{2^{k-1}R_{0}}$, we
can estimate

$\displaystyle\mathrm{Mod}_{Q^{\prime}}\mathcal{D}(R_{0},R)\leq\int_{\mathcal{D}(R_{0},R)}\rho_{N}^{Q^{\prime}}d\mu_{X}\leq\sum_{k=1}^{N}\int_{D_{k}}\rho_{N}^{Q^{\prime}}d\mu_{X}\leq\sum_{k=1}^{N}\int_{B_{k}}\left(\frac{3}{N}\frac{1}{2^{k-1}R_{0}}\right)^{Q^{\prime}}d\mu_{X}=$
$\displaystyle=\sum_{k=1}^{N}\left(\frac{3}{N}\frac{1}{2^{k-1}R_{0}}\right)^{Q^{\prime}}\mu_{X}(B_{k})\leq
K\left(\frac{6}{N}\right)^{Q^{\prime}}R_{0}^{Q-Q^{\prime}}\sum_{k=1}^{N}2^{k(Q-Q^{\prime})}\to
0\ \ \text{as}\ \ N\to\infty,$

Since $R\to\infty$ implies that $N\to\infty$ we obtain the statement. ∎

As expected, our next statement is a formulation of the fact that a parabolic
metric measure space cannot be quasiconformally equivalent to an hyperbolic
one. In order to formulate the statement we recall that a metric space is
proper, if its closed metric balls are compact.

######  Theorem 2.3.

Let $Q>1$ and let $(X,d_{X},\mu_{X})$,
$(X^{\prime},d_{X^{\prime}},\mu_{X^{\prime}})$ be two locally Ahlfors,
$Q$-regular metric measure spaces. Assume that both spaces are proper and
$(X,d_{X},\mu_{X})$ is hyperbolic and
$(X^{\prime},d_{X^{\prime}},\mu_{X^{\prime}})$ is a parabolic space. Then
there is no QC map $f:X\to X^{\prime}$.

###### Proof.

Assume by contradiction that there is a QC map $f:X\to X^{\prime}$. Since
$(X,d_{X},\mu_{X})$ is assumed to be hyperbolic, there exist a point $x_{0}\in
X$, $R_{0}>0$, a sequence $R_{n}\to\infty$, and a number $M>0$ such that

$\mathrm{Mod}_{Q}(\Gamma_{n})\geq M>0,\,n\geq n_{0},$

where $\Gamma_{n}$ is the set of curves connecting $\partial
B_{X}(x_{0},R_{0})$ and $\partial B_{X}(x_{0},R_{n})$. By the relation (5)
there exists $H\geq 1$ such that

$\mathrm{Mod}_{Q}(f(\Gamma_{n}))\geq\frac{\mathrm{Mod}_{Q}(\Gamma_{n})}{H}\geq\frac{M}{H}>0.$

Let us denote by $y_{0}=f(x_{0})\in X^{\prime}$. Since $X$ is proper,
$\bar{B}_{X}(x_{0},R_{0})$ is compact and thus $f(B_{X}(x_{0},R_{0}))$ is
bounded in $X^{\prime}$. We conclude that there exists a number
$R_{0}^{\prime}>0$ such that $f(B_{X}(x_{0},R_{0}))\subseteq
B_{X^{\prime}}(y_{0},R_{0}^{\prime})$. Let us denote by

$R_{n}^{\prime}:=\min\\{d_{X^{\prime}}(f(x_{0}),f(x)):x\in\partial
B_{X}(x_{0},R_{n})\\}.$

We claim that $R_{n}^{\prime}\to\infty$. For otherwise, we find a sequence
$x_{n}\in X$ with $d_{X}(x_{0},x_{n})=R_{n}$ such that
$d_{X}^{\prime}(f(x_{0}),f(x_{n}))\leq M^{\prime}$ for some fixed constant
$M^{\prime}>0$. Since the space $X^{\prime}$ is a proper metric space, we
obtain that (up to a subsequence) $f(x_{n})\to y$ for some $y\in X^{\prime}$.
Let us denote by $x_{1}=f^{-1}(y)\in X$ the preimage of $y$. Since $f$ is a
homeomorphism we have that $f(B_{X}(x_{1},r))$ is a neighborhood of $y\in
X^{\prime}$ for any fixed $r>0$. Since $f(x_{n})\to y$ we must have that for
$n$ large enough $f(x_{n})\in f(B_{X}(x_{1},r))$, which is a contradiction to
the injectivity of $f$.

Let us note that any curve in $f(\Gamma_{n})$ has a sub-curve connecting
$\partial B_{X^{\prime}}(y_{0},R_{0}^{\prime})$ and $\partial
B_{X^{\prime}}(y_{0},R_{n}^{\prime})$. This implies by (4) that

$\mathrm{Mod}_{Q}(D(R_{0}^{\prime},R_{n}^{\prime}))\geq\mathrm{Mod}_{Q}(f(\Gamma_{n}))\geq\frac{M}{H},$

which is a contradiction to the parabolicity of
$(X^{\prime},d_{X^{\prime}},\mu_{X^{\prime}})$, concluding the proof. ∎

The metric spaces considered in this paper are 3-dimensional Lie groups
$\mathbb{G}$ with group multiplication $\star$. We shall assume that
$\mathbb{G}$ is equipped with a left-invariant contact form
$\vartheta_{\mathbb{G}}$. Using this contact form we define a left-invariant
sub-Riemannian metric on $\mathbb{G}$ as follows.

The kernel $\ker\vartheta_{\mathbb{G}}=\mathcal{H}_{\mathbb{G}}$ is a two
dimensional subbundle of the tangent bundle ${\rm T}_{\mathbb{G}}$. If $X$ and
$Y$ are left-invariant vector fields such that $\mathcal{H}_{\mathbb{G}}={\rm
span}\\{X,Y\\}$ then a left-invariant sub-Riemannian metric
$\langle\cdot,\cdot\rangle_{\mathbb{G}}$ is considered in
$\mathcal{H}_{\mathbb{G}}$, making $\\{X,Y\\}$ an orthonormal basis of
$\mathcal{H}_{\mathbb{G}}$.

A curve $\gamma:[a,b]\to\mathbb{G}$ , $\gamma=\gamma(s)$ shall be called
horizontal if $\dot{\gamma}(s)\in\ker(\vartheta_{\mathbb{G}})_{\gamma(s)}$ for
almost every $s\in[a,b]$. Then, the horizontal velocity of $\gamma$ is

$|\dot{\gamma}(s)|_{\mathbb{G}}=\sqrt{\langle\dot{\gamma}(s),X_{\gamma(s)}\rangle_{\mathbb{G}}^{2}+\langle\dot{\gamma}(s),Y_{\gamma(s)}\rangle_{\mathbb{G}}^{2}}.$

The horizontal length of $\gamma$ is

$\ell_{\mathbb{G}}(\gamma)=\int_{a}^{b}|\dot{\gamma}(s)|_{\mathbb{G}}\,ds.$

The corresponding sub-Riemannian or Carnot-Carathéodory distance
$d_{\mathbb{G}}$ associated to the sub-Riemannian metric
$\langle\cdot,\cdot\rangle_{\mathbb{G}}$ is defined in $\mathbb{G}$ as
follows: let $p,q\in\mathbb{G}$ and cosider the family
$\Gamma_{\mathbb{G}}(p,q)$ of horizontal curves $\gamma:[a,b]\to\mathbb{G}$
such that $\gamma(a)=p$ and $\gamma(b)=q$. Then

$d_{\mathbb{G}}(p,q)=\inf_{\gamma\in\Gamma_{\mathbb{G}}(p,q)}\\{\ell_{\mathbb{G}}(\gamma)\\},$
(8)

We remark that the above definition only depends on the values of
$\langle\cdot,\cdot\rangle_{\mathbb{G}}$ on $\mathcal{H}_{\mathbb{G}}$.
Moreover, since $\mathcal{H}_{\mathbb{G}}$ is completely non integrable, the
distance $d_{\mathbb{G}}$ is finite, geodesic, and induces the manifold
topology (see e.g. [19]). This will make the space
$(X,d_{X})=(\mathbb{G},d_{\mathbb{G}})$ a metric space. We consider the
measure $\mu_{X}=\mu_{\mathbb{G}}$ induced by the contact form
$\vartheta_{\mathbb{G}}$ by $\mu_{\mathbb{G}}=\vartheta_{\mathbb{G}}\wedge
d\vartheta_{\mathbb{G}}$ (up to a multiplicative constant different from $0$)
that is also left-invariant and gives our metric measure space
$(\mathbb{G},d_{\mathbb{G}},\mu_{\mathbb{G}})$.

A well-known example of such a structure is the first Heisenberg group
$\mathbb{H}$. Its underlying manifold is $\mathbb{C}\times\mathbb{R}$ with
coordinates $(z=x+iy,t)$ and the group multiplication $\star$ is given by

$p^{\prime}\star
p=\left(z^{\prime}+z,t^{\prime}+t+2\Im(\overline{z}^{\prime}z)\right)$

for every $p=(z,t)$ and $p^{\prime}=(z^{\prime},t^{\prime})$ in
$\mathbb{C}\times\mathbb{R}$.

The contact form of $\mathbb{H}$ is given by:

$\vartheta_{\mathbb{H}}=dt+2\Im(\overline{z}dz)=dt+2(xdy-ydx).$

The horizontal bundle $\mathcal{H}_{\mathbb{H}}$ of the tangent bundle is
spanned by the vector fields

$X=\partial_{x}+2y\partial_{t},\;Y=\partial_{y}-2x\partial_{t}\,.$

Denote the sub-Riemannian metric in $\mathbb{H}$ by
$\langle\cdot,\cdot\rangle_{\mathbb{H}}$ making $\\{X,Y\\}$ an orthonormal
frame. The horizontal length of a curve $\gamma=\gamma(s)$, $s\in[a,b]$,
$\gamma(s)=(z(s),t(s))$ is

$\ell_{\mathbb{H}}(\gamma)=\int_{a}^{b}|\dot{z}(s)|\,ds.$

Denote also the corresponding Carnot-Carathéodory distance by
$d_{\mathbb{H}}$. The measure $\mu_{\mathbb{H}}$ is the bi-invariant Haar
measure for $\mathbb{H}$ and it coincides with the 3-dimensional Lebesgue
measure in $\mathbb{C}\times\mathbb{R}$ denoted with $\mathcal{L}^{3}$. It
turns out that the $(\mathbb{H},d_{\mathbb{H}},\mu_{\mathbb{H}})$ is a
parabolic, $4$-Ahlfors regular metric measure space. It follows from
Proposition 2.2 that the metric measure space
$(\mathbb{H},d_{\mathbb{H}},\mu_{\mathbb{H}})$ is 4-parabolic. We note, that
there is an elaborate theory of QC maps on the Heisenberg group (see e.g.
[20], [15], [16], [6], [3], [22]). It is therefore of interest to identify
those sub-Riemannian Lie groups that are QC equivalent to the Heisenberg
group.

The second example is the roto-translation group $\mathcal{RT}$ (see Chapter 3
in [5] and [8]). Its underlying manifold is $\mathbb{C}\times\mathbb{R}$ with
coordinates $p=(z=x+iy,t)$ and the group multiplication $\ast$ is given by

$p^{\prime}\star
p=\left(e^{it^{\prime}}z+z^{\prime},t^{\prime}+t\right)\in\mathbb{C}\times\mathbb{R}$

for every $p=(z,t)$ and $p^{\prime}=(z^{\prime},t^{\prime})$ in
$\mathbb{C}\times\mathbb{R}$.

The contact form of $\mathcal{RT}$ is given by:

$\vartheta_{\mathcal{RT}}=\sin t\,dx-\cos t\,dy.$

The horizontal bundle $\mathcal{H}_{\mathcal{RT}}$ of the tangent bundle is
spanned by the vector fields

$X=\cos t\,\partial_{x}+\sin t\,\partial_{y},\;Y=\partial_{t}\,.$

Denote the sub-Riemannian metric in $\mathcal{RT}$ by
$\langle\cdot,\cdot\rangle_{\mathcal{RT}}$ making $\\{X,Y\\}$ an orthonormal
frame. The horizontal length of a curve $\gamma=\gamma(s)$, $s\in[a,b]$,
$\gamma(s)=(z(s),t(s))$ is

$\ell_{\mathcal{RT}}(\gamma)=\int_{a}^{b}|\dot{\gamma}(s)|_{\mathcal{RT}}\,ds,$

where

$|\dot{\gamma}(s)|_{\mathcal{RT}}=\sqrt{(\dot{x}(s)\cos t(s)+\dot{y}(s)\sin
t(s))^{2}+\dot{t}(s)^{2}}.$

Denote also the corresponding Carnot-Carathéodory distance by
$d_{\mathcal{RT}}$. The measure $\mu_{\mathcal{RT}}$ is again the bi-invariant
Haar measure of $\mathcal{RT}$ and it is the 3-dimensional Lebesgue measure in
$\mathbb{C}\times\mathbb{R}$.

Later on we will need the following (Lemma 5.5 in [8]):

######  Proposition 2.4.

The manifolds $(\mathcal{RT},\vartheta_{\mathcal{RT}})$ and
$(\mathbb{H},\vartheta_{\mathbb{H}})$ are globally contactomorphic: i.e.,
there is a diffeomorphism $f:\mathcal{RT}\to\mathbb{H}$ such that

$f^{*}\vartheta_{\mathbb{H}}=\sigma\,\vartheta_{\mathcal{RT}},$

where $\sigma:\mathcal{RT}\to\mathbb{R}$ is a nowhere vanishing smooth
function.

We will also need (Corollary 5.9 in [8]):

######  Proposition 2.5.

There exists $R_{0}>0$, and $C_{0}>0$ such that if
$B_{\mathcal{RT}}(e_{\mathcal{RT}},r)$ is the open $CC$-ball of centre
$e_{\mathcal{RT}}$ and radius $r$ then:

$\mathcal{L}^{3}(B_{\mathcal{RT}}(e_{\mathcal{RT}},r))\leq C_{0}r^{3},\text{
for all }r\geq R_{0}.$ (9)

The remarkable result of Fässler, Koskela and Le Donne states that in contrast
to the fact that both spaces $(\mathbb{H},d_{\mathbb{H}},\mu_{\mathbb{H}})$
and $(\mathcal{RT},d_{\mathcal{RT}},\mu_{\mathcal{RT}})$ are 4-parabolic and
by 2.4 locally bi-Lipschitz equivalent but they are still not QC equivalent
(see Corollary 1.2 in [8]).

##  3 The affine-additive group as a metric measure space

The main subject of this paper is the affine-additive group, which we describe
below. In particular, after introducing the group, we discuss its sub-
Riemannian structure. For more details about the affine-additive group, we
refer to [4].

Our starting point is the hyperbolic plane, defined as

$\mathbf{H}_{\mathbb{C}}^{1}:=\\{\zeta=\xi+i\eta\in\mathbb{C}:\xi>0\\}\
\text{with the Riemannian metric
}g=\frac{|d\zeta|^{2}}{4\xi^{2}}=\frac{d\xi^{2}+d\eta^{2}}{4\xi^{2}}.$

We consider affine transformations on $\mathbf{H}_{\mathbb{C}}^{1}$, composed
by dilations $D_{\lambda}$, $\lambda>0$, defined by
$D_{\lambda}(\zeta)=\lambda\zeta,$ and translations $T_{t}$, $t\in\mathbb{R}$,
defined by $T_{t}(\zeta)=\zeta+it$, for $\zeta\in\mathbf{H}_{\mathbb{C}}^{1}$
resulting in maps of the form

$M(\lambda,t)(\zeta)=(T_{t}\circ D_{\lambda})(\zeta)=\lambda\zeta+it.$

It is clear that $\mathbf{H}_{\mathbb{C}}^{1}$ is in bijection with the set of
transformations of the above form: to each point $\xi+i\eta$ we uniquely
assign the transformation $M(\xi,\eta)$. Therefore we define a group structure
on $\mathbf{H}_{\mathbb{C}}^{1}$ by considering the composition of any two
transformations $M(\lambda^{\prime},t^{\prime})$ and $M(\lambda,t)$:

$\displaystyle(M(\lambda^{\prime},t^{\prime})\circ
M(\lambda,t))(\zeta)=M(\lambda^{\prime},t^{\prime})(\lambda\zeta+it)=\lambda^{\prime}\lambda\zeta+i(\lambda^{\prime}t+t^{\prime})=M(\lambda^{\prime}\lambda,\;\lambda^{\prime}t+t^{\prime})(\zeta).$

To sum up, (compare to Section 4.4.2 in [21]) the group operation on
$\mathbf{H}_{\mathbb{C}}^{1}$ is given by

$(\lambda^{\prime},t^{\prime})\cdot(\lambda,t)=(\lambda^{\prime}\lambda,\;\lambda^{\prime}t+t^{\prime}).$
(10)

We wish to extend the previous construction over the space
$\mathbb{R}\times\mathbf{H}_{\mathbb{C}}^{1}$. We define the group operation
as follows: if $p^{\prime}=(a^{\prime},\lambda^{\prime},t^{\prime})$ and
$p=(a,\lambda,t)$ are points of $\mathbb{R}\times\mathbf{H}_{\mathbb{C}}^{1}$,
then

$p^{\prime}\star
p=(a^{\prime}+a,\lambda^{\prime}\lambda,\lambda^{\prime}t+t^{\prime}),$ (11)

which is again a point in $\mathbb{R}\times\mathbf{H}_{\mathbb{C}}^{1}$. This
group operation is the group operation of the Cartesian product of the
additive group $(\mathbb{R},+)$ and the group
$(\mathbf{H}_{\mathbb{C}}^{1},\cdot)$, where $\cdot$ is as in (10).

######  Definition 3.1.

The pair $\mathcal{AA}=(\mathbb{R}\times\mathbf{H}_{\mathbb{C}}^{1},\;\star)$
shall be called the affine-additive group.

We define a $1$-form on $\mathcal{AA}$ as follows:

$\vartheta=\frac{dt}{2\lambda}-da.$ (12)

Since $d\vartheta=\frac{1}{2\lambda^{2}}dt\wedge d\lambda$ we obtain
$\vartheta\wedge d\vartheta=\frac{dt\wedge da\wedge d\lambda}{2\lambda^{2}}$
and thus $(\mathcal{AA},\vartheta)$ is a contact manifold. In what follows we
identify the left invariant vector fields and define a left invariant sub-
Riemannian metric on the group $\mathcal{AA}$.

######  Proposition 3.2.

The vector fields

$U=\partial_{a}+2\lambda\partial_{t},\ V=2\lambda\partial_{\lambda},\
W=-\partial_{a}$

are left-invariant and form a basis for the tangent bundle $T(\mathcal{AA})$
of $\mathcal{AA}$. They satisfy the following Lie bracket relations:

$[U,W]=[V,W]=0\;\text{ and }\;[U,V]=-2(U+W);$ (13)

Moreover, the left-invariant measure for $\mathcal{AA}$ is
$d\mu_{\mathcal{AA}}=\frac{da\,d\lambda\,dt}{\lambda^{2}}.$

###### Proof.

By the definition of $U,V$ and $W$ we have the relations:

$\partial_{a}=-W,\quad\partial_{\lambda}=\frac{U}{2\lambda},\quad\partial_{t}=\frac{U+W}{2\lambda},$
(14)

and thus $\\{U,V,W\\}$ is a basis for $T(\mathcal{AA})$. To verify that $U,V$
and $W$ are left-invariant, it suffices to consider their values at
$e=e_{\mathcal{AA}}=(0,1,0)$. For this, let

$\\{U_{e}=(\partial_{a}+2\partial_{t})_{|e},\;V_{e}=(2\partial_{\lambda})_{|e},\;W_{e}=(-\partial_{a})_{|e}\\}$

be the basis for $T_{e}(\mathcal{AA})$. If we fix a point
$p^{\prime}=(a^{\prime},\lambda^{\prime},t^{\prime})\in\mathcal{AA}$ we can
consider the left translation on $\mathcal{AA}$ given by

$L_{p^{\prime}}(p)=p^{\prime}\star
p=(a^{\prime}+a,\lambda^{\prime}\lambda,\lambda^{\prime}t+t^{\prime}),$ (15)

the Jacobian matrix of the derivative $(L_{p^{\prime}})_{*,p}$ of
$L_{p^{\prime}}$ evaluated at $p$ is

$(DL_{p^{\prime}})_{p}=\left[\begin{array}[]{ccc}1&0&0\\\
0&\lambda^{\prime}&0\\\ 0&0&\lambda^{\prime}\end{array}\right].$

Then by $(L_{p})_{*,e}:T_{e}(\mathcal{AA})\rightarrow T_{p}(\mathcal{AA})$ we
have

$(L_{p})_{*,e}\,(\partial_{a}+2\partial_{t})_{|e}=U_{p},\
(L_{p})_{*,e}\,(2\partial_{\lambda})_{|e}=V_{p},\
(L_{p})_{*,e}\,(-\partial_{a})_{|e}=W_{p},$ (16)

proving the first claim. The verification of the Lie bracket relations and the
left-invariance of $\mu_{\mathcal{AA}}$ are left to the reader. ∎

Note, that $\vartheta(U)=\vartheta(V)=0$ and thus, the horizontal bundle of
$\mathcal{AA}$ is $\mathcal{H}_{\mathcal{AA}}=\text{Span}\\{U,V\\}$. The sub-
Riemannian structure in $\mathcal{AA}$ is defined by a sub-Riemannian metric
on $\mathcal{H}_{\mathcal{AA}}$ making $\\{U,V\\})$ an orthonormal basis. In
order to define the sub-Riemannian or Carnot-Carathéodory distance on
$\mathcal{AA}$ let $\gamma:[0,1]\rightarrow\mathcal{AA}$,
$\gamma(s)=(a(s),\lambda(s),t(s))$ be a (piecewise) $C^{1}$ curve. Its tangent
vector at $\gamma(s)$ is

$\dot{\gamma}(s)=\frac{\dot{t}(s)}{2\lambda(s)}U_{\gamma(s)}+\frac{\dot{\lambda}(s)}{2\lambda(s)}V_{\gamma(s)}+\left(\frac{\dot{t}(s)}{2\lambda(s)}-\dot{a}(s)\right)W_{\gamma(s)}.$

The curve $\gamma$ is a horizontal curve if and only if
$\dot{\gamma}(s)\in\ker(\vartheta)_{\gamma(s)}$ for almost every $s\in[0,1]$.
This is equivalent to the ODE

$\frac{\dot{t}(s)}{2\lambda(s)}-\dot{a}(s)=0,\text{ a.e. }s\in[0,1].$ (17)

It follows that for a horizontal curve

$\dot{\gamma}(s)=\frac{\dot{t}(s)}{2\lambda(s)}U_{\gamma(s)}+\frac{\dot{\lambda}(s)}{2\lambda(s)}V_{\gamma(s)}\in({\mathcal{H}}_{\mathcal{AA}})_{\gamma(s)}.$

The horizontal velocity $|\dot{\gamma}|_{H}$ of $\gamma$ is now defined by the
relation

$|\dot{\gamma}|_{H}=\left(\langle\dot{\gamma},U\rangle_{\mathcal{AA}}^{2}+\langle\dot{\gamma},V\rangle_{\mathcal{AA}}^{2}\right)^{1/2}=\frac{\sqrt{\dot{\lambda}^{2}+\dot{t}^{2}}}{2\lambda}.$
(18)

Here, $\langle\cdot,\cdot\rangle_{\mathcal{AA}}$ is the sub-Riemannian metric
on $\mathcal{H}_{\mathcal{AA}}$. Let
$\pi:\mathcal{AA}\to\mathbf{H}^{1}_{\mathbb{C}}$ denote the canonical
projection given by
$\pi(a,\lambda,t)=(\lambda,t),\,(a,\lambda,t)\in\mathcal{AA}$, the horizontal
length of $\gamma$ is then given by

$\ell(\gamma)=\int_{0}^{1}\frac{\sqrt{\dot{\lambda}^{2}+\dot{t}^{2}}}{2\lambda}ds=\ell_{h}(\pi\circ\gamma),$
(19)

where $\ell_{h}(\pi\circ\gamma)$ is the hyperbolic length of the projected
curve $\pi\circ\gamma$ in $\mathbf{H}^{1}_{\mathbb{C}}$. It is straightforward
to prove that the horizontal length is invariant under left-translations.

Conversely, if $\tilde{\gamma}$ is a $C^{1}$ curve in
$\mathbf{H}^{1}_{\mathbb{C}}$, $\tilde{\gamma}(s)=(\xi(s),\eta(s))$,
$s\in[0,1]$, passing from a point $q_{0}=\gamma(s_{0})$, then the curve
$\gamma:[0,1]\to\mathcal{AA}$ given by $\gamma(s)=(a(s),\lambda(s),t(s))$,
where

$a(s)=\int_{s_{0}}^{s}\frac{t(u)}{2\lambda(u)}\;du+a_{0},\quad\lambda(s)=\xi(s),\quad
t(s)=\eta(s),$

is a horizontal curve passing from a point $p_{0}=(a_{0},q)$ in the fibre of
$q$.

The corresponding Carnot-Carathéodory distance $d_{\mathcal{AA}}$ associated
to the sub-Riemannian metric $\langle\cdot,\cdot\rangle$ is defined for all
$p,q\in\mathcal{AA}$ as follows:

$d_{\mathcal{AA}}(p,q)=\inf_{\gamma\in\Gamma_{\mathcal{AA}}}\\{\ell(\gamma)\\},$
(20)

where $\Gamma$ is the following family of horizontal curves:

$\Gamma_{\mathcal{AA}}=\\{\gamma\in
C^{1}([0,1],\mathcal{AA}):\;\gamma(0)=p,\;\gamma(1)=q\\}.$

We recall that the distance $d_{\mathcal{AA}}$ is finite, geodesic and induces
the manifold topology. Our main object of study is the metric measure space
$(\mathcal{AA},d_{\mathcal{AA}},\mu_{\mathcal{AA}})$. It is well known, that
by Darboux theorem each three dimensional contact manifold is locally
contactomorphic to the Heisenberg group. Our next statement is a stronger,
global version of this fact.

######  Proposition 3.3.

The manifolds $(\mathcal{AA},\vartheta)$ and
$(\mathbb{H},\vartheta_{\mathbb{H}})$ are globally contactomorphic. That is:
there exists a smooth bijective map $g:\mathbb{H}\to\mathcal{AA}$ such that
$g^{*}\vartheta=\nu\vartheta_{\mathbb{H}}$ for some non-vanishing smooth
function $\nu:\mathbb{H}\to\mathbb{R}$. In particular the metric spaces
$(\mathbb{H},d_{\mathbb{H}})$ and $(\mathcal{AA},d_{\mathcal{AA}})$ are
locally bi-Lipschitz equivalent.

###### Proof.

We define the smooth contactomorphism
$g:(\mathbb{H},\vartheta_{\mathbb{H}})\rightarrow(\mathcal{AA},\vartheta)$
explicitely by the formula

$g(x,y,t)=\left(xe^{-y},\;e^{y},\;\frac{1}{2}(t-2xy+4x)\right)\text{ for
}(x,y,t)\in\mathbb{H}.$ (21)

Clearly, $g$ is a smooth diffeomorphism between $\mathbb{H}$ and
$\mathcal{AA}$. Its inverse map $g^{-1}:\mathcal{AA}\to\mathbb{H}$ is given by

$g^{-1}(a,\lambda,t)=\left(a\lambda,\;\ln\lambda,\;2t+2a\lambda(\ln\lambda-2)\right)\text{
for }\ (a,\lambda,t)\in\mathcal{AA}.$

To check the contact property of $g$ we compute directly:

$\displaystyle g^{*}\vartheta$ $\displaystyle=$ $\displaystyle\frac{(1/2)dt-
xdy-
ydx+2dx}{2e^{y}}-e^{-y}dx+xe^{-y}dy=\frac{dt+2xdy-2ydx}{4e^{y}}=\frac{1}{4e^{y}}\vartheta_{\mathbb{H}}.$

∎

Combining Proposition 2.4 and Proposition 3.3 we deduce

######  Proposition 3.4.

The manifolds $(\mathcal{RT},\vartheta_{\mathcal{RT}})$,
$(\mathbb{H},\vartheta_{\mathbb{H}})$ and $(\mathcal{AA},\vartheta)$ are all
globally contactomorphic to each other.

Another consequence of Proposition 3.3 is the following:

######  Proposition 3.5.

The metric measure space $(\mathcal{AA},d_{\mathcal{AA}},\mu_{\mathcal{AA}})$
is locally Ahlfors $4$-regular.

###### Proof.

We are going to prove a stronger property for
$(\mathcal{AA},d_{\mathcal{AA}},\mu_{\mathcal{AA}})$; actually, that there
exist a $C\geq 1$ and an $r_{0}>0$ such that

$C^{-1}r^{4}\leq\mu_{\mathcal{AA}}(\overline{B}_{d_{\mathcal{AA}}}(p,r))\leq
Cr^{4},$ (22)

for all $0<r\leq r_{0}$ and for all $p\in\mathcal{AA}$. Due to the left-
invariance of both the sub-Riemannian distance $d_{\mathcal{AA}}$ and the
measure $\mu_{\mathcal{AA}}$, it suffices to prove (22) for balls
$B_{\mathcal{AA}}(e,r)$ centered at the neutral element $e=e_{\mathcal{AA}}$.
We have that $(\mathbb{H},\vartheta_{\mathbb{H}})$ and
$(\mathcal{AA},\vartheta)$ are globally contactomorphic thanks to Proposition
3.3, so let us consider the map

$g:(\mathbb{H},d_{\mathbb{H}},\mathcal{L}^{3})\rightarrow(\mathcal{AA},d_{\mathcal{AA}},\mu_{\mathcal{AA}}),\quad
g^{*}\vartheta=\nu\vartheta_{\mathbb{H}},$

given in (21). Since $g(e_{\mathbb{H}})=e$, where $e_{\mathbb{H}}=(0,0,0)$ is
the neutral element of $\mathbb{H}$ and $g:\mathbb{H}\rightarrow\mathcal{AA}$
is locally bi-Lipschitz, we have the inclusions

$g(B_{\mathbb{H}}(e_{\mathbb{H}},L^{-1}r))\subseteq
B_{\mathcal{AA}}(e,r)\subseteq g(B_{\mathbb{H}}(e_{\mathbb{H}},Lr))$

for some fixed number $L\geq 1$ and any $0\leq r\leq 1$. Since
$g^{*}\mu_{\mathcal{AA}}=\nu^{2}\mu_{\mathbb{H}}=\nu^{2}\mathcal{L}^{3}$ (up
to multiplicative constants different from $0$) and
$\mathcal{L}^{3}(B_{\mathbb{H}}(e_{\mathbb{H}},r))=Cr^{4}$ for some fixed
constant $C>0$, the claim follows. ∎

Due to Proposition 3.4 we obtain the same result for the roto-translation
group $\mathcal{RT}$ as well, and moreover, according to Proposition 2.2, it
follows that

######  Proposition 3.6.

The metric measure spaces $(\mathbb{H},d_{\mathbb{H}},\mu_{\mathbb{H}})$ and
$(\mathcal{RT},d_{\mathcal{RT}},\mu_{\mathcal{RT}})$ are locally $4$-Ahlfors
regular and $4$-parabolic.

Another consequence of Proposition 3.3 is the following result about the
existence of non-smooth QC maps of $\mathcal{AA}$ that distort the Hausdorff
dimension $\dim_{H}$ of certain Cantor sets in $\mathcal{AA}$ in an arbitrary
fashion:

######  Proposition 3.7.

For any $s,t$, $0<s<t<4$ there exist Cantor sets $C_{s}\subset\mathcal{AA}$
and $C_{t}\subset\mathcal{AA}$ such that $\dim_{H}(C_{s})=s$ and
$\dim_{H}(C_{t})=t$ and a QC map $F:\mathcal{AA}\to\mathcal{AA}$ such that
$F(C_{s})=C_{t}$.

###### Proof.

The proof is based on the corresponding result in [1] for the case of the
Heisenberg group. In fact Theorem 1.1 in [1] states that if $0<s<t<4$ there
exist Cantor sets $K_{s}\subset\mathbb{H}$ and $K_{t}\subset\mathbb{H}$ and a
QC map $G:\mathbb{H}\to\mathbb{H}$ such that $\dim_{H}(K_{s})=s$,
$\dim_{H}K_{t}=t$, $K_{s}\subset B_{\mathbb{H}}(e,1)$, $K_{t}\subset
B_{\mathbb{H}}(e,1)$, $G(K_{s})=K_{t}$ and $G=id_{\mathbb{H}}$ outside of
$B_{\mathbb{H}}(e,1)$. It is easy to see that the map
$F:\mathcal{AA}\to\mathcal{AA}$ defined by $F=g\circ G\circ g^{-1}$ satisfies
the properties in the statement for the sets $C_{s}=g(K_{s})$ and
$C_{t}=g(K_{t})$. ∎

More results on quasiconformal maps defined on the affine-additive group
$\mathcal{AA}$, including methods of constructions such maps and study of
their extremality will be contained in the forthcoming paper [2] of the
authors as well as in the dissertation of the second author [4].

##  4 Proof of the main result

Let us observe, first, that hyperbolicity of a metric measure space
$(X,d_{X},\mu_{X})$ holds, if there exists a compact set $E\subset X$ and
sequence of compact sets $F_{n}\subseteq X$ such that

$\operatorname{\text{dist}}(E,F_{n}):=\inf\\{d(x,y):x\in E,y\in
F_{n}\\}\to\infty$

and

$\liminf_{n\to\infty}\mathrm{Mod}_{Q}(Q,F_{n})>0.$

To do this, let us pick $x_{0}\in E$.

We shall consider $R_{n}=\inf\\{d(x_{0},y):y\in F_{n}\\}$. Note, that
$R_{n}\to\infty$ and any curve connecting $E$ and $F_{n}$ must have a sub-
curve connecting $\partial B(x_{0},R_{0})$ and $\partial B(x_{0},R_{n})$.
Thus, by (4) we have the inequality

$\mathrm{Mod}_{Q}(\mathcal{D}(R_{0},R_{n}))\geq\mathrm{Mod}_{Q}(E,F_{n}).$

Since $\liminf_{n\to\infty}\mathrm{Mod}_{Q}(E,F_{n})>0$ we obtain that
$(X,d_{X},\mu_{X})$ is hyperbolic.

The idea of the proof of Theorem 1.1 is to construct compact sets $E$ and
$F_{n}$ in $\mathcal{AA}$ with the above properties. This is explicitly done
as follows:

Let $n\in\mathbb{N}$, $n\geq 2$. We define

$\displaystyle E$ $\displaystyle=\\{(a,1,t)\in\mathcal{AA}:a\in[-1,1]\text{
and }t\in[-1,1]\\},$ $\displaystyle F_{n}$
$\displaystyle=\\{(a,\frac{1}{n},t)\in\mathcal{AA}:a\in[-1,1]\text{ and
}t\in[-1,1]\\}.$

Next, for each such $n$ we define the following curve families of piecewise
smooth horizontal curves:

$\displaystyle\Gamma_{n}=\\{\gamma,$
$\displaystyle\gamma:[0,1]\rightarrow\mathcal{AA}\;\text{ such
that}\;\gamma(0)\in E\;\text{and}\;\gamma(1)\in F_{n}\\}.$ (23)

The following estimate holds.

######  Proposition 4.1.

There exists some $M>0$ such that $\mathrm{Mod}_{4}(\Gamma_{n})>M$ for all
$n\in\mathbb{N}$, $n\geq 2$.

###### Proof.

We consider the sub-family $\Gamma^{0}_{n}\subset\Gamma_{n}$ which comprises
curves $\gamma:[0,1]\rightarrow\mathcal{AA}$ given by

$\gamma(s)=\left(a,1-\left(1-\frac{1}{n}\right)s,t\right),\;x\in[-1,1],\,t\in[-1,1].$

It is straightforward to check that the curves in $\Gamma^{0}_{n}$ are
horizontal with $\gamma(0)\in E$ and $\gamma(1)\in F_{n}$ for all
$n\in\mathbb{N}$, $n\geq 2$. Further, from (18) we obtain that

$|\dot{\gamma}(s)|_{H}=\frac{1-\frac{1}{n}}{2\left(1-\left(1-\frac{1}{n}\right)s\right)}.$

If now $\rho\in{\rm Adm}(\Gamma^{0}_{n})$, then we have

$\int_{0}^{1}\rho\left(a,1-\left(1-\frac{1}{n}\right)s,t\right)\frac{1-\frac{1}{n}}{2\left(1-\left(1-\frac{1}{n}\right)s\right)}ds\geq
1,$

which, under integration by substitution with
$\lambda(s)=1-\left(1-\frac{1}{n}\right)s$, gives

$\int_{\frac{1}{n}}^{1}\frac{\rho(a,\lambda,t)}{2\lambda}\,d\lambda\geq
1,\,\forall n\geq 2.$ (24)

Next, by integrating (24) with respect to $x\in[-1,1]$ and $t\in[-1,1]$, we
obtain

$\int_{-1}^{1}\int_{-1}^{1}\int_{\frac{1}{n}}^{1}\frac{\rho(a,\lambda,t)}{\lambda}\,da\,d\lambda\,dt\geq
8,\,\forall n\geq 2.$ (25)

At this point, for $n\geq 2$ we define the sets

$P_{n}=\left\\{(a,\lambda,t)\in\mathcal{AA}:\;a\in[-1,1],\lambda\in\left[\frac{1}{n},1\right],\;t\in[-1,1]\right\\}$

and we apply Hölder’s inequality in (25) with respect to
$\frac{\rho(a,\lambda,t)}{\sqrt{\lambda}}\cdot\frac{\mathcal{X}_{P_{n}}(a,\lambda,t)}{\sqrt{\lambda}}$
and with conjugated exponents $4$ and $\frac{4}{3}$, to obtain

$\left(\int_{\mathcal{AA}}\rho^{4}(a,\lambda,t)\frac{da\,d\lambda\,dt}{\lambda^{2}}\right)^{\frac{1}{4}}\left(\int_{\mathcal{AA}}\mathcal{X}_{P_{n}}(a,\lambda,t)\frac{1}{\lambda^{\frac{2}{3}}}\,da\,d\lambda\,dt\right)^{\frac{3}{4}}\geq
8,\quad\forall n\geq 2.$ (26)

Now we observe that

$\int_{\mathcal{AA}}\mathcal{X}_{P_{n}}(a,\lambda,t)\frac{1}{\lambda^{\frac{2}{3}}}\,da\,d\lambda\,dt\leq
4\int_{0}^{1}\frac{1}{\lambda^{\frac{2}{3}}}\,d\lambda=12,\quad\forall n\geq
2.$

The latter inequality combined with (26) gives

$\int_{\mathcal{AA}}\rho^{4}(a,\lambda,t)\frac{da\,d\lambda\,dt}{\lambda^{2}}\geq\frac{2^{4}}{3^{3}}.$

Finally, the proof is concluded by taking the infimum over all $\rho\in{\rm
Adm}(\Gamma^{0}_{n})$. ∎

The first consequence of Theorem 1.1 is the following:

######  Corollary 4.2.

There is no QC map between $\mathcal{AA}$ and $\mathbb{H}$ or $\mathcal{AA}$
and $\mathcal{RT}$.

For a map $f$ between metric spaces, let’s recall the quantity $H_{f}(\cdot)$
from (1) and define $B_{f}$ as the branch set (i.e., the set of points where
$f$ does not define a local homeomorphism). We use the following definition of
quasiregular (QR) maps from [9]

######  Definition 4.3.

Let $M$ and $N$ be any sub-Riemannian manifolds among $\mathbb{H}$,
$\mathcal{RT}$ and $\mathcal{AA}$. We call a mapping $f:M\to N$
$K$-quasiregular if it is constant, or if:

  1. (1)

$f$ is a branched cover onto its image (i.e., continuous, discrete, open and
sense-preserving),

  2. (2)

$H_{f}(\cdot)$ is locally bounded on $M$,

  3. (3)

$H_{f}(p)\leq K$ for almost every $p\in M$,

  4. (4)

the branch set $B_{f}$ and its image have measure zero.

A mapping is said to be quasiregular if it is $K$-quasiregular for some $1\leq
K<\infty$.

From the definition it is clear, every QC map is QR. On the other hand, the
class of QR maps can be substantially larger than the class of QC maps.

Let us recall, that by Theorem 4.8.1 from [10] if $f:\mathbb{H}\to N$ is a QR
map where $N$ is $4$-hyperbolic then $f$ must be constant. Applying this
statement to our situation, we obtain the following result:

######  Theorem 4.4.

If $f:\mathbb{H}\to\mathcal{AA}$ is a quasiregular map, then $f$ is constant.

In contrast to the previous statement, we note that there can be plenty of
examples of QR maps $f:\mathcal{AA}\to\mathbb{H}$. One such map is the
following:

######  Example 4.5.

Let $f:\mathcal{AA}\to\mathbb{H}$ be the map defined by

$f(a,\lambda,t)=(-\sqrt{\lambda}\cos a,\sqrt{\lambda}\sin
a,t),\;(a,\lambda,t)\in\mathcal{AA}.$

By a direct calculation one can verify the contact property of $f$, namely
$f^{*}\vartheta_{\mathbb{H}}=2\lambda\vartheta$. Moreover, denoting
$f(a,\lambda,t)=(x,y,t)\in\mathbb{H}$, one can check that $f_{*}U=yX-xY$ and
$f_{*}V=xX+yY$. Using this, we have that

$f_{*}(\alpha U+\beta V)=(\alpha y+\beta x)X+(\beta y-\alpha x)Y,$

for any $\alpha,\beta\in\mathbb{R}$.

Since $\\{U,V\\}$, resp. $\\{X,Y\\}$, is the orthonormal basis in the sub-
Riemannian metric of $\mathcal{AA}$, resp. $\mathbb{H}$, we obtain that

$|f_{*}(\alpha U+\beta
V)|_{\mathbb{H}}=\sqrt{(\alpha^{2}+\beta^{2})(x^{2}+y^{2})}$

and therefore

$H_{f}(a,\lambda,t)=\frac{\max\\{|f_{*}(\alpha U+\beta
V)|_{\mathbb{H}}:\alpha^{2}+\beta^{2}=1\\}}{\min\\{|f_{*}(\alpha U+\beta
V)|_{\mathbb{H}}:\alpha^{2}+\beta^{2}=1\\}}=1,$

for every point $(a,\lambda,t)\in\mathcal{AA}$. See also Proposition 2.4 in
[9] for a different way to compute the value of $H_{f}(\cdot)$.

Furthermore, note, that a direct computation, gives $\det f_{*}=\frac{1}{2}$;
and thus $f$ is a local diffeomorphism at every point. This means that the
branch set $B_{f}$ of $f$ is empty, and thus $f$ is an immersion of
$\mathcal{AA}$ into $\mathbb{H}$. Consequently we conclude that $f$ is
$1$-quasiregular.

Further examples of QR maps $g:\mathcal{AA}\to\mathbb{H}$ can be obtained as
compositions $g=h\circ f$ where $h:\mathbb{H}\to\mathbb{H}$ is a QC map of the
Heisenberg group.

## References

  * [1] Z.M. Balogh.  Hausdorff dimension distribution of quasiconformal mappings on the Heisenberg group.  J. Anal. Math., 83:289–312, 2001.
  * [2] Z.M. Balogh, E. Bubani, and I.D. Platis.  Extremal quasiconformal maps on the affine-additive group.  Preprint, Forthcoming, 2024.
  * [3] Z.M. Balogh, K. Fässler, and I.D. Platis.  Modulus method and radial stretch map in the Heisenberg group.  Ann. Acad. Sci. Fenn. Math., 38(1):149–180, 2013.
  * [4] E. Bubani.  Hyperbolicity and quasiconformal maps on the affine-additive group.  Doctoral Dissertation, Forthcoming, 2025.
  * [5] L. Capogna, D. Danielli, S.D. Pauls, and J.T. Tyson.  An introduction to the Heisenberg group and the sub-Riemannian isoperimetric problem, volume 259 of Prog. Math. Basel: Birkhäuser, 2007.
  * [6] L. Capogna and P. Tang.  Uniform domains and quasiconformal mappings on the Heisenberg group.  Manuscripta Math., 86(3):267–281, 1995.
  * [7] T. Coulhon, I. Holopainen, and L. Saloff-Coste.  Harnack inequality and hyperbolicity for subelliptic $p$-Laplacians with applications to Picard type theorems.  Geom. Funct. Anal., 11(6):1139–1191, 2001.
  * [8] K. Fässler, P. Koskela, and E. Le Donne.  Nonexistence of quasiconformal maps between certain metric measure spaces.  Int. Math. Res. Not., 2015(16):6968–6987, 2015.
  * [9] K. Fässler, A. Lukyanenko, and K. Peltonen.  Quasiregular mappings on sub-Riemannian manifolds.  J. Geom. Anal., 26(3):1754–1794, 2016.
  * [10] K. Fässler, A. Lukyanenko, and J. Tyson.  Heisenberg quasiregular ellipticity.  Rev. Mat. Iberoam., 35(2):471–520, 2019.
  * [11] J. Heinonen.  Lectures on analysis on metric spaces.  Universitext. Springer-Verlag, New York, 2001.
  * [12] J. Heinonen and P. Koskela.  Quasiconformal maps in metric spaces with controlled geometry.  Acta Math., 181(1):1–61, 1998.
  * [13] J. Heinonen, P. Koskela, N. Shanmugalingam, and J.T. Tyson.  Sobolev spaces on metric measure spaces, volume 27 of New Mathematical Monographs.  Cambridge University Press, Cambridge, 2015.  An approach based on upper gradients.
  * [14] I. Holopainen and S. Rickman.  Quasiregular mappings of the Heisenberg group.  Math. Ann., 294(4):625–643, 1992.
  * [15] A. Korányi and H.M. Reimann.  Quasiconformal mappings on the Heisenberg group.  Invent. Math., 80(2):309–338, 1985.
  * [16] A. Korányi and H.M. Reimann.  Foundations for the theory of quasiconformal mappings on the Heisenberg group.  Adv. Math., 111(1):1–87, 1995.
  * [17] P. Koskela and K. Wildrick.  Analytic properties of quasiconformal mappings between metric spaces.  In Metric and differential geometry, volume 297 of Progr. Math., pages 163–174. Birkhäuser/Springer, Basel, 2012.
  * [18] G.A. Margulis and G.D. Mostow.  The differential of a quasi-conformal mapping of a Carnot-Carathéodory space.  Geom. Funct. Anal., 5(2):402–433, 1995.
  * [19] J. Mitchell.  On Carnot-Carathéodory metrics.  Journal of Differential Geometry, 21(1):35 – 45, 1985.
  * [20] P. Pansu.  Métriques de Carnot-Carathéodory et quasiisométries des espaces symétriques de rang un.  Ann. of Math. (2), 129(1):1–60, 1989.
  * [21] P. Petersen.  Riemannian geometry, volume 171 of Graduate Texts in Mathematics.  Springer-Verlag, New York, 1998.
  * [22] I.D. Platis.  Quasiconformal mappings in the hyperbolic Heisenberg group and a lifting theorem.  In Lecture Notes of Seminario Interdisciplinare di Matematica. Vol. XV, volume 15 of Lect. Notes Semin. Interdiscip. Mat., pages 75–105. Semin. Interdiscip. Mat. (S.I.M.), Potenza, 2020.
  * [23] V.A. Zorich.  Asymptotic geometry and conformal types of Carnot-Carathéodory spaces.  Geom. Funct. Anal., 9(2):393–411, 1999.

Z.M. Balogh, (Corresponding author), Universität Bern, Mathematisches Institut
(MAI),
Sidlerstrasse 5, 3012 Bern, Switzerland.

E-mail address, Z.M. Balogh<EMAIL_ADDRESS>
E. Bubani, Universität Bern, Mathematisches Institut (MAI), Sidlerstrasse 5,
3012 Bern, Switzerland.

E-mail address, E. Bubani<EMAIL_ADDRESS>
I.D. Platis, Department of Mathematics and Applied Mathematics, University of
Crete Voutes Campus, 70013 Heraklion, Greece

E-mail address, I.D. Platis<EMAIL_ADDRESS>


# DFIN-SQL: Integrating Focused Schema with DIN-SQL for Superior Accuracy in
Large-Scale Databases

Shai Volvovsky
Sygnia
<EMAIL_ADDRESS>
Marco Marcassa
Safra Bank
<EMAIL_ADDRESS>
Mustafa Panbiharwala
Wells Fargo
<EMAIL_ADDRESS>
###### Abstract

The task of converting natural language queries into SQL queries is intricate,
necessitating a blend of precise techniques for an accurate translation. The
DIN-SQL (Decomposed-In-Context SQL) methodology represents a significant
development in this domain. This paper introduces DFIN (Decomposed Focused-In-
Context), an innovative extension of DIN-SQL that enhances Text-to-SQL
conversion by addressing schema linking errors, which are a major source of
inaccuracies. DFIN uniquely alternates between prompting techniques and
Retrieval-Augmented Generation (RAG), adapting to the size and complexity of
the database schema. A preprocessing phase embeds database definitions and
leverages annotated files, akin to those in the BIRD dataset, facilitating the
runtime retrieval of pertinent schema information. This strategy significantly
reduces the token count for schema linking prompts, enabling the use of a
standard GPT-4 model over its larger context variant, thus handling large-
scale databases more effectively and economically. Our evaluation on the BIRD
dataset, a challenging real-world benchmark, demonstrates that DFIN not only
scales efficiently but also improves accuracy, achieving a score of 51.69.
This improvement surpasses DIN-SQL method (the current third-place), which is
the highest-ranked model employing in-context learning rather than fine-
tuning, previously scoring 50.72. The advancement of DFIN underscores the
evolving capabilities of in-context learning methodologies combined with
advanced language models, offering a promising avenue for future research in
complex Text-to-SQL conversion tasks.

DFIN-SQL: Integrating Focused Schema with DIN-SQL for Superior Accuracy in
Large-Scale Databases

Shai Volvovsky Sygnia<EMAIL_ADDRESS>Marco Marcassa Safra Bank
<EMAIL_ADDRESS>

Mustafa Panbiharwala Wells Fargo<EMAIL_ADDRESS>

##  1 Introduction

Text-to-SQL conversion stands as a pivotal challenge in the realm of natural
language processing. The current state-of-the-art, DIN-SQL (Decomposed-In-
Context SQL) Pourreza and Rafiei (2023), employs a chained prompt methodology
to process natural language queries into SQL commands. Despite its innovative
approach, DIN-SQL’s Pourreza and Rafiei (2023) schema linking prompt, which is
crucial for identifying relevant schema elements, is prone to errors. These
inaccuracies in schema linking account for a significant portion of the total
errors encountered. Moreover, as database complexity increases, the context
window required by the model expands, leading to higher computational costs
and a decrease in accuracy.

In this paper, we propose DFIN-SQL (Decomposed Focused-In-Context), an
enhancement to the DIN-SQL Pourreza and Rafiei (2023) method designed to
address these critical issues. Our approach introduces a preliminary focus
phase that utilizes a dual strategy, alternating between prompt-based and
Retrieval-Augmented Generation (RAG) techniques, to zero in on the most
pertinent tables and columns (see Figure 1). This process is dynamic,
adjusting according to the complexity and size of the database schema. In our
empirical work, prompts were employed to determine table linkages, while the
RAG method was applied to refine column selection. This adaptive strategy
ensures that DFIN-SQL is capable of handling databases of various sizes, thus
optimizing for both precision and recall as necessary.

Figure 1: DIN-SQL vs DFIN-SQL.

A key advancement presented in this work is the development of the Schema
Linking Accuracy Metric (SLAM), a bespoke metric crafted to assess the
precision of the schema focusing phase within DFIN-SQL. By thoroughly
preprocessing the development set of the BIRD dataset and aligning our
findings with the gold-standard table and column usage stipulated in the
queries, we were able to fine-tune our model through iterative refinement.
Guided by the SLAM metric, we aimed to achieve a high recall, which is crucial
for the next stages in the SQL generation process, while also avoiding the
inclusion of superfluous tables and columns that could otherwise lead to
inaccuracies in the conversion.

The introduction of DFIN-SQL marks a significant advancement in the accuracy
of Text-to-SQL conversion, especially for large and complex database
environments. This methodological progress is not merely an incremental
improvement but a substantial leap forward, addressing both the scalability
and precision challenges faced by current systems. The innovative utilization
of preprocessed natural language annotations from the BIRD dataset, alongside
the newly established SLAM metric, sets a new standard for precision in Text-
to-SQL tasks and signals a promising direction for future exploration in this
domain.

##  2 Prior Literature

The research landscape of Text-to-SQL conversion within Natural Language
Processing (NLP) is rich and multifaceted. To contextualize our contributions,
we categorize relevant literature into two primary groups, each underscoring
different aspects of the Text-to-SQL challenge and its solutions.

###  2.1 Advances in Text-to-SQL Conversion Mechanisms

This group encapsulates breakthroughs in conversion methodologies, including
model architectures and the prompting mechanisms that guide natural language
understanding towards accurate SQL query generation:

  * •

In-context learning for Text-to-SQL: In recent advancements within the field
of natural language processing, the text-to-SQL paradigm has experienced a
transformative shift with the advent of Large Language Models (LLMs).The C3
technique from Dong et al. (2023) showcases the significance of prompt design
in improving LLM performance in a zero-shot context. Similarly, DAIL-SQL Gao
et al. (2023) advances the understanding of prompt engineering, with its Code
Representation Prompt (CRP) leading to an 86.6% accuracy on the Spider Yu et
al. (2019) benchmark. The multi-prompt DIN-SQL method Pourreza and Rafiei
(2023) posits a ’deconstructed-in-context SQL’ approach by addressing schema
linking and query generation, and recognizes schema linking as the primary
source of errors. Our work builds on DIN-SQL’s Pourreza and Rafiei (2023)
framework, focusing on refining its application to large databases where
efficiency and accuracy are key.

  * •

Prompting and De-semanticization Techniques: Innovations in Text-to-SQL
conversion have led to novel strategies that refine query generation through
advanced prompting techniques. The study by Guo et al. (2023b) introduces a
de-semanticization process paired with skeleton retrieval, stripping natural
language questions to their structural core to enhance the accuracy of SQL
translations performed by GPT-3.5. This approach underscores the significance
of domain-specific knowledge and iterative SQL revisions in the context of
varied datasets. Complementing this, Guo et al. (2023a) advances a retrieval-
augmented prompting framework that employs Large Language Models for iterative
prompting and question simplification. This method dynamically adapts to
feedback, iteratively refining SQL queries to approach the desired result more
accurately. Both methods, showcasing improved performance on benchmark
datasets, suggest that the integration of these structured prompting
techniques could significantly bolster the development of more precise and
efficient Text-to-SQL models.

###  2.2 Datasets and Schema Understanding in Text-to-SQL

The development of specialized datasets and the comprehension of database
schemas are critical for advancing Text-to-SQL technologies. Here we delve
deeper into the BIRD dataset which plays a central role in our work:

  * •

BIRD - A BIg Bench for Database Grounded Text-to-SQLs: The BIRD dataset’s Li
et al. (2023) intricate annotations of database schemas distinguish it as a
pivotal resource for our study. It provides extensive natural language
descriptions for columns, essential for the preprocessing step in our DFIN-SQL
approach, and offers a more realistic challenge for models due to its
complexity and domain-specific data.

  * •

Foundational Benchmarks: The SPIDER dataset Yu et al. (2019), while
foundational, presents a less challenging benchmark and lacks the detailed
annotations found in BIRD Li et al. (2023). The BIRD dataset Li et al. (2023),
with its comprehensive annotations and our own Schema Linking Accuracy Metric
(SLAM), pushes the envelope in terms of precision for Text-to-SQL tasks and
reflects a more accurate representation of real-life database scenarios.

Our DFIN-SQL methodology synthesizes these advances, presenting a novel
approach that significantly enhances accuracy for complex and large database
environments, marking a notable progression in the field of Text-to-SQL
conversion.

##  3 Data

Table 1: BIRD Dev Databases

Database Name | # of Tables | Median # of Columns | Range of Columns (Min-Max)
---|---|---|---
California Schools | 3 | 29 | 11-49
Card Games | 6 | 6 | 4-74
Codebase Community | 8 | 6 | 4-21
Debit Card Specializing | 5 | 3 | 2-9
European Football | 7 | 7 | 2-115
Financial | 8 | 5 | 4-16
Formula 1 | 13 | 7 | 2-18
Student Club | 8 | 6 | 2-9
Superhero | 10 | 2 | 2-12
Thrombosis Prediction | 3 | 13 | 7-44
Toxicology | 4 | 3 | 2-3

Our evaluation was conducted on the cross-domain BIRD dataset Li et al. (2023)
which consists of a train and dev set. For our analysis and work, we primarily
focus on the dev split as the test split is not publicly available. The dev
dataset contains 1533 question-SQL pairs over 11 databases. Each instance
comprises a natural language question on a specific database and its
corresponding SQL query. The descriptions of the 11 databases are presented in
Table 1. Each database is meticulously curated, with foreign key constraints
and calibrated names for abbreviated columns or tables. Furthermore, a unique
"Table Description File" was formulated for each table across all databases to
aid annotators in grasping the structure of databases, offering insights into
full schema names and the significance of database values. These files are
pivotal for models to discern intricate database structures and comprehend
values which might not string-match directly with questions. Each database
file also contains an individual SQLite file for the database, which includes
the schema, data, and metadata for each of the tables.

Additionally, the BIRD dataset Li et al. (2023) provides extensive annotations
for each column within the databases. An example annotation from the frpm
table in the california schools database is as follows:

  * •

Original Column Name:
’FRPM Count (K-12)’

  * •

Column Description:
Free or Reduced Price Meal Count (K-12)

  * •

Data Format:
real

  * •

Value Description:
Commonsense evidence: eligible FRPM rate = FRPM / Enrollment

Apart from the databases, the dev dataset also comes with a dev.json file
which contains the gold standard 1533 question-SQL pairs. The dev.json file
has fields including question_id, db_id, question, evidence, SQL, and
difficulty. The evidence field represents external knowledge given to both the
model and the annotators to improve their ability to answer the question
correctly. The difficulty field classifies all SQL queries as simple,
moderate, or challenging. The annotators have calculated the difficulty of a
task based on factors such as question comprehension, schema linking, external
knowledge acquisition, and reasoning. The distribution of queries based on
difficulty is depicted in Table 2.

Difficulty | # of question-sql pairs | Count
---|---|---
1 | Simple | 925
2 | Moderate | 465
3 | Challenging | 144
Table 2: Number of Question-SQL Pairs by Difficulty

A sample entry from the dev.json file:

  * •

question_id: 0

  * •

db_id: california_schools

  * •

question: What is the highest eligible free rate for K-12 students in the
schools in Alameda County?

  * •

SQL:SELECT ‘Free Meal Count (K-12)‘ / ‘Enrollment (K-12)‘ FROM frpm WHERE
‘County Name‘ = ’Alameda’ ORDER BY (CAST(‘Free Meal Count (K-12)‘ AS REAL) /
‘Enrollment (K-12)‘) DESC LIMIT 1

  * •

evidence: Eligible free rate for K-12 = ‘Free Meal Count (K-12)‘ / ‘Enrollment
(K-12)‘

  * •

difficulty: simple

##  4 Methodology

The DFIN-SQL methodology arises from the need to enhance schema linking in SQL
query generation, where the standard DIN-SQL Pourreza and Rafiei (2023)
approach often incorporates an unwieldy and overgeneralized context. DIN-SQL
Pourreza and Rafiei (2023) contexts include a CREATE TABLE statement, sample
table rows, and column descriptions for every table in a database, which
creates a bulky and sometimes irrelevant schema context for the task at hand.
This broad context can dilute the model’s focus, leading to suboptimal schema
linking performance. An illustrative example of this standard context is
presented in Figure 2, showcasing the typical structure and content included.

⬇

CREATE TABLE employee (

emp_id INT PRIMARY KEY,

first_name VARCHAR(100),

last_name VARCHAR(100),

gender CHAR(1),

department VARCHAR(100)

);

\-- Sample rows from ’employee’ table:

\-- emp_id | first_name | last_name | gender | department

\-- 101 | John | Doe | M | Engineering

\-- 102 | Jane | Smith | F | Marketing

\-- 103 | Emma | Brown | F | Human Resources

\-- Column descriptions:

\-- ’emp_id’: Unique identifier for each employee.

\-- ’first_name’: Given name of the employee.

\-- ’last_name’: Family name of the employee.

\-- ’gender’: Gender of the employee (’F’ for female, ’M’ for male).

\-- ’department’: Department where the employee works.

Figure 2: Example of a single table representation for the Schema Linking
prompt

###  4.1 Preprocessing for Table Descriptions

To address the absence of overarching table descriptions in the BIRD dataset
Li et al. (2023), we utilized GPT-4 to generate succinct and informative
descriptions for each table. This was achieved by prompting the model with a
structured input that included the table’s CREATE TABLE statement, sample
rows, and existing column descriptions, analogous to the process depicted in
Figure 2. The resulting table descriptions were then stored in a
’table_description.json’ file for subsequent use during the schema linking
process.

###  4.2 Runtime Processing

####  4.2.1 Linking Tables

At runtime, when a natural language question is posed, DFIN-SQL employs a
prompt-based method to determine the relevant tables from the database. Two
strategies are employed: a ’minimal’ approach, which seeks to identify only
the most critical tables, and a ’conservative’ approach, which aims for higher
recall by including any potentially relevant tables. Examples of these prompts
are presented in Figures 3 and 4.

⬇

"""You are a sql query assistant schema linker. You are provided with a
natural language question a possible hint and a list of table descriptions.

Your task is to pick the minimum relevant tables for the query. Each table you
pick is costly so be cautious and weary for each table you consider.

the final output of tables should look like a pytho set -> {{’table_a’,
’table_b’}}

Table Descriptions:

####

{tables_descriptions}

####

Question: {question}

{f"Hint: {hint}" if hint else ’’}

tables for query, Let’s think step by step."""

Figure 3: Example of a minimal table linking prompt

⬇

"""You are a sql query assistant schema linker with a strong focus on high
recall. You are provided with a natural language question a possible hint and
a list of table descriptions.

Your task is to identify all the tables that could possibly be relevant to the
query. It is crucial that you do not miss any relevant tables, even if it
means including a few that might not be strictly necessary. Each missed table
is a significant issue, while including an extra table is a minor
inconvenience.

Table Descriptions:

...

Considering the importance of high recall and the relative cost of missing a
table versus including an extra one, list the tables for the query. Aim for
completeness and be err on the side of inclusion. Your output should be
formatted as a python set -> {{’table_a’, ’table_b’}}.

Tables for query, Let’s think step by step."

Figure 4: Example of a conservative table linking prompt

####  4.2.2 Linking Columns

In the DFIN-SQL approach, once the pertinent tables are pinpointed, an
embedding similarity step hones the context further by pinpointing columns
with the greatest semantic relation to the given query. This step is strictly
applied to the tables identified previously, ensuring relevance and
efficiency.

After preprocessing all column description embeddings, generated using the
OpenAI model ada-002, are compared to the question’s embedding through cosine
similarity. The top $k$ columns with the highest similarity are selected,
focusing the query formation on the most relevant columns. This method
effectively narrows down the necessary columns for constructing the SQL query.

Moreover, regardless of their cosine similarity scores, primary and foreign
keys from the linked tables are always included to accommodate any join
operations required by the query.

###  4.3 Final Context Construction

The final stage in the DFIN-SQL methodology involves assembling a concise
context that encompasses only the crucial schema information as identified in
the previous steps. This focused context is then utilized to guide the
language model in generating an accurate SQL query, reflecting the specific
requirements of the natural language question posed.

##  5 Experiment

###  5.1 Models

Our choice of models for the experiments includes GPT-4 OpenAI (2023) for its
unparalleled natural language processing capabilities and OpenAI’s ADA2 model
for generating embeddings used in schema linking. The combination of GPT-4’s
OpenAI (2023) generative abilities and ADA2’s efficient embeddings allows us
to capitalize on the strengths of both models to improve the overall accuracy
of SQL generation from natural language queries.

###  5.2 Evaluation Metrics

Our evaluation framework employs Execution Accuracy (EX) and Valid Efficiency
Score (VES) as principal metrics, following the benchmarks established by the
creators of the BIRD dataset Li et al. (2023). Execution Accuracy (EX) is a
critical metric that measures the proportion of SQL queries generated by the
model that produce the same results as the ground truth when executed against
the database. This metric directly reflects the model’s ability to understand
and translate a user’s natural language question into a functionally
equivalent SQL query.

In parallel, the Valid Efficiency Score (VES) quantifies the efficiency of the
SQL queries generated. It is computed by considering only those queries that
are both syntactically correct and yield the correct result set when executed.
The VES offers insight into the computational cost of the generated queries,
encouraging the model to produce optimized SQL statements that align with the
intended user requests while minimizing resource utilization.

Together, EX and VES provide a dual perspective on the model’s performance,
ensuring that the generated SQL queries are not only accurate in representing
the user’s intent but are also efficient in their execution. This holistic
approach to evaluation aligns with our goal of improving the functionality of
SQL generation from natural language, ensuring that the generated queries are
practical for real-world applications where accuracy and efficiency are
paramount.

###  5.3 Schema Linking Accuracy Metric (SLAM)

The Schema Linking Accuracy Metric (SLAM) is a pivotal element of our
evaluation framework, enabling us to meticulously assess the precision and
recall of our schema linking method. SLAM operates by contrasting the
predicted linked tables and columns against a gold standard—a preprocessed set
of tables and columns that are known to be relevant to each query within the
dataset. The analysis is twofold: it first evaluates the table linking
accuracy by comparing the predicted set of relevant tables with the gold
standard, tracking metrics such as missed and extra tables. It then delves
into the granularity of column linking, comparing predicted columns within
these tables to the gold standard, accounting for the possibility of a greater
number of columns being linked due to the top-k selection approach, which
ensures that even tables with fewer than k columns have all columns
considered. The metric focuses particularly on recall, especially for columns,
to minimize false negatives and ensure comprehensive coverage of relevant
schema elements. This is crucial for tasks that involve information retrieval,
where missing relevant columns (false negatives) can significantly impact the
accuracy and utility of the results. The SLAM’s output includes detailed per-
question recall rates as well as aggregate statistics, such as average recall
across the dataset, which informs further refinement of the linking process
and prompt optimization.

###  5.4 Implementation

In the implementation of our methodology, the embeddings generated by ADA2
play a pivotal role in the identification of semantically relevant columns,
allowing us to employ cosine similarity measures for precise schema linking.
Our focused context approach enabled us to utilize the GPT-4-8k model variant,
which is less resource-intensive than the GPT-4-32k variant used in the
original DIN-SQL Pourreza and Rafiei (2023) study, while improving overall
accuracy and efficiency.

###  5.5 Baselines and Permutations

Our comparative analysis involved benchmarking against the existing DIN-SQL
Pourreza and Rafiei (2023) framework and the base GPT-4 OpenAI (2023) model,
drawing from the BIRD dataset’s Li et al. (2023) development set. To fine-tune
our schema linking strategy, we initially focused on this stage exclusively,
deploying our Schema Linking Accuracy Metric (SLAM) to assess a series of
permutations. These included both minimal and conservative modes with top-k
settings of 15, 10, and 5 for column selection. Through this process, we were
able to rapidly iterate and evaluate the impact of each configuration on
schema linking accuracy. Ultimately, we settled on the minimal mode with a
top-k of 15 for the full DFIN-SQL integration. This decision was informed by
the observation that while the conservative approach did yield improvements in
recall, the overall gains did not justify the additional complexity. The
chosen configuration, therefore, struck a harmonious balance between precision
and recall, leading to a significant enhancement in the accuracy of the final
query predictions.

Figure 5: Analysis of table links. Figure 6: Recall of column links.

##  6 Analysis

Figure 7: Example Top-K Distribution for a Question. The relevance of columns
is plotted, showing the uniform distribution and highlighting the selected
relevant columns.

###  6.1 Schema Focusing Impact on Accuracy and Efficiency

Our comprehensive analysis indicates a significant enhancement in both
accuracy and efficiency when the schema relevant to the query is focused
within the schema linking prompt. This refinement of the schema is
particularly beneficial when dealing with large databases, a common scenario
in real-world applications. Such databases can contain hundreds of tables and
columns, posing a substantial challenge for traditional natural language
processing methods. By distilling the schema to the most pertinent elements,
our methodology demonstrates robustness and scalability, enabling successful
handling of complex database structures without compromising on performance.

###  6.2 Table Linking Precision and Recall

The analysis of table links brings to light a key finding: the minimal version
of our approach yields an average precision of 0.935, significantly surpassing
the conservative approach, which stands at 0.803. Even though the conservative
method slightly edges out with an average recall of 0.972 compared to the
minimal approach’s 0.938, the F1 score—a measure of a test’s accuracy—and
fully correct predictions favor the minimal approach. Impressively, in 80% of
the questions, the table linking prompt correctly identified the relevant
tables while filtering out irrelevant ones. This high percentage of fully
correct predictions underscores the effectiveness of our minimal approach,
striking an optimal balance between inclusivity and precision.

###  6.3 Top-K Column Selection Insights

An intriguing aspect of our method is the top-K column selection. A
visualization, which we will refer to as Figure 7, exemplifies the challenge
of selecting an appropriate K. In the figure, the distribution of column
relevance for a given question shows that the relevant column for the SQL
query is ranked at position 11, indicating the risks associated with selecting
a small top-K. The distribution of similarities across the columns is
relatively uniform, complicating the task of distinguishing between highly
relevant and less relevant columns.

This uniform distribution prompts a reconsideration of our exclusive reliance
on the ADA-002 embeddings for semantic representation. While embeddings
provide a robust baseline for relevance, our findings suggest that integrating
a re-ranking mechanism that incorporates exact keyword matches may yield
better results. A hybrid approach combining semantic embeddings with keyword
matching could allow for a reduction in the top-K threshold while maintaining,
or even improving, the precision of column selection. This re-ranking could be
particularly advantageous for queries that naturally involve a limited number
of columns, aligning the focus context more closely with the actual usage
patterns observed in SQL queries.

###  6.4 Rethinking the Top-K Threshold

The analysis suggests that as the number of columns increases, the strategy
for selecting the top-K columns warrants a re-evaluation. Our objective is to
confine the focus context to the relevant columns, avoiding the inclusion of
superfluous information. However, the necessity of including crucial columns
for accurately interpreting the query at times necessitates a larger top-K.
The future development of our methodology may involve exploring a more nuanced
column selection mechanism that can dynamically adjust the top-K based on the
distribution of semantic similarities and the presence of keyword matches.
This adjustment would optimize the relevance of the included columns, thus
enhancing the overall effectiveness of the schema linking process.

###  6.5 Insights on Element Size and Method Suitability

The size of the element set in database queries significantly impacts the
effectiveness of different schema focusing techniques. Our analysis reveals
that when dealing with a smaller set of elements, such as tables where the
average database contains between 8 to 13 tables, a direct prompting strategy
yields superior results. This technique involves the integration of table
descriptions within the prompts used by GPT-4 OpenAI (2023), capitalizing on
the model’s language understanding capabilities to determine relevance.

Conversely, as the number of elements increases, the viability of direct
prompting diminishes. In cases where databases contain an extensive number of
columns, such as the European football database with its 115 columns, it is
impractical to incorporate all column descriptions within a single prompt.
Here, our Retrieval-Augmented Generation (RAG) approach proves to be more
effective. It enables the model to handle a larger element set by leveraging
embeddings to distill a focused context. This approach, when paired with a
carefully calibrated top-k threshold and a re-ranking mechanism that accounts
for keyword matches, can significantly enhance the model’s ability to discern
the most relevant columns for a given query.

The dichotomy between the two scenarios emphasizes the importance of method
adaptability based on element set size. Direct prompting excels in smaller,
more manageable scenarios, while the RAG approach, augmented with strategic
re-ranking, is better suited for larger, more complex element sets. This
insight lays the groundwork for future research and development, suggesting
that a hybrid approach or a dynamic method selection based on the size of the
element set could further optimize the schema focusing process.

##  7 Conclusion

In this work, we have presented DFIN-SQL, an enhancement over the DIN-SQL
Pourreza and Rafiei (2023) approach, which addresses the critical issue of
schema linking errors in Text-to-SQL conversion tasks. By introducing a novel
preprocessing phase and a dynamic runtime processing mechanism, DFIN-SQL
significantly reduces the token count for schema linking prompts, thereby
allowing the standard GPT-4 OpenAI (2023) model to handle large-scale
databases more effectively. Our methodological innovations, including the
Schema Linking Accuracy Metric (SLAM) and the use of Retrieval-Augmented
Generation (RAG), have demonstrated a marked improvement in the accuracy and
scalability of SQL query generation from natural language descriptions.

The empirical results on the BIRD dataset underscore the potential of DFIN-SQL
to achieve superior performance on complex, real-world databases. By focusing
on the schema elements that are most pertinent to the query, DFIN-SQL not only
streamlines the query generation process but also provides a more economical
solution in terms of computational resources.

###  7.1 Refinement and Future Directions

Our study on DFIN-SQL demonstrates that a focused schema can significantly
elevate the precision of Text-to-SQL translations. Turns out, in the realm of
database querying, focus is all you need :) The use of a minimal approach for
table linking and a top-k strategy for column selection has proven to be
effective, particularly when dealing with the intricate schemas of large
databases. However, our analysis indicates that there is potential for further
optimization. A hybrid strategy that combines semantic relevance with keyword
matching could refine the column selection process, particularly for databases
with numerous columns.

The distinction between when to use direct prompting and when to employ RAG-
based techniques is a key takeaway from our research. For smaller element
sets, direct prompting is practical and efficient, but as the size of the
element set grows, RAG becomes necessary to manage the increased complexity.
Adjusting the top-k threshold dynamically according to the distribution of
semantic similarities could further enhance our methodology.

In conclusion, DFIN-SQL represents a significant step forward in the field of
Text-to-SQL conversion. Our findings lay a foundation for future work, which
will explore more sophisticated selection mechanisms and the potential of a
dynamic approach that tailors the methodology to the size of the database
schema. The path ahead is promising, with the ultimate goal of creating models
that seamlessly bridge the gap between natural language and SQL for databases
of any scale.

## References

  * Dong et al. (2023) Xuemei Dong, Chao Zhang, Yuhang Ge, Yuren Mao, Yunjun Gao, lu Chen, Jinshu Lin, and Dongfang Lou. 2023.  C3: Zero-shot text-to-sql with chatgpt.
  * Gao et al. (2023) Dawei Gao, Haibin Wang, Yaliang Li, Xiuyu Sun, Yichen Qian, Bolin Ding, and Jingren Zhou. 2023.  Text-to-sql empowered by large language models: A benchmark evaluation.
  * Guo et al. (2023a) Chunxi Guo, Zhiliang Tian, Jintao Tang, Shasha Li, Zhihua Wen, Kaixuan Wang, and Ting Wang. 2023a.  Retrieval-augmented gpt-3.5-based text-to-sql framework with sample-aware prompting and dynamic revision chain.
  * Guo et al. (2023b) Chunxi Guo, Zhiliang Tian, Jintao Tang, Pancheng Wang, Zhihua Wen, Kang Yang, and Ting Wang. 2023b.  Prompting gpt-3.5 for text-to-sql with de-semanticization and skeleton retrieval.
  * Li et al. (2023) Jinyang Li, Binyuan Hui, Ge Qu, Binhua Li, Jiaxi Yang, Bowen Li, Bailin Wang, Bowen Qin, Rongyu Cao, Ruiying Geng, Nan Huo, Chenhao Ma, Kevin C. C. Chang, Fei Huang, Reynold Cheng, and Yongbin Li. 2023.  Can llm already serve as a database interface? a big bench for large-scale database grounded text-to-sqls.
  * OpenAI (2023) OpenAI. 2023.  Gpt-4 technical report.
  * Pourreza and Rafiei (2023) Mohammadreza Pourreza and Davood Rafiei. 2023.  Din-sql: Decomposed in-context learning of text-to-sql with self-correction.
  * Yu et al. (2019) Tao Yu, Rui Zhang, Kai Yang, Michihiro Yasunaga, Dongxu Wang, Zifan Li, James Ma, Irene Li, Qingning Yao, Shanelle Roman, Zilin Zhang, and Dragomir Radev. 2019.  Spider: A large-scale human-labeled dataset for complex and cross-domain semantic parsing and text-to-sql task.