# TailorGAN: Making User-Defined Fashion Designs

Lele Chen† Justin Tian† Guo Li University of Rochester
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>Cheng-Haw Wu Erh-Kan King Kuan-Ting Chen Shao-Hang Hsieh Viscovery
<EMAIL_ADDRESS>Chenliang Xu University of
Rochester<EMAIL_ADDRESS>†equal contribution

###### Abstract

Attribute editing has become an important and emerging topic of computer
vision. In this paper, we consider a task: given a reference garment image A
and another image B with target attribute (collar/sleeve), generate a photo-
realistic image which combines the texture from reference A and the new
attribute from reference B. The highly convoluted attributes and the lack of
paired data are the main challenges to the task. To overcome those
limitations, we propose a novel self-supervised model to synthesize garment
images with disentangled attributes (_e.g_., collar and sleeves) without
paired data. Our method consists of a reconstruction learning step and an
adversarial learning step. The model learns texture and location information
through reconstruction learning. And, the model’s capability is generalized to
achieve single-attribute manipulation by adversarial learning. Meanwhile, we
compose a new dataset, named GarmentSet, with annotation of landmarks of
collars and sleeves on clean garment images. Extensive experiments on this
dataset and real-world samples demonstrate that our method can synthesize much
better results than the state-of-the-art methods in both quantitative and
qualitative comparisons.

##  1 Introduction

Deep generative techniques [9, 15] have led to highly successful image/video
generation, some focusing on style transfer [37], and others on the synthesis
of desired conditions [16, 25]. In this paper, we propose a novel schema to
disentangle attributes and synthesize high-quality images with the desired
attribute while keeping other attributes unchanged. Concretely, we focus on
the problem of fashion image attribute manipulation to demonstrate the
capability of our method. By our method, users can switch a specific part of
garments to the wanted designs (_e.g_., round collar to V-collar). The
objective is to synthesize a photo-realistic new fashion image by combining
different parts seamlessly together. Potential applications of such system
range from item retrieval to professional fashion design assistant. Fig. 1
shows our task and results.

Figure 1: Illustration of our task and results. Given a reference fashion
garment (on the left) and a desired design attribute (in the middle), we aim
to generate a new garment that seamlessly integrates the desired design
attribute to the reference image. The first row shows collar-editing, and the
second row shows sleeve-editing. Our results are shown on the right.

Recently, Generative Adversarial Networks (GANs) [9, 16, 25], image-to-image
translation [11], and CycleGAN [37] have proved their effectiveness in
generating photo-realistic images. However, image syntheses using such models
usually involve highly-entangled attributes and may fail in editing target-
specific attributes/objects [19, 30, 37]. Meanwhile, the large variance in the
garment textures causes additional problems. It is impossible to build a
dataset that is large enough to approximate the distribution of all garment
texture and design combinations, which serve as paired samples to train models
such as [25, 11]. Novel learning paradigm is expected to overcome this
difficulty.

To solve these challenges, we propose a novel self-supervised image generative
model, TailorGAN, that makes disentangled attribute manipulations. The model
exploits the latent space expression of input images without paired training
images. Image edge maps are used to isolate the structures from textures. By
using edge maps, we achieve good results with only a small amount of data. It
is also robust to a small amount of geometric misalignment between the
reference and design attribute images. The model is further generalized in a
GAN framework to achieve single-attribute manipulation using random fashion
inputs. Besides, an attribute-aware discriminator is weaved into the model to
guide the image editing. This attribute-aware discriminator helps in making
high-quality single attribute editing and guides a better self-supervised
learning process.

Current available fashion image datasets (_e.g_., DeepFashion [10]) mostly
consist of street photos with complex backgrounds or with user’s body parts
presented. That extra visual information may hinder the performance of an
image synthesis model. Thus, to simplify the training data and screen out
noisy backgrounds, we introduce a new dataset, GarmentSet. The new dataset
contains fashion images with no human user presented, and most images have
single-color backgrounds.

Contributions made in this paper can be summarized as:

  * •

We propose a new task in deep learning fashion studies. Instead of generating
images with text guidance, virtual try-on, or texture transferring, our task
is to make new fashion designs with disentangled user-appointed attributes.

  * •

We exploit a novel training schema consists of reconstruction learning and
adversarial learning. The self-supervised reconstruction learning guides the
network to learn shape, location information from the edge map, and texture
information from the RGB image. The unpaired adversarial learning gives the
network generalizability to synthesize images with new disentangled
attributes. Besides, we propose a novel attribute-aware discriminator, which
helps high-quality attribute editing by isolating the design structures from
the garment textures.

  * •

A new dataset, GarmentSet, is introduced to serve our attribute editing task.
Unlike existing fashion datasets in which most images illustrate the user’s
face or body parts with complicated backgrounds, GarmentSet filters out the
most redundant information and directly serves the fashion design purpose.

The rest of this paper is organized as follows: A brief review of related work
is presented in Sec. 2. The details of the proposed method are described in
Sec. 3. We introduce our new dataset in Sec. 4. Experimental details and
results are presented in Sec. 5. In Sec. 5.6, we further conduct ablation
studies to investigate the performances of our model explicitly. And finally,
Sec. 6 concludes the paper with discussions of limitations. Our code and data
are available at: https://www.cs.rochester.edu/~cxu22/r/tailorgan/.

##  2 Related Work

Generative Adversarial Network (GAN) [9] is one of the most popular deep
generative models and has shown impressive results in image synthesis studies,
like image editing [23, 29] and fine-grained objects generation [25, 14].
Researchers utilize different conditions to generate images with desired
properties. Existing works have explored various conditions, from category
labels [22], audio [6, 5], text [25], skeleton [20, 12, 36, 24] to attributes
[27]. There are a few studies that investigate the task of image translations
using cGAN [16, 25, 4]. In the context of fashion-related applications,
researchers apply cGAN in automated garment textures filling [32], texture
transferring [13], and virtual try-on [38, 31] by replacing dress on a person
with a new one. More related work is sequential attention GAN proposed by
Cheng _et al_. [7]. Their model uses text as the guidance and continuously
changes the fashion designs based on user’s requests, but the attribute
changes are highly entangled. In contrast to this work, we propose a new
training algorithm that combines self-supervised reconstruction learning with
adversarial learning to make disentangled attribute manipulations with user-
appointed images.

Figure 2: The network architecture of TailorGAN. The Geo-Transfer indicates
random rotations, translations, and scale shifts applied on the edge map. This
operation can make the trained model robust to different edge maps. The weight
inherit means the weights of $\Phi_{edge}$ and $G$ in adversarial step are
inherited from the reconstruction step. In the reconstruction step (the upper
part), we extract the edge feature (_e.g_. location and shape of the collar)
by $\Phi_{edge}$ and extract image feature (_e.g_. overall texture and design
of the garment) by $\Phi_{img}$. Then, we merge the two vectors in the latent
space and pass the resultant vector through image generator $G$ to output mask
and attention. In the adversarial training step (the lower part), we use
$\Phi_{edge}$ to extract features from the target-attribute edge map $E^{T}$,
which has a new collar. The attribute discriminator (Attr-$D$) outputs a
real/fake score and classifies the collar type of the newly-generated image
$\hat{I}^{T}$ yield by $G$.

Self-supervised generation is recently introduced as a novel and effective way
to train generative models without paired training data. Unpaired image-to-
image translation framework such as CycleGAN [37] removes pixel-level
supervision. In CycleGAN, the unpaired image to image translation is achieved
by enforcing a bi-directional translation between two domains with an
adversarial penalty on the translated image in the target domain. The CycleGAN
variants [35, 17] are moving towards the direction of unsupervised learning
approaches. However, CycleGAN-family models also create unexpected or even
unwanted results, which are shown in the experiment section. One reason for
such a phenomenon is due to the lack of straightforward knowledge of the
target translation domain in the circularity training process. Inherent
attributes of the source samples may be changed in a translation process. To
avoid such unwanted changes, we keep an image reconstruction penalty in our
image editing task.

Attracted by the huge profit potentials in the fashion industries, deep
learning methods have been conducted on fashion analysis and fashion image
synthesis. Most existing researches focus on fashion trend prediction [2],
clothing recognition with landmarks [10], clothing matching with fashion items
in street photos [18] and fashion recommendation system [3, 33]. Different
from those research lines, we focus on the fashion image synthesis task with
user-appointed attribute manipulations.

##  3 Methodology

This section presents the implementation details of our method. There are two
steps in the model training: (1) self-supervised reconstruction learning and
(2) generalized attribute manipulations using adversarial learning. The first
step helps the model fill correct texture for the user-appointed design
pattern. The second step helps the model generate high-quality images with
desired new attributes. Although we use collar translating example in Fig. 2,
we emphasize here that our model can be applied to other design patterns as
shown in experiments.

###  3.1 Learning to Manipulate Designs

Self-Supervised Learning Step. The motivation of formulating a self-supervised
model is that it is almost impossible to collect paired training images for a
fully supervised model. Using the collar editing task as an example, for each
image in a fully supervised training process, one needs to collect paired
images for each collar type. In these paired images, only the collar parts are
different while the other attributes, like body decoration, clothing texture,
etc., must stay unchanged and match with other paired images. Such data is
usually unavailable. Also, the dataset size increases exponentially when
multiple attribute annotations are needed for each image.

Therefore, we employ an encoder-decoder structure for the self-supervised
reconstruction training step. Given a masked garment image $I^{M}$ (mask out
the collar/sleeve part from the original garment image $I^{O}$) and edge map
$E^{O}$, our reconstruction step reconstructs the original garment image
(collar region). Intuitively, individual fashion designs may correlate with
clothing texture and other design factors. For instance, light pink color is
rarely used on men’s garments, and leather is usually used to make jackets,
etc. In our task, we want our model focus only on the design structure editing
rather than the clothing texture translating, which is inherited from the
reference garment image. Specifically, the self-supervised learning step is
defined as:

$\displaystyle\vspace{-2mm}\hat{I}^{R}=SAM(G(\Phi_{img}(I^{M})\oplus\Phi_{edge}(E^{O})),I^{M})\enspace,\vspace{-2mm}$
(1)

where $\Phi_{img}$ and $\Phi_{edge}$ are image encoder and edge encoder,
respectively. $\Phi_{img}$ and $\Phi_{edge}$ consist of several 2D convolution
layers and residual blocks. $G$ is the image decoder/generator, which consists
of several 2D transpose-convolution layers. $\oplus$ is channel-wise
concatenation. After encoding, we feed the concatenated latent vector to $G$
to output attention mask $\bf m$ and new pixel $\bf C$ . The SAM block (see
Eq. 3) outputs the reconstructed image $\hat{I}^{R}$ based on $\bf m$, $\bf C$
and $I^{M}$. This learning step learns how to reconstruct $I^{O}$ according to
the texture feature from $I^{M}$ and shape feature from $E^{O}$.

Different from other methods [6, 5], we only use pixel-wise loss here to
supervise the reconstruction step. Specifically, the loss function for this
training step is defined as:

$\displaystyle\vspace{-4mm}\mathcal{L}_{R}(\hat{I}^{R},I^{O})=||I^{O}-\hat{I}^{R}||_{1}\enspace.\vspace{-4mm}$
(2)

From the reconstruction, the network learns to fill the garment texture and
locate the desired design to output the original unmasked image $I^{O}$. We
empirically find that this learning step is critical to the full model
performance. During the training, we apply random rotations, translations, and
scale shifts to the input edge maps. Thus, the model is trained to handle
potential geometric misalignment and can locate the desired fashion pattern at
the correct position.

Self-Attention Mask Operation (SAM). During the reconstruction step, the model
should learn to change only the target part and keep the rest of an image
untouched. Thus, we introduce a self-attention mask to the generator. The
self-attention mechanism can guide the model to focus on the target region.
Concretely, the decoder/generator $G$ produces two outputs: single-channel
self-attention mask $\bf m$ and new pixel image $\bf C$. The final output
combines the masked color image with the input cropped image $I^{M}$:

$\hat{I}^{R}_{i,j}={\bf{m}}_{i,j}\times{\bf{C}}_{i,j}+(1-{\bf{m}}_{i,j})\times
I^{M}_{i,j}\enspace,$ (3)

where ${\bf{m}}_{i,j}$, ${\bf{C}}_{i,j}$ and $\hat{I}^{R}_{i,j}$ are the
pixels at $i^{th}$ row and $j^{th}$ column in the self-attention mask, the new
pixel image, and the final output image. The self-attention mask layer and the
color layer share the bottom transpose convolutional blocks in the decoder.
The output of the last transpose convolutional layer is fed into two
activation layers: a Sigmoid layer with a single-channel output (self-
attention mask) and a hyperbolic tangent layer with three-channel output (the
new pixel image). The self-attention mask guides the network to focus on the
attribute-related region while training the network in a fully self-supervised
manner.

Figure 3: Samples of each collar type and sleeve type from GarmentSet dataset.
The pie charts demonstrate the collar type and sleeve type distributions.
There are in total 12 collar types and 2 sleeve types.

###  3.2 Generalized Single Attribute Manipulations

We have introduced the self-supervised reconstruction learning in Sec. 3.1,
which can reconstruct the original image. However, our task is to synthesize
new images by manipulating the attributes. The model trained with the
reconstruction step could not yield good results since it is not generalized
to synthesize a new image with other new attributes (_e.g_., new collar type,
and new sleeve type). Meanwhile, the synthesized image with the reconstruction
step is blurry, which makes the results unrealistic. To tackle those problems,
we have another adversarial learning step, which inherits the encoder-decoder
network from the reconstruction step and applies a novel attribute-aware
discriminator.

Perceptual Loss. To improve the image quality and preserve the overall texture
of the original garment image $I^{O}$, we use VGG perceptual loss:

$\displaystyle\vspace{-4mm}\mathcal{L}_{\textit{VGG}}(\hat{I}^{T},I^{O})=||\phi(I^{O})-\phi(\hat{I}^{T})||_{1}\enspace,\vspace{-4mm}$
(4)

where $\phi$ is a VGG-19 [28] feature extractor pre-trained on ImageNet [8].

Attribute-Aware Losses. To enforce the model to output image with correct
attributes, we propose a discriminator with two different regressions: a
binary (real/fake) label and an attribute prediction vector. The attribute
prediction is optimized by cross-entropy loss, which is defined as:

$\displaystyle\mathcal{L}_{ATT}(I,\vec{V})$ $\displaystyle=-\vec{V}*log(f(I))$
$\displaystyle-(1-\vec{V})*log(1-f(I))\enspace,$ (5)

where $\vec{V}$ denotes the one-hot vector of the target attribute type and
${f}$ is an attribute classifier that outputs the class label vector of image
$I$. During the adversarial training, when we forward $I^{O}$ and its
corresponding $\vec{V}^{O}$ to the discriminator, the discriminator’s
parameters are updated to learn how to classify the attributes; when we
forward $\hat{I}^{T}$ and the desired target $\vec{V}^{T}$ to the
discriminator, we do not update the discriminator’s parameters, but update the
generator’s parameters.

By predicting the attribute type, ideally, the discriminator should focus on
the replaced design region. Therefore, we introduce an additional feature-
level distance measure between $\hat{I}^{T}$ and $I^{T}$ to further improve
the image quality at the perception-level:

$\displaystyle\vspace{-4mm}\mathcal{L}_{\textit{CNT}}(\hat{I}^{T},I^{T})=||D_{conv}(I^{T})-D_{conv}(\hat{I}^{T})||_{1},\vspace{-4mm}$
(6)

where $D_{conv}$ denotes the feature output from the convolution layers of the
discriminator.

By combining the losses above, the full loss to train the generator can be
formulated as:

$\displaystyle\mathcal{L}_{\text{G}}$
$\displaystyle=(1-{\text{D}}({\text{G}}(E^{T},I^{M}))^{2}+\mathcal{L}_{CNT}(\hat{I}^{T},I^{T})$
$\displaystyle+\lambda_{1}*\mathcal{L}_{ATT}(\hat{I}^{T},\vec{V}^{T})+\lambda_{2}*\mathcal{L}_{VGG}(\hat{I}^{T},I^{O})\enspace,$
(7)

where $\lambda_{1}$ and $\lambda_{2}$ are hyper-parameters to balance the loss
terms. We set $\lambda_{1}=0.1$, $\lambda_{2}=2.5$ in all experiments. In our
empirical study, we observe that the model is sensitive to $\lambda_{2}$ and
we need to choose different $\lambda_{2}$ if we use different VGG layer
features to compute the perceptual loss. Similarly, the full loss to train the
discriminator is:

$\displaystyle\mathcal{L}_{\text{D}}$
$\displaystyle=\frac{1}{2}[{\text{D}}({\text{G}}(E^{T},I^{M}))^{2}+({\text{D}}(I^{O})-1)^{2}]$
$\displaystyle+\mathcal{L}_{ATT}(I^{O},\vec{V}^{O})\enspace.$ (8)

###  3.3 Training Algorithm

Algorithm 1 Training steps

Input: learning rate $\alpha$, batch size B

Output: generator parameter $\theta_{G}$ , discriminator parameter
$\theta_{D}$

for number of iterations do

Sample $\\{I^{O}_{i}\\}_{i=1}^{B}$

Extract edge maps and masked-out images $\\{E^{O}_{i},I^{M}_{i}\\}_{i=1}^{B}$

$\\{\hat{I}^{R}_{i}\\}^{B}_{i=1}\leftarrow
G_{\theta}(\\{E_{i}^{O},I^{M}_{i}\\}^{B}_{i=1})$

Update the generator G in the reconstruction step:

$\theta_{G}\leftarrow
Adam\\{\frac{1}{B}\sum_{i=1}^{B}\nabla_{\theta_{G}}\mathcal{L}_{R}(\hat{I}_{i}^{R},I_{i}^{O}),\alpha\\}$

for number of iterations do

Sample $\\{I^{O}_{i},\vec{V}^{O}_{i},I^{T}_{i},\vec{V}^{T}_{i}\\}_{i=1}^{B}$

Extract edge maps and masked-out images $\\{E^{T}_{i},I^{M}_{i}\\}_{i=1}^{B}$

$\\{\hat{I}^{T}_{i}\\}^{B}_{i=1}\leftarrow
G_{\theta}(\\{E_{i}^{T},I_{i}^{M}\\}^{B}_{i=1})$

Update the discriminator D in the adversarial step:

${\theta_{D}}\leftarrow
Adam\\{\frac{1}{B}\sum_{i=1}^{B}\nabla_{\theta_{D}}\mathcal{L}_{{D}}(\hat{I}_{i}^{T},I_{i}^{O},\vec{V}^{O}_{i}),\alpha\\}$

Update the generator G in the adversarial step:

$\theta_{G}\leftarrow
Adam\\{\frac{1}{B}\sum_{i=1}^{B}\nabla_{\theta_{G}}\mathcal{L}_{G}(\hat{I}^{T}_{i},I^{T}_{i},\vec{V}^{T}_{i},I^{O}_{i}),\alpha\\}$

Combining the self-supervised reconstruction learning step (Sec. 3.1) with the
adversarial learning step (Sec. 3.2), our full model is trained in two
separate training loops. Specifically, we formulate the training algorithm in
Algorithm 1. When training the generator G in the reconstruction step without
discriminator D, the generator G receives a masked image $I^{M}$ and its
original edge map $E^{O}$ as input, and it outputs the reconstructed image
$\hat{I}^{R}$. We try to minimize the reconstruction loss $\mathcal{L}_{R}$ to
enforce the network to learn to generate correct texture based on design
sketch and fit to other parts. When training the discriminator D in the
adversarial step, the generator G receives masked image $I^{M}$ and the edge
map $E^{T}$ of a new attribute type as input, and it outputs the edited image
$\hat{I}^{T}$. We try to minimize the generator loss $\mathcal{L}_{G}$, since
there is no paired ground truth in this step. It enforces the network to learn
to synthesize images by manipulating the target attribute type $E^{T}$. Then
we update parameters in generator G in the adversarial step by minimizing the
discriminator loss $\mathcal{L}_{D}$. By optimizing the loss in reconstruction
and adversarial steps, the TailorGAN can learn realistic texture and geometry
information to yield high-quality images with user-appointed attribute type.

Type |  Type 1 $\Rightarrow$ Type 2 |  Type 2 $\Rightarrow$ Type 1 |  Type 1 $\Rightarrow$ Type 6 |  Type 6 $\Rightarrow$ Type 1 |  Type 2 $\Rightarrow$ Type 6 |  Type 6 $\Rightarrow$ Type 2
---|---|---|---|---|---|---
|  C.E. |  SSIM |  PSNR |  C.E. |  SSIM |  PSNR |  C.E. |  SSIM |  PSNR |  C.E. |  SSIM |  PSNR |  C.E. |  SSIM |  PSNR |  C.E. |  SSIM |  PSNR
CycleGAN |  12.48 |  0.77 |  18.72 |  1.74 |  0.64 |  13.97 |  5.21 |  0.74 |  23.40 |  2.97 |  0.78 |  18.77 |  6.02 |  0.89 |  18.89 |  10.02 |  0.77 |  17.63
Pix2pix |  20.01 |  0.87 |  22.75 |  12.73 |  0.89 |  21.42 |  21.62 |  0.88 |  17.63 |  15.79 |  0.89 |  21.88 |  15.12 |  0.77 |  23.15 |  19.67 |  0.88 |  23.04
Ours |  9.17 |  0.89 |  23.53 |  3.70 |  0.89 |  23.75 |  6.29 |  0.90 |  23.92 |  3.25 |  0.90 |  22.47 |  5.62 |  0.89 |  23.08 |  8.13 |  0.90 |  22.24
Table 1: Measurements for all three models based on target translating types
on the testing set. C.E. stands for the average classification error score for
each paired type translation. The bold numbers in each column are the best
scores.

##  4 GarmentSet dataset

This part serves as a brief introduction to GarmentSet dataset. Current
available datasets like DeepFashion [10] and FashionGen [26] mostly consist of
images including the user’s face or body parts and street photos with noisy
backgrounds. The redundant information raises unwanted hardness in the
training process. To filter out such redundant information in the images, we
build a new dataset: GarmentSet. In this dataset, we have 9636 images with
collar part annotations and 8616 images with shoulder and sleeve annotations.
Both classification types and landmarks are annotated. Although in our
studies, the landmark locations are only used in the image pre-processing
steps, they still can be useful in future researches like fashion item
retrieve, clothing recognition, etc.

In Fig. 3, we present sampled pictures for each collar type, each sleeve type,
and the overall data distributions in the dataset. Round collar, V-collar, and
lapel images together contribute over eighty percent of the total collar-
annotation images. The sleeve dataset only contains two types: short and long
sleeves. Although not used in training, the dataset also contains attribute
landmark locations, including collars, shoulders, and sleeve ends.

##  5 Experiments

###  5.1 Data Pre-processing

In this paper, we randomly sample $80\%$ data for training and $20\%$ for
testing. Meanwhile, in Sec. 5.3, we keep one collar type out in the training
set to demonstrate the robustness of our model. In the data pre-processing
step, we generate masked-out images $I^{M}$ and edge maps. We use the
left/right collar landmarks to make a bounding box around the collar region.
The holistically-nested edge detection (HED) model [34] takes charge of making
edge maps, which is pre-trained on the BSDS dataset [21].

We notice that the image quality of the edited results depends on the input
edge map resolution. Since the HED model used is pre-trained on a general
image dataset, it struggles in catching structural details and may also
generate unwanted noise maps. The HED model produces low-resolution edge maps
for a target image with complicated, detailed structures.

###  5.2 Comparative Studies

Figure 4: Testing results of collar editing. The images are clustered based on
the target collar types. The generated results of simple collar patterns
(round and V-collar) are, in general, better than complicated ones (lapel). We
train CycleGAN, pix2pix models separately for each specific transformation.

We compare our model with CycleGAN [37] and pix2pix [11]. To compare with
[37], we have trained three different CycleGAN models: collar type 1 (round
collar) $\Leftrightarrow$ type 2 (V-collar), collar type 1 (round collar)
$\Leftrightarrow$ type 6 (lapel) and collar type 2 $\Leftrightarrow$ type 6.
However, our model is trained with all different types together. The results
are shown in Tab. 1. Furthermore, in Tab. 2, we compare our model with pix2pix
using random collar types. Since one CycleGAN model cannot handle translation
between any two collar types, we drop it in this random translating comparison
test.

Qualitative results. In Fig. 4, we present testing results of three models. As
one can see in the sampled images, CycleGAN does not preserve garment
textures. The trained pix2pix model performs poorly in most examples. For the
collar part, the pix2pix outputs only show color bulks with no structural
patterns.

Quantitative results. For the quantitative comparisons, in measuring model
performances, we use three metrics: classification errors (C.E.), structure
similarity index (SSIM), and peak signal to noise ratio (PSNR). The
classification error is measured with a classifier pretrained on GarmentSet
dataset. The classification error measures the distance from the target collar
designs. The SSIM and the PSNR scores are derived from the differences between
the original image and the edited image. From the numerical results presented
in Tab. 1 and Tab. 2, our model outperforms both CycleGAN and pix2pix in
making high-quality images with higher classification accuracy. We attribute
this to the poor texture/structure preserving of the CycleGAN/pix2pix model.

| C.E. | SSIM | PSNR
---|---|---|---
Our model | 5.78 | 0.8921 | 23.36
pix2pix | 16.12 | 0.8783 | 22.83

Table 2: Testing results of TailorGAN and pix2pix trained on all collar type
inputs.

###  5.3 Synthesizing Unseen Collar Type

To test our model’s capability of processing collar types that are missing in
the dataset, we take one collar type out in the training stage and test the
model’s performance on this unseen collar type. In this test, we take collar
type 1, 2, and 6 out. We also test the leave-one-out model with a fully
trained model that meets all collar types in its training process. The
classification errors for each pair of models are calculated for each taken-
out collar type in the testing set. The qualitative results are shown in Fig.
5

C. E. | type 1 out | type 2 out | type 6 out
---|---|---|---
full model | 3.48 | 7.41 | 5.27
one-out model | 4.74 | 8.59 | 5.34

Table 3: The one-out model V.S. the fully trained model. Figure 5: Testing
results of the unseen target collar type. The left side indicates which type
we are generating (remove this type in training set). The $1^{th},4^{th}$
columns are the original reference images. The $2^{th},5^{th}$ columns are
images with target collar types. The $3^{th},6^{th}$ columns are generated
images with target collar types with texture/style of reference image.

Based on the qualitative analysis and quantitative comparisons (see Tab. 3),
our model shows a strong generalization ability in synthesizing unseen collar
types.

###  5.4 Sleeve Generation

In the previous discussions, we applied our model in collar part editing.
GarmentSet dataset also contains sleeve landmarks and types information. Thus,
we test our model’s capability in editing sleeves and present testing results
in Fig. 6. We use the same training scheme. Instead of collars, the sleeve
parts are masked out. Due to simpler edge structures and better resolutions in
the edge maps, the edited sleeve images have better image qualities and are
close to the real images. We discuss more details of sleeve editing results in
the user evaluation section.

Figure 6: Testing results of editing sleeves using TailorGAN. The
$1^{th},4^{th}$ columns are the original reference images. The $2^{th},5^{th}$
columns are images with target sleeve types. The $3^{th},6^{th}$ columns are
generated images with target sleeve types with texture/style of reference
image.

###  5.5 User Evaluations and Item Retrieves

To evaluate the performance in a human perceptive level, we conduct thoughtful
user studies in this section. Human subjects evaluation (see Fig. 7) is
conducted to investigate the image quality and the attribute (collar)
similarity of our generated results compared with [37, 11]. Here, we present
the average scores for each model based on twenty users’ evaluations. The
maximum score is ten. As shown in Fig. 7, our model receives the best scores
in both image quality and similarity evaluations.

Figure 7: Average user evaluation scores based on image quality and target
part similarity. The part similarity is based on users’ scores on the edited
part structure similarity between the edited image and the target image.

We also collected users’ feedback to the sleeve changing results, and the
feedback shows that users can hardly distinguish real/fake between our
generated images and the real images. Sleeve tests only evaluate image
quality. In each test case, there are two pictures: (1) the original picture
and (2) the edited picture. Users decide scores ranging from zero to ten to
both pictures based on the image quality. Translating from short to long
sleeves is, in general, a harder task due to auto-texture filling and
background changing. Users may find that it is harder to distinguish the real
images from the edited ones for short sleeve garments. Those observations are
reflected in the evaluation scores in Fig. 8.

Figure 8: User feedback to sleeve editing results.

To prove that TailorGAN can be useful in image item retrieves, we upload the
edited images to a searching-based website [1] and show top search results in
Fig. 9.

Figure 9: Top 5 matching items from [1]. The first column (green box) are
generated images and the rest of the column (yellow) are retrieved images
based on the generated images from [1].

###  5.6 Ablation Studies

In this section, we want to clarify our choices of two separate training steps
are crucial to generating photo-realistic results. As we argued, to
disentangle the texture and the design structure meanwhile keep the rest
similar, the model needs to have the ability to reconstruct. Also, using two
separate training steps makes sharper results. Tab. 4 shows that without using
the reconstruction training step produces blurry images. Similarly, feeding
RGB reference images as input instead of gray-scale edge images, the model
produces blurry collars since the lack of clear geometric edge information.
For qualitative analysis, We plot testing results of RGB inputs and results of
only using adversarial training step and compare those changes with our full
model.

Figure 10: Results of full model, without reconstruction step (w/o
reconstruction step) and using RGB pictures (w/o $E^{T}$) as inputs instead of
edge maps.

Fig. 10 shows edited image results of our current model versus w/o
reconstruction and w/o edge maps. The model w/o reconstruction does not
prioritize high-frequency details and tends to average the pixel values in the
editing region. On the other hand, using RGB images as inputs, the results
show unexpected effects. The RGB-input includes extra structures that are not
related to the target images or original images. We hypothesize that those
unexpected structures are from the texture-design entanglement. We measure the
classification error, SSIM, and PSNR for three variants. Since the major part
of the image is left untouched in the result, the leading score may not be
impressive in numbers. But, through the qualitative analysis, we can confirm
that our current model can generate high-quality images with more details
preserved.

| C.E. | SSIM | PSNR
---|---|---|---
Full model | 5.78 | 0.8921 | 23.36
w/o reconstruction step | 6.34 | 0.7706 | 19.46
w/o edge input | 7.21 | 0.8782 | 21.58

Table 4: Our final model versus two variants on the testing set. w/o
reconstruction step represents we use only adversarial training step rather
than two steps. w/o edge input indicates that we use RGB images as input
rather than grey-scale edge maps.

##  6 Conclusion

In this paper, we introduce a novel task to the deep learning fashion field.
We investigate the problem of doing image editing to a fashion item with user-
defined attribute manipulation. Methods developed under this task can be
useful in real world applications such as novel garment retrieval and
assistant to designers. We propose a novel training schema that can manipulate
a single attribute to an arbitrary fashion image. To serve a better model
training, we collect our own GarmentSet dataset. Our model outperforms the
baseline models and successfully generates photo-realistic images with desired
attribute manipulation.

Acknowledgement. This work was partly supported by a research gift from
Viscovery.

## References

  * [1] taobao.com.  taobao.com.  Accessed: 2019-12-29.
  * [2] Z. Al-Halah, R. Stiefelhagen, and K. Grauman.  Fashion forward: Forecasting visual style in fashion.  In Proceedings of the IEEE International Conference on Computer Vision, pages 388–397, 2017.
  * [3] H. Chen, A. Gallagher, and B. Girod.  Describing clothing by semantic attributes.  In European conference on computer vision, pages 609–623. Springer, 2012.
  * [4] L. Chen, Z. Li, R. K Maddox, Z. Duan, and C. Xu.  Lip movements generation at a glance.  In Proceedings of the European Conference on Computer Vision (ECCV), pages 520–535, 2018.
  * [5] L. Chen, R. K. Maddox, Z. Duan, and C. Xu.  Hierarchical cross-modal talking face generation with dynamic pixel-wise loss.  In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7832–7841, 2019.
  * [6] L. Chen, S. Srivastava, Z. Duan, and C. Xu.  Deep cross-modal audio-visual generation.  In Proceedings of the on Thematic Workshops of ACM Multimedia 2017, pages 349–357. ACM, 2017.
  * [7] Y. Cheng, Z. Gan, Y. Li, J. Liu, and J. Gao.  Sequential attention gan for interactive image editing via dialogue.  arXiv preprint arXiv:1812.08352, 2018.
  * [8] J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei.  Imagenet: A large-scale hierarchical image database.  In 2009 IEEE conference on computer vision and pattern recognition, pages 248–255. Ieee, 2009.
  * [9] I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio.  Generative adversarial nets.  In Advances in neural information processing systems, pages 2672–2680, 2014.
  * [10] M. Hadi Kiapour, X. Han, S. Lazebnik, A. C. Berg, and T. L. Berg.  Where to buy it: Matching street clothing photos in online shops.  In Proceedings of the IEEE international conference on computer vision, pages 3343–3351, 2015.
  * [11] P. Isola, J.-Y. Zhu, T. Zhou, and A. A. Efros.  Image-to-image translation with conditional adversarial networks.  In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1125–1134, 2017.
  * [12] N. Jetchev and U. Bergmann.  The conditional analogy gan: Swapping fashion articles on people images.  In Proceedings of the IEEE International Conference on Computer Vision, pages 2287–2292, 2017.
  * [13] S. Jiang and Y. fu.  Fashion style generator.  IJCAI, 2017.
  * [14] N. Kato, H. Osone, K. Oomori, C. W. Ooi, and Y. Ochiai.  Gans-based clothes design: Pattern maker is all you need to design clothing.  In Proceedings of the 10th Augmented Human International Conference 2019, page 21. ACM, 2019.
  * [15] D. P. Kingma and M. Welling.  Auto-encoding variational bayes.  arXiv preprint arXiv:1312.6114, 2013.
  * [16] C. Lassner, G. Pons-Moll, and P. V. Gehler.  A generative model of people in clothing.  In Proceedings of the IEEE International Conference on Computer Vision, pages 853–862, 2017.
  * [17] M. Li, H. Huang, L. Ma, W. Liu, T. Zhang, and Y. Jiang.  Unsupervised image-to-image translation with stacked cycle-consistent adversarial networks.  In Proceedings of the European Conference on Computer Vision (ECCV), pages 184–199, 2018.
  * [18] S. Liu, Z. Song, G. Liu, C. Xu, H. Lu, and S. Yan.  Street-to-shop: Cross-scenario clothing retrieval via parts alignment and auxiliary set.  In 2012 IEEE Conference on Computer Vision and Pattern Recognition, pages 3330–3337. IEEE, 2012.
  * [19] Y. Lu, Y.-W. Tai, and C.-K. Tang.  Attribute-guided face generation using conditional cyclegan.  In Proceedings of the European Conference on Computer Vision (ECCV), pages 282–297, 2018.
  * [20] L. Ma, X. Jia, Q. Sun, B. Schiele, T. Tuytelaars, and L. Van Gool.  Pose guided person image generation.  In Advances in Neural Information Processing Systems, pages 406–416, 2017.
  * [21] D. Martin, C. Fowlkes, D. Tal, and J. Malik.  A database of human segmented natural images and its application to evaluating segmentation algorithms and measuring ecological statistics.  In Proc. 8th Int’l Conf. Computer Vision, volume 2, pages 416–423, July 2001.
  * [22] A. Nguyen, A. Dosovitskiy, J. Yosinski, T. Brox, and J. Clune.  Synthesizing the preferred inputs for neurons in neural networks via deep generator networks.  In Advances in Neural Information Processing Systems, pages 3387–3395, 2016.
  * [23] A. Radford, L. Metz, and S. Chintala.  Unsupervised representation learning with deep convolutional generative adversarial networks.  arXiv preprint arXiv:1511.06434, 2015.
  * [24] A. Raj, P. Sangkloy, H. Chang, J. Lu, D. Ceylan, and J. Hays.  Swapnet: Garment transfer in single view images.  In Proceedings of the European Conference on Computer Vision (ECCV), pages 666–682, 2018.
  * [25] S. Reed, Z. Akata, X. Yan, L. Logeswaran, B. Schiele, and H. Lee.  Generative adversarial text to image synthesis.  arXiv preprint arXiv:1605.05396, 2016.
  * [26] N. Rostamzadeh, S. Hosseini, T. Boquet, W. Stokowiec, Y. Zhang, C. Jauvin, and C. Pal.  Fashion-gen: The generative fashion dataset and challenge.  arXiv preprint arXiv:1806.08317, 2018.
  * [27] W. Shen and R. Liu.  Learning residual images for face attribute manipulation.  In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4030–4038, 2017.
  * [28] K. Simonyan and A. Zisserman.  Very deep convolutional networks for large-scale image recognition.  arXiv preprint arXiv:1409.1556, 2014.
  * [29] X. Wang and A. Gupta.  Generative image modeling using style and structure adversarial networks.  In European Conference on Computer Vision, pages 318–335. Springer, 2016.
  * [30] Z. Wang, X. Tang, W. Luo, and S. Gao.  Face aging with identity-preserved conditional generative adversarial networks.  In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7939–7947, 2018.
  * [31] R. Y. X. Han, Z. Wu and L. S. Davis.  Viton: an image based virtual try-on network.  CVPR, 2018.
  * [32] W. Xian, P. Sangkloy, V. Agrawal, A. Raj, J. Lu, C. Fang, F. Yu, and J. Hays.  Texturegan: Controlling deep image synthesis with texture patches.  In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8456–8465, 2018.
  * [33] T. Xiao, T. Xia, Y. Yang, C. Huang, and X. Wang.  Learning from massive noisy labeled data for image classification.  In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2691–2699, 2015.
  * [34] S. Xie and Z. Tu.  Holistically-nested edge detection.  In Proceedings of the IEEE international conference on computer vision, pages 1395–1403, 2015.
  * [35] Y. Yuan, S. Liu, J. Zhang, Y. Zhang, C. Dong, and L. Lin.  Unsupervised image super-resolution using cycle-in-cycle generative adversarial networks.  In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 701–710, 2018.
  * [36] B. Zhao, X. Wu, Z.-Q. Cheng, H. Liu, Z. Jie, and J. Feng.  Multi-view image generation from a single-view.  In 2018 ACM Multimedia Conference on Multimedia Conference, pages 383–391. ACM, 2018.
  * [37] J.-Y. Zhu, T. Park, P. Isola, and A. A. Efros.  Unpaired image-to-image translation using cycle-consistent adversarial networks.  In Proceedings of the IEEE international conference on computer vision, pages 2223–2232, 2017.
  * [38] S. Zhu, R. Urtasun, S. Fidler, D. Lin, and C. Change Loy.  Be your own prada: Fashion synthesis with structural coherence.  In Proceedings of the IEEE International Conference on Computer Vision, pages 1680–1688, 2017.


# The $T$-adic Galois representation is surjective for a positive density of
Drinfeld modules

Anwesh Ray  Chennai Mathematical Institute, H1, SIPCOT IT Park, Kelambakkam,
Siruseri, Tamil Nadu 603103, India<EMAIL_ADDRESS>
###### Abstract.

Let $\mathbb{F}_{q}$ be the finite field with $q\geq 5$ elements,
$A\mathrel{\mathop{\mathchar 58\relax}}=\mathbb{F}_{q}[T]$ and
$F\mathrel{\mathop{\mathchar 58\relax}}=\mathbb{F}_{q}(T)$. Assume that $q$ is
odd and take $|\cdot|$ to be the absolute value at $\infty$ that is normalized
by $|T|=q$. Given a pair $w=(g_{1},g_{2})\in A^{2}$ with $g_{2}\neq 0$,
consider the associated Drinfeld module $\phi^{w}\mathrel{\mathop{\mathchar
58\relax}}A\rightarrow A\\{\tau\\}$ of rank $2$ defined by
$\phi_{T}^{w}=T+g_{1}\tau+g_{2}\tau^{2}$. Fix integers $c_{1},c_{2}\geq 1$ and
define $|w|\mathrel{\mathop{\mathchar
58\relax}}=\operatorname{max}\\{|g_{1}|^{\frac{1}{c_{1}}},|g_{2}|^{\frac{1}{c_{2}}}\\}$.
I show that when ordered by height, there is a positive density of pairs
$w=(g_{1},g_{2})$, such that the $T$-adic Galois representation attached to
$\phi^{w}$ is surjective.

###### Key words and phrases:

Galois representations, Drinfeld modules, function fields in postive
characteristic, density results

###### 2020 Mathematics Subject Classification:

11F80, 11G09, 11R45

##  1\. Introduction

###  1.1. Background and motivation

Given an elliptic curve $E$ over $\mathbb{Q}$, and a prime natural number
$n>1$, there is a Galois representation

$\rho_{E,n}\mathrel{\mathop{\mathchar
58\relax}}\operatorname{Gal}(\bar{\mathbb{Q}}/\mathbb{Q})\rightarrow\operatorname{GL}_{2}(\mathbb{Z}/n\mathbb{Z})$

on the $n$-torsion of $E(\bar{\mathbb{Q}})$. Moreover, given a prime $p$, the
$p$-adic Tate-module $T_{p}(E)\mathrel{\mathop{\mathchar
58\relax}}=\varprojlim_{n}E[p^{n}]$ admits a natural Galois action, which is
encoded by the representation

$\hat{\rho}_{E,p}\mathrel{\mathop{\mathchar
58\relax}}\operatorname{Gal}(\bar{\mathbb{Q}}/\mathbb{Q})\rightarrow\operatorname{GL}_{2}(\mathbb{Z}_{p}).$

Passing to the inverse limit of $\rho_{E,n}$, one obtains the _adelic Galois
representation_

$\hat{\rho}_{E}\mathrel{\mathop{\mathchar
58\relax}}\operatorname{Gal}(\bar{\mathbb{Q}}/\mathbb{Q})\rightarrow\operatorname{GL}_{2}(\widehat{\mathbb{Z}})\xrightarrow{\sim}\prod_{p}\operatorname{GL}_{2}(\mathbb{Z}_{p}),$

which can also be identified with the product $\prod_{p}\hat{\rho}_{E,p}$. The
celebrated _open image theorem_ of Serre [Ser72] asserts that if $E$ does not
have complex multiplication, then the image of $\hat{\rho}_{E}$ has finite
index in $\operatorname{GL}_{2}(\widehat{\mathbb{Z}})$. In particular, this
means that for all but finitely many primes $p$, the
$\rho_{E,p}\mathrel{\mathop{\mathchar
58\relax}}\operatorname{Gal}(\bar{\mathbb{Q}}/\mathbb{Q})\rightarrow\operatorname{GL}_{2}(\mathbb{Z}/p\mathbb{Z})$
is surjective. A prime $p$ is said to be _exceptional_ if $\rho_{E,p}$ is not
surjective. Duke [Duk97] showed that almost all elliptic curves have no
exceptional primes (when ordered according to height). An elliptic curve
$E_{/\mathbb{Q}}$ is said to be a _Serre curve_ if the index of
$\hat{\rho}_{E}$ in $\operatorname{GL}_{2}(\widehat{\mathbb{Z}})$ is equal to
$2$. This is the minimal possible index, and Jones [Jon10] showed that almost
all elliptic curves are Serre curves. Generalized results have been obtained
for principally polarized abelian varieties over a rational base, cf.
[LSTX19].

In this article I explore natural analogues of such questions for Drinfeld
modules of rank $2$. These arithmetic objects are natural function field
analogues of elliptic curves, and they give rise to compatible families of
Galois representations. Drinfeld modules (and their generalizations) have come
to prominence for their central role in the Langlands program over function
fields. Let $q$ be a power of a prime number and $F$ be the rational function
field $\mathbb{F}_{q}(T)$. Let $F^{\operatorname{sep}}$ be a choice of
separable closure of $F$. Take $A$ to be the polynomial ring
$\mathbb{F}_{q}[T]$. Take $\widehat{A}\mathrel{\mathop{\mathchar
58\relax}}=\varprojlim_{\mathfrak{a}}A/\mathfrak{a}$, where $\mathfrak{a}$
runs over all non-zero ideals in $A$. Pink and Rütsche [PR09] proved an
analogue of Serre’s open image theorem for Drinfeld modules $\phi$ over $F$
without complex multiplication. In greater detail, suppose that
$\phi\mathrel{\mathop{\mathchar 58\relax}}A\rightarrow F\\{\tau\\}$ is a
Drinfeld module of rank $r$ for which $\operatorname{End}_{\bar{F}}(\phi)=A$,
then the image of the adelic Galois representation

$\hat{\rho}_{\phi}\mathrel{\mathop{\mathchar
58\relax}}\operatorname{Gal}(F^{\operatorname{sep}}/F)\rightarrow\operatorname{GL}_{r}(\widehat{A})$

has finite index in $\operatorname{GL}_{r}(\widehat{A})$. For odd prime powers
$q\geq 5$, Zywina [Zyw11] was in fact able to construct an explicit Drinfeld
module of rank $2$ for which the adelic Galois representation is surjective.
These results have been generalized to certain higher ranks by Chen [Che22,
Che21]. There has also been recent interest in the study of the mod-$T$
representation for certain infinite families of Drinfeld modules [GM23], as
well as its application to the inverse Galois problem over the rational
function field.

###  1.2. Main result

The strategy taken by Duke to prove that almost all elliptic curves have no
expectional primes makes use of the large sieve. This involves local estimates
that rely on bounds for certain sums of Hurwitz class numbers (in congruence
classes). These sums are related to the fourier coefficients of certain
modular forms, and the estimates rely on the Ramanujan bound (cf. [Duk97,
Lemma 3]). The approach taken for Drinfeld modules in this article is indeed
different, since Duke’s method does not readily generalize to this context. I
consider only the Galois representation at the rational prime
$\mathfrak{p}=(T)$. I then study the _density_ of rank $2$ Drinfeld modules
$\phi$ for which the $T$-adic Galois representation

(1.1) $\hat{\rho}_{\phi,\mathfrak{p}}\mathrel{\mathop{\mathchar
58\relax}}\operatorname{Gal}(F^{\operatorname{sep}}/F)\rightarrow\operatorname{GL}_{2}(A_{\mathfrak{p}})$

is surjective.

######  Theorem 1.1.

Assume that $q\geq 5$ is odd. Then there is a positive density of Drinfeld
modules of rank $2$ over $A\mathrel{\mathop{\mathchar
58\relax}}=\mathbb{F}_{q}[T]$ for which the $T$-adic Galois representation
(1.1) is surjective.

One may refer to section 2.3, where a precise notion of density is given for
Drinfeld modules over $A$.

###  1.3. Organization

Including the introduction, this article consists of three sections. In
section 2, I discuss the basic properties of Drinfeld modules and their
associated Galois representations. In the final section, I prove that the
surjectivity of the $T$-adic representation can indeed be detected from
certain very explicit congruence conditions on the coefficients of a Drinfeld
module with coefficients in $A$ (cf. Theorem 3.1). These conditions are very
explicit, and they are leveraged to prove that the density of Drinfeld modules
satisfying these conditions is positive. In fact, a lower bound for this
density can be given, and I refer to the Remark 3.6 for a discussion on the
issues in obtaining a satisfactory lower bound.

###  1.4. Outlook

One of the key methods used is the algorithm of Gekeler for computing
characteristic polynomials of rank $2$ Drinfeld modules. I would expect that
they can be generalized to prove similar results for the Galois
representations on $\mathfrak{p}$-adic Tate modules, when $\mathfrak{p}$ is a
prime with small degree. However, this has not been pursued since one does not
have a general statement that applied to all $\mathfrak{p}$, and one only
considers $\mathfrak{p}=(T)$ in this article. I am hopeful that Theorem 1.1
shall pave the way for interesting developments in the future.

##  2\. Drinfeld modules and associated Galois representations

###  2.1. Preliminary notions

I discuss the theory of Drinfeld modules; my notation is consistent with that
in [Pap23]. Let $p$ be an odd prime number and $q=p^{n}$. Set $\mathbb{F}_{q}$
to be the field with $q$ elements and assume that $q\geq 5$. Let $A$ be the
polynomial ring $\mathbb{F}_{q}[T]$ and $F$ its fraction field
$\mathbb{F}_{q}(T)$. Given a non-zero ideal $\mathfrak{a}$ with generator $a$,
set $\operatorname{deg}\mathfrak{a}\mathrel{\mathop{\mathchar
58\relax}}=\operatorname{deg}_{T}(a)$. Let $K$ be a field extension of
$\mathbb{F}_{q}$, $K$ is called an $A$-field if it is equipped with an
$\mathbb{F}_{q}$-algebra homomorphism $\gamma\mathrel{\mathop{\mathchar
58\relax}}A\rightarrow K$. Given an $A$-field $K$, the $A$-characteristic of
$K$ is defined as follows

$\operatorname{char}_{A}(K)\mathrel{\mathop{\mathchar
58\relax}}=\begin{cases}0&\text{ if }\gamma\text{ if injective,}\\\
\operatorname{ker}\gamma&\text{ otherwise.}\end{cases}$

Then $K$ is of _generic characteristic_ if $\operatorname{char}_{A}(K)=0$.
Take $K^{\operatorname{sep}}$ to be a choice of separable closure of $K$, and
set $\operatorname{G}_{K}\mathrel{\mathop{\mathchar
58\relax}}=\operatorname{Gal}(K^{\operatorname{sep}}/K)$. The rational
function field $F$ is an $A$-field of generic characteristic where the map
$\gamma\mathrel{\mathop{\mathchar 58\relax}}A\hookrightarrow F$ is the natural
inclusion map. Given a non-zero prime $\lambda$ of $A$, take $k_{\lambda}$ to
denote the residue field of $A$ at $\lambda$. Then, $k_{\lambda}$ is an
$A$-field of characteristic $\lambda$, where
$\gamma_{\lambda}\mathrel{\mathop{\mathchar 58\relax}}A\rightarrow
k_{\lambda}$ is the mod-$\lambda$ reduction map.

Given an $\mathbb{F}_{q}$-algebra $K$, set $K\\{\tau\\}$ to denote the
noncommutative ring of twisted polynomials over $K$, the elements of which are
polynomials $f(\tau)=\sum_{i=0}^{d}a_{i}\tau^{i}$, with coefficients $a_{i}\in
K$. Addition is defined _term-wise_ as follows

$\begin{split}&\sum_{i}a_{i}\tau^{i}+\sum_{i}b_{i}\tau^{i}\mathrel{\mathop{\mathchar
58\relax}}=\sum_{i}(a_{i}+b_{i})\tau^{i},\\\
&(a\tau^{i})(b\tau^{j})\mathrel{\mathop{\mathchar
58\relax}}=ab^{q^{i}}\tau^{i+j}.\end{split}$

Given $f=\sum_{i=0}^{d}a_{i}\tau^{i}$, set

$f(x)\mathrel{\mathop{\mathchar 58\relax}}=\sum_{i=0}^{d}a_{i}x^{q^{i}}.$

The polynomial $f(x)$ is an $\mathbb{F}_{q}$-linear polynomial, i.e., given
$c_{1},c_{2}\in\mathbb{F}_{q}$, the following algebraic relation holds

$f(c_{1}x+c_{2}y)=c_{1}f(x)+c_{2}f(y)$

in $K[x,y]$. I take $K\langle x\rangle$ to denote non-commutative ring of
$\mathbb{F}_{q}$-linear polynomials defined by the relations

$(f+g)(x)\mathrel{\mathop{\mathchar 58\relax}}=f(x)+g(x)\text{ and }(f\cdot
g)(x)\mathrel{\mathop{\mathchar 58\relax}}=f(g(x)).$

The map $f(\tau)\mapsto f(x)$ is an isomorphism of $\mathbb{F}_{q}$-algebras
from $K\\{\tau\\}$ to $K\langle x\rangle$.

Next, I define the notion of _height_ $\operatorname{ht}_{\tau}(f)$ and
_degree_ $\operatorname{deg}_{\tau}(f)$ of a twisted polynomial $f(\tau)\in
K\\{\tau\\}$. Write

$f(\tau)=a_{h}\tau^{h}+a_{h+1}\tau^{h+1}+\dots+a_{d}\tau^{d},$

where $a_{h},a_{d}\neq 0$, and set

$\operatorname{ht}_{\tau}(f)\mathrel{\mathop{\mathchar 58\relax}}=h\text{ and
}\operatorname{deg}_{\tau}(f)\mathrel{\mathop{\mathchar 58\relax}}=d.$

Thus, one finds that the degree of $f(x)$ as a polynomial in $x$ is
$q^{\operatorname{deg}_{\tau}(f)}$. When referring to the degree of the
polynomial in $x$, I write

$\operatorname{deg}_{x}f(x)\mathrel{\mathop{\mathchar
58\relax}}=q^{\operatorname{deg}_{\tau}(f)}.$

Let $\partial\mathrel{\mathop{\mathchar 58\relax}}K\\{\tau\\}\rightarrow K$ be
the _derivative map_ sending

$\sum_{n}a_{n}\tau^{n}\mapsto a_{0}.$

Thus, $\operatorname{ht}(f)=0$ if and only if $\partial(f)\neq 0$. Note that
$f(x)$ is separable if and only if its derivative in $x$ does not vanish.
Since $\partial f=\frac{d}{dx}(f(x))$, one finds that $f(x)$ is separable if
and only if $\operatorname{ht}(f)=0$. With these conventions at hand, I recall
the definition of a Drinfeld module of rank $r\geq 1$. In this article, I
shall only be concerned with the case in which $r=2$.

######  Definition 2.1.

Let $r\geq 1$ be an integer and $K$ be an $A$-field. A _Drinfeld module_ of
rank $r$ over $K$ is a homomorphism of $\mathbb{F}_{q}$-algebras

$\phi\mathrel{\mathop{\mathchar 58\relax}}A\rightarrow K\\{\tau\\},$

sending $a\in A$ to $\phi_{a}\in K\\{\tau\\}$, such that

  * •

$\partial(\phi_{a})=\gamma(a)$ for all $a\in A$;

  * •

$\operatorname{deg}_{\tau}(\phi_{a})=r\operatorname{deg}_{T}(a)$.

The second condition is equivalent to requiring that
$\operatorname{deg}_{\tau}(\phi_{T})=r$. I shall write

$\phi_{T}=T+g_{1}\tau+g_{2}\tau^{2}+\dots+g_{r}\tau^{r},$

and observe that since $\operatorname{deg}_{\tau}\phi_{T}=r$, $g_{r}\neq r$.
The coefficients $(g_{1},\dots,g_{r})$ completely describe the module $\phi$.

Let $\phi$ and $\psi$ be Drinfeld modules, a morphism
$u\mathrel{\mathop{\mathchar 58\relax}}\phi\rightarrow\psi$ is a function
$u(\tau)\in K\\{\tau\\}$ such that $u\phi_{a}=\psi_{a}u$ for all $a\in A$. An
isogeny is a non-zero morphism. It is easy to see that if there exists an
isogeny, then, the rank of $\phi$ equals the rank of $\psi$. The group of all
morphisms from $\phi$ to $\psi$ is denoted
$\operatorname{Hom}_{K}(\phi,\psi)$. An isomorphism between Drinfeld module is
an isogeny with an inverse. It is easy to see that the only invertible
elements in $K\\{\tau\\}$ are the non-zero constant elements $c\in K$. Write
$\phi_{T}=T+g_{1}\tau+\dots+g_{r}\tau^{r}$ and
$\psi_{T}=T+g_{1}^{\prime}\tau+\dots+g_{r}^{\prime}\tau^{r}$, one finds that
$\phi$ is isomorphic to $\psi$ if and only if there is a non-zero constant $c$
such that

$g_{i}^{\prime}=c^{q^{i}-1}g_{i},$

for $i\in[1,r]$. When $r=2$, the $j$-invariant of $\phi$ is defined as

$j(\phi)\mathrel{\mathop{\mathchar 58\relax}}=\frac{g_{1}^{q+1}}{g_{2}}.$

Two rank $2$ Drinfeld modules $\phi$ and $\phi^{\prime}$ are isomorphic if and
only if $j(\phi)=j(\phi^{\prime})$ (cf. [Pap23, Ch. 3]).

Let $\Omega_{F}^{\ast}$ denote the set of discrete valuations of $F$, and
$\Omega_{F}$ be the valuations corresponding to non-zero prime ideals of $A$.
For $\lambda\in\Omega_{F}$, set $A_{\lambda}$ denote the completion of $A$ at
$\lambda$, and $F_{\lambda}$ be its field of fractions. Taking
$\mathfrak{m}_{\lambda}$ to be the maximal ideal of $A_{\lambda}$, set
$k_{\lambda}\mathrel{\mathop{\mathchar
58\relax}}=A_{\lambda}/\mathfrak{m}_{\lambda}$. Let $\phi$ be a Drinfeld
module over $F$ and $\lambda\in\Omega_{F}$. I denote by $\phi_{\lambda}$ the
localized Drinfeld module over $F_{\lambda}$, defined to be the composite

$\phi_{\lambda}\mathrel{\mathop{\mathchar
58\relax}}A\xrightarrow{\phi}F\\{\tau\\}\rightarrow F_{\lambda}\\{\tau\\},$

where the second map is induced by the natural inclusion of $F$ into
$F_{\lambda}$. Say that $\phi$ has _stable reduction_ at $\lambda$ if there is
a Drinfeld module $\psi$ over $F_{\lambda}$ that is isomorphic to
$\phi_{\lambda}$ with coefficients in $A_{\lambda}$, for which the reduction

$\bar{\psi}\mathrel{\mathop{\mathchar 58\relax}}A\rightarrow
k_{\lambda}\\{\tau\\}$

is a Drinfeld module. The rank of $\bar{\psi}$ is referred to as the
_reduction rank_ of $\phi$ at $\lambda$. If the reduction rank is $r$, then
$\phi$ has _good reduction_ at $\lambda$. Let $\lambda\in\Omega_{F}$ be a
prime of good reduction, and consider the reduced Drinfeld module

$\bar{\psi}\mathrel{\mathop{\mathchar 58\relax}}A\rightarrow
k_{\lambda}\\{\tau\\}.$

Let $a$ be the monic generator of $\lambda$. The element $a$ is in the kernel
of the reduction map $\gamma\mathrel{\mathop{\mathchar 58\relax}}A\rightarrow
k_{\lambda}$. The constant term of $\phi_{a}$ is $\gamma(a)=0$, and thus,
$\operatorname{ht}_{\tau}(\phi_{a})>0$. In fact, $\operatorname{deg}_{T}(a)$
divides $\operatorname{ht}_{\tau}(\phi_{a})$ and the _height of $\bar{\psi}$_
is defined to be the integer

$H(\bar{\psi})\mathrel{\mathop{\mathchar
58\relax}}=\frac{\operatorname{ht}_{\tau}(\phi_{a})}{\operatorname{deg}_{T}(a)},$

which one refers to as the height of the reduction of $\phi$ at $v$. It is
easy to see that $H(\bar{\psi})\in[1,r]$, I refer to [Pap23, section 3.2] for
further details. The quantity $H(\bar{\psi})$ is called the height of the
reduction of $\phi$ at $\lambda$.

Given a Drinfeld module $\phi$ of rank $r$ over $F$, there is an isomorphic
Drinfeld module $\psi$ for which

$\psi_{T}=T+g_{1}\tau+g_{2}\tau^{2}+\dots g_{r}\tau^{r}$

with coefficients $g_{i}\in A$. A tuple $(g_{1},\dots,g_{r})\in A^{r}$ is said
to be _minimal_ if there is no non-constant polynomial $f\in A$ such that
$g_{i}$ is divisible by $c^{q^{i}-1}$ for all $i\in[1,r]$. It is easy to see
that $\psi$ can be uniquely chosen so that $(g_{1},\dots,g_{r})$ is minimal in
the above sense. Moreover, the primes of bad reduction are precisely those
that divide the leading coefficient $g_{r}$. It is thus clear that there are
only finitely many primes of bad reduction. The primes of unstable reduction
are those that divide every single coefficient $g_{i}$ for $i\in[1,r]$.

###  2.2. Galois representations

I discuss Galois representations associated to Drinfeld modules over $F$ or
rank $r$. Let $\phi$ be a Drinfeld module over $F$ and $a$ be a non-zero
polynomial in $A$. Since the constant coefficient of $\phi_{a}$ is
$\gamma(a)=a$, it follows that $\phi_{a}(x)$ is a separable polynomial. Let
$\phi[a]\subset F^{\operatorname{sep}}$ denote the set of roots of
$\phi_{a}(x)$. I note that if $b\in A$, then,

$\phi_{a}(\phi_{b}(x))=\phi_{ab}(x)=\phi_{b}(\phi_{a}(x))=0.$

One defines a twisted $A$-module structure on $F^{\operatorname{sep}}$ by
$b\ast\alpha\mathrel{\mathop{\mathchar 58\relax}}=\phi_{b}(\alpha)$. Then, the
above computation shows that $\phi[a]$ is an $A$-submodule of
$F^{\operatorname{sep}}$. Given a non-zero ideal $\mathfrak{a}$ in $A$, set
$\phi[\mathfrak{a}]\mathrel{\mathop{\mathchar 58\relax}}=\phi[a]$, where $a$
is the monic generator of $\mathfrak{a}$. Then, one finds that
$\phi[\mathfrak{a}]\simeq(A/\mathfrak{a})^{r}$. The Galois group
$\operatorname{G}_{F}\mathrel{\mathop{\mathchar
58\relax}}=\operatorname{Gal}(F^{\operatorname{sep}}/F)$ naturally acts on
$\phi[\mathfrak{a}]$ by $A$-module automorphisms. I denote by

$\rho_{\phi,\mathfrak{a}}\mathrel{\mathop{\mathchar
58\relax}}\operatorname{G}_{F}\rightarrow\operatorname{Aut}_{A}(\phi[\mathfrak{a}])\xrightarrow{\sim}\operatorname{GL}_{r}(A/\mathfrak{a})$

the associated Galois representation. Let $\mathfrak{p}$ be a non-zero prime
ideal of $A$ and take $T_{\mathfrak{p}}(\phi)$ to denote the
$\mathfrak{p}$-adic Tate-module, defined to be the inverse limit

$T_{\mathfrak{p}}(\phi)\mathrel{\mathop{\mathchar
58\relax}}=\varprojlim_{n}\phi[\mathfrak{p}^{n}].$

Choosing a $A_{\mathfrak{p}}$-basis of $T_{\mathfrak{p}}(\phi)$ the associated
Galois representation is denoted

$\hat{\rho}_{\phi,\mathfrak{p}}\mathrel{\mathop{\mathchar
58\relax}}\operatorname{G}_{F}\rightarrow\operatorname{Aut}_{A_{\mathfrak{p}}}(T_{\mathfrak{p}}(\phi))\xrightarrow{\sim}\operatorname{GL}_{r}(A_{\mathfrak{p}}).$

The mod-$\mathfrak{p}$ reduction of $\hat{\rho}_{\phi,\mathfrak{p}}$ is
identified with $\rho_{\phi,\mathfrak{p}}$. The Galois representation
$\rho_{\phi,\mathfrak{a}}$ is unramified at all primes
$\mathfrak{l}\nmid\mathfrak{a}$ of $A$ at which $\phi$ has good reduction.
Moreover, given a non-zero prime $\mathfrak{l}\neq\mathfrak{p}$ of $A$, the
representation $\hat{\rho}_{\phi,\mathfrak{p}}$ is unramified at
$\mathfrak{l}$ if and only if $\mathfrak{l}$ is a prime of good reduction for
$\phi$.

Assume that $\phi$ has good reduction at $\mathfrak{p}$. Let me briefly
discuss the structure of $T_{\mathfrak{p}}(\phi)$ as a module over
$\operatorname{G}_{\mathfrak{p}}\mathrel{\mathop{\mathchar
58\relax}}=\operatorname{G}_{F_{\mathfrak{p}}}$. Let $H$ denote the height of
the reduction of $\phi$ at $\mathfrak{p}$. Let $n$ be a positive integer and
$v=v_{\mathfrak{p}}$ be the valuation on $F_{\mathfrak{p}}$ normalized by
$v(\pi_{v})=1$, where $\pi_{v}$ is a uniformizer of $F_{\mathfrak{p}}$.

$\phi[\mathfrak{p}^{n}]^{0}\mathrel{\mathop{\mathchar
58\relax}}=\\{\alpha\in\phi[\mathfrak{p}^{n}]\mid v(\alpha)>0\\}.$

For ease of notation, denote by $\bar{\phi}$ the reduction of $\phi$ at
$\mathfrak{p}$, and $\bar{\phi}[\mathfrak{p}^{n}]$ be its
$\mathfrak{p}^{n}$-torsion module. Then, $\bar{\phi}[\mathfrak{p}^{n}]$ is an
unramified $\operatorname{G}_{\mathfrak{p}}$-module and can be identified with
the quotient $\phi[\mathfrak{p}^{n}]/\phi[\mathfrak{p}^{n}]^{0}$. One has a
short exact sequence of $\operatorname{G}_{\mathfrak{p}}$-modules

$0\rightarrow\phi[\mathfrak{p}^{n}]^{0}\rightarrow\phi[\mathfrak{p}^{n}]\rightarrow\bar{\phi}[\mathfrak{p}^{n}]\rightarrow
0,$

cf. [Pap23, (6.3.1) on p. 371]. Taking

$T_{\mathfrak{p}}(\phi)^{0}\mathrel{\mathop{\mathchar
58\relax}}=\varprojlim_{n}\phi[\mathfrak{p}^{n}]^{0}\text{ and
}T_{\mathfrak{p}}(\bar{\phi})\mathrel{\mathop{\mathchar
58\relax}}=\varprojlim_{n}\bar{\phi}[\mathfrak{p}^{n}],$

and obtain a short exact sequence

$0\rightarrow T_{\mathfrak{p}}(\phi)^{0}\rightarrow
T_{\mathfrak{p}}(\phi)\rightarrow T_{\mathfrak{p}}(\bar{\phi})\rightarrow 0,$

cf. [Pap23, Proposition 6.3.9]. As an $A_{\mathfrak{p}}$-module,

$\phi[\mathfrak{p}^{n}]^{0}\simeq(A/\mathfrak{p}^{n})^{H}\text{, and
}\bar{\phi}[\mathfrak{p}^{n}]\simeq(A/\mathfrak{p}^{n})^{r-H}.$

Thus, one finds that

$T_{\mathfrak{p}}(\phi)^{0}\simeq A_{\mathfrak{p}}^{H}\text{ and
}T_{\mathfrak{p}}(\bar{\phi})\simeq A_{\mathfrak{p}}^{r-H}.$

Let $F_{\mathfrak{p}}(\phi[\mathfrak{p}^{n}]^{0})$ be the field extension of
$F_{\mathfrak{p}}$ generated by $\phi[\mathfrak{p}^{n}]^{0}$. In other words,
it is the fixed field of the kernel of the action map

$\varrho\mathrel{\mathop{\mathchar
58\relax}}\operatorname{G}_{\mathfrak{p}}\rightarrow\operatorname{Aut}(\phi[\mathfrak{p}^{n}]^{0})\xrightarrow{\sim}\operatorname{GL}_{H}(A/\mathfrak{p}^{n}).$

######  Lemma 2.2.

With respect to notation above, the ramification index of
$F_{\mathfrak{p}}(\phi[\mathfrak{p}^{n}]^{0})/F_{\mathfrak{p}}$ is divisible
by $q^{N(n-1)}(q^{N}-1)$, where $N\mathrel{\mathop{\mathchar
58\relax}}=H\operatorname{deg}(\mathfrak{p})$.

###### Proof.

The result is [Pap23, Lemma 6.3.10]. ∎

######  Proposition 2.3.

With respect to the above notation, assume that $H=1$. Then, the determinant
map

$\operatorname{det}\hat{\rho}_{\phi,\mathfrak{p}}\mathrel{\mathop{\mathchar
58\relax}}\operatorname{G}_{F}\rightarrow A_{\mathfrak{p}}^{\times}$

is surjective.

###### Proof.

It suffices to show that for all $n>0$, the determinant map

$\operatorname{det}\rho_{\phi,\mathfrak{p}^{n}}\mathrel{\mathop{\mathchar
58\relax}}\operatorname{G}_{F}\rightarrow\left(A/\mathfrak{p}^{n}\right)^{\times}$

is surjective. Consider the restriction of
$\operatorname{det}\rho_{\phi,\mathfrak{p}^{n}}$ to the inertia group
$\operatorname{I}_{\mathfrak{p}}$ of $\operatorname{G}_{\mathfrak{p}}$. Let
$\psi\mathrel{\mathop{\mathchar
58\relax}}\operatorname{I}_{\mathfrak{p}}\rightarrow
A_{\mathfrak{p}}^{\times}$ be the character for the action of the inertia
group on $T_{\mathfrak{p}}(\phi)^{0}$ and $\psi_{n}$ be its mod-$\mathfrak{p}$
reduction. It follows from Lemma 2.2 that $\psi_{n}$ is surjective for all
$n$. Since $\bar{\phi}[\mathfrak{p}^{n}]$ is unramified at $\mathfrak{p}$, it
follows that $\operatorname{det}\hat{\rho}_{\phi,\mathfrak{p}}$ coincides with
$\psi$, when restricted to $\operatorname{I}_{\mathfrak{p}}$. It follows that

$\operatorname{det}\hat{\rho}_{\phi,\mathfrak{p}}(\operatorname{I}_{\mathfrak{p}})=\psi(\operatorname{I}_{\mathfrak{p}})=A_{\mathfrak{p}}^{\times}.$

This shows that the determinant map
$\operatorname{det}\hat{\rho}_{\phi,\mathfrak{p}}$ is surjective. ∎

###  2.3. Counting Drinfeld modules

In this section, I consider the data defining a Drinfeld module over $A$ of
rank $2$. I say that $\phi$ is defined over $A$ if

$\phi_{T}=T+g_{1}\tau+g_{2}\tau^{2},$

where $(g_{1},g_{2})\in A^{2}$. It is easy to see that any Drinfeld module
over $F$ is isomorphic to a Drinfeld module defined over $A$. Since I assume
that $\phi$ has rank $2$, it follows that $g_{2}\neq 0$. The pair
$w=(g_{1},g_{2})\in A^{2}$ with $g_{2}\neq 0$ shall be referred to as a
_Drinfeld datum_. I shall take $\phi^{w}$ to be the Drinfeld module defined by

$\phi^{w}_{T}=T+g_{1}\tau+g_{2}\tau^{2}.$

The pair $w$ does not uniquely determine the Drinfeld module $\phi$ up to
isomorphism over $F$. Take $\mathcal{C}$ to be the set of Drinfelf data
$w=(g_{1},g_{2})\in A^{2}$.

Fix a pair of positive integers $\vec{c}=(c_{1},c_{2})$. Given a polynomial
$f$, set $|f|\mathrel{\mathop{\mathchar 58\relax}}=q^{\operatorname{deg}(f)}$.
Then, the height

$|w|\mathrel{\mathop{\mathchar
58\relax}}=\operatorname{max}\left\\{|g_{1}|^{\frac{1}{c_{1}}},|g_{2}|^{\frac{1}{c_{2}}}\right\\}.$

Let $X>0$ be an integer, take $\mathcal{C}(X)$ to be the set of Drinfeld
modules with $|\phi|<q^{X}$. Then, this is the set of Drinfeld data
$w=(g_{1},g_{2})$ such that

$\deg g_{1}<c_{1}X\text{ and }\deg g_{2}<c_{2}X.$

Thus, one finds that

(2.1) $\\#\mathcal{C}(X)=q^{c_{1}X}(q^{c_{2}X}-1).$

Let $\mathcal{S}$ be a subset of $\mathcal{C}$ and given a positive integer
$X>0$, take $\mathcal{S}(X)\mathrel{\mathop{\mathchar
58\relax}}=\\{w\in\mathcal{S}\mid|w|<X\\}$. Refer to the following limit

$\mathfrak{d}(\mathcal{S})=\lim_{X\rightarrow\infty}\frac{\\#\mathcal{S}(X)}{\\#\mathcal{C}(X)}=\frac{\\#\mathcal{S}(X)}{q^{c_{1}X}(q^{c_{2}X}-1)},$

(provided it exists) as the _density of $\mathcal{S}$_. The upper and lower
densities $\overline{\mathfrak{d}}(\mathcal{S})$ and
$\underline{\mathfrak{d}}(\mathcal{S})$ are defined as follows

$\begin{split}&\overline{\mathfrak{d}}(\mathcal{S})\mathrel{\mathop{\mathchar
58\relax}}=\limsup_{X\rightarrow\infty}\left(\frac{\\#\mathcal{S}(X)}{\\#\mathcal{C}(X)}\right);\\\
&\underline{\mathfrak{d}}(\mathcal{S})\mathrel{\mathop{\mathchar
58\relax}}=\liminf_{X\rightarrow\infty}\left(\frac{\\#\mathcal{S}(X)}{\\#\mathcal{C}(X)}\right),\end{split}$

and unlike $\mathfrak{d}(\mathcal{S})$, these densities are guaranteed to
exist. One says that $\mathcal{S}$ has positive density if
$\underline{\mathfrak{d}}(\mathcal{S})>0$.

######  Remark 2.4.

Recall that a pair $w=(g_{1},g_{2})\in A^{2}$ with $g_{2}\neq 0$ is said to be
minimal if there is no non-constant polynomial $a$ such that $a^{q-1}$ divides
$g_{1}$ and $a^{q^{2}-1}$ divides $g_{2}$. One may instead define
$\mathcal{C}_{\operatorname{min}}$ to consist of only minimal pairs $w$, and
define the density of a subset $\mathcal{S}$ of
$\mathcal{C}_{\operatorname{min}}$ by

$\mathfrak{d}(\mathcal{S})\mathrel{\mathop{\mathchar
58\relax}}=\frac{\\#\mathcal{S}(X)}{\\#\mathcal{C}_{\operatorname{min}}(X)}.$

It is possible to adopt this approach instead since it relies on point
counting techniques in certain weighted projective spaces, cf. [Phi22, section
5]. I do not however pursue it in this article since it makes calculations
more cumbersome.

##  3\. Main results

In this section, the main results of the article are proven. I shall assume
that $q\geq 5$ is odd. There are two distinct elements
$a_{1},a_{2}\in\mathbb{F}_{q}^{\times}$. For $i=1,2$, set
$\lambda_{i}\mathrel{\mathop{\mathchar 58\relax}}=(T-a_{i})$. I set $v_{i}$ to
denote the valuation at $\lambda_{i}$, normalized by $v_{i}(T-a_{i})=1$. Let
$w=(g_{1},g_{2})$ be a Drinfeld datum for a rank $2$ Drinfeld module
$\phi=\phi^{w}\mathrel{\mathop{\mathchar 58\relax}}A\rightarrow A\\{\tau\\}$.
Throughout this section, I fix an element $\eta\in\mathbb{F}_{q}^{\times}$
which is not a square in $\mathbb{F}_{q}^{\times}$. This is possible since $q$
is assumed to be odd, and thus, $\mathbb{F}_{q}^{\times}$ has even order (and
therefore not $2$-divisible). Set $\mathfrak{p}\mathrel{\mathop{\mathchar
58\relax}}=(T)$ and for ease of notation, take $\rho$ to denote the $T$-adic
representation $\hat{\rho}_{\phi^{w},\mathfrak{p}}\mathrel{\mathop{\mathchar
58\relax}}\operatorname{G}_{F}\rightarrow\operatorname{GL}_{2}(A_{\mathfrak{p}})$.
Set

$\bar{\rho}\mathrel{\mathop{\mathchar
58\relax}}\operatorname{G}_{F}\rightarrow\operatorname{GL}_{2}\left(A/\mathfrak{p}\right)\xrightarrow{\sim}\operatorname{GL}_{2}(\mathbb{F}_{q})$

to denote the mod-$\mathfrak{p}$ reduction of $\rho$. For $i=1,2$, set
$\operatorname{G}_{\lambda_{i}}\mathrel{\mathop{\mathchar
58\relax}}=\operatorname{Gal}(F_{\lambda_{i}}^{\operatorname{sep}}/F_{\lambda_{i}})$
and $\operatorname{I}_{i}\subset G_{\lambda_{i}}$ be the inertia group. The
Frobenius in $\operatorname{G}_{\lambda_{i}}/\operatorname{I}_{i}$ is denoted
$\sigma_{i}$. Likewise,
$\operatorname{G}_{\mathfrak{p}}\mathrel{\mathop{\mathchar
58\relax}}=\operatorname{Gal}(F_{\mathfrak{p}}^{\operatorname{sep}}/F_{\mathfrak{p}})$
and $\operatorname{I}_{\mathfrak{p}}$ is the inertia subgroup.

###  3.1. Congruence criteria for surjective $T$-adic images

In this subsection, we prove the following result.

######  Theorem 3.1.

Let $\eta\in\mathbb{F}_{q}^{\times}$ be a non-square, and let $a_{1},a_{2}$ be
distinct non-zero elements in $\mathbb{F}_{q}^{\times}$. Consider a pair
$(g_{1},g_{2})\in A^{2}$ with $g_{2}\neq 0$ such that

  1. (1)

$g_{1}$ is divisible by $(T-a_{1})$,

  2. (2)

$g_{1}$ is coprime to $T(T-a_{2})$,

  3. (3)

$g_{2}$ is divisible by $(T-a_{2})$ and not by $(T-a_{2})^{2}$,

  4. (4)

$g_{2}\equiv-a_{1}\eta^{-1}\mod{(T-a_{1})}$,

  5. (5)

$g_{2}$ is coprime to $T$.

Then, the representation $\rho\mathrel{\mathop{\mathchar
58\relax}}\operatorname{G}_{F}\rightarrow\operatorname{GL}_{2}(A_{\mathfrak{p}})$
is surjective.

I prove some preparatory results. Let $\pi$ be the uniformizer of
$A_{\mathfrak{p}}$ at $\mathfrak{p}$. The congruence filtration on
$\operatorname{GL}_{2}(A_{\mathfrak{p}})$ is defined by

$\begin{split}&G_{\mathfrak{p}}^{0}\mathrel{\mathop{\mathchar
58\relax}}=\operatorname{GL}_{2}(A_{\mathfrak{p}})\text{ for }i=0;\\\
&G_{\mathfrak{p}}^{i}\mathrel{\mathop{\mathchar
58\relax}}=\operatorname{Id}+\pi^{i}\operatorname{M}_{2}(A_{\mathfrak{p}})\text{
for }i>0;\end{split}$

where $\operatorname{M}_{2}(A_{\mathfrak{p}})$ denotes the $2\times 2$
matrices with entries in $A_{\mathfrak{p}}$. Let $\mathcal{H}$ be a closed
subgroup of $\operatorname{GL}_{2}(A_{\mathfrak{p}})$, take
$\mathcal{H}^{i}\mathrel{\mathop{\mathchar 58\relax}}=\mathcal{H}\cap
G_{\mathfrak{p}}^{i}$, and

$\mathcal{H}^{[i]}\mathrel{\mathop{\mathchar
58\relax}}=\mathcal{H}^{i}/\mathcal{H}^{i+1}.$

######  Proposition 3.2.

Let $\mathcal{H}$ be a closed subgroup of
$\operatorname{GL}_{2}(A_{\mathfrak{p}})$. Assume that the following
conditions hold

  1. (1)

$q\geq 4$,

  2. (2)

$\operatorname{det}(\mathcal{H})=A_{\mathfrak{p}}^{\times}$,

  3. (3)

$\mathcal{H}^{[0]}=\operatorname{GL}_{2}(\mathbb{F}_{q})$,

  4. (4)

$\mathcal{H}^{[1]}$ contains a non-scalar matrix.

Then one has that

$\mathcal{H}=\operatorname{GL}_{2}(A_{\mathfrak{p}}).$

###### Proof.

This result is [PR09, Proposition 4.1]. ∎

######  Lemma 3.3.

Let $\phi\mathrel{\mathop{\mathchar 58\relax}}A\rightarrow F\\{\tau\\}$ be a
Drinfeld module of rank $2$ associated to a pair $(g_{1},g_{2})\in A^{2}$,
i.e.,

(3.1) $\phi_{T}=T+g_{1}\tau+g_{2}\tau^{2}.$

Let $\lambda=(a)$ be a non-zero prime ideal of $A$ and $v$ be the associated
valuation normalized by setting $v(a)=1$. Take $\operatorname{I}_{v}$ to be
the inertia group of $\operatorname{G}_{F_{v}}$. Assume that

$v(g_{1})=0\text{ and }v(g_{2})=1.$

Let $\mathfrak{a}$ be a proper ideal of $A$. Then there is a basis of
$\phi[\mathfrak{a}]$ such that
$\rho_{\phi,\mathfrak{a}}(\operatorname{I}_{v})$ contains the full group of
unipotent upper triangular matrices $\left({\begin{array}[]{cc}1&\ast\\\
0&1\\\ \end{array}}\right)$ in $\operatorname{GL}_{2}(A/\mathfrak{a})$.

###### Proof.

It follows from the conditions (3.1) that $\phi$ has stable reduction at $v$
with reduction rank equal to $1$. Moreover, the valuation of the $j$-invariant
is $-1$. The result then follows from [Zyw11, Proposition 4.1]111I am happy to
reproduce the details here if the referee insists.. ∎

######  Lemma 3.4.

Let $\mathbb{F}$ be a finite field and $G$ be a subgroup of
$\operatorname{GL}_{2}(\mathbb{F})$ such that

  1. (1)

$G$ contains a subgroup of order $\\#\mathbb{F}$,

  2. (2)

$G$ acts irreducibly.

Then, $G$ must contain $\operatorname{SL}_{2}(\mathbb{F})$.

###### Proof.

This result is [Zyw11, Lemma A.1]. ∎

######  Proposition 3.5.

Let $\phi$ be a Drinfeld module associated to a pair $(g_{1},g_{2})\in A^{2}$
such that

  1. (1)

$g_{1}$ is divisible by $(T-a_{1})$,

  2. (2)

$g_{1}$ is coprime to $(T-a_{2})$,

  3. (3)

$g_{2}$ is divisible by $(T-a_{2})$ and not by $(T-a_{2})^{2}$,

  4. (4)

$g_{2}\equiv-a_{1}\eta^{-1}\mod{(T-a_{1})}$.

Then, the image of the representation

$\bar{\rho}\mathrel{\mathop{\mathchar
58\relax}}\operatorname{G}_{F}\rightarrow\operatorname{GL}_{2}(\mathbb{F}_{q})$

contains $\operatorname{SL}_{2}(\mathbb{F}_{q})$.

###### Proof.

Let $G$ be the image of $\bar{\rho}$ and let
$\bar{V}\mathrel{\mathop{\mathchar
58\relax}}=\phi[\mathfrak{p}]\simeq\mathbb{F}_{q}^{2}$ be the underlying space
on which $G$ acts.

First, I show that $G$ acts irreducibly on $\bar{V}$. In other words, there is
no $\mathbb{F}_{q}$-basis of $\bar{V}$ with respect to which $G$ consists only
of upper triangular matrices $\left({\begin{array}[]{cc}\ast&\ast\\\ 0&\ast\\\
\end{array}}\right)$. Since $g_{2}\equiv-a_{1}\eta^{-1}\mod{(T-a_{1})}$, and
both $a_{1}$ and $\eta$ are non-zero constants in $\mathbb{F}_{q}$, one finds
that $(T-a_{1})$ does not divide $g_{2}$. As a consequence, $\phi$ has good
reduction at $\lambda_{1}$. Recall that

$\rho\mathrel{\mathop{\mathchar
58\relax}}\operatorname{G}_{F}\rightarrow\operatorname{GL}_{2}(A_{\mathfrak{p}})$

is the Galois representation on the $T$-adic Tate-module
$T_{\mathfrak{p}}(\phi)$. This representation is unramified at $\lambda_{1}$,
and thus there is a well defined element
$\rho(\sigma_{1})\in\operatorname{GL}_{2}(A_{\mathfrak{p}})$. Let $a,b\in
A_{\mathfrak{p}}$ be coefficients of the characteristic polynomial of
$\rho(\sigma_{1})$, i.e.,

$a\mathrel{\mathop{\mathchar
58\relax}}=\operatorname{trace}\rho(\sigma_{1})\text{ and
}b\mathrel{\mathop{\mathchar 58\relax}}=\operatorname{det}\rho(\sigma_{1}).$

The elements $a,b$ are in the image of the natural embedding $A\hookrightarrow
A_{\mathfrak{p}}$, and can thus be identified with elements in $A$ (cf.
[Pap23, Section 4.2, p.236]). These elements $a,b$ depend only on
$\lambda_{1}$ and not on the prime $\mathfrak{p}$. Moreover, it follows from
[Pap23, Theorem 4.2.7, (2)] that

$\operatorname{deg}_{T}(a)=0\text{ and }\operatorname{deg}_{T}(b)\leq 1.$

I compute $a$ and $b$ using Gekeler’s algorithm for Drinfeld modules of rank
$2$, cf. [Pap23, p.248, l.-2]. This this context, Gekeler’s result simply
states that

$\begin{split}&a=-\bar{g}_{2}^{-1}\bar{g}_{1}\mod{\lambda_{1}};\\\
&b=-\bar{g}_{2}^{-1}(T-a_{1}),\end{split}$

where $\bar{g}_{i}\mathrel{\mathop{\mathchar
58\relax}}=g_{i}\mod{\lambda_{1}}$ is a constant in $\mathbb{F}_{q}$. Note
that the first of the above equations determines $a$, since $a$ is a constant,
and $\lambda_{1}$ has degree $1$. I warn the reader that $a$ and $b$ are
computed only with reference to $\lambda_{1}$ and the above computation has no
dependence on $\mathfrak{p}=(T)$. After computing $a$ and $b$, I shall reduce
them modulo $(T)$. Since $g_{1}$ is divisible by $(T-a_{1})$, one finds that
$\bar{g}_{1}=0$. On the other hand, $\bar{g}_{2}=-a_{1}\eta^{-1}$. Hence, one
finds that

$a=0\text{ and }b=\eta(a_{1}^{-1}T-1).$

Let $\bar{a},\bar{b}\in\mathbb{F}_{q}$ denote the mod-$T$ reductions of $a$
and $b$ respectively. Then, one has that

$\bar{a}\mathrel{\mathop{\mathchar
58\relax}}=\operatorname{trace}\bar{\rho}(\sigma_{1})\text{ and
}\bar{b}\mathrel{\mathop{\mathchar
58\relax}}=\operatorname{det}\bar{\rho}(\sigma_{1}),$

where I remind the reader that $\bar{\rho}$ is the mod-$T$ reduction of
$\rho$. Note that $\bar{a}=0$ and $\bar{b}=-\eta$. Thus, the trace and
determinant of $\bar{\rho}(\sigma_{1})$ are $0$ and $-\eta$ respectively.
Suppose that by way of contradiction that there is an $\mathbb{F}_{q}$-basis
of $\bar{V}$ with respect to which $\bar{\rho}(\sigma_{1})$ is upper
triangular. Then, since the trace of this matrix is $0$, one has that

$\bar{\rho}(\sigma_{1})=\left({\begin{array}[]{cc}c&d\\\ 0&-c\\\
\end{array}}\right),$

and the determinant is $-c^{2}=-\eta$. Thus, $\eta$ is a square in
$\mathbb{F}_{q}^{\times}$, which is a contradiction. Therefore, $G$ acts on
$\bar{V}$ irreducibly.

In order to complete the proof, note that the assumptions imply that
$v_{2}(g_{1})=0$ and $v_{2}(g_{2})=1$. Taking
$\mathfrak{a}\mathrel{\mathop{\mathchar 58\relax}}=\mathfrak{p}$ and
$\lambda\mathrel{\mathop{\mathchar 58\relax}}=\lambda_{2}$ in Lemma 3.3, one
finds that the full group of unipotent upper triangular matrices is in $G$.
Thus in particular, $G$ contains a subgroup with $q$ elements. I have shown
that the hypotheses of Lemma 3.4 are satisfied, and thus, $G$ contains
$\operatorname{SL}_{2}(\mathbb{F}_{q})$. ∎

I now give the proof of Theorem 3.1.

###### Proof of Theorem 3.1.

Let $\bar{\rho}$ be the mod-$\mathfrak{p}$ reduction of $\rho$. It follows
from Proposition 3.5 that the image of $\bar{\rho}$ contains
$\operatorname{SL}_{2}(\mathbb{F}_{q})$. It is assumed that $g_{2}$ is coprime
to $T$, and hence, $\phi$ has good reduction at $T$. Since $g_{1}$ is coprime
to $T$, the height of the reduction of $\phi$ at $\mathfrak{p}$ is $1$. It
then follows from Proposition 2.3 that $\operatorname{det}\rho$ is surjective.
Let $\rho_{2}$ denote the reduction of $\rho$ modulo $\mathfrak{p}^{2}$, and
let $\mathcal{G}\subseteq\operatorname{GL}_{2}(A/\mathfrak{p}^{2})$ be its
image. In order to complete the proof, it suffices to show that $\mathcal{G}$
contains a non-scalar matrix that is identity modulo $\mathfrak{p}$. Applying
Lemma 3.3 to $\lambda=\lambda_{2}$ and $\mathfrak{a}\mathrel{\mathop{\mathchar
58\relax}}=\mathfrak{p}^{2}$, one finds that $\mathcal{G}$ contains the full
upper triangular unipotent subgroup of
$\operatorname{GL}_{2}(A/\mathfrak{p}^{2})$ (up to conjugation). Thus in
particular, it contains a nontrivial unipotent matrix that reduces to the
identity modulo-$\mathfrak{p}$. Now set $\mathcal{H}$ to denote the image of
$\rho$. I have shown that the conditions of Proposition 3.2 are satisfied for
$\mathcal{H}$, and thus, I conclude from it that
$\mathcal{H}=\operatorname{GL}_{2}(A_{\mathfrak{p}})$. ∎

###  3.2. Proof of the main result

In this short subsection, we give a proof of the main result from the
Introduction.

###### Proof of Theorem 1.1.

Fix an element $\eta\in\mathbb{F}_{q}^{\times}$ which is not contained in
$(\mathbb{F}_{q}^{\times})^{2}$. Let $w=(g_{1},g_{2})\in A^{2}$ be a pair
satisfying the congruence conditions of Theorem 3.1, then the $T$-adic Galois
representation associated to $\phi^{w}$ is surjective. In other words, one
requires that $g_{1}=b_{1}\mod{T(T-a_{1})(T-a_{2})}$ where $b_{1}$ is
divisible by $(T-a_{1})$, but is coprime to $T(T-a_{2})$, and that
$g_{2}=b_{2}\mod{T(T-a_{1})(T-a_{2})}$ where $b_{2}$ is divisible by
$(T-a_{2})$ but not by $(T-a_{2})^{2}$, is coprime to $T$ and $b_{2}\equiv-
a_{1}\eta^{-1}\mod{(T-a_{1})}$. Fix one such pair $(b_{1},b_{2})$ represented
by $b_{i}$ with

$\operatorname{deg}_{T}b_{1}<3\text{ and }\operatorname{deg}_{T}b_{2}<4.$

Let $\mathcal{S}$ be the set of all pairs $w=(g_{1},g_{2})$ such that

$g_{1}\equiv b_{1}\mod{T(T-a_{1})(T-a_{2})}\text{ and }g_{2}\equiv
b_{2}\mod{T(T-a_{1})(T-a_{2})^{2}}.$

Let $X>0$ be an integer such that $c_{1}X,c_{2}X\geq 4$. Then, the polynomials
$g_{1}$ for which $\operatorname{deg}g_{1}<c_{1}X$ and such that $g_{1}\equiv
b_{1}\mod{T(T-a_{1})(T-a_{2})}$ can be written uniquely as
$g_{1}=b_{1}+a_{1}T(T-a_{1})(T-a_{2})$, where
$\operatorname{deg}a_{1}<c_{1}X-3$. Thus, the number of such polynomials
$g_{1}$ is exactly equal to $q^{c_{1}X-3}$. Likewise, the number of
polynomials $g_{2}=b_{2}+a_{2}T(T-a_{1})(T-a_{2})^{2}$ is exactly equal to
$q^{c_{2}X-4}$. Therefore, one finds that for $X\geq
4\operatorname{max}\\{c_{1}^{-1},c_{2}^{-1}\\}$,

$\\#\mathcal{S}(X)=q^{(c_{1}+c_{2})X-7}.$

Thus, I have that
$\lim_{X\rightarrow\infty}\frac{\\#\mathcal{S}(X)}{\\#\mathcal{C}(X)}=q^{-7}$.
Thus in particular, $\mathcal{S}$ has positive density. Let $\mathcal{T}$ be
the set of all pairs $w\in\mathcal{C}$ such that the $T$-adic representation
attached to $\phi^{w}$ is surjective. Then, $\mathcal{T}$ contains
$\mathcal{S}$ and

$\underline{\mathfrak{d}}(\mathcal{T})\geq\underline{\mathfrak{d}}(\mathcal{S})=\mathfrak{d}(\mathcal{S})>0.$

This completes the proof of the main result. ∎

######  Remark 3.6.

The density is calculated to be $q^{-7}$ for a choice of $5$-tuple
$(b_{1},b_{2},\lambda_{1},\lambda_{2},\eta)$. Two choices
$(b_{1},b_{2},\lambda_{1},\lambda_{2},\eta)$ and
$(b_{1}^{\prime},b_{2}^{\prime},\lambda_{1}^{\prime},\lambda_{2}^{\prime},\eta^{\prime})$
could have a non-empty intersection. I have not made an effort to obtain a
closed formula for the density of pairs $(g_{1},g_{2})$ that satisfy the union
of conditions imposed for all such $5$-tuples.

## References

  * [Che21] Chien-Hua Chen.  Surjectivity of the adelic galois representation associated to a drinfeld module of prime rank.  arXiv preprint arXiv:2111.04234, 2021.
  * [Che22] Chien-Hua Chen.  Surjectivity of the adelic Galois representation associated to a Drinfeld module of rank 3.  J. Number Theory, 237:99–123, 2022.
  * [Duk97] William Duke.  Elliptic curves with no exceptional primes.  Comptes rendus de l’Académie des sciences. Série 1, Mathématique, 325(8):813–818, 1997.
  * [GM23] Rod Gow and Gary McGuire.  On Galois groups of linearized polynomials related to the general linear group of prime degree.  J. Number Theory, 253:368–377, 2023.
  * [Jon10] Nathan Jones.  Almost all elliptic curves are Serre curves.  Trans. Amer. Math. Soc., 362(3):1547–1570, 2010.
  * [LSTX19] Aaron Landesman, Ashvin Swaminathan, James Tao, and Yujie Xu.  Surjectivity of Galois representations in rational families of abelian varieties.  Algebra Number Theory, 13(5):995–1038, 2019.  With an appendix by Davide Lombardo.
  * [Pap23] Mihran Papikian.  Drinfeld modules, volume 296 of Graduate Texts in Mathematics.  Springer, Cham, [2023] ©2023.
  * [Phi22] Tristan Phillips.  Counting drinfeld modules with prescribed local conditions.  arXiv preprint arXiv:2209.05576, 2022.
  * [PR09] Richard Pink and Egon Rütsche.  Adelic openness for Drinfeld modules in generic characteristic.  J. Number Theory, 129(4):882–907, 2009.
  * [Ser72] Jean-Pierre Serre.  Propriétés galoisiennes des points d’ordre fini des courbes elliptiques.  Invent. Math., 15(4):259–331, 1972.
  * [Zyw11] David Zywina.  Drinfeld modules with maximal galois action on their torsion points.  arXiv preprint arXiv:1110.4365, 2011.