# Classification of flag-transitive primitive symmetric $(v,k,\lambda)$
designs with ${\rm PSL}(2,q)$ as socle

Shenglin Zhoua111Supported by the National Natural Science Foundation of China
(No.11471123) and the Natural Science Foundation of Guangdong Province
(No.S2013010011928). E-mail address<EMAIL_ADDRESS>The results of this
paper is part of Ph.D. thesis of the second author. , Delu Tiana,b
a. School of Mathematics, South China University of Technology,
Guangzhou, Guangdong 510640, P. R. China
b. Department of Mathematics, Guangdong University of Education,
Guangzhou, 510310, P. R. China

###### Abstract

Let $\cal D$ be a nontrivial symmetric $(v,k,\lambda)$ design, and $G$ be a
subgroup of the full automorphism group of $\cal D$. In this paper we prove
that if $G$ acts flag-transitively, point-primitively on $\mathcal{D}$ and
${\rm Soc}(G)={\rm PSL}(2,q)$, then $\cal D$ has parameters $(7,3,1)$,
$(7,4,2)$, $(11,5,2)$, $(11,6,3)$ or $(15,8,4)$.

Keywords: symmetric design, flag-transitive, primitive group

MR(2000) Subject Classification 05B05, 05B25, 20B25

##  1 Introduction

A 2-$(v,k,\lambda)$ design $\mathcal{D}$ is a set $P$ of $v$ points together
with a set $\mathcal{B}$ of $b$ blocks, such that every block contains $k$
points and every pair of points is in exactly $\lambda$ blocks. The design
$\mathcal{D}$ is symmetric if $b=v$, and is non-trivial if $2<k<v-1$. In this
paper we only study non-trivial symmetric 2-$(v,k,\lambda)$ designs, and for
brevity we call such a design a symmetric $(v,k,\lambda)$ design. A flag in a
design is an incident point-block pair. The complement of $\cal D$, denoted by
$\cal D^{\prime}$, is a symmetric $(v,v-k,v-2k+\lambda)$ design whose set of
points is the same as the set of points of $\cal D$, and whose blocks are the
complements of the blocks of $\cal D$. The automorphism group ${\rm Aut}(\cal
D)$ of ${\cal D}$ consists of all permutations of $P$ which leave $\cal B$
invariant. For $G\leq{\rm Aut}(\cal D)$, the design $\cal D$ is called point-
primitive if $G$ is primitive on $P$, and flag-transitive if $G$ is transitive
on the set of flags. The socle of a group $G$, denoted by ${\rm Soc}(G)$, is
the subgroup generated by its minimal normal subgroups.

The classification program for symmetric $(v,k,\lambda)$ designs has been
studied by several researchers. In 1985, Kantor [9] classified all symmetric
$(v,k,\lambda)$ designs admitting 2-transitive automorphism groups. In [4],
Dempwolff determined all symmetric $(v,k,\lambda)$ designs which admit an
automorphism group $G$ such that $G$ has a nonabelian socle and is a primitive
rank three group on points (and blocks). In [13], we classified flag-
transitive point-primitive symmetric $(v,k,\lambda)$ designs admitting an
automorphism group $G$ such that ${\rm Soc}(G)$ is a sporadic simple group.
This paper is devoted to the complete classification of flag-transitive point-
primitive symmetric $(v,k,\lambda)$ designs which admit an automorphism group
$G$ with ${\rm Soc}(G)={\rm PSL}(2,q)$, and extend the result of symmetric
designs with $\lambda=4$ in [15] to the general case.

###### Theorem 1.1

Let $\mathcal{D}=(P,\mathcal{B})$ be a symmetric $(v,k,\lambda)$ design which
admits a flag-transitive, point-primitive automorphism group $G$, and $x$ be a
point of $P$. If $G$ is an almost simple group and $X={\rm Soc}(G)={\rm
PSL}(2,q)$, where $q=p^{f}$ and $p$ is a prime, then $\mathcal{D}$ is one of
the following:

  1. (i)

a $(7,3,1)$ design with $X={\rm PSL}(2,7)$ and $X_{x}=S_{4}$;

  2. (ii)

a $(7,4,2)$ design with $X={\rm PSL}(2,7)$ and $X_{x}=S_{4}$;

  3. (iii)

a $(11,5,2)$ design with $X={\rm PSL}(2,11)$ and $X_{x}=A_{5}$;

  4. (iv)

a $(11,6,3)$ design with $X={\rm PSL}(2,11)$ and $X_{x}=A_{5}$;

  5. (v)

a $(15,8,4)$ design with $X={\rm PSL}(2,9)$ and $X_{x}={\rm PGL}(2,3)$.

###### Corollary 1.2

For $\lambda\geq 5$, there is no symmetric $(v,k,\lambda)$ design admitting a
flag-transitive, point-primitive almost simple automorphism group with socle
${\rm PSL}(2,q)$.

##  2 Preliminaries

In this section we state some preliminary results which will be needed later
in this paper. From [11] and [14] we get the following:

###### Lemma 2.1

Let ${\cal D}$ be a symmetric $(v,k,\lambda)$ design. Then the following hold:

  1. (i)

$k(k-1)=\lambda(v-1)$, and in particular $k^{2}>v$;

  2. (ii)

$k\mid\lambda d_{i}$, where $d_{i}$ is any non-trivial subdegree of $G$;

  3. (iii)

$k\mid|G_{x}|$ and $|G_{x}|^{3}>|G|$, where $G_{x}$ is the stabilizer in $G$
of a point $x\in P$.

###### Lemma 2.2

([3]) Let ${\cal D}=(P,{\cal B})$ be a symmetric $(v,k,\lambda)$ design and
$G\leq{\rm Aut}(\cal D)$. Suppose that $\gcd(k,\lambda)=1$ and $G$ is
2-transitive on $P$. Then $G$ is flag-transitive.

###### Lemma 2.3

([10]) Let ${\cal D}$ be a symmetric $(v,k,\lambda)$ design and $G\leq{\rm
Aut}(\cal D)$. Then

  1. (i)

$G$ has as many orbits on points as on blocks;

  2. (ii)

if $G$ is a transitive automorphism group, then $G$ has the same rank whether
considered as a permutation group on points or on blocks.

###### Lemma 2.4

Let ${\cal D}=(P,{\cal B})$ be a symmetric $(v,k,\lambda)$ design admitting a
flag-transitive automorphism group $G$. Then $G$ is 2-transitive on $P$ if and
only if $G$ is flag-transitive on $\cal D^{\prime}$, the complement design of
$\cal D$.

Proof. Suppose that $G$ is 2-transitive on $P$. Then for any $x\in P$ and
$B\in{\cal B}$, Lemma 2.3 shows that both $G_{x}$ and $G_{B}$ acting on points
or on blocks have two orbits. The flag-transitivity implies that $G_{B}$ acts
transitively on the points of $B$. Thus $G_{B}$ has an orbit $\Gamma_{1}$ of
length $k$ on $P$ and the other orbit $\Gamma_{2}$ of length $v-k$ and
$\Gamma_{2}=P-\Gamma_{1}$. Therefore, $\Gamma_{2}=B^{\prime}$ is one of the
blocks of ${\cal D}^{\prime}$ and $G_{B}=G_{B^{\prime}}$. So $G_{B^{\prime}}$
is transitive on the points of $B^{\prime}$. Moreover, by Lemma 2.3, $G$ is
block-transitive on ${\cal D}^{\prime}$ since $G$ is 2-transitive on $P$.
Hence $G$ is flag-transitive on ${\cal D}^{\prime}$.

Conversely, if $\cal D^{\prime}$ is flag-transitive, then $G_{B^{\prime}}$ is
transitive on the points of $B^{\prime}$ for every block $B^{\prime}$ of $\cal
D^{\prime}$. Let $B=P-B^{\prime}$. Then $B$ is one of the blocks of ${\cal D}$
and $G_{B}=G_{B^{\prime}}$. Since $\cal D$ is flag-transitive, $G_{B}$ is
transitive on $B$. Thus $G_{B}$ has two orbits acting on points, which implies
that the point-stabilizer $G_{x}$ has two orbits acting on $P$ by Lemma 2.3.
Hence $G$ is 2-transitive on $P$. $\hfill\square$

###### Lemma 2.5

Let $G$ be a group that acts transitively on $P$, and let $X\unlhd G$. Then
each orbit of $G_{x}$, the stabilizer of $G$ for some $x\in P$, acting on $P$
is the union of some orbits of $X_{x}$ which have the same cardinality.

Proof. Suppose that the orbits of the action of the stabilizer $X_{x}$ on $P$
are $\Delta_{1}(=\\{x\\})$, $\Delta_{2},\cdots$, $\Delta_{m}$. For any orbit
$\Delta_{i}$ ($i=1,2,\cdots,m$) and any $g\in G_{x}$, we have
$(\Delta_{i}^{g})^{X_{x}}=(\Delta_{i}^{g})^{g^{-1}{X_{x}}g}=\Delta_{i}^{X_{x}g}=\Delta_{i}^{g}$,
where the first equality holds since $X_{x}\unlhd G_{x}$. Hence
$\Delta_{i}^{g}$ is also an orbit of $X_{x}$. It follows that
$\Delta_{i}^{G_{x}}=\\{\Delta_{i}^{g}\ |\ g\in{G_{x}}\\}$, a union of orbits
of $X_{x}$ which have the same cardinality, gives an orbit of $G_{x}$.
$\hfill\square$

###### Lemma 2.6

Let $\mathcal{D}=(P,\mathcal{B})$ be a symmetric $(v,k,\lambda)$ design
admitting a flag-transitive, point-primitive automorphism group $G$ with socle
$X$. If the non-trivial subdegree $t$ of $X$ appears with multiplicity $s$,
then $k\mid\lambda st$.

Proof. Suppose that $\Gamma_{1}$, $\Gamma_{2},\cdots$, $\Gamma_{s}$ are all
orbits of $X_{x}$ with cardinality $t$, where $x\in P$. By Lemma 2.5, the
group $G_{x}$ acts on $\Gamma=\bigcup\limits^{s}_{i=1}\Gamma_{i}$, and the
cardinalities of orbits of $G_{x}$ are

$(a_{1}t)^{s_{1}},\ (a_{2}t)^{s_{2}},\ \cdots,\ (a_{r}t)^{s_{r}},$

where $a^{b}$ means that $a$ appears with multiplicity $b$, and $r$, $a_{i}$,
$s_{i}$ ($1\leq i\leq r$) are all positive integers such that
$\sum\limits^{r}_{i=1}a_{i}{s_{i}}=s$, and $a_{i}\neq a_{j}$ if and only if
$i\neq j$ for $1\leq i,j\leq r$. Let $c=\gcd(a_{1},a_{2},\cdots,a_{r})$, then
$c\mid s$. Lemma 2.1 ($ii$) shows that $k\mid\lambda(a_{i}t)$,
$i=1,2,\cdots,r$. So $k\mid\lambda ct$, and hence $k\mid\lambda st$.
$\hfill\square$

The subgroups of ${\rm PSL}(2,q)$ are well-known and given by Huppert [8].

###### Lemma 2.7

([8]) The subgroups of the group ${\rm PSL}(2,q)$ $(q=p^{f})$ are as follows.

  1. (i)

An elementary abelian group $C_{p}^{\ell}$, where $\ell\leq f$.

  2. (ii)

A cyclic group $C_{z}$, where $z\mid\frac{p^{f}\pm 1}{d}$ and $d=\gcd(2,q-1)$.

  3. (iii)

A dihedral group $D_{2z}$, where $z$ is the same as in (ii).

  4. (iv)

The alternating group $A_{4}$ when $p>2$ or $p=2$ and $2\mid f$.

  5. (v)

The symmetric group $S_{4}$ when $p^{2f}\equiv 1\pmod{16}$.

  6. (vi)

The alternating group $A_{5}$ when $p=5$ or $p^{2f}\equiv 1\pmod{5}$.

  7. (vii)

$C_{p}^{\ell}:C_{t}$, where $t\mid\gcd(p^{\ell}-1,\frac{p^{f}-1}{d})$ and
$d=\gcd(2,q-1)$.

  8. (viii)

${\rm PSL}(2,p^{\ell})$ when $\ell\mid f$ and ${\rm PGL}(2,p^{\ell})$ when
$2\ell\mid f$.

The following lemma is a combination of Theorem 1.1, 2.1 and 2.2 in [7].

###### Lemma 2.8

Let $X={\rm PSL}(2,q)\leq G\leq{\rm P\Gamma L}(2,q)$ and let $M$ be a maximal
subgroup of $G$ which does not contain $X$. Then either $M\cap X$ is maximal
in $X$, or $G$ and $M$ are given in Table 1. The maximal subgroups of $X$
appear in Tables 2 and 3.

$G$ | $M$ | $|G:M|$
---|---|---
${\rm PGL}(2,7)$ | $N_{G}(D_{6})=D_{12}$ | 28
${\rm PGL}(2,7)$ | $N_{G}(D_{8})=D_{16}$ | 21
${\rm PGL}(2,9)$ | $N_{G}(D_{10})=D_{20}$ | 36
${\rm PGL}(2,9)$ | $N_{G}(D_{8})=D_{16}$ | 45
$M_{10}$ | $N_{G}(D_{10})=C_{5}\rtimes C_{4}$ | 36
$M_{10}$ | $N_{G}(D_{8})=C_{8}\rtimes C_{2}$ | 45
${\rm P\Gamma L}(2,9)$ | $N_{G}(D_{10})=C_{10}\rtimes C_{4}$ | 36
${\rm P\Gamma L}(2,9)$ | $N_{G}(D_{8})=C_{8}.{\rm Aut}(C_{8})$ | 45
${\rm PGL}(2,11)$ | $N_{G}(D_{10})=D_{20}$ | 66
${\rm PGL}(2,q),q=p\equiv\pm 11,19({\rm mod}\ {40})$ | $N_{G}(A_{4})=S_{4}$ | $\frac{q(q^{2}-1)}{24}$
Table 1: $G$ and $M$ of Lemma 2.8

Structure | Conditions | Order | Index
---|---|---|---
$C_{p}^{f}:C_{(q-1)/2}$ |  | $\frac{q(q-1)}{2}$ | $q+1$
$D_{q-1}$ | $q\geq 13$ | $q+1$ | $\frac{q(q-1)}{2}$
$D_{q+1}$ | $q\neq 7,9$ | $q-1$ | $\frac{q(q+1)}{2}$
${\rm PGL}(2,q_{0})$ | $q=q_{0}^{2}$ | $q_{0}(q_{0}^{2}-1)$ | $\frac{q_{0}(q_{0}^{2}+1)}{2}$
${\rm PSL}(2,q_{0})$ |  $q=q_{0}^{r}$, $r$ odd prime | $\frac{q_{0}(q_{0}^{2}-1)}{2}$ | $\frac{q_{0}^{r-1}(q_{0}^{2r}-1)}{q_{0}^{2}-1}$
$A_{5}$ |  $q=p\equiv\pm 1({\rm mod}\ {5})$, | 120 | $\frac{q(q^{2}-1)}{120}$
|  or $q=p^{2}\equiv-1({\rm mod}\ {5})$ |  |
$A_{4}$ |  $q=p\equiv\pm 3({\rm mod}\ {8})$, | 12 | $\frac{q(q^{2}-1)}{24}$
|  and $q\not\equiv\pm 1({\rm mod}\ {10})$ |  |
$S_{4}$ | $q=p\equiv\pm 1({\rm mod}\ {8})$ | 24 | $\frac{q(q^{2}-1)}{24}$

Table 2: Maximal subgroups of ${\rm PSL}(2,q)$

with $q=p^{f}\geq 5$, $p$ odd prime

Structure | Conditions | Order | Index
---|---|---|---
$C_{2}^{f}:C_{q-1}$ |  | ${q(q-1)}$ | $q+1$
$D_{2(q-1)}$ |  | $2(q+1)$ | $\frac{q(q-1)}{2}$
$D_{2(q+1)}$ |  | $2(q-1)$ | $\frac{q(q+1)}{2}$
${\rm PSL}(2,q_{0})$ |  $q=q_{0}^{r}$, $r$ prime, $q_{0}\neq 2$ | $q_{0}(q_{0}^{2}-1)$ | $\frac{q_{0}^{r-1}(q_{0}^{2r}-1)}{q_{0}^{2}-1}$

Table 3: Maximal subgroups of ${\rm PSL}(2,q)$

with $q=2^{f}\geq 4$

Now we state the following algorithm, which will be useful to search for
symmetric designs which satisfy the condition “$k\mid u$”. The output of the
algorithm is the list Designs of parameter sequences $(v,k,\lambda)$ of
potential symmetric designs.

###### Algorithm 2.9

(Designs)
Input: $u$, $v$.
Output: The list Designs := $S$.
set $S$ := an empty list;
for each $k$ dividing $u$ with $2<k<v-1$
$~{}~{}~{}~{}~{}~{}~{}\lambda:=k*(k-1)/(v-1)$;
if $\lambda$ be an integer
Add $(v,k,\lambda)$ to the list $S$;
return $S$.

##  3 Proof of Theorem 1.1

Let $\mathcal{D}=(P,\mathcal{B})$ be a symmetric $(v,k,\lambda)$ design
admitting a flag-transitive, point-primitive automorphism group $G$ with
$X\unlhd G\leq{\rm Aut}(X)$, where $X={\rm PSL}(2,q)$ with $q=p^{f}$ and $p$
prime. As a maximal subgroup of $G$, the point stabilizer $G_{x}$ does not
contain $X$ since $X$ is transitive on $P$. Thus Lemma 2.8 shows that either
$X\cap G_{x}$ is maximal in $X$, or $G$ and $G_{x}$ are given in Table 1. We
will prove Theorem 1.1 by the following three subsections.

###  3.1 Cases in Table 1

In these cases, we may view the maximal subgroup $M$ as the point stabilizer
$G_{x}$. We get the 3-tuples $(|G|,u,v)$ in Table 1 where $v$ is the index
$|G:G_{x}|$ and $u=|G_{x}|$. For each case except the last one, we can obtain
all potential symmetric designs using Algorithm 2.9 implemented in GAP [6].
There exists only one potential $(21,16,12)$ design with $G={\rm PGL}(2,7)$
and $G_{x}=D_{16}$. The subdegrees of ${\rm PGL}(2,7)$ acting on the cosets of
$D_{16}$ are 1, 4, 8 and 8\. (Throughout this paper, we apply Magma [1] to
calculate the subdegrees of $G$ and the number of the conjugacy class of
subgroups.) Then by using the Magma-command Subgroups(G:OrderEqual:=n) where
$n=|G|/v$, we obtain the fact that $G$ has only one conjugacy class of
subgroups with index 21. Thus $G_{x}$ is conjugate to $G_{B}$ for any
$x\in{\cal P},B\in{\cal B}$ which forces that there exists a block $B_{0}$
such that $G_{x}=G_{B_{0}}$. The flag-transitivity of $G$ implies that
$G_{B_{0}}$ is transitive on the block $B_{0}$. So $B_{0}$ should be an orbit
of $G_{x}$, but there is no such orbit of size $k=16$, a contradiction.

Now we consider the last case. Here $G={\rm PGL}(2,q)$ with $q=p\equiv\pm
11,19\pmod{40}$, $G_{x}=S_{4}$, and $v=\frac{q(q^{2}-1)}{24}$. Since
$|G_{x}|^{3}>|G|$, we have $24^{3}>q(q^{2}-1)$, and so $q=p=11$ or 19. If
$q=11$ then $v=55$. There exist two potential symmetric designs with
parameters $(55,27,13)$ and $(55,28,14)$, but neither of them satisfies the
condition that $k\mid|G_{x}|$. If $q=19$ then $v=285$, and so
$(k,\lambda)=(72,18)$ or $(213,159)$. However, for every case $k>24$ which
contracts the fact that $k$ divides $|G_{x}|$.

###  3.2 Odd characteristic

In this subsection, we consider the cases that $G$ has odd characteristic $p$
and $X\cap G_{x}$ is maximal in $X$. The structure of $X\cap G_{x}$ comes from
Table 2.

####  Case (1). $X\cap G_{x}=E_{q}:\frac{q-1}{2}$.

Here $v=q+1$, so $k(k-1)=\lambda(v-1)=\lambda q=\lambda p^{f}$. If $p\mid k$,
then from $\gcd(p,k-1)=1$ we have $p^{f}\mid k$, that is, $v-1\mid k$ which is
impossible. Then $p\nmid k$, and so $p^{f}\mid k-1$ implies $v-1\mid k-1$,
which contradicts $k<v-1$.

####  Case (2). $X\cap G_{x}=D_{q-1}$ $(q\geq 13)$.

In this case, $v=\frac{1}{2}q(q+1)$, $|{\rm Out}(X)|=2f$,
$|G|=\frac{1}{2}eq(q^{2}-1)$ and $|G_{x}|=e(q-1)$, where $e$ is a positive
integer and $e\mid 2f$.

From $k\mid|G_{x}|$ we get $k\mid e(q-1)$. So there exists a positive integer
$m$ such that $k=\frac{e(q-1)}{m}$. The equality $k(k-1)=\lambda(v-1)$ implies
that
$\frac{e(q-1)}{m}\big{(}\frac{e(q-1)}{m}-1\big{)}=\frac{1}{2}\lambda(q+2)(q-1)$,
and hence

$(2e^{2}-m^{2}\lambda)q=2m^{2}\lambda+2e^{2}+2em>0.$

This implies that $m<2e$. From
$p^{f}=q=\frac{2m^{2}\lambda+2e^{2}+2em}{2e^{2}-m^{2}\lambda}=\frac{6e^{2}+2em}{2e^{2}-m^{2}\lambda}-2$,
we get

$p^{f}<6e^{2}+2em<6e^{2}+(2e)^{2}=10e^{2}\leq 40f^{2}.$

It follows that the 3-tuples $(q,p,f)$ are

$\begin{array}[]{llllllll}&(27,3,3),&(81,3,4),&(243,3,5),&(729,3,6),&(25,5,2),&(125,5,3),\\\
&(625,5,4),&(49,7,2),&(343,7,3),&(121,11,2),&(13,13,1),&(17,17,1),\\\
&(19,19,1),&(23,23,1),&(29,29,1),&(31,31,1),&(37,37,1).&&\\\ \end{array}$

We call each of these 3-tuples a subcase. Since $k\mid e(q-1)$ and $e\mid 2f$,
it follows that $k\mid u$, where $u=2f(q-1)$. It is easy to compute the values
of $u$ and $v$ for every subcase. However, for every subcase, there is no such
symmetric design satisfying the condition that $k\mid u$ by Algorithm 2.9
calculated with GAP.

####  Case (3). $X\cap G_{x}=D_{q+1}$ ($q\neq 7,9$).

Now $v=\frac{1}{2}q(q-1)$, $|{\rm Out}(X)|=2f$, $|G|=\frac{1}{2}eq(q^{2}-1)$,
and $|G_{x}|=e(q+1)$, where $e$ is a positive integer and $e\mid 2f$.

Since $k\mid|G_{x}|=e(q+1)$, it follows that there exists a positive integer
$m$ such that $k=\frac{e(q+1)}{m}$. Then
$\frac{e(q+1)}{m}\big{(}\frac{e(q+1)}{m}-1\big{)}=\frac{1}{2}\lambda(q-2)(q+1)$.
So we have

$(m^{2}\lambda-2e^{2})q=2e^{2}-2em+2m^{2}\lambda=2(e-\frac{1}{2}m)^{2}+(2\lambda-\frac{1}{2})m^{2}>0.$

Thus
$p^{f}=q=\frac{2e^{2}-2em+2m^{2}\lambda}{m^{2}\lambda-2e^{2}}=\frac{6e^{2}-2em}{m^{2}\lambda-2e^{2}}+2$
which gives

$p^{f}<6e^{2}+2\leq 24f^{2}+2.$

Combining this with $q\neq 7,9$, we obtain all possible 3-tuples $(q,p,f)$:

$\begin{array}[]{lllllllll}&(27,3,3),&(81,3,4),&(243,3,5),&(729,3,6),&(5,5,1),&(25,5,2),&(125,5,3),\\\
&(49,7,2),&(11,11,1),&(13,13,1),&(17,17,1),&(19,19,1),&(23,23,1).&\\\
\end{array}$

Since $k\mid e(q+1)$ and $e\mid 2f$, then $k\mid u=2f(q+1)$. The values of $v$
and $u$ can be calculated easily for each 3-tuple $(p,q,f)$. In fact, we get
no such symmetric design satisfying $k\mid u$ by Algorithm 2.9 calculated with
GAP.

####  Case (4). $X\cap G_{x}={\rm PGL}(2,q^{\frac{1}{2}})={\rm PGL}(2,q_{0})$.

Here $v=\frac{q_{0}(q_{0}^{2}+1)}{2}$, $|X_{x}|=|X\cap
G_{x}|=q_{0}(q_{0}^{2}-1)$, $|{\rm Out}(X)|=2f$, $|G|=\frac{1}{2}eq(q^{2}-1)$,
and $|G_{x}|=eq_{0}(q_{0}^{2}-1)$, where $e\mid 2f$ and $f$ is even.

The subdegrees of ${\rm PSL}(2,q)$ on the cosets of ${\rm PGL}(2,q_{0})$ are

$1,\ \frac{{q_{0}}({q_{0}}-\varepsilon)}{2},\ \ {q_{0}^{2}-1},\
({q_{0}}({q_{0}}-1))^{\frac{{q_{0}}-4-\varepsilon}{4}},\
({q_{0}}({q_{0}}+1))^{\frac{{q_{0}}-2+\varepsilon}{4}},$

where ${q_{0}}\equiv\varepsilon~{}({\rm mod}\ {4})$ with $\varepsilon=\pm 1$
(see [5]). Recall that here $a^{b}$ means the subdegree $a$ appears with
multiplicity $b$. We consider two subcases in the following.

Subcase (4.1):  $\varepsilon=-1$. Then there exists a positive integer $s$
such that $q_{0}=4s-1$, and the subdegrees here are:

$1,\ \frac{{q_{0}}({q_{0}}+1)}{2},\ {q_{0}^{2}-1},\
({q_{0}}({q_{0}}-1))^{\frac{{q_{0}}-3}{4}},\
({q_{0}}({q_{0}}+1))^{\frac{{q_{0}}-3}{4}}.$

By Lemma 2.6, we get

$k\mid\lambda\gcd\big{(}\frac{{q_{0}}({q_{0}}+1)}{2},{q_{0}^{2}-1},\frac{{q_{0}}({q_{0}}-1)({q_{0}}-3)}{4},\frac{{q_{0}}({q_{0}}+1)({q_{0}}-3)}{4}\big{)}.$

Since $q_{0}=4s-1$, it follows that
$\gcd(\frac{{q_{0}}({q_{0}}+1)}{2},{q_{0}^{2}-1})=\frac{{q_{0}}+1}{2}$ and
$\gcd(\frac{{q_{0}}({q_{0}}-1)({q_{0}}-3)}{4},\frac{{q_{0}}({q_{0}}+1)({q_{0}}-3)}{4})$
$=\frac{{q_{0}}(q_{0}-3)}{2}$. Thus
$k\mid\lambda\gcd(\frac{q_{0}+1}{2},\frac{{q_{0}}(q_{0}-3)}{2})=2\lambda$.
Then from $k>\lambda$ we get $k=2\lambda$. By Lemma 2.1 ($i$),
$\lambda=\frac{v+1}{4}=\frac{q_{0}^{3}+q_{0}+2}{8}$ and
$k=\frac{q_{0}^{3}+q_{0}+2}{4}$. Since $k\mid|G_{x}|$ and $e\mid 2f$, $k\mid
u=2fq_{0}(q_{0}^{2}-1)$. It follows that $q_{0}^{3}+q_{0}+2\mid
8fq_{0}(q_{0}^{2}-1)$. Note that $\gcd(q_{0}^{3}+q_{0}+2,q_{0})=1$ and
$\gcd(q_{0}^{2}-q_{0}+2,q_{0}-1)=2$, we get $q_{0}^{2}-q_{0}+2\mid 16f$. So $\
q_{0}^{2}-q_{0}+2\leq 16f$, i.e.
$(p^{\frac{1}{2}f})^{2}-p^{\frac{1}{2}f}+2\leq 16f$. It follows that
$(f,p)=(2,3)$ or $(2,5)$ because $f$ is even. If $(f,p)=(2,5)$, then $q_{0}$
is equal to $p$ which contradicts $q_{0}=4s-1$. Suppose that $(f,p)=(2,3)$.
Then $\cal D$ has parameters (15, 8, 4) with $X={\rm PSL}(2,9)\cong A_{6}$,
$X_{x}={\rm PGL}(2,3)\cong S_{4}$. The existence of this design has been
discussed in [15].

Subcase (4.2): $\varepsilon=1$. Then $q_{0}=4s+1$ for some positive integer
$s$. Let $q_{0}=p^{a}$. Then $f=2a$. The subdegrees are:

$1,\ \frac{{q_{0}}({q_{0}}-1)}{2},\ {q_{0}^{2}-1},\
({q_{0}}({q_{0}}-1))^{\frac{{q_{0}}-5}{4}},\
({q_{0}}({q_{0}}+1))^{\frac{q_{0}-1}{4}}.$

Lemma 2.6 shows that

$k\mid\lambda\gcd\big{(}\frac{{q_{0}}({q_{0}}-1)}{2},{q_{0}^{2}-1},\frac{{q_{0}}({q_{0}}-1)({q_{0}}-5)}{4},\frac{{q_{0}}({q_{0}}+1)(q_{0}-1)}{4}\big{)}.$

Since $\gcd\big{(}\frac{{q_{0}}({q_{0}}-1)}{2}$, ${q_{0}^{2}-1}\big{)}$
$=\frac{1}{2}(q_{0}-1)$, it follows that $k\mid\frac{1}{2}\lambda(q_{0}-1)$.
Combining this with
$k(k-1)=\lambda(v-1)=\frac{1}{2}\lambda(q_{0}-1)(q_{0}^{2}+q_{0}+2)$, we get

$q_{0}^{2}+q_{0}+2\mid k-1,$

which implies that $k$ is odd.

The flag-transitivity of $G$ implies that $G_{x}$ acts transitively on $P(x)$,
the set of all blocks which are incident with the point $x$. Therefore $G_{x}$
has some subgroup $L$ with index $k$. Since $X_{x}\unlhd G_{x}$, we have
$L/(L\cap X_{x})\cong LX_{x}/X_{x}$. Let $H=L\cap X_{x}$, and
$|LX_{x}:X_{x}|=c$ for some integer $c$. Then $c\mid e$ and
$|H|=\frac{eq_{0}(q_{0}^{2}-1)}{ck}$, and hence

$k=\frac{e_{0}q_{0}(q_{0}^{2}-1)}{|H|},$

where $e_{0}=\frac{e}{c}$. The fact $e\mid 2f=4a$ yields $e_{0}\mid 4a$.

Since ${\rm PSL}(2,q_{0})$ is the normal subgroup of ${\rm PGL}(2,q_{0})$ with
index 2, and $H\leq X_{x}={\rm PGL}(2,q_{0})$, we get $|H:H\cap{\rm
PSL}(2,q_{0})|=|{\rm PSL}(2,q_{0})H:{\rm PSL}(2,q_{0})|=$ 1 or 2. Lemma 2.7
gives all the subgroups of ${\rm PSL}(2,q_{0})$, and hence $|H|$ must be one
of the following:

  1. (i)

$p^{\ell}$ or $2p^{\ell}$, where $\ell\leq a$;

  2. (ii)

$z$ or $2z$, where $z\mid\frac{q_{0}\pm 1}{2}$;

  3. (iii)

$2z$ or $4z$, where $z\mid\frac{q_{0}\pm 1}{2}$;

  4. (iv)

12 or 24;

  5. (v)

24 or 48 when $p^{2a}\equiv 1\pmod{16}$;

  6. (vi)

60 or 120 when $p=5$ or $p^{2a}\equiv 1\pmod{5}$;

  7. (vii)

$tp^{\ell}$ or $2tp^{\ell}$, where $t\mid\gcd(p^{\ell}-1,\frac{p^{a}-1}{2})$;

  8. (viii)

$\frac{1}{2}p^{\ell}(p^{2\ell}-1)$ or $p^{\ell}(p^{2\ell}-1)$ when $\ell\mid
a$, and $p^{\ell}(p^{2\ell}-1)$ or $2p^{\ell}(p^{2\ell}-1)$ when $2\ell\mid
a$.

Recall that $q_{0}=4s+1$, and so $8\mid q_{0}^{2}-1$. Combing this with the
fact that $k=\frac{e_{0}q_{0}(q_{0}^{2}-1)}{|H|}$ is odd, gives $8\mid|H|$. It
follows that $|H|\neq p^{\ell},2p^{\ell},z$, 12 and 60, and we deal with the
remaining possible values of $|H|$ in turn.

If $|H|=2z$ where $z\mid\frac{q_{0}\pm 1}{2}$ as in (ii) or (iii), then it is
easily known from $k=\frac{e_{0}q_{0}(q_{0}^{2}-1)}{2z}$ that $k$ is even, a
contradiction.

If $|H|=4z$ as in (iii), and in addition $z\mid\frac{q_{0}+1}{2}$, then $k$ is
even, a contradiction. Next suppose that $z\mid\frac{q_{0}-1}{2}$. Since
$q_{0}^{2}+q_{0}+2\mid k-1$, then $q_{0}^{2}+q_{0}+2$ divides

$z(k-1)=\frac{e_{0}q_{0}(q_{0}^{2}-1)}{4}-z=\frac{e_{0}(q_{0}-1)}{4}(q_{0}^{2}+q_{0}+2)-\frac{e_{0}(q_{0}-1)}{2}-z,$

which implies that $q_{0}^{2}+q_{0}+2\mid\frac{e_{0}(q_{0}-1)}{2}+z$.
Therefore $q_{0}^{2}+q_{0}+2\leq\frac{e_{0}(q_{0}-1)}{2}+z$. It follows that
$p^{2a}+p^{a}+2\leq 2a(p^{a}-1)+\frac{p^{a}-1}{2}$ because $e_{0}\leq 4a$ and
$z\leq\frac{q_{0}-1}{2}$, and hence $2p^{2a}+2a+5\leq(2a-1)p^{a}$ which is a
contradiction.

If $|H|=24$ then $k=\frac{e_{0}q_{0}(q_{0}^{2}-1)}{24}$. The fact that
$q_{0}^{2}+q_{0}+2\mid k-1$ implies that $q_{0}^{2}+q_{0}+2$ divides

$6(k-1)=\frac{e_{0}q_{0}(q_{0}^{2}-1)}{4}-6=\frac{e_{0}(q_{0}-1)}{4}(q_{0}^{2}+q_{0}+2)-\frac{e_{0}(q_{0}-1)}{2}-6.$

Thus $q_{0}^{2}+q_{0}+2\mid\frac{e_{0}(q_{0}-1)}{2}+6$, and so
$q_{0}^{2}+q_{0}+2\leq\frac{e_{0}(q_{0}-1)}{2}+6$. Since $e_{0}\mid 4a$, we
have $p^{2a}+p^{a}+2\leq\frac{e_{0}(q_{0}-1)}{2}+6\leq 2a(p^{a}-1)+6$, which
is impossible since $p\geq 3$.

Now we turn to (v). Here $|H|=48$ and $k=\frac{e_{0}q_{0}(q_{0}^{2}-1)}{48}$.
By $q_{0}^{2}+q_{0}+2\mid k-1$ we know that $q_{0}^{2}+q_{0}+2$ divides

$12(k-1)=\frac{e_{0}(q_{0}-1)}{4}(q_{0}^{2}+q_{0}+2)-\frac{e_{0}(q_{0}-1)}{2}-12,$

which implies that $q_{0}^{2}+q_{0}+2\leq\frac{e_{0}(q_{0}-1)}{2}+12$. Since
$e_{0}\mid 4a$, we have $p^{2a}+p^{a}+2\leq\frac{e_{0}(q_{0}-1)}{2}+12\leq
2a(p^{a}-1)+12$, which implies $p=3$ and $a=1$. Thus $q_{0}=3$, contradicting
$q_{0}=4s+1$.

If $|H|=120$ then $k=\frac{e_{0}q_{0}(q_{0}^{2}-1)}{120}$. Using the fact
$q_{0}^{2}+q_{0}+2\mid k-1$, we have that $q_{0}^{2}+q_{0}+2$ divides

$30(k-1)=\frac{e_{0}(q_{0}-1)}{4}(q_{0}^{2}+q_{0}+2)-\frac{e_{0}(q_{0}-1)}{2}-30.$

So $p^{2a}+p^{a}+2\leq\frac{e_{0}(q_{0}-1)}{2}+30\leq 2a(p^{a}-1)+30$. It
follows that $(p,a)=(3,1)$ or $(5,1)$. The fact $q_{0}=4s+1$ shows that
$q_{0}=p=5$ and $a=1$. Now $e_{0}\mid 4a$ forces $e_{0}=1$, 2 or 4. Hence
$v=65$, and $k=1$, 2 or 4, respectively. However, $k$ is too small to satisfy
$k^{2}>v$, a contradiction.

For (vii), if $|H|=tp^{\ell}$ or $2tp^{\ell}$ , then
$k=\frac{e_{0}q_{0}(q_{0}^{2}-1)}{itp^{\ell}}$ where $i=1$ or 2, and hence $k$
is even because $t\mid\frac{p^{a}-1}{2}$, a contradiction.

For (viii), suppose first that $\ell\mid a$ and $|H|=p^{\ell}(p^{2\ell}-1)$ or
$\frac{1}{2}p^{\ell}(p^{2\ell}-1)$. Then
$k=\frac{ie_{0}p^{a}(p^{2a}-1)}{p^{\ell}(p^{2\ell}-1)}$ where $i=1$ or 2. If
$\ell=a$, then $k=ie_{0}$. From $v<k^{2}$ and $e_{0}\mid 4a$, we see
$\frac{p^{a}(p^{2a}+1)}{2}<(ie_{0})^{2}\leq 16i^{2}a^{2}$. It follows that
$(p,a)=(3,1)$, and so $q_{0}=3$, contradicting $q_{0}=4s+1$. Thus $\ell<a$,
and so $a\geq 2$. It is easy to see that $p^{\ell}-1\mid p^{a}-1$ because
$\ell\mid a$. Since $q_{0}^{2}+q_{0}+2\mid k-1$, we obtain that
$q_{0}^{2}+q_{0}+2$ divides

$\displaystyle p^{\ell}(p^{\ell}+1)(k-1)$
$\displaystyle=\frac{ie_{0}p^{a}(p^{2a}-1)}{p^{\ell}-1}-p^{\ell}(p^{\ell}+1)$
$\displaystyle=\frac{ie_{0}(p^{a}-1)}{p^{\ell}-1}(p^{2a}+p^{a}+2)-\frac{2ie_{0}(p^{a}-1)}{p^{\ell}-1}-p^{\ell}(p^{\ell}+1).$

Thus
$p^{2a}+p^{a}+2\mid\frac{2ie_{0}(p^{a}-1)}{p^{\ell}-1}+p^{\ell}(p^{\ell}+1)$.
Since $\ell\mid a$ and $\ell<a$, we have $2\ell\leq a$, and so $p^{2\ell}\leq
p^{a}$. Then $p^{2a}+p^{a}+2<8ia(p^{a}-1)+2p^{a}$. Combining this with
$q_{0}=p^{a}=4s+1$ and $a\geq 2$, gives $(p,a)=(3,2)$ when $i=1$, and
$(p,a)=(3,2)$ or (5, 2) when $i=2$. It follows that $\ell=1$ and $e_{0}$=1, 2,
4 or 8. For all these parameters $e_{0},p,a$ and $\ell$, we can get all
possible values of $v$ and $k$. It is not hard to check that for all these
pairs $(v,k)$, there are no integer values of $\lambda$ satisfying equation
$k(k-1)=\lambda(v-1)$, a contradiction.

Now suppose that $2\ell\mid a$ and $|H|=p^{\ell}(p^{2\ell}-1)$. Then $a\geq 2$
and $k=\frac{e_{0}p^{a}(p^{a}+1)(p^{a}-1)}{p^{\ell}(p^{2\ell}-1)}$ is even
since $p^{2\ell}-1\mid p^{a}-1$, a contradiction. Finally suppose that
$2\ell\mid a$ and $|H|=2p^{\ell}(p^{2\ell}-1)$ so that
$k=\frac{e_{0}p^{a}(p^{2a}-1)}{2p^{\ell}(p^{2\ell}-1)}$ and $a\geq 2$. Then by
$q_{0}^{2}+q_{0}+2\mid k-1$, we get that $q_{0}^{2}+q_{0}+2$ divides

$\displaystyle p^{\ell}(p^{\ell}+1)(k-1)$
$\displaystyle=\frac{e_{0}p^{a}(p^{2a}-1)}{2(p^{\ell}-1)}-p^{\ell}(p^{\ell}+1)$
$\displaystyle=\frac{e_{0}(p^{a}-1)}{2(p^{\ell}-1)}(p^{2a}+p^{a}+2)-\frac{e_{0}(p^{a}-1)}{p^{\ell}-1}-p^{\ell}(p^{\ell}+1),$

which yields
$p^{2a}+p^{a}+2\mid\frac{e_{0}(p^{a}-1)}{p^{\ell}-1}+p^{\ell}(p^{\ell}+1)$. By
$p^{2\ell}\leq p^{a}$, we have $p^{2a}+p^{a}+2<4a(p^{a}-1)+2p^{a}$. It follows
that $p^{2a}<(4a+1)(p^{a}-1)-1<(4a+1)p^{a}$, and then $p^{a}<4a+1$. This is
impossible.

####  Case (5). $X\cap G_{x}={\rm PSL}(2,q_{0})$, for $q=q_{0}^{r}$ where $r$
is an odd prime.

Here $v=\frac{q_{0}^{r-1}(q_{0}^{2r}-1)}{q_{0}^{2}-1}$,
$|X_{x}|=\frac{1}{2}q_{0}(q_{0}^{2}-1)$, $|{\rm Out}(X)|=2f$,
$|G|=\frac{1}{2}eq(q^{2}-1)$, and $|G_{x}|=\frac{1}{2}eq_{0}(q_{0}^{2}-1)$,
where $e\mid 2f$. Let $q_{0}=p^{a}$. Then $f=ra$.

From $|G_{x}|^{3}>|G|$, that is,
$(\frac{1}{2}eq_{0}(q_{0}^{2}-1))^{3}>\frac{1}{2}eq(q^{2}-1)=\frac{1}{2}eq_{0}^{r}(q_{0}^{2r}-1)$,
we obtain

$4f^{2}\geq
e^{2}>4q_{0}^{r-3}\frac{q_{0}^{2r}-1}{q_{0}^{6}-3q_{0}^{4}+3q_{0}^{2}-1}.$

For an odd prime $r$, if $r\geq 5$, then

$f^{2}>q_{0}^{r-3}\frac{q_{0}^{2r}-1}{q_{0}^{6}-3q_{0}^{4}+3q_{0}^{2}-1}\geq
q_{0}^{r-3}\frac{q_{0}^{10}-1}{q_{0}^{6}-3q_{0}^{4}+3q_{0}^{2}-1}>q_{0}^{r}=q=p^{f},$

where the third inequality holds because
$q_{0}^{10}-1>q_{0}^{3}(q_{0}^{6}-3q_{0}^{4}+3q_{0}^{2}-1)=q_{0}^{9}-3q_{0}^{5}(q_{0}^{2}-1)-q_{0}^{3}$.
But it is easy to see that $\frac{p^{f}}{f^{2}}>1$ when $p\geq 3$ and $f\geq
r\geq 5$, a contradiction. Hence $r=3$, and so
$v=q_{0}^{2}(q_{0}^{4}+q_{0}^{2}+1)$ and $f=3a$.

The subdegrees of ${\rm PSL}(2,q_{0}^{3})$ on the cosets of ${\rm
PSL}(2,q_{0})$ are ([5]):

$1,\ \big{(}\frac{q_{0}^{2}-1}{2}\big{)}^{2({q_{0}}+1)},\
({q_{0}}({q_{0}}-1))^{\frac{{q_{0}}({q_{0}}-1)}{2}},\
({q_{0}}({q_{0}}+1))^{\frac{{q_{0}}({q_{0}}+1)}{2}},\
\big{(}\frac{{q_{0}}(q_{0}^{2}-1)}{2}\big{)}^{2(q_{0}^{3}+{q_{0}}-1)}.$

By Lemma 2.6, we have

$k\mid\lambda\gcd\big{(}({q_{0}}+1)^{2}({q_{0}}-1),\frac{q_{0}^{2}({q_{0}}-1)^{2}}{2},\frac{q_{0}^{2}({q_{0}}+1)^{2}}{2},{q_{0}}(q_{0}^{2}-1)(q_{0}^{3}+{q_{0}}-1)\big{)}.$

Now, since $\gcd(q_{0}+1,q_{0}-1)=2$ and
$\gcd(q_{0},q_{0}+1)=\gcd(q_{0},q_{0}-1)=1$, we have
$\gcd\big{(}\frac{q_{0}^{2}({q_{0}}-1)^{2}}{2},\frac{q_{0}^{2}({q_{0}}+1)^{2}}{2}\big{)}$
$=q_{0}^{2}\gcd\big{(}\frac{({q_{0}}-1)^{2}}{2},\frac{4q_{0}}{2}\big{)}=2q_{0}^{2}$,
$\gcd\big{(}({q_{0}}+1)^{2}({q_{0}}-1),2q_{0}^{2}\big{)}=2$, and so $k\mid
2\lambda$. Thus $k=2\lambda$ follows from $k>\lambda$. The equation
$k(k-1)=\lambda(v-1)$ forces $v=4\lambda-1$. Therefore
$\lambda=\frac{v+1}{4}=\frac{q_{0}^{6}+q_{0}^{4}+q_{0}^{2}+1}{4}$ and
$k=2\lambda=\frac{q_{0}^{6}+q_{0}^{4}+q_{0}^{2}+1}{2}$. Then by Lemma 2.1
($iii$), $k\mid|G_{x}|=\frac{1}{2}eq_{0}(q_{0}^{2}-1)$. This together with
$e\mid 2f=6a$ and $q_{0}=p^{a}$, implies $\frac{p^{6a}+p^{4a}+p^{2a}+1}{2}\leq
3ap^{a}(p^{2a}-1)$ and so that $p^{6a}<6a\cdot p^{a}\cdot p^{2a}$, i.e.,
$p^{3a}<6a$, which is impossible.

####  Case (6). $X\cap G_{x}=A_{5}$, where $q=p\equiv\pm 1({\rm mod}\ {5})$ or
$q=p^{2}\equiv-1({\rm mod}\ {5})$.

Here $v=\frac{q(q^{2}-1)}{120}$, $|X_{x}|=|X\cap G_{x}|=60$, $|{\rm
Out}(X)|=2f$, $|G|=\frac{1}{2}eq(q^{2}-1)$ and $|G_{x}|=60e$, where $e\mid 2f$
and $f=1$ or 2.

From the inequality $|G_{x}|^{3}>|G|$ we have
$(60e)^{3}>\frac{1}{2}eq(q^{2}-1)$. This together with $e\mid 2f$, implies
$2\cdot 60^{3}\cdot(2f)^{2}\geq p^{f}(p^{2f}-1)$, i.e.,

$120^{3}f^{2}\geq p^{f}(p^{2f}-1).$

If $f=1$ then $q=p\equiv\pm 1\pmod{5}$ and $120^{3}\geq p(p^{2}-1)$, which
force $q=11$, 19, 29, 31, 41, 59, 61, 71, 79, 89, 101 or 109. Now we compute
the values of $v$ by $v=\frac{q(q^{2}-1)}{120}$, and from $k\mid|G_{x}|$,
$e=1$ or 2 we get $k\mid u=120$. We then check all possibilities for $v$ by
using Algorithm 2.9, and obtain three potential parameters: $(11,5,2)$,
$(11,6,3)$ and $(57,8,1)$. If $(v,k,\lambda)=(57,8,1)$, then $X={\rm
PSL}(2,19)$. The subdegrees of $X$ on the cosets of $A_{5}$ are 1, 6, 20 and
30. By Lemma 2.5, the subdegrees of $G$ are also 1, 6, 20 and 30,
contradicting Lemma 2.1($ii$). If $(v,k,\lambda)=(11,5,2)$, then $X={\rm
PSL}(2,11)$, and so $G={\rm PSL}(2,11)$ or ${\rm PGL}(2,11)$. The GAP-command
Transitivity($G,\Omega$) returns the degree $t$ of transitivity of the action
implied by the arguments; that is, the largest integer $t$ such that the
action is $t$-transitive. Thus we know that $G$ acts as 2-transitive
permutation group on the set $P$ of 11 points by GAP. Since
$\gcd(k,\lambda)=1$, then by Lemma 2.2 we see that $\mathcal{D}$ is flag-
transitive, as required. In fact, this design has been found in [11]. If
$(v,k,\lambda)=(11,6,3)$, then Lemma 2.4 shows that $\mathcal{D}$ is also
flag-transitive, as described in [14].

If $f=2$ then $q=p^{2}\equiv-1\pmod{5}$ and $120^{3}\cdot 4^{2}\geq
p^{2}(p^{4}-1)$. Hence, the possible pairs $(p,v)$ are $(3,6)$, $(7,980)$ and
$(13,40222)$. Since $k\mid 60e$ and $e\mid 2f=4$, we have $k\mid u=240$.
Running Algorithm 2.9 with $u=240$ and $v=6$, 980 or 40222, returns an empty
list Designs for every case, a contradiction.

####  Case (7). $X\cap G_{x}=A_{4}$, $q=p\equiv\pm 3\pmod{8}$ and
$q\not\equiv\pm 1\pmod{10}.$

Here $v=\frac{q(q^{2}-1)}{24}$, $|X_{x}|=|X\cap G_{x}|=12$, $|{\rm
Out}(X)|=2$, $|G|=\frac{1}{2}eq(q^{2}-1)$ and $|G_{x}|=12e$, where $\ e=1$ or
2.

The inequality $|G_{x}|^{3}>|G|$ gives $(12e)^{3}>\frac{1}{2}eq(q^{2}-1)$.
Since $q\geq 5$, $q=p\equiv\pm 3\pmod{8}$ and $q\not\equiv\pm 1\pmod{10}$, we
get $q=5$ or 13. Thus $v=5$ or 91, respectively. It is not hard to see that
there is no symmetric $(v,k,\lambda)$ design with $v=5$. If $v=91$ then all
possible parameters of $(k,\lambda)$ are

$(10,1),(36,14),(45,22),(46,23),(55,33)\ \hbox{and}\ (81,72).$

However, by $k\mid 12e$ and $e=1$ or 2, we have $k\mid 24$, the desired
contradiction.

####  Case (8). $X\cap G_{x}=S_{4}$, $q=p\equiv\pm 1\pmod{8}.$

Now $v=\frac{q(q^{2}-1)}{48}$, $|X_{x}|=|X\cap G_{x}|=24$, $|{\rm Out}(X)|=2$,
$|G|=\frac{1}{2}eq(q^{2}-1)$, $|G_{x}|=24e$, where $e=1$ or 2.

Since $q=p$, $e\leq 2$ and $|G_{x}|^{3}>|G|$, that is,
$(24e)^{3}>\frac{1}{2}eq(q^{2}-1)$, we get

$q(q^{2}-1)<2\cdot 24^{3}\cdot e^{2}\leq 48^{3}.$

Since $q\equiv\pm 1\pmod{8}$, we obtain that the possible pairs $(q,v)$ are
(7, 7), (17, 102), (23, 253), (31, 620), (41, 1435) and (47, 2162). Since
$k\mid|G_{x}|=24e$ and $e=1$ or 2, we get $k\mid u=48$. Thus Algorithm 2.9
gives only two parameters: $(7,3,1)$ and $(7,4,2)$. If
$(v,k,\lambda)=(7,3,1)$, then $X={\rm PSL}(2,7)$, and so $G={\rm PSL}(2,7)$ or
${\rm PGL}(2,7)$. Hence $G$ acts as a 2-transitive permutation group on the
set $P$ of 7 points by GAP. Lemma 2.2 shows that $\mathcal{D}$ is flag-
transitive because $\gcd(k,\lambda)=1$. If $(v,k,\lambda)=(7,4,2)$, then
$\mathcal{D}$ is also flag-transitive by Lemma 2.4. This design has been
discussed in [11].

###  3.3 Characteristic two

In this subsection, we suppose that $G$ is of characteristic 2 and $X\cap
G_{x}$ is maximal in $X$. The structure of $X\cap G_{x}$ is given in Table 2.

####  Case (1). $X\cap G_{x}=E_{q}:(q-1).$

Here $v=q+1$ and $k(k-1)=\lambda(v-1)=\lambda q=2^{f}\lambda$. If $2\mid k$,
then $\gcd(2,k-1)=1$, and so $2^{f}\mid k$, which implies $v-1\mid k$. This is
impossible. Thus $2\nmid k$ and so $2^{f}\mid k-1$. It follows that $v-1\mid
k-1$, a contradiction.

####  Case (2). $X\cap G_{x}=D_{2(q-1)}.$

Now $v=\frac{1}{2}q(q+1)$, $|{\rm Out}(X)|=f$, $|G|=eq(q^{2}-1)$ and
$|G_{x}|=2e(q-1)$, where $e\mid f$.

From $q=2^{f}\geq 4$ we know that $v=\frac{1}{2}q(q+1)$ is even. So $\lambda$
is also even since $k(k-1)=\lambda(v-1)$. Lemma 2.1 ($iii$) shows $k\mid
2e(q-1)$. Then there exists a positive integer $m$ such that
$k=\frac{2e(q-1)}{m}$. Again by $k(k-1)=\lambda(v-1)$, we have
$\frac{2e(q-1)}{m}(\frac{2e(q-1)}{m}-1)=\lambda(\frac{1}{2}q(q+1)-1)$, and so
$(8e^{2}-m^{2}\lambda)q=2m^{2}\lambda+8e^{2}+4em$, which forces
$8e^{2}-m^{2}\lambda>0$ and so $m<2e$. The fact that $\lambda$ is even implies
that $8e^{2}-m^{2}\lambda\geq 2$. So we have

$2^{f}=q=\frac{24e^{2}+4em}{8e^{2}-m^{2}\lambda}-2\leq\frac{24e^{2}+4e\cdot
2e}{2}\leq 16f^{2}.$

Hence $2\leq f\leq 10$. Since $k\mid 2e(q-1)$ and $e\mid f$, we get $k\mid
u=2f(q-1)$. The pairs $(v,u)$, for $2\leq f\leq 10$, are (10, 12), (36, 42),
(136, 120), (528, 310), (2080, 756), (8256, 1778), (32896, 4080), (131328,
9198) and (524800, 20460). Then Algorithm 2.9 gives only one possible set of
parameters $(36,21,12)$. Suppose $(v,k,\lambda)=(36,21,12)$. Then $G={\rm
PSL}(2,8)$ or ${\rm P\Gamma L}(2,8)$. When $G={\rm PSL}(2,8)$, the subdegrees
of $G$ are 1, $7^{3}$ and 14, and $G$ has only one conjugacy class of
subgroups of index 36. Thus for any $B\in\mathcal{B}$, $G_{x}$ is conjugate to
$G_{B}$. Without loss of generality, let $G_{x}=G_{B_{0}}$ for some block
$B_{0}$. The flag-transitivity of $G$ forces $G_{B_{0}}$ to act transitively
on the points of $B_{0}$. Hence the points of $B_{0}$ form an orbit of
$G_{x}$, which implies that a subdegree of $G$ is $k=21$, a contradiction. Now
assume $G={\rm P\Gamma L}(2,8)$. Then the subdegrees of $G$ are 1, 14 and 21,
and $G$ has only one conjugacy class of subgroups of index 36. So let
$G_{x}=G_{B_{0}}$ for some block $B_{0}$ as above. Then $B_{0}$ is an orbit of
size 21 of $G_{x}$. By using Magma, we obtain that $|\mathcal{B}|=|B^{G}|=36$,
but $|B_{i}\cap B_{j}|=10$ or 15 for any two distinct blocks $B_{i}$ and
$B_{j}$. This is a contradiction since in our situation any two distinct
blocks should have $\lambda=12$ common points.

####  Case (3). $X\cap G_{x}=D_{2(q+1)}.$

Here $v=\frac{1}{2}q(q-1)$, $|{\rm Out}(X)|=f$, $|G|=\frac{1}{2}eq(q^{2}-1)$
and $|G_{x}|=2e(q+1)$, where $e\mid f$.

Since $k\mid|G_{x}|$, there exists a positive integer $m$ such that
$k=\frac{2e(q+1)}{m}$. Thus Lemma 2.1 ($i$) yields
$\frac{2e(q+1)}{m}\big{(}\frac{2e(q+1)}{m}-1\big{)}=\lambda(\frac{1}{2}q(q-1)-1)$,
and so
$(m^{2}\lambda-8e^{2})q=8e^{2}-4em+2m^{2}\lambda=8(e-\frac{1}{2}m)^{2}+2(\lambda-1)m^{2}>0$.
We then have

$2^{f}=q=\frac{8e^{2}-4em+2m^{2}\lambda}{m^{2}\lambda-8e^{2}}=\frac{24e^{2}-4em}{m^{2}\lambda-2e^{2}}+2,$

which implies $2^{f}<24e^{2}+2\leq 24f^{2}+2.$ Hence $2\leq f\leq 11$. Since
$k\mid 2e(q+1)$ and $e\mid f$, we have $k\mid u=2f(q+1)$. For $2\leq f\leq
11$, the pairs $(v,u)$ are as follows:

$\begin{array}[]{lllllll}&(6,20),&(28,54),&(120,136),&(496,330),&(2016,780),\\\
&(8128,1806),&(32640,4112),&(130816,9234),&(523776,20500),&(2096128,45078).&\end{array}$

Applying Algorithm 2.9 to these pairs $(v,u)$, we obtain
$(v,k,\lambda)=(496,55,6)$ or $(2016$, $156$, $12)$. If
$(v,k,\lambda)=(496,55,6)$, then $G={\rm PSL}(2,2^{5})$ or ${\rm P\Gamma
L}(2,2^{5})$. Let $G={\rm PSL}(2,2^{5})$(or ${\rm P\Gamma L}(2,2^{5})$), then
the subdegrees of $G$ are 1 and $33^{15}$ (or 1 and $165^{3}$), and $G$ has
only one conjugacy class of subgroups of index 496. Thus there exists a block-
stabilizer $G_{B_{0}}$ such that $G_{x}=G_{B_{0}}$, which implies that $B_{0}$
should be an orbit of $G_{x}$. But this is impossible because $|B_{0}|=55$.
Now suppose $(v,k,\lambda)=(2016,156,12)$. Then $G={\rm PSL}(2,2^{6})$, ${\rm
PSL}(2,2^{6}):i$ $(i=2,3)$ or ${\rm P\Sigma L}(2,2^{6})$. By the fact that $G$
has only one conjugacy class of subgroups of index 2016, similar to the
analysis above, there exists a block $B_{0}$ such that $B_{0}$ is an orbit of
$G_{x}$. Thus $G_{x}$ should have an orbit of size 156. The subdegrees of $G$,
however, are as follows:

  1. (i)

1, and $65^{31}$ when $G={\rm PSL}(2,2^{6})$;

  2. (ii)

1, $65^{7}$ and $130^{12}$ when $G={\rm PSL}(2,2^{6}):2$;

  3. (iii)

1, $65$ and $195^{10}$ when $G={\rm PSL}(2,2^{6}):3$;

  4. (iv)

1, 65, $195^{2}$ and $390^{4}$ when $G={\rm P\Sigma L}(2,2^{6})$.

####  Case (4). $X\cap G_{x}={\rm PSL}(2,q_{0})={\rm PGL}(2,q_{0})$, where
$q=q_{0}^{r}$ for some prime $r$ and $q_{0}\neq 2$.

Here $v=\frac{q_{0}^{r-1}(q_{0}^{2r}-1)}{q_{0}^{2}-1}$, $|X_{x}|=|X\cap
G_{x}|=q_{0}(q_{0}^{2}-1)$, $|{\rm Out}(X)|=f$, $|G|=\frac{1}{2}eq(q^{2}-1)$
and $|G_{x}|=eq_{0}(q_{0}^{2}-1)$, where $e\mid f$. Let $q_{0}=2^{a}$, so that
$f=ra$.

From $|G_{x}|^{3}>|G|$, $q=q_{0}^{r}$ and $e\mid f$, we get

$f^{2}\geq
e^{2}>q_{0}^{r-3}\frac{q_{0}^{2r}-1}{q_{0}^{6}-3q_{0}^{4}+3q_{0}^{2}-1}.$

If $r\geq 5$, then

$f^{2}>q_{0}^{r-3}\frac{q_{0}^{2r}-1}{q_{0}^{6}-3q_{0}^{4}+3q_{0}^{2}-1}\geq
q_{0}^{r-3}\frac{q_{0}^{10}-1}{q_{0}^{6}-3q_{0}^{4}+3q_{0}^{2}-1}>q_{0}^{r}=q=2^{f},$

where the third inequality holds because
$q_{0}^{10}-1>q_{0}^{3}(q_{0}^{6}-3q_{0}^{4}+3q_{0}^{2}-1)=q_{0}^{9}-3q_{0}^{5}(q_{0}^{2}-1)-q_{0}^{3}$.
But for $f\geq r\geq 5$ the inequality $f^{2}>2^{f}$ is not satisfied. Hence
$r=2$ or 3.

Suppose first that $r=3$, so that $q=q_{0}^{3}=2^{3a}$,
$v=q_{0}^{2}(q_{0}^{4}+q_{0}^{2}+1)$ and $f=3a$. The subdegrees of ${\rm
PSL}(2,q_{0}^{3})$ on the cosets of ${\rm PSL}(2,q_{0})$ are as follows ([5]):

$1,\ (q_{0}^{2}-1)^{{q_{0}}+1},\
({q_{0}}({q_{0}}-1))^{\frac{{q_{0}}({q_{0}}-1)}{2}},\
({q_{0}}({q_{0}}+1))^{\frac{{q_{0}}({q_{0}}+1)}{2}},\
({q_{0}}(q_{0}^{2}-1))^{q_{0}^{3}+{q_{0}}-1}.$

By Lemma 2.6, we have

$k\mid\lambda\gcd\big{(}({q_{0}}+1)^{2}({q_{0}}-1),\frac{q_{0}^{2}({q_{0}}-1)^{2}}{2},\frac{q_{0}^{2}({q_{0}}+1)^{2}}{2},{q_{0}}(q_{0}^{2}-1)(q_{0}^{3}+{q_{0}}-1)\big{)}.$

So $k\mid 2\lambda$. This forces $k=2\lambda$ since $k>\lambda$. Thus
$v=4\lambda-1$ by equation $k(k-1)=\lambda(v-1)$. Then
$\lambda=\frac{v+1}{4}=\frac{q_{0}^{6}+q_{0}^{4}+q_{0}^{2}+1}{4}$ and
$k=2\lambda=\frac{q_{0}^{6}+q_{0}^{4}+q_{0}^{2}+1}{2}$. By
$k\mid|G_{x}|=\frac{1}{2}eq_{0}(q_{0}^{2}-1)$ and $e\mid f=3a$, we get
$\frac{2^{6a}+2^{4a}+2^{2a}+1}{2}\leq\frac{3a}{2}\cdot 2^{a}(2^{2a}-1)$, and
so $2^{6a}\leq 3a\cdot 2^{a}\cdot 2^{2a}$, i.e., $2^{3a}\leq 3a$, which is
impossible.

Now suppose $r=2$. Then $q=q_{0}^{2}=2^{2a}$, $v=q_{0}(q_{0}^{2}+1)$ and
$f=2a$. The subdegrees of ${\rm PSL}(2,q_{0}^{2})$ on the cosets of ${\rm
PGL}(2,q_{0})$ are as follows ([5]):

$1,\ q_{0}^{2}-1,\ (q_{0}(q_{0}-1))^{\frac{q_{0}-2}{2}},\
(q_{0}(q_{0}+1))^{\frac{q_{0}}{2}}.$

By Lemma 2.6, we have

$k\mid\lambda\gcd\big{(}q_{0}^{2}-1,\frac{q_{0}(q_{0}-1)(q_{0}-2)}{2},\frac{q_{0}^{2}(q_{0}+1)}{2}\big{)}.$

Here
$\gcd\big{(}\frac{q_{0}(q_{0}-1)(q_{0}-2)}{2},\frac{q_{0}^{2}(q_{0}+1)}{2}\big{)}=2^{a}\gcd((2^{a}-1)(2^{a-1}-1),2^{a}+1)$
which divides $3\cdot 2^{a}=3q_{0}$. Thus
$k\mid\lambda\gcd\big{(}q_{0}^{2}-1,3q_{0}\big{)}$, and so $k\mid 3\lambda$.
Now, $k>\lambda$ implies that $k=3\lambda$ or $\frac{3\lambda}{2}$.

If $k=3\lambda$, then $v=9\lambda-2$ by $k(k-1)=\lambda(v-1)$. So
$\lambda=\frac{v+2}{9}=\frac{q_{0}^{3}+q_{0}+2}{9}$ and
$k=3\lambda=\frac{q_{0}^{3}+q_{0}+2}{3}$. From
$k\mid|G_{x}|=eq_{0}(q_{0}^{2}-1)$ and $e\mid f=2a$, we have $k\mid
2aq_{0}(q_{0}^{2}-1)$. By the facts that $\gcd(q_{0}^{3}+q_{0}+2,q_{0})=2$ and
$\gcd(q_{0}^{3}+q_{0}+2,q_{0}-1)=\gcd(4,q_{0}-1)=1$, we get
$\frac{q_{0}^{2}-q_{0}+2}{3}\mid 4a$, and so $\frac{2^{2a}-2^{a}+2}{3}\leq
4a$, which implies that $a=1$ or 2. Since $q_{0}\neq 2$, $a\neq 1$. Hence
$a=2$ and $q_{0}=4$, but then $k=\frac{70}{3}$ is not an integer.

If $k=\frac{3\lambda}{2}$, then $v=\frac{9\lambda-2}{4}$. Thus
$\lambda=\frac{4v+2}{9}=\frac{4q_{0}^{3}+4q_{0}+2}{9}$ and
$k=\frac{2q_{0}^{3}+2q_{0}+1}{3}$. Since $k\mid|G_{x}|$ and $e\mid f=2a$, we
have $\frac{2q_{0}^{3}+2q_{0}+1}{3}\mid 2aq_{0}(q_{0}^{2}-1)$. Note that
$\gcd(2q_{0}^{3}+2q_{0}+1,q_{0})=1$, $\gcd(2q_{0}^{3}+2q_{0}+1,q_{0}+1)=1$ or
3, and $\gcd(2q_{0}^{3}+2q_{0}+1,q_{0}-1)=1$ or 5. Then
$2q_{0}^{3}+2q_{0}+1\mid 90a$, and hence $2^{3a+1}+2^{a+1}+1\leq 90a$. It
follows that $a=1$ or 2. If $a=1$ then $q_{0}=2$, a contradiction. If $a=2$
then $q_{0}=4$ which implies $k=\frac{137}{3}$ is not an integer.

This completes the proof of Theorem 1.1. $\hfill\square$

## References

  * [1] W. Bosma, J. Cannon, C. Playoust, The Magma algebra system I: The user language, J. Symb. Comput. 24 (1997) 235-265.
  * [2] H. Davies, Flag-transitive and primitivity, Discrete Math. 63 (1987) 91-93.
  * [3] P. Dembowski, Finite Geometries, Springer, Berlin, 1968\.
  * [4] U. Dempwolff, Primitive rank 3 groups on symmetric designs, Des. Codes and Cryptogr. 22(2001) 191-207.
  * [5] I.A. Faradzev, A.A. Ivanov, Distance-transitive representations of groups $G$ with ${\rm PSL}_{2}(q)\unlhd G\leq{\rm P\Gamma L}_{2}(q)$, European J. Combin. 11 (1990) 347-356.
  * [6] The GAP Group, _GAP – Groups, Algorithms, and Programming, Version 4.4.12_ ; 2008, http://www.gap-system.org.
  * [7] M. Giudici, Maximal subgroups of almost simple groups with socle ${\rm PSL}_{2}(q)$, manuscript, http:// arXiv.org/abs/math/0703685v1, 2007.
  * [8] B. Huppert, Endliche Gruppen I, Springer-Verlag, Berlin, 1981.
  * [9] W.M. Kantor, Classification of 2-transitive symmetric designs, Graphs and Combin. 1 (1985) 165-166.
  * [10] E.S. Lander, Symmetric Designs: An Algebraic Approach, London Mathematical Society Lecture Note Series, 74, Cambridge University Press, London, 1983.
  * [11] E. O’Reilly Regueiro, Biplanes with flag-transitive automorphism groups of almost simple type, with classical socle, J. Algebr. Combin. 26 (2007) 529-552.
  * [12] D. Tian, Classification of Flag-transitive Point-primitive Symmetric Designs, Ph. D. Thesis, South China University of Technology, 2013.
  * [13] D. Tian, S. Zhou, Flag-transitive $2$-$(v,k,\lambda)$ symmetric designs with sporadic socle, J. Combin. Des., DOI: 10.1002/jcd.21385, accept, 2014.
  * [14] S. Zhou, H. Dong, W. Fang, Finite classical groups and flag-transitive triplanes, Discrete Math. 309 (16) (2009) 5183-5195.
  * [15] S. Zhou, D. Tian, Flag-transitive point-primitive 2-$(v,k,4)$ symmetric designs and two dimensional classical groups, Appl. Math. J. Chinese Univ., 26(3) (2011) 334-341.


# Transferring General Multimodal Pretrained Models to Text Recognition

Junyang Lin, Xuancheng Ren, Yichang Zhang, Gao Liu, Peng Wang, An Yang, Chang
Zhou
DAMO Academy, Alibaba Group
<EMAIL_ADDRESS>
###### Abstract

This paper proposes a new method, OFA-OCR, to transfer multimodal pretrained
models to text recognition. Specifically, we recast text recognition as image
captioning and directly transfer a unified vision-language pretrained model to
the end task. Without pretraining on large-scale annotated or synthetic text
recognition data, OFA-OCR outperforms the baselines and achieves state-of-the-
art performance in the Chinese text recognition benchmark. Additionally, we
construct an OCR pipeline with OFA-OCR, and we demonstrate that it can achieve
competitive performance with the product-level API. The
code111https://github.com/OFA-Sys/OFA and
demo222https://modelscope.cn/studios/damo/ofa_ocr_pipeline/summary are
publicly available.

##  1 Introduction

Optical character recognition (OCR) plays an important role in the real-world
applications. It helps users or developers extract text contents from
different types of images, including photos, scanned documents, etc. In
practice, building a tool for OCR needs a pipeline consisting of a text
localization module and a text recognition module.

In this work, we focus on improving the accuracy of text recognition. Text
recognition has often been regarded as a key challenge owing to the room for
improvements in recognition accuracy. In the deep learning era, the classical
methods are mostly based on CNN and RNN, which are responsible for visual
feature extraction and sequence modeling, respectively (Shi et al., 2017a,
2019; Luo et al., 2019). Recently, with the rise of Transformer (Vaswani et
al., 2017), researchers applied the Transformer encoder-decoder framework to
text recognition and achieved outperforming results over the baselines (Li et
al., 2021; Lyu et al., 2022). However, most methods are based on large-scale
pretraining on human-annotated or synthetic OCR data. It is hard for other
researchers to collect or create such data for reproduction. Furthermore, the
methods often include complex model or objective designs, like DETR-like
decoder (Carion et al., 2020), CTC loss (Graves et al., 2006), etc. These
components also might hinder reproduction as they increase the difficulty in
training. Therefore, we naturally raise a question: Is there any way to
achieve high recognition accuracy without complex designs on data and model?

Figure 1: An comparison between the performance with or without general
vision-language pretraining. On 4 subtasks of text recognition, OFA-OCR with
general-domain vision-language pretraining significantly outperforms the
baseline without one.

Inspired by the recent progress in multimodal pretraining, we argue that the
transfer of a unified multimodal pretrained model is a possible solution.
Multimodal pretraining has proved significant to the performance of downstream
tasks, and thanks to the rise of unified multimodal pretrained models, they
can perform both cross-modal understanding and generation and achieve state-
of-the-art performance (Wang et al., 2022a, b; Lu et al., 2022). We therefore
propose to transfer the unified multimodal pretrained model by finetuning the
pretrained model on the text recognition datasets with the task of image
captioning, which is essentially a simple sequence-to-sequence learning task
with maximum likelihood estimation for optimization.

To support the effectiveness of the proposed method, we have conducted
extensive experiments on the Chinese text recognition benchmark (Chen et al.,
2021b) covering multiple scenarios, including scene, web, document, and
handwriting. Specifically, we finetune the open-source Chinese multimodal
pretrained model OFA (Wang et al., 2022a) on text recognition, and we name the
model OFA-OCR. Figure 1 demonstrates the results of methods with or without
general-domain pretraining. It shows that multimodal pretraining on general-
domain vision-language data can effectively boost downstream performance in
text recognition. To achieve the best performance, we apply the multitask +
single-task finetuning to OFA-OCR, and it outperforms the previous state-of-
the-art methods on the benchmark. Furthermore, through the ablation studies,
we demonstrate the effectiveness of our method designs, including multitask +
single-task finetuning, data augmentation, etc. Furthermore, to enable
deployment for real-world applications, we construct a pipeline with both OFA-
OCR and a simple text localization module. We find that this simple pipeline
can provide high-quality OCR performance, competitive with a product-level
API.

##  2 Method

###  2.1 Pretraining

To leverage the capability of the multimodal pretrained model for image
captioning, we employ the unified multimodal pretrained model architecture.
Specifically, we implement our models on OFA (Wang et al., 2022a), an open-
source state-of-the-art unified multimodal pretrained model with the release
of Chinese models.

The model is mainly based on the Transformer encoder-decoder framework
(Vaswani et al., 2017). To make information from different modalities
adaptable to the Transformer, there are adaptors for images and texts, which
are visual backbones, e.g., ResNet (He et al., 2016), ViT (Dosovitskiy et al.,
2021), etc., and word embeddings, respectively. The information from
modalities is encoded as discrete tokens so that the decoder can perform their
generation.

For Chinese multimodal pretraining, OFA-Chinese was pretrained on a large-
scale dataset, which consists of LAION-5B (Schuhmann et al., 2022), Wukong
dataset, as well as translated datasets from MSCOCO (Chen et al., 2015),
Visual Genome (Krishna et al., 2017), VQA (Goyal et al., 2017), RefCOCO (Yu et
al., 2016), etc.

Note that this work is different from previous pretraining-related methods,
which pretrain the model on large-scale human-annotated or synthetic data. We
show that through pretraining on general-domain data, the model can obtain the
potential of text recognition by finetuning on small datasets.

###  2.2 Finetuning with Image Captioning

It is natural to recast text recognition as image captioning, as text
recognition also requires the model to generate a piece of text based on the
input image. It is equivalent to finetuning on different image captioning
datasets, where the target refers to the text on the image. We finetune the
model with maximum likelihood estimation for optimization.

Furthermore, to better alleviate the discrepancy between upstream and
downstream data, we apply a transformation to the input images to make them
square, e.g., a resolution of $480\times 480$. Specifically, we first resize
the image to a longer edge of the specified resolution while keeping the
original height-width ratio of the image, and we make the image square by
padding on all sides with the edge value. The lengths for the directions are
random, and thus this method can play as data augmentation in this context. We
demonstrate the pseudo code in Sec. A.3.

For better performance in the downstream tasks, we often use a larger
resolution in the finetuning stage, and thus we encounter issues with the
positional embedding. In our practice, we still use the same one from
pretraining but apply interpolation to adapt to images of a larger resolution.

###  2.3 Multitask Finetuning

There are multiple subtasks in text recognition, concerning different
scenarios, e.g., scene, document, etc. Our experiments are implemented on the
Chinese text recognition benchmark consisting of $4$ subtasks. In our
practice, we implement multitask finetuning and single-task finetuning for
comparison. Specifically, as the data of all subtasks are organized with the
same format, we directly build a mixture of datasets for multitask finetuning.
We find that directly applying multitask finetuning can help OFA-OCR achieve
outstanding performance on all datasets. To further boost its performance, we
additionally apply single-task finetuning after multitask finetuning, and we
find that this pushes its performance to the new state-of-the-art.

##  3 Experiments

Metrics Scene Web Document Handwriting Average CRNN (Shi et al., 2017a) 53.4
54.5 97.5 46.4 67.0 ASTER (Shi et al., 2019) 54.5 52.3 93.1 38.9 64.7 MORAN
(Luo et al., 2019) 51.8 49.9 95.8 39.7 64.3 SAR (Li et al., 2019) 62.5 54.3
93.8 31.4 67.3 TransOCR (Chen et al., 2021a) 63.3 62.3 96.9 53.4 72.8
$\text{MaskOCR}\rm_{ViT\text{-}B}$ 73.9 74.8 99.3 63.7 80.8
$\text{MaskOCR}\rm_{ViT\text{-}L}$ 76.2 76.8 99.4 67.9 82.6 $\text{OFA-
OCR}\rm_{Base}$ 82.9 81.7 99.1 69.0 86.0 $\text{OFA-OCR}\rm_{Large}$ 83.7 82.6
99.2 67.7 86.3

Table 1: Experimental results on the Chinese text recognition benchmark.
Results show that the base-size OFA-OCR model can outperform the previous
state-of-the-art, and the large-size model achieves the best performance on
average.

###  3.1 Datasets and Metrics

We implement OFA-OCR on the Chinese text recognition benchmark (Chen et al.,
2021b). This benchmark consists of multiple subtasks of text recognition,
which are text recognition in different scenarios, including scene, web,
document, and handwriting. The details of the datasets are provided in Sec.
A.1. The evaluation metric includes accuracy, which refers to the ratio of
exact match.

###  3.2 Experimental Results

The experimental results are demonstrated in Table 1. We compare our method
with baseline models of OCR, including the previous state-of-the-art MaskOCR
(Lyu et al., 2022). It can be found that with no regard to the scale of
models, the base-size OFA-OCR, which is finetuned from the pretrained Chinese
$\text{OFA}_{\text{Base}}$, can outperform both the base-size and large-size
MaskOCR models. Specifically, it shows the advantages of $9.0$, $6.9$, and
$5.3$ absolute improvements in the scenarios of scene, web, and handwriting.
On average, the base-size OFA-OCR outperforms the base-size MaksOCR by $5.2$
and the large-size MaskOCR by $3.4$. Scaling up the model size can
consistently bring steady improvement in the downstream performance. On
average, $\text{OFA}_{\text{Large}}$reaches the best results of $86.3$.

Specifically, we find that the advantage in the scene dataset is the largest
among the tasks. This may be attributed to the pretraining on general-domain
data, where there are images of street views, and some of them might contain
texts. Similarly, the pretraining dataset consists of web images that resemble
those in the web dataset, and thus the gaps between OFA-OCR and the previous
methods are large. However, text recognition for documents should be a simpler
task as the texts are more regular in fonts and there is often much less noise
in the background. Thus, even the conventional method like CRNN can achieve a
high accuracy.

###  3.3 Ablation Study of Training Strategies

To check how the multitask learning influences the final performance, we
conduct an ablation study to evaluate its effects. Specifically, the
experiments are conducted with the base-size OFA-OCR. We provide experiments
in $4$ setups, which are training from scratch (scratch), single-task
finetuning (ft), multitask-finetuning (mt), and multitask + single-task
finetuning (mt+ft), respectively. Experimental results are shown in Figure 2.
It can be found that on average, the addition of the initialization of the
pretrained OFA model significantly boosts the performance on the datasets.
Surprisingly, multitask finetuning alone can outperform single-task finetuning
on all $4$ tasks, and the advantage in the web dataset is the most obvious. We
assume that this is attributed to the small amount of supervised training data
for downstream transfer. A mixture of datasets of related subtasks can
encourage performance on all subtasks. Furthermore, the combination of
multitask finetuning and single-task finetuning is the best solution owing to
its outstanding performance, while multitask finetuning on the mixture of
datasets is the most cost-efficient.

Figure 2: Performance of OFA-OCR in different setups. We validate the model
performance on the $4$ datasets in the setups of training from scratch
(scratch), single-task finetuning (ft), multitask-finetuning (mt), and
multitask + single-task finetuning (mt+ft). We observe consistent performance
growth with the addition of the pretrained weight initialization and multitask
finetuning.

###  3.4 Ablation Study of Data Augmentation

The preprocessing of images for this task can play as data augmentation. To
validate its effects, we use a simple resizing to the specified resolution as
a baseline. We also implement experiments on the $4$ datasets, and for
simplicity we implement the experiments in the setup of single-task finetuning
on the base-size models. Results are demonstrated in Table 2. We use “Aug.” to
indicate the preprocessing method mentioned in Sec. 2. The results indicate
that the introduced technique for data preprocessing can effectively boost the
performance.

###  3.5 Deployment

To construct an OCR system applicable in real-world scenarios, a strong text
recognition model is not sufficient, and we need to build a pipeline with both
the text detection and text recognition module. While the former one is not
the focus of this research, we directly use a light-weight model from
EasyOCR333https://github.com/JaidedAI/EasyOCR for detection. After detecting
all the bounding boxes which possibly contain texts, we crop them with boxes
to create a batch of new images. The final step is to process the images with
OFA-OCR for the generation of text recognition results. Through our case
study, we find that the simple OCR pipeline based on OFA-OCR can achieve
competitive performance with the product-level API. Examples are demonstrated
in Sec. A.4.

Method w/o Aug. w/ Aug. Scene 77.0 78.4 Web 72.3 73.4 Document 98.2 98.4 Web
60.4 62.8 Avg 81.0 82.1

Table 2: Performance comparison with or without data augmentation for images.
The experiments are conducted in the setup of single-task finetuning on the
base-size model.

##  4 Related Work

We focus on the review of text recognition methods and multimodal pretraining.
Conventional methods based on CNN and RNN have demonstrated great
effectiveness (Shi et al., 2017a; Luo et al., 2019; Shi et al., 2019; Yu et
al., 2020; Li et al., 2019; Fang et al., 2021). Recent methods have turned to
the use of Transformer and achieved improved performance (Atienza, 2021; Li et
al., 2021; Zhang et al., 2022; Lyu et al., 2022). However, before this work,
we have not witnessed the direct transfer of general-domain vision-language
pretrained models to text recognition. Vision-language pretraining has proved
a success as it has leveled up the model performance on a series of downstream
tasks (Chen et al., 2019; Lu et al., 2019; Radford et al., 2021; Wang et al.,
2021), and the unified models capable of both understanding and generation
have become popular and achieved the best performance (Wang et al., 2022a, b).
Yet, there are only a few unified multimodal pretrained models in Chinese (Lin
et al., 2021; Wang et al., 2022a).

##  5 Conclusion

In this work, we propose a simple method called OFA-OCR, which leverages the
unified multimodal pretrained model and transfers it to text recognition by
image captioning. To be more specific, we utilize the Chinese multimodal
pretrained model OFA without pretraining on OCR data and transfer it to text
recognition with multitask + single-task finetuning. Through extensive
experiments, we demonstrate that OFA-OCR can achieve state-of-the-art
performance on the Chinese text recognition benchmark. Additionally, we build
a pipeline of OCR by integrating an existent simple text detection module and
OFA-OCR. The deployed pipeline achieves competitive performance in comparison
with a product-level API. We hope that this research sheds light on the
application of general-domain multimodal pretraining, and also helps OCR
practitioners.

## Limitations

This section discusses the limitations of this work for more insights on the
research in this track. Though OFA-OCR achieves high accuracy on multiple text
recognition datasets, its costs are larger than the non-Transformer baselines.
As the model is based on Transformer, the costs for training and inference of
$\text{OFA-OCR}_{\text{base}}$ are equivalent to those of other base-size
Transformer. However, in practice, it is difficult to deploy such large
models. Thus in our future work, we will discover how to distill or compress
OFA-OCR to a light-weight model with high efficiency.

## Ethics Statement

Our method is essentially based on a generation model, and thus the OCR
results should be taken as AI-generated contents. As the generated results
should be aligned with the input, we have not noticed deliberate harmful
contents, e.g., hate speech, bias, etc. However, the model maintains such
ability and it might be triggered. We also have to note that due to the
application context, the input may contain harmful contents itself. In such
scenario, we believe the model should faithfully reflect its input, which is
valuable to measures against such contents. Although we believe that after
finetuning on the public datasets the risk of such phenomena is extremely low,
we still take it into account. In the future research, besides focusing on
improving downstream performance, we will study how to increase the
controllability on the generation.

## References

  * Atienza (2021) Rowel Atienza. 2021.  Vision Transformer for fast and efficient scene text recognition.  In _ICDAR (1)_ , volume 12821 of _Lecture Notes in Computer Science_ , pages 319–334. Springer.
  * Carion et al. (2020) Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. 2020.  End-to-end object detection with transformers.  In _European conference on computer vision_ , pages 213–229. Springer.
  * Chen et al. (2021a) Jingye Chen, Bin Li, and Xiangyang Xue. 2021a.  Scene text telescope: Text-focused scene image super-resolution.  In _CVPR_ , pages 12026–12035. Computer Vision Foundation / IEEE.
  * Chen et al. (2021b) Jingye Chen, Haiyang Yu, Jianqi Ma, Mengnan Guan, Xixi Xu, Xiaocong Wang, Shaobo Qu, Bin Li, and Xiangyang Xue. 2021b.  Benchmarking Chinese text recognition: Datasets, baselines, and an empirical study.  _CoRR_ , abs/2112.15093.
  * Chen et al. (2015) Xinlei Chen, Hao Fang, Tsung-Yi Lin, Ramakrishna Vedantam, Saurabh Gupta, Piotr Dollár, and C. Lawrence Zitnick. 2015.  Microsoft COCO captions: Data collection and evaluation server.  _CoRR_ , abs/1504.00325.
  * Chen et al. (2019) Yen-Chun Chen, Linjie Li, Licheng Yu, Ahmed El Kholy, Faisal Ahmed, Zhe Gan, Yu Cheng, and Jingjing Liu. 2019.  Uniter: Universal image-text representation learning.  In _European Conference on Computer Vision_.
  * Chng et al. (2019) Chee-Kheng Chng, Yuliang Liu, Yipeng Sun, Chun Chet Ng, Canjie Luo, Zihan Ni, Chuanming Fang, Shuaitao Zhang, Junyu Han, Errui Ding, Jingtuo Liu, Dimosthenis Karatzas, Chee Seng Chan, and Lianwen Jin. 2019.  Icdar2019 robust reading challenge on arbitrary-shaped text - rrc-art.  _2019 International Conference on Document Analysis and Recognition (ICDAR)_ , pages 1571–1576.
  * 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. 2021.  An image is worth 16x16 words: Transformers for image recognition at scale.  In _ICLR_. OpenReview.net.
  * Fang et al. (2021) Shancheng Fang, Hongtao Xie, Yuxin Wang, Zhendong Mao, and Yongdong Zhang. 2021\.  Read like humans: Autonomous, bidirectional and iterative language modeling for scene text recognition.  _2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)_ , pages 7094–7103.
  * Goyal et al. (2017) Yash Goyal, Tejas Khot, Douglas Summers-Stay, Dhruv Batra, and Devi Parikh. 2017\.  Making the V in VQA matter: Elevating the role of image understanding in visual question answering.  In _CVPR_ , pages 6325–6334. IEEE Computer Society.
  * Graves et al. (2006) Alex Graves, Santiago Fernández, Faustino Gomez, and Jürgen Schmidhuber. 2006.  Connectionist temporal classification: labelling unsegmented sequence data with recurrent neural networks.  In _Proceedings of the 23rd international conference on Machine learning_ , pages 369–376.
  * He et al. (2016) Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. 2016.  Deep residual learning for image recognition.  In _CVPR_ , pages 770–778. IEEE Computer Society.
  * He et al. (2018) Mengchao He, Yuliang Liu, Zhibo Yang, Sheng Zhang, Canjie Luo, Feiyu Gao, Qi Zheng, Yongpan Wang, Xin Zhang, and Lianwen Jin. 2018.  Icpr2018 contest on robust reading for multi-type web images.  _2018 24th International Conference on Pattern Recognition (ICPR)_ , pages 7–12.
  * Krishna et al. (2017) Ranjay Krishna, Yuke Zhu, Oliver Groth, Justin Johnson, Kenji Hata, Joshua Kravitz, Stephanie Chen, Yannis Kalantidis, Li-Jia Li, David A. Shamma, Michael S. Bernstein, and Li Fei-Fei. 2017.  Visual genome: Connecting language and vision using crowdsourced dense image annotations.  _Int. J. Comput. Vis._ , 123(1):32–73.
  * Li et al. (2019) Hui Li, Peng Wang, Chunhua Shen, and Guyu Zhang. 2019.  Show, attend and read: A simple and strong baseline for irregular text recognition.  In _AAAI_ , pages 8610–8617. AAAI Press.
  * Li et al. (2021) Minghao Li, Tengchao Lv, Lei Cui, Yijuan Lu, Dinei A. F. Florêncio, Cha Zhang, Zhoujun Li, and Furu Wei. 2021.  TrOCR: Transformer-based optical character recognition with pre-trained models.  _CoRR_ , abs/2109.10282.
  * Lin et al. (2021) Junyang Lin, Rui Men, An Yang, Chang Zhou, Ming Ding, Yichang Zhang, Peng Wang, Ang Wang, Le Jiang, Xianyan Jia, Jie Zhang, Jianwei Zhang, Xu Zou, Zhikang Li, Xiaodong Deng, Jie Liu, Jinbao Xue, Huiling Zhou, Jianxin Ma, Jin Yu, Yong Li, Wei Lin, Jingren Zhou, Jie Tang, and Hongxia Yang. 2021.  M6: A Chinese multimodal pretrainer.  _CoRR_ , abs/2103.00823.
  * Liu et al. (2019) Xi Liu, Rui Zhang, Yongsheng Zhou, Qianyi Jiang, Qi Song, Nan Li, Kai Zhou, Lei Wang, Dong Wang, Minghui Liao, Mingkun Yang, Xiang Bai, Baoguang Shi, Dimosthenis Karatzas, Shijian Lu, and C. V. Jawahar. 2019.  Icdar 2019 robust reading challenge on reading chinese text on signboard.  _2019 International Conference on Document Analysis and Recognition (ICDAR)_ , pages 1577–1581.
  * Loshchilov and Hutter (2019) Ilya Loshchilov and Frank Hutter. 2019.  Decoupled weight decay regularization.  In _ICLR 2019_.
  * Lu et al. (2019) Jiasen Lu, Dhruv Batra, Devi Parikh, and Stefan Lee. 2019.  Vilbert: Pretraining task-agnostic visiolinguistic representations for vision-and-language tasks.  In _Neural Information Processing Systems_.
  * Lu et al. (2022) Jiasen Lu, Christopher Clark, Rowan Zellers, Roozbeh Mottaghi, and Aniruddha Kembhavi. 2022.  Unified-io: A unified model for vision, language, and multi-modal tasks.  _arXiv preprint arXiv:2206.08916_.
  * Luo et al. (2019) Canjie Luo, Lianwen Jin, and Zenghui Sun. 2019.  MORAN: A multi-object rectified attention network for scene text recognition.  _Pattern Recognit._ , 90:109–118.
  * Lyu et al. (2022) Pengyuan Lyu, Chengquan Zhang, Shanshan Liu, Meina Qiao, Yangliu Xu, Liang Wu, Kun Yao, Junyu Han, Errui Ding, and Jingdong Wang. 2022.  MaskOCR: Text recognition with masked encoder-decoder pretraining.  _CoRR_ , abs/2206.00311.
  * Radford et al. (2021) Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever. 2021.  Learning transferable visual models from natural language supervision.  In _ICML_ , volume 139 of _Proceedings of Machine Learning Research_ , pages 8748–8763. PMLR.
  * Schuhmann et al. (2022) Christoph Schuhmann, Romain Beaumont, Richard Vencu, Cade Gordon, Ross Wightman, Mehdi Cherti, Theo Coombes, Aarush Katta, Clayton Mullis, Mitchell Wortsman, Patrick Schramowski, Srivatsa Kundurthy, Katherine Crowson, Ludwig Schmidt, Robert Kaczmarczyk, and Jenia Jitsev. 2022.  Laion-5b: An open large-scale dataset for training next generation image-text models.  _ArXiv_ , abs/2210.08402.
  * Shi et al. (2017a) Baoguang Shi, Xiang Bai, and Cong Yao. 2017a.  An end-to-end trainable neural network for image-based sequence recognition and its application to scene text recognition.  _IEEE Trans. Pattern Anal. Mach. Intell._ , 39(11):2298–2304.
  * Shi et al. (2019) Baoguang Shi, Mingkun Yang, Xinggang Wang, Pengyuan Lyu, Cong Yao, and Xiang Bai. 2019.  ASTER: An attentional scene text recognizer with flexible rectification.  _IEEE Trans. Pattern Anal. Mach. Intell._ , 41(9):2035–2048.
  * Shi et al. (2017b) Baoguang Shi, Cong Yao, Minghui Liao, Mingkun Yang, Pei Xu, Linyan Cui, Serge Belongie, Shijian Lu, and Xiang Bai. 2017b.  Icdar2017 competition on reading chinese text in the wild (rctw-17).  In _2017 14th iapr international conference on document analysis and recognition (ICDAR)_ , volume 1, pages 1429–1434. IEEE.
  * Sun et al. (2019) Yipeng Sun, Zihan Ni, Chee-Kheng Chng, Yuliang Liu, Canjie Luo, Chun Chet Ng, Junyu Han, Errui Ding, Jingtuo Liu, Dimosthenis Karatzas, Chee Seng Chan, and Lianwen Jin. 2019.  Icdar 2019 competition on large-scale street view text with partial labeling - rrc-lsvt.  _2019 International Conference on Document Analysis and Recognition (ICDAR)_ , pages 1557–1562.
  * Vaswani et al. (2017) Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017.  Attention is all you need.  In _NIPS_ , pages 5998–6008.
  * Wang et al. (2022a) Peng Wang, An Yang, Rui Men, Junyang Lin, Shuai Bai, Zhikang Li, Jianxin Ma, Chang Zhou, Jingren Zhou, and Hongxia Yang. 2022a.  OFA: Unifying architectures, tasks, and modalities through a simple sequence-to-sequence learning framework.  In _ICML_ , volume 162 of _Proceedings of Machine Learning Research_ , pages 23318–23340. PMLR.
  * Wang et al. (2022b) Wenhui Wang, Hangbo Bao, Li Dong, Johan Bjorck, Zhiliang Peng, Qiang Liu, Kriti Aggarwal, Owais Khan Mohammed, Saksham Singhal, Subhojit Som, and Furu Wei. 2022b.  Image as a foreign language: BEiT pretraining for all vision and vision-language tasks.  _CoRR_ , abs/2208.10442.
  * Wang et al. (2021) Zirui Wang, Jiahui Yu, Adams Wei Yu, Zihang Dai, Yulia Tsvetkov, and Yuan Cao. 2021\.  Simvlm: Simple visual language model pretraining with weak supervision.  _ArXiv_ , abs/2108.10904.
  * Yu et al. (2020) Deli Yu, Xuan Li, Chengquan Zhang, Tao Liu, Junyu Han, Jingtuo Liu, and Errui Ding. 2020.  Towards accurate scene text recognition with semantic reasoning networks.  In _CVPR_ , pages 12110–12119. Computer Vision Foundation / IEEE.
  * Yu et al. (2016) Licheng Yu, Patrick Poirson, Shan Yang, Alexander C. Berg, and Tamara L. Berg. 2016\.  Modeling context in referring expressions.  In _ECCV (2)_ , volume 9906 of _Lecture Notes in Computer Science_ , pages 69–85. Springer.
  * Yuan et al. (2019) Tailing Yuan, Zhe Zhu, Kun Xu, Cheng-Jun Li, Tai-Jiang Mu, and Shimin Hu. 2019.  A large chinese text dataset in the wild.  _Journal of Computer Science and Technology_ , 34:509–521.
  * Zhang et al. (2020) Hesuo Zhang, Lingyu Liang, and Lianwen Jin. 2020.  Scut-hccdoc: A new benchmark dataset of handwritten chinese text in unconstrained camera-captured documents.  _Pattern Recognit._ , 108:107559.
  * Zhang et al. (2022) Xinyun Zhang, Binwu Zhu, Xufeng Yao, Qi Sun, Ruiyu Li, and Bei Yu. 2022.  Context-based contrastive learning for scene text recognition.  In _AAAI_ , pages 3353–3361. AAAI Press.

##  Appendix A Appendix

###  A.1 Datasets

The Chinese text recognition benchmark consists of $4$ subtasks, which are
scene, web, document, and handwriting. The scene dataset consists of multiple
datasets, including RCTW (Shi et al., 2017b), ReCTS (Liu et al., 2019), LSVT
(Sun et al., 2019), ArT (Chng et al., 2019), and CTW (Yuan et al., 2019). It
consists of $509164$ samples for training, $63645$ for validation, and $63646$
for testing. The web dataset is derived from MTWI (He et al., 2018), and it
has $112471$ samples for training, $14059$ for validation, and $14059$ for
testing. The document dataset is constructed with synthetic data created with
Text Renderer444https://github.com/Sanster/text_renderer, and it has $400000$
samples for training, $50000$ for validation, and $50000$ for testing. The
handwriting dataset is collected from SCUT-HCCDoc (Zhang et al., 2020), and it
has $74603$ samples for training, $18651$ for validation, and $23389$ for
testing.

###  A.2 Evaluation

We calculate the ratio of exact match as the accuracy for the evaluation. For
the average score on the $4$ subtasks, we calculate the average score weighted
by the number of testing samples (Lyu et al., 2022).

###  A.3 Implementation Details

For single-task, multitask, and multitask + single-task finetuning, we
finetune the pretrained base-size and large-size OFA for $100$ epochs. We use
the AdamW (Loshchilov and Hutter, 2019) optimizer for training. For the base-
size model, the batch size is $256$ and the peak learning rate is
$5\text{\times}{10}^{-5}$, and for the large-size model, the batch size is
$512$ and the peak learning rate is $2\text{\times}{10}^{-5}$.

Here we provide more details about the preprocessing for images. The specified
resolution is $480\times 480$, and as the pretrained models were pretrained on
images of the resolution of $224\times 224$, we apply interpolation to the
positional embedding.

As to the data augmentation, we demonstrate the process with the pseudo code
below.

⬇

import torch

from torchvision.transforms import InterpolationMode

from torchvision.transforms import functional as F

def ocr_resize(img, resolution=480, is_document=False):

img = img.convert("RGB")

width, height = img.size

if width >= height:

new_width = max(64, resolution)

new_height = max(64, int(resolution * (height / width)))

top = random.randint(0, resolution - new_height)

bottom = resolution - new_height - top

left, right = 0, 0

else:

new_height = max(64, resolution)

new_width = max(64, int(resolution * (width / height)))

left = random.randint(0, resolution - new_width)

right = resolution - new_width - left

top, bottom = 0, 0

img_new = F.resize(

img,

[new_height, new_width],

interpolation=InterpolationMode.BICUBIC,

)

img_new = F.pad(img_new, padding=[left, top, right, bottom],
padding_mode="edge")

return img_new

###  A.4 Case Study

Figure 3: A Case study of different OCR demos. We compare a product-level API
(a) with OFA-OCR (b). Through the case study, we find that OFA-OCR can reach a
competitive performance.

Here we evaluate the performance of the constructed simple OCR pipeline. For
comparison, we use a product-level
API555https://www.paddlepaddle.org.cn/modelsDetail?modelId=17 as the baseline.
Figure 3 demonstrates the cases comparison. It can be found that on the $3$
cases while the baseline makes mistakes by different extents, OFA-OCR makes
the correct prediction of all characters, even if there are missing strokes or
the text is in hard-to-recognize handwriting style.