Deep Bayesian Active Learning for Multiple Correct Outputs

Typical active learning strategies are designed for tasks, such as classification, with the assumption that the output space is mutually exclusive. The assumption that these tasks always have exactly one correct answer has resulted in the creation of numerous uncertainty-based measurements, such as entropy and least confidence, which operate over a model's outputs. Unfortunately, many real-world vision tasks, like visual question answering and image captioning, have multiple correct answers, causing these measurements to overestimate uncertainty and sometimes perform worse than a random sampling baseline. In this paper, we propose a new paradigm that estimates uncertainty in the model's internal hidden space instead of the model's output space. We specifically study a manifestation of this problem for visual question answer generation (VQA), where the aim is not to classify the correct answer but to produce a natural language answer, given an image and a question. Our method overcomes the paraphrastic nature of language. It requires a semantic space that structures the model's output concepts and that enables the usage of techniques like dropout-based Bayesian uncertainty. We build a visual-semantic space that embeds paraphrases close together for any existing VQA model. We empirically show state-of-art active learning results on the task of VQA on two datasets, being 5 times more cost-efficient on Visual Genome and 3 times more cost-efficient on VQA 2.0.

Introduction
Active Learning is an approach for data annotation in supervised learning problems that selectively seeks labels for informative examples [68,60]. It has proven to be a potential solution [68] to maximize learning while reducing the data annotation cost for many problems, including visionlanguage generation tasks like Visual Question Answering (VQA) [52,11,44] or image captioning [63] that rely on large, expensive, curated datasets [3,39,78,21]. Nonetheless, applying existing active learning strategies to language generation tasks does not result in performance increase OUTPUT Figure 1: Many vision tasks, such as image captioning and visual question answering, have multiple correct answers for the same input. In this example, multiple correct answers exist: "Glasses", "A pair of Glasses", etc. Existing active learning strategies overestimate uncertainty as they fail to account for paraphrases. We propose a new uncertainty estimation framework built over a visual-semantic embedding space that extends Monte-Carlo dropout-based Bayesian uncertainty for VQA and demonstrate that it is more sample efficient across multiple datasets.
compared to randomly annotating examples [14,48,62]. Traditionally designed for classification and regression [60], popular active learning strategies use some notion of model output based uncertainty to select informative data [29,1,9,19,33]. There are two main challenges with existing approaches when they are adapted for vision-language tasks. First, they are founded on the assumption that no two output categories can be associated with any given input, assuming that the model's output space is a set of mutually exclusive labels. Unfortunately, this assumption is invalid for numerous vision-language tasks, such as image captioning and VQA, as one image or image-question pair can have multiple correct captions or answers [21,5,73]. This paraphrastic nature of language causes these measures to fail. Figure 1 illustrates an instance of this phenomenon where the question "what is the dog wearing?" can be answered by "Glasses", "Spectacles", "Eye-wear" and countless other paraphrases. Measures like entropy [64], margin [10], or least confidence [64] confound multiple correct answers to imply high uncertainty in the model's output.
Second, extending existing uncertainty functions for language generation models quickly renders them computationally intractable. Consider a VQA task with a model that can generate answers up to a length of N with each word belonging to a vocabulary of size |V |. The output space is of the order of N |V | . So, measuring uncertainty in model outputs grows exponentially with the vocabulary size. To circumvent intractability, Monte-Carlo simulations or similar approximations are often used to reduce the output space [60,61]. However, there is no clear extension of such approximations for discrete tokens, like the words in an answer or a caption.
In this paper, we propose a novel active learning uncertainty sampling paradigm that estimates uncertainty in an embedding space instead of an output probability space. Our proposed method enables the use of dropout-based Bayesian Monte-Carlo uncertainty estimation [18] for sequence generation. We claim that our strategy is effective, even in the presence of multiple correct outputs with discrete words. We showcase the efficacy of our approach in a VQA setting, as it represents a natural manifestation of the phenomenon of having multiple correct candidates for a given input, but insist that our solution is extendable to any language generation task, provided that a semantic space can be created. Instead of immediately generating answers, we impose a semantic structure on the hidden representation of existing VQA models. Our semantic space is designed to embed paraphrases close together. It allows us to abstract away from the discrete tokens generated by VQA models and estimate uncertainty in the embedding space instead.
We show the utility of our uncertainty sampling strategy for VQA generation on the Visual Genome v1.4 [39] and the VQA v2.0 [3] datasets in an active learning setting. We observe that our solution achieves state-of-the-art results in multiple language generation metrics compared to existing uncertainty sampling strategies [64,10,58], while being 5 times more cost-efficient on Visual Genome and 3 times more cost-efficient on VQA 2.0.

Related Work
We explore the field of active learning and comment on how existing uncertainty measurements fail in environments where we have multiple correct outputs. We place our work in context with the task of VQA, as we believe it represents a highly representative manifestation of these environments. Next, we dive into visual-semantic embedding, a practical solution to construct semantic spaces using visual priors. Finally, we explore Bayesian uncertainty measurement techniques.
Active learning. A typical active learning setting starts with an initial small set of labeled data D L and a large set of unlabeled data D U . Knowing that labeling data is costly and time consuming, the task is to minimize the number of samples to annotate from D U while maximizing performance on a given task that requires those labels [68]. Active learning strategies have been successfully applied to a wide number of machine learning tasks, including image recognition [29,59], information extraction [58,15,28,10], named entity recognition [64,22] and text categorization [40,24]. Active learning strategies have included uncertainty-based sampling [29,1,9] and information gain [25]. Others have introduced a theoretical dropout-based framework to measure uncertainty [19,33]. Similar solutions have been adapted to NLP tasks like Named Entity Recognition [64] and Neural Semantic Parsing by adding Gaussian noise to the network weights [13]. In this paper, we empirically show how previous uncertainty sampling strategies do not perform better than random sampling in a VQA setting and propose a novel strategy that uses Bayesian uncertainty in a semantically structured embedding space.
Visual question answering. VQA systems expect an input image and a natural language question and attempt to output the correct answer [3]. VQA has received a considerable amount of attention in recent years with the development of several datasets, proposed as benchmarks [3,50,27,20,39,57,78], and of various models [3,17,45,77,75,78,26,49,71]. To tackle the task, many proposed architectures encode and then merge the visual and textual information in order to classify answers [50,46,26]. Attention mechanisms have proved to be successful in this task [65,72,45,2]. Other work focuses on designing effective multi-modal feature fusion schemes [4,17,34]. While the performance has been encouraging, such approaches require a large amount of labelled data with a predefined, mutually exclusive set of answer categories. We explore a more realistic variant of VQA where models generate natural language answers, resulting in the generation of paraphrases.
Semantically structured embeddings. Our key insight lies in moving uncertainty estimation from the model's output space to a semantically structed internal embedding space. Since we specifically study vision-language tasks, we build a visual-semantic space that combines both visual and textual information in order to create a unified latent representation. This problem has been studied extensively in the last few years with work that involves jointly embedding images and text, at the word level [16,38,30,51,37,66], and sentence level [79,31,32,8,36,56]. Visually grounded text representations have been applied to different tasks, including caption generation [36,31], image retrieval [42], and visual question answering [50]. Our approach is inspired by previous work [32], where we use image regions with their associated captions and adapt a margin objective to build the semantic space. We use the semantic space to enable a new active learning strategy.
Uncertainty. As uncertainty estimation represents the most popular sampling strategy for active learning, we explore uncertainty estimation techniques developed for deep learning models. Even though Deep Learning systems are performant, they remain uninterpretable, poor at quantifying predictive uncertainty, and overconfident in their predictions. To mitigate this problem, Bayesian models have been proposed by placing a prior distribution over model weights [70,53,47]. Yet, even though the problem is simple to formulate, deriving a posterior distribution for Deep Bayesian Neural Networks (BNN) is intractable which makes Bayesian inference difficult [18]. Therefore, focus has shifted to approximating BNNs with variational inference. Bayesian modeling of stochastic processes introduced new techniques into the field such as sampling-based and stochastic variational inference [6,7].
On the other hand, Monte-Carlo Dropout [19,18] has empirically demonstrated comparable uncertainty estimation quality to variational inference [19]. A model trained with dropout can be used as a Bayesian model by making multiple predictions while sampling different dropout masks for each forward propagation. Estimating the posterior amounts to computing the mean and variance of the predictions. While previous work has showed promise in classification and regression tasks [74,18,60], such methods have not been extended to language generation. In fact, most language-based uncertainty work adapts classification-based uncertainty techniques to language tasks, transforming the problem from an open language problem to a constrained closed problem [64,22,40,24,13]. We propose a new sampling strategy that extends Monte-Carlo dropout uncertainty [18] to measure uncertainty in a semantic space.

Method
We design an uncertainty measurement for active learning even when questions have multiple correct answers. In this section, we formulate our overall active learning framework, and then describe our uncertainty measurement approach. Our approach depends on two components: a semantic space that structures the model's output representations and a denoiser that refines our representations to get an accurate dropout-based Bayesian uncertainty estimation.

Visual question answer generation
We specifically study the scenario with multiple correct outputs using the VQA task, which expects an imagequestion pair (q, i) as input and natural language answer a as output. The goal is to train a modelâ ∼ f (a|q, i), whereâ is the generated answer and f (·) is the trained VQA model. Since different sentences can have the same meaning, we define S a , the set of all sentences semantically similar to a. When evaluating the performance of the VQA model, we consider any answerâ ∈ S a as a correct candidate for an answer. For example, in Figure 1, the question "What is the dog wearing?" can have multiple correct answer candidates, including "Glasses", "Spectacles", etc. Traditionally, VQA classifies the answer in a mutually exclusive set of 1000 correct answers [3]. However, we study a more realistic variant of VQA where our model generates the answer in natural language. So, in all our experiments, we use the popular bottom-up attention model [2] and replace its classifier with a long short term memory network (LSTM) [67] to generate answers instead of classifying them. Although we report results with the bottom-up attention model, our results are consistent with other existing VQA models [75]. Almost all VQA models follow a traditional encoder-decoder architecture, where (q, i) are encoded to generate a hidden representation z. This representation is then decoded to produce the answerâ.

Active learning for VQA
We follow a traditional pool-based active learning setting [61,60]. The model is initially trained with a small bootstrapping training set {(q, i, a)} ∈ D train to produce a starting model f 0 . At every time step t, we receive a new pool P t of N question-image pairs (q, i) and must choose K pairs to annotate using an oracle. The K pairs are chosen using an uncertainty measurement {(q 1 , i 1 ) . . . (q k , i k )} ∼ U (P t ). Once the oracle answers the chosen questions, they are added to D train and the model is re-trained to f t .
The process of incorporating new annotations by choosing data points from a pool continues for T iterations. Our final model is f T . In our experiments, we compare and evaluate different uncertainty measurements by the performance of their resulting {f 0 , . . . , f T } models.  Figure 3: (a) We train existing VQA models, which almost always follow an encoder-decoder architecture, with an additional embedding loss that structures the output according to the visual-semantic space. (b) We define an embedding denoiser, by combining the VQA decoder with the pretrained visual-semantic encoder. The denoiser refines these representations to get an accurate uncertainty estimation.

Our contribution: Bayesian uncertainty as variance in semantic space
As discussed earlier, traditional uncertainty estimation techniques for language generation are based on the assumption that all outputs must be mutually exclusive, and thus, fail when paraphrases exist. Also since the existing methods take exponentially long to compute with respect the size of the vocabulary [60], these methods require approximations that lead to further errors [60].
Our solution tackles both of these challenges. First, we build a visual-semantic space that captures semantic language similarly and maps similar paraphrases close together, and second, uses Monte-Carlo dropout-based Bayesian uncertainty [18] with a denoiser to measure the model's uncertainty.
Monte-Carlo dropout [18] is an approximate inference approach to Bayesian Neural Networks that approximates a Gaussian Process by enforcing model dropout in both training and test time. At test time, due to the randomness induced by dropout, our model inference becomes stochastic which makes our output potentially variable. Applying a Monte-Carlo process with m simulations, equivalent to applying m forward passes each with a different dropout mask, results in a probabilistic distribution that can be used as a Bayesian interpretation of a neural network and allows the use of variance as an uncertainty measure.
Instead of dealing with intractable output spaces, we measure uncertainty within a visual-semantic space that is computationally independent of the vocabulary size. More specifically, given an input (q, i), we encode the pair into a hidden representation h using m forward passes, each with a randomly sampled dropout mask, resulting in m hidden representations. We assume that the representations embed into a visual-semantic space, a space where similar visual and language concepts lie close together. We measure uncertainty as the sum of variances across all the dimensions of the representation vectors: The (q, i) inputs with the K highest uncertainty scores are chosen and sent to an oracle for annotation. Intuitively, our measurement outputs a small uncertainty score when the m forward passes all produce representations that occupy a small volume in the embedding space, implying that all the answers the model produces are paraphrases or at least semantically similar. Similarly, our measurement outputs a large uncertainty score when the m representations occupy a large volume in the embedding space, implying that the answers produced by the model are different.

Training the visual-semantic space
Since we are demonstrating our method using a visionlanguage task, we build a visual-semantic space to structure language outputs. Similar to previous work, we design the embedding space using a dataset of image regions and their corresponding natural language captions [36,16,38,30,51,37,66,79,31,32,8,56]. Concretely, given a dataset of (i, c) pairs of images and captions, we first embed the images using a pretrained ResNet50 [23] h i = CN N (i) and the caption using a visual-semantic encoder h c = enc vs (c). Next, we use contrastive loss, often called triplet loss, to ensure that similar image regions and similar captions are embedded nearby: where (i j c j ) and (i k , c k ) are two distinct image-captions pairs and δ m is a hyper-parameter representing our loss margin. d(·, ·) is the euclidean distance function though any other distance function can also be used.
[·] + lower bounds all values to zero. To ensure that our embedding space does not collapse, we add a cross entropy loss H(·) which reconstructs the caption from its embedding. λ 1 , λ 2 are hyperparameters we optimize using a validation set of imagecaption pairs. Figure 2 visualizes this training process. Figure 4: Active learning strategies' performance on Visual Genome [39] measured using multiple language generation metrics. Performance of the initial model is not shown as it is the same for all strategies. We outperform all existing strategies. Additional metrics with exact numbers are included in the appendix.

Training VQA using visual semantic space
Finally, with the visual-semantic space trained, we can use it to train a VQA model and structure its outputs. Almost all VQA models proposed in Computer Vision follow an encoder-decoder architecture with an encoder which embeds the question-image pair h ∼ enc(q, i) and then a decoder that converts the embedding into an answer a ∼ dec(h) [75,2]. We train our model in a traditional way by imposing the following reconstruction cross entropy loss along with a visual-semantic embedding loss: where n is the size of the dataset and h aj = enc vs (a j ) is the projected answer embedding in the visual-semantic space. Figure 3(a) visualizing the training objective.

Denoising the representations for uncertainty estimation
Our approach depends on two central components: a semantic space that structures the model's output representations and a denoiser that refines our representations to get an accurate uncertainty estimation. As discussed previously, we use the L embed distance loss with respect to a visual-semantic space to semantically structure our VQA encoder's hidden representation. In practice, the resulting representation is an approximation of the reference visualsemantic space. We find that embeddings for some concepts often result in a noisy representations. In our dropout-based framework, we find that variance measured on these noisy representations does not guarantee an accurate model uncertainty estimation and results in random sampling behavior.
To refine the image-question pair representations to be similar to the answer representation, we introduce an embedding denoiser module. The denoiser consists of components we have already introduced during training: the pretrained VQA decoder and the pretrained visual-semantic encoder. As the VQA decoder is trained to map the imagequestion representations to text, it learns the inherent noise in the embedding space generated by the VQA encoder. By decoding these concepts to answer outputs and then using the visual-semantic encoder to re-project them back, we semantically correct the embeddings. Figure 3(b) visualizes the denoiser. As the denoiser does not expect the VQA model's hidden representation to be semantically structured, we might expect that it renders the training VQA models with L embed loss unnecessary. However, we find in practice that the semantic information provided by L embed combined with the denoiser, not only increases the quality of the samples but also improves model performance (see Section 4.3 for ablations).

Implementation Details
We implement our visual-semantic model by combining a Resnet50 [23] encoder for the image, with a bidirectional LSTM encoder for the question, with a hidden size of 512 and 2 layers. For our decoder, we use a 2-layer LSTM decoder with a hidden size of 512. We train our the model using 70k image region and corresponding description pairs from Visual Genome [39]. We also feed VQA imageanswer pairs from the VQA training set 10% of all iterations ensure that answer concepts are mixed together with the captions. The model is optimized using Adam [35] with Figure 5: Active learning strategies' performance on VQA [3] measured using multiple language generation metrics. Performance of the initial model is not shown as it is the same for all strategies. We outperform all existing strategies. Additional metrics with exact numbers are included in the appendix. a learning rate of 1e −3 with zero weight decay. We initialize our LSTM embeddings using GLoVe [55] and train the model for a total of 27k iterations with a batch size of 128.
When training our VQA model [2], we find that a dropout rate of 0.5 results in good performance along with reasonable hidden representations for our uncertainty framework. To estimate our uncertainty, we simulate m = 20 forward passes with dropout 0.5 to generate our embedding distribution. If we increase m beyond 20, we find that the change in the uncertainty value is negligible.

Experiments
In our experiments, we empirically demonstrate that Bayesian uncertainty, measured as variance in the visualsemantic space, is a better sampling strategy for active learning than existing strategies. Furthermore, we show that all existing uncertainty measures perform better when the output of the VQA model is structured with a visualsemantic space. Datasets. We study our approach using two existing VQA datasets: Visual Genome [39] and VQA [3]. Visual Genome contains 108k images densely annotated with scene graphs containing objects, attributes and relationships, as well as region descriptions and visual question answers. We use 70k of 5M randomly sampled region descriptions to create our visual-semantic space. For the VQA model, we use the 1.18M question answers. We split our data into a train set of 69k images with 853k question answers and a validation set of 27k images with 335k (q, a) pairs. VQA is a dataset of 123k MSCOCO [43] images with 658k visual question answers. We use the default train/val split with a training set of 83k images with 443k question answers and a test set of 40k images with 215k (q, a) pairs. Active learning setup. In order to showcase the advantage of usin g our uncertainty measurement, we test its efficiency against widely used uncertainty sampling strategies [10,58,64]. We setup our active learning pipeline as follows: we randomly initialize our bootstrapping set D train with size representing 5% of the original training set, and pretrain our model f 0 . f 0 is then used as the starting point for all our experiments. For each active learning iteration, we sample a pool P t with size representing 15% of the original dataset size. Using our sampling strategies, we update D train with the K best scoring data points such that we have an increase of 5% of the entire dataset in each iteration. We retrain our model using the resulting train set and repeat the procedure for 5 iterations, resulting in a final D train size of 30% of the original dataset. We train the visual-semantic space with the same amount of image-caption pairs as the question-answer pairs the initial f 0 uses.
Baselines. We compare our uncertainty measure against the most popular uncertainty-based strategies. All baselines use a traditional encoder-decoder architecture without imposing a visual-semantic embedding loss. Random sampling (Random) is a passive learning strategy that queries points following a uniformly random distribution. Least confidence (LC) [10] queries the instances for which the model has the least confidence in its most likely generated sequence: u(q, i) = 1 − P (a * |q, i), where P (a * |q, i) is the probability of the most confident model response. Margin Sampling (Margin) [58]: queries the instances with the least margin between the output probabilities for the two most likely generated answers of our model: u(q, i) = 1 + P (a 2 |q, i) − P (a 1 |q, i), where P (a j |Q, I) is the probability of the j th most confident model response, j ∈ {1, 2}. Maximum Entropy Sampling (Entropy) [64] queries the instances that maximize the entropy of our models output: We use a beam size of b = 5 to get our uncertainty score.
While other active learning strategies like information gain and density based methods exist, some require an explicit enumeration over the output space, which is intractable, while others are not scalable for large datasets and adapting them in language generation models is still an open research problem [60]. Evaluation. To evaluate answer quality, we use the standard automatic evaluation metrics, namely CIDEr [69], METEOR [12], and BERT (precision and recall) [76]. We report additional metrics, like Bert F1 [76], Bleu [54], ROUGE-L [41] and accuracy in the appendix.

Active learning performance
Setup. We report quantitative results from our active learning experiments in Table 4, as well as in Figure 5. To ensure that our results are not a product of noise, we run all experiments 5 times for each strategy on both datasets. Each run is accompanied with a different random seed to alter how the weights of the model are initialized and which pool of image-question pairs arrives at every step. We present the average scores from all 5 separate experiments.
Results. Our solution out-performs all traditional active learning strategies in all metrics by a large margin for both Visual Genome (see Table 4) and VQA 2.0 (see Table 5). The increase in performance is larger for Visual Genome, which has more unique answers than VQA 2.0, resulting in the model learning more sequences to express the same answer. On Visual Genome, our measure is over 5 times more cost efficient than most existing sampling strategies, performing at 20% of the annotation budget better than what other strategies manage after using the whole budget across all metrics. Similarly for VQA 2.0, we find that our solution is around 3 times more cost efficient, performing at 60% of the annotation budget better than what other strategies manage after using the whole budget across all metrics. This demonstrates our framework's ability to maximize performance when multiple correct answers are present.

What questions are sampled?
Setup. Next, we dive into what types of questions are sampled by Ours versus Margin, which is the best performing baseline. We report the sampling statistics per question category, i.e the percentage of a specific type of question the strategy chooses at every step. We also report the performance of the models on the test set for those specific categories. We only report CIDEr scores as we see the same trend across the other metrics. Results are reported in Table 1. We look at "what", "where", "who", "how" and "how many (counting)" questions in particular as they make up more than 90% of questions in Visual Genome. We also report how well the models perform at every iteration on the test split containing only that type of questions.
Results. Not only do we outperform Margin in cases where we sample more points for a specific type of question but also in cases where we sample less. In order to explain this behavior, we study samples from the 3 rd iteration of active learning, in which we sample significantly less "where" questions and more "what" questions and yet perform better than Margin on both types. We find that Margin samples 25.3% more answers of length ≥ 4 on "where" questions. We also look at the average length of answers in Visual Genome [39] and find that "what" questions have an average length of 1.9(±1.2) while "where" questions have an average length of 3.1(±1.5). Longer answers typically have a higher potential of having paraphrases. We find this assumption to be true qualitatively: Margin samples questions with ground truth answers like "next to the large brick buildings", "near the tall buildings" and "by the buildings" when it already has 6 paraphrases already in its training set. Furthermore, Ours samples 27% more new concepts on "what" question that might be less prone to redundancy since they are generally shorter answers (refer to Appendix for more details). We also see that our method samples very few counting questions as the model picks up on the dataset bias where the answer is usually "2" and therefore has a lower uncertainty.

Ablations
Setup. Our solution involves three components: a visualsemantic space (VS), applying dropout-based Bayesian uncertainty within that space (Baye), and utilizing a denoiser to make the measurements more accurate (Deno). The visual-semantic space, however, can be used during training for any VQA model to structure the outputs and doesn't need to specifically rely on dropout-based Bayesian uncertainty. So, we can add L embed as a loss and still utilize existing uncertainty functions. Here, we perform experiments by ablating the three components of our model as well as adding the visual-semantic space loss and reporting how they impact existing methods. Results. We report the impact of the structure provided by the visual-semantic space when still using existing uncertainty measure in Table 2. We notice that even though our proposed strategy outperforms the extended traditional strategies, all existing uncertainty methods achieve a considerable boost in performance over iterations. This leads to two important conclusions: (1) structuring the output space of problems that have multiple correct answers can improve uncertainty estimations by all existing measures and (2) measuring uncertainty in the embedding space instead of model outputs proves to be more robust with multiple correct answers. Our ablations also demonstrate the importance of the denoiser and visual-semantic space when using Bayesian uncertainty estimation. We show that Baye by itself performs just as well as the existing baselines but combined with Deno or VS increases its performance and together Baye+VS+Deno performs the best.

Discussion
While promising, it is important to note that our method does have a few limitations. First, constructing a semantic space requires additional data. In our case, the availabil-ity of Visual Genome's [39] region descriptions made constructing a visual-semantic space feasible. However, in different tasks where such data might not be already available, such an approach can increase the overall cost. Second, it is possible for semantic embeddings for some concepts to occupy a larger convex hull than others. Therefore, variance as a measure might overestimate uncertainty for concepts that cover a larger convex hull while underestimating uncertainty for those placed within a smaller hull. Measuring uncertainty with respect to the density of specific concepts is an open research question we leave to future work. Third, as we measure the variance on m sampled embeddings as our uncertainty, our solution needs multiple forward passes. This gives us a runtime and computational disadvantage over existing baselines. Even though these limitations exist, we consider them implementation limitations, left for further research work, and emphasize the higher level contribution of our paper which is the proposal of a new paradigm that investigates uncertainty as variance in semantic space.

Conclusion
Existing uncertainty sampling strategies in active learning are no better than random sampling for sequence generation tasks with multiple correct answers. We propose a novel uncertainty sampling paradigm that moves away from a probabilistic to an embedding-based uncertainty estimation and overcomes the paraphrastic nature of language. We evaluate our solution in an active learning setting for the VQA generation task and outperform existing sampling strategies. Our model samples fewer paraphrases and more novel concepts and is 5× more cost-efficient on Visual Genome and 3× on VQA 2.0.

Appendix
We provide more details on how to implement our VQA model. We then motivate our design decisions in developing a new active learning framework for tasks with multiple correct ouputs, by investigating when and how existing uncertainty measurements fail. Next, we explore the active learning framework baselines and provide a more comprehensive quantitative evaluation, as well as a qualitative analysis of our proposed sampling strategy.

Implementation details: VQA model
We implement a bottom-up, top-down attention [2] VQA generation model and use it for all of our active learning experiments. We use a question encoder similar to the LSTM encoder to the Visual-Semantic Encoder. We feed our bottom-up attention mechanism the output hidden state of the LSTM encoder for the question's embedding, along with a 100 region per corresponding image. We add a dropout layer (with p = 0.5) to our attention mechanism when we attend over the joint question-image representation and use the original architecture otherwise. We decode the model's answer using an LSTM decoder. We optimize the model with the same hyper-parameters as the Visual-Semantic model and train it for a total of 15 epochs.

Uncertainty estimation with multiple answers: CLEVR experiment
To motivate our design decisions in developing a new active learning framework for VQA with multiple correct answers, we investigate when and how existing uncertainty measurements fail. To systematically perform this evaluation without confounding factors like noise in real-world datasets, we use the synthetic CLEVR dataset [27]. Even though CLEVR only has questions with one correct answer, we modify the answers by introducing paraphrases. Our insights from experimenting on a modified-CLEVR motivate both the importance of moving to different uncertainty estimation for language generation models, as well as the specific uncertainty measure described in the next section.
Modifying CLEVR to include paraphrases CLEVR is a diagnostic dataset that tests a range of visual reasoning abilities, including Visual Question Answering. It contains minimal biases and has detailed annotations describing the kind of reasoning each question requires. The dataset is composed of a train set of 700k (I, Q, A) triples with multiple answer categories including binary (yes / no), attributes, counts, objects and spatial relationships.
In a real world dataset, some answers will have multiple correct answers while other answers might only have one. To mimic such a setup, we modify CLEVR by taking a fraction of answer categories and replacing them with syn-  Figure 6: Even though the model is uncertain about the question on the left, existing uncertainty measurements assign it a lower uncertainty than the example on the right. When an input has multiple correct answers, existing measures overestimate uncertainty as they are unable to relate which outputs are paraphrases.
onyms. For example, we corrupt the answer 'yes' to seven different tokens − → {'yes', 'yeah', . . ., 'yup'}. Specifically, for every answer that is 'yes', we randomly modify it to one of the seven paraphrases. This is a conservative modification; in language, there are usually more than seven ways of expressing the same meaning.
Overestimation of uncertainty We train a state-of-the art VQA model [75], on both the modified-CLEVR dataset for 10 epochs with a learning rate of 4e − 3. Next, for all the data points in modified-CLEVR's validation set, we measure the model's uncertainty from the model's outputs and compare how uncertainty measurements differ for questions with multiple correct answers and those with only one.
We report uncertainty scores using entropy, which is the most popular uncertainty measurement used in active learning settings. We run similar experiments with other measures, like least confidence and margin, but omit them from our analysis here as they follow the same trend. Since exactly measuring entropy is intractable, we approximate entropy by decoding the answer with a beam size of 5 [64].
Qualitatively, Figure 6 demonstrates how the model's uncertainty scores differ for questions with one or multiple correct answers. On the left, we show an example of a question that the model is relatively unsure about. It assigns most of its weight to the correct answer ("large") but also assigns a sizable weight to an incorrect answer ("small"). However, the uncertainty associated with this question is lower than the example we show on the right. When multiple correct answers exist, the model fails to choose a clear answer and tends to assign similar weights to multiple an- Figure 7: As existing uncertainty measurements tend to overestimate uncertainty when an input has multiple correct answers, we end up sampling data points that the model already knows how to answer reducing active learning efficiency.
swers with the same meaning. Even though we can interpret such a result as the model learning that for such a question, multiple correct candidates exist, uncertainty measures are unaware of which answers are paraphrases and overestimate uncertainty. This scenario showcases a common failure case of active learning with existing uncertainty measurements, which would choose to collect more labels for the example with multiple correct answers, even though the model might benefit more from sampling the question on the left.
Quantitatively, we show how prevalent this problem is for all questions in the modified-CLEVR's validation set in Figure 7. Entropy assigns high uncertainty for all questions with multiple correct answers (shown in orange). And majority of these questions are assigned a higher uncertainty score than questions with a single correct answer (shown in green). Finally, if we correct the uncertainty scores by summing up the weights assigned to all the synonyms together, we find that the model is actually quite certain about a lot of these questions (shown in blue).
Our experiments with CLEVR allows us to conclude that we need an uncertainty measurement that can perform a similar correction, moving overestimated uncertainty scores (as shown in orange) to their correct values (as shown in blue). We need to design a mechanism which suggests which answers are semantically similar so that such a correction can be performed.

Active learning framework
We visualize the active learning framework described in the main paper using an algorithm in Algorithm 1. We also add additional notes and details about the baselines used below:

11:
Annotate SAMPLES using an oracle 12: Add new data to training set Dtrain ← Dtrain+ SAMPLES 13: Retrain f t using the updated D to get f t+1 14: end for Random Sampling (Passive Learning): We choose U following a uniformly random distribution from P .
where unif () returns k data points from P following a uniform distribution.
Least Confidence Sampling [10]: This approach queries the instances for which our model has the least condence in its most likely generated sequence. We choose U as the set with the top K points from P that the current VQA model has the least confidence in generating an answer for. We define our acquisition function as follows: where P (a * |Q, I) is the probability of the most confident model response.
Margin Sampling [58]: This approach queries the instances with the least margin between the output probabilities for the two most likely generated answers of our model. In this strategy, we use a beam size of 2 and choose U as the set with the top K points from P with the smallest margin. We define our acquisition function as follows: s(Q, I) = 1 + P (a 2 |Q, I) − P (a 1 |Q, I), where P (a i |Q, I) is the probability of the i th most confident model response, i ∈ {1, 2}.
Maximum Entropy Sampling [64]: This approach queries the instances that maximize the entropy of our models output. We choose U as the K data points with the highest prediction entropy. We define our acquisition function as follows: In order to measure entropy of our predictions in a VQA setting, we use a beam size of b to get b different predictions with probabilities P i (a|Q, I) for i = 1, 2, .., b.

More active learning performance:
The experiments we ran in the main paper can also be evaluated using additional language metrics like BLEU, ROUGE and BERT F1. We include those metrics here. They follow the same trend as the other metrics. We also report model accuracy.
Results on Visual Genome are shown in Table 3 and results on VQA 2.0 are shown in Table 4.

Qualitative analysis between Margin vs Ours
As discussed in section 5.2, we qualitatively study the behavior of both Margin, as as our solution on different types of questions. We find that our solution out-performs Margin in all types of questions by a considerable margin. We also study the percentage of sampled points with respect to performance for each type of question. We find that our solution not only performs better when we sample more points but also in cases where we sample less.
In order to understand this behavior, we study samples from the 3 rd iteration of active learning, where we sample significantly less "where" questions and more "what" questions and yet perform better than Margin on both types. We investigate the distribution of answer length for samples in both types of questions. Figure 8 and 9 show the sampled distributions. We find that Margin samples 25.3% more answers of length ≥ 4 on "where" questions (3271 vs 2647).
We also look at the average length of answers in Visual Genome [39] and find that "What" questions have an average length of 1.9(±1.2) while "where" questions have an average length of 3.1(±1.5). Longer answers typically have a higher potential of having paraphrases. We find this assumption to be true qualitatively: an example of the redundancy of Margin is shown in Table 5. We look at sampled points containing the word "building". We find that Margin heavily re-samples concepts that are already avail- able or have paraphrases in the training set. We also report the corresponding samples for Ours in Table 6 and find that we sample less paraphrases and are less redundant.   Table 4: We report our models efficacy with multiple metrics. We use language modeling metrics to measure its capability to generate answers similar to the ground truth as we progress through the AL process. Scores are multiplied by 100 to show more significant digits.

Margin 3 rd iteration samples
Paraphrases already in the Training Set Points between the buildings between the red brick buildings over the street and between buildings between the buildings in between two buildings between the pear and lemon buildings overhead between the buildings between two buildings between buildings hanging between buildings in between buildings above the buildings on buildings on the buildings on the buildings behind the vehicles above buildings on buildings above the train and buildings on the buildings on top of buildings on the buildings in the background on the buildings above the city buildings above the buildings hanging over buildings in front of the buildings in front of buildings parked in front of the buildings in front of the buildings and tower in front of buildings in front of the buildings near the buildings near buildings next to the large brick buildings by the buildings in the street , near buildings next to the buildings by the tall buildings near the buildings beside the buildings by the trees and buildings near buildings close to buildings next to the buildings behind buildings behind the buildings behind the buildings behind the other buildings behind all the buildings Table 5: We look at all the sampled phrases containing the word "building" with Margin. We realize that we end up heavily re-sampling concepts that are already available in our training set. This shows the redundancy of this strategy and explains why sampling more points leads to worse performance.  Table 6: We look at all the sampled phrases containing the word "building" with Margin. We find that compared to Margin, we cover the same range of concepts while being less redundant.


Anticyclotomic p-adic l-functions and the exceptional zero phenomenon

Let A be a modular elliptic curve over a totally real field F, and let E/F be a totally imaginary quadratic extension. In the event of exceptional zero phenomenon, we prove a formula for the derivative of the multivariable anticyclotomic p-adic L-function attached to (A,E), in terms of the Hasse-Weil L-function and certain p-adic periods attached to the respective automorphic forms. Our methods are based on a new construction of the anticyclotomic p-adic L-function by means of the corresponding automorphic representation.

If A has either ordinary good or bad multiplicative reduction at all places above p, we obtain a better understanding of the arithmetic of A/F if we replace the Canalysis of L(A, s) by the a C p -analysis of its p-adic avatar L p (A, s), the (cyclotomic) p-adic L-function of A. This is a C p -valued function that interpolates the critical values L(A, ψ, 1), for any finite character ψ of the Galois group G p ≃ Z p of the cyclotomic Z p -extension F cyc p of F unramified outside p and ∞. The function L p (A, s) is defined as where ℓ : G p → Z p is a canonical isomorphism and µ p is a certain (cyclotomic) p-adic measure attached to A. By L p (A, s) interpolates L(A, ψ, 1), we mean that the measure µ p satisfies Gp ψ(γ)dµ p (γ) = e p (A, ψ)L(A, ψ, 1), for all finite characters ψ : G p → C × , where e p (A, ψ) is some Euler factor which is non-zero for almost all ψ. Observe that the p-adic L-function is univocally characterized by the C p -valued measure µ p . A p-adic analog of the Birch and Swinnerton-Dyer conjecture was stated in [11]. Let E/F be a totally imaginary quadratic extension. Some remarkable achievements towards the Birch and Swinnerton-Dyer conjecture have been obtained by means of the rich theory of Heegner points associated with E/F . This encourages us to consider A/E as an elliptic curve defined over E. Note that in this setting we can consider anticyclotomic abelian extensions of E which are linearly disjoint from F cyc p E. Indeed, for any prime ideal P of F dividing p, let E a P be the maximal abelian extension of E which is unramified outside P and ∞ and so that the complex conjugation τ ∈ Gal(E/F ) acts on G E,P := Gal(E a P /E) by −1. Up to torsion, G E,P is isomorphic to Z r p , where r = [F P : Q p ]. Motivated by the cyclotomic theory, one may ask if there is an analogous construction of p-adic L-functions attached to such anticyclotomic Z r p -extensions. The behavior of the local functional equation outside P provides a dichotomy in our scenario: on the one hand the definite case, where the number of finite places v outside P with the sign of the local functional equation (i.e. the local root number) ω v (A/E) = −1 is even; on the other hand the indefinite case, where that number of finite places is odd.
Assume that A has either ordinary good or multiplicative reduction modulo P. Our starting point is the construction of C p -valued measures of G E,P attached to A, with good interpolation properties. In the literature, we can find constructions of such measures in some particular cases: for F = Q and E/Q not ramified at p, we have the work of Bertolini-Darmon (see [5] and [6]); for arbitrary F , we have the work of Van Order also under certain restrictions for the ramification of E/F (see [18] and [17]). In this paper, we provide alternative constructions valid for arbitrary totally imaginary quadratic extensions E/F . Note the novelty of these constructions, even for F = Q, when E/Q ramifies at p. We denote by µ I E,P and µ II E,P the corresponding measures in the definite and indefinite situations, respectively. In analogy with the cyclotomic setting, our definite p-adic measure µ I E,P interpolates the critical values L(A/E, χ, 1) for any finite character χ of G E,P (Theorem 5.9). In the indefinite case, the corresponding p-adic measure µ II E,P interpolates p-adic logarithms of certain Heegner points whose height is given by the derivative L ′ (A/E, χ, 1) (Theorem 5.16). In both scenarios (and also including the cyclotomic setting), the interpolation property involves an Euler factor e P (A/E, χ) that is not identically zero.
The set of C p -valued measures Meas(G E,P , C p ) of G E,P has a natural structure of C p -algebra called Iwasawa algebra. The morphism deg : Meas(G E,P , C p ) → C p , that maps any measure to the image of the constant map 1, is indeed a C p -algebra morphism. The ideal I = ker(deg) is called augmentation ideal and the maximum power I r in which a measure µ lies is called order of vanishing of µ. Observe that, in the cyclotomic setting, L p (A, 0) = deg(µ p ) and the order of vanishing of L p (A, s) at s = 0 coincides with the order of vanishing of µ p .
In this paper, we mean by anticyclotomic p-adic L-functions the elements L I P (A, E) and L II P (A, E) of the Iwasawa algebra of G E,P defined by µ I E,P and µ II E,P , respectively. In the cyclotomic and definite anticyclotomic setting, the interpolation property relates the image deg(L I P (A, E)) with the critical value of the classical L-functions at s = 1 (analogously, in the indefinite anticyclotomic case the classical L-function is replaced by its derivative). This suggests that the order of vanishing of such p-adic L-functions coincides with the order of vanishing of the classical L-functions at s = 1 (resp. their derivatives in the indefinite anticyclotomic case). Nevertheless, a surprising phenomenon appears if A has split multiplicative reduction: the Euler factor e P (A/E, 1) vanishes and we observe a zero of the p-adic L-function, even when the classical L-function (or its derivative) is not zero. These extra zeros coming from the vanishing of the Euler factors are called exceptional zeros.
A first approach to understand this exceptional zero phenomenon is to compute the derivatives of the corresponding p-adic L-functions or, analogously in terms of Iwasawa algebras, their classes in the respective C p -vector spaces I r /I r+1 . Many authors have contributed to this research line: [4] an analogous formula involving the p-adic logarithm of a Heegner point (see also [6]). The case E/Q ramified at p is still an open problem even for F = Q. • In the indefinite anticyclotomic setting, the only results to date were for the case F = Q and p inert at E. Bertolini and Darmon proved in [3] that the image of L II p (A, E) in I/I 2 ≃ C p can be expressed in terms of the critical value L(A/E, 1) (see also [6]). The cases E/Q split or ramified at p have never been considered previously.
The main result of this paper (Theorem 7.5) establishes a formula for the classes of the p-adic L-functions L I P (A, E) and L II P (A, E) in I/I 2 , assuming that P splits in E. We remark that these results are valid for arbitrary totally real fields and, in turn, resolve the indefinite anticyclotomic case for F = Q.
In order to explain our result, let us introduce π, the automorphic representation of GL 2 (A F ) associated with A. The (twisted) Hasse-Weil L-function L(A/E, χ, s) coincides with the Rankin-Selberg L-function L(s − 1/2, π E , χ), where π E is the extension of the representation π to GL 2 (A E ). Actually, we will define our anticyclotomic measures by means of a certain Jacquet-Langlands lift π JL of π. For this reason we denote them by µ π,I E,P and µ π,II E,P , respectively L I P (π, E) and L II P (π, E) when considered as elements of the Iwasawa algebra. In §7 we will introduce a new type of L-invariants, the automorphic L-invariant vectors L P (π) ∈ I/I 2 . They are defined in terms of the cohomology of (S p -)arithmetic groups associated with Jacquet-Langlands lifts of π (see §6). If we denote by ∇L I P (π, E), ∇L II P (π, E) ∈ I/I 2 the classes of the corresponding p-adic L-functions, we obtain that where C E is a non-zero constant, C(π P ) is a non-zero Euler factor, and P T is a Heegner point with explicit height depending on L ′ (1/2, π E , 1). In the definite setting, this is a generalization of the result by Bertolini and Darmon in [5], for F = Q. With the spirit of the p-adic BSD conjecture introduced in [11], Bertolini and Darmon also conjectured in [2,Conjecture 4.6] such a result in the indefinite setting for F = Q and A(E) of rank 1, but replacing the automorphic L-invariant vector L P (π) by the corresponding geometric L-invariant.
Bearing in mind the case F = Q, we expect the L-invariant vector L P (π) to be related to the geometry of A/F P . Actually, L P (π) is defined differently in the definite and indefinite settings. In §6.3, we show in the definite setting that L P (π) is given by the geometric L-invariants. It is a work in progress to study the relation between indefinite L-invariant vectors and geometric L-invariants. Such relation, predicted by Conjecture 6.6, holds for F = Q thanks to the work by Greenberg-Stevens [9] and Longo-Rotger-Vigni [10].
The techniques used to prove these results are generalizations of the work by Spieß in [15], where the cyclotomic measure is defined by means of a certain group cohomology cocycle. In our setting, we construct our anticyclotomic measures by means of certain (S P )-arithmetic cocycles associated with the automorphic representations π JL and the torus attached to the extension E/F . In fact, our construction is given in such generality that we recover the Spieß p-adic measure if we allow E/F to be the trivial extension E = F × F . In this direction, our work helps us to understand the link between the cyclotomic and anticyclotomic framework.
Finally, let us remark that the techniques and results described in this paper could also contribute to research on the exceptional zero phenomenon whenever P does not split in E. A future research line is to compute the classes ∇L I P (π, E) and ∇L II P (π, E) in case P is inert in E, generalizing the results of Bertolini and Darmon for F = Q, or P ramified in E, which is an open problem even for F = Q.
1.1. Notation. For any field F , denoted by O F its ring of integers.
We denote the action of GL 2 (F ) on the projective line P 1 (F ) by: If F is a local field, we consider the Haar measure d × x of F × introduced in [21]. If F is a global number field, we denote by d × x v the corresponding Haar measure of the localization are the groups of finite ideles of F and E, respectively. Finally, we fix embeddingsQ ֒→ C andQ ֒→ C p .

Measures and Iwasawa algebras
2.1. Distributions and measures. Let X be a totally disconected locally compact topological space. For a topological Hausdorff ring R, we denote by C(X , R) the ring of continuous maps from X to R, and by C c (X , R) ⊆ C(X , R) the subring of compactly supported continuous maps. We denote by C(X , R) 0 and C c (X , R) 0 the corresponding rings if we consider R with the discrete topology. We denote by C ⋄ (X , R) ⊆ C(X , R) the set of continuous functions f with f (g)→0 as g→∞, more precisely, f can be extended to a continuous function on the one-point compactification of X by setting f (∞) = 0. We have We shall denote the R-module of M -valued distributions by Dist(X , M ).
Assume that R = K is a p-adic field, namely, a field of characteristic 0, complete with respect to a nonarchimedean absolute value | | : K → R, whose restriction to Q is the usual p-adic value. We denote the corresponding valuation ring by O K .
A norm on a K-vector space V is a function : V → R satisfying: Two norms in V are equivalent if they define the same topology on V . A normed K-vector space (V, ) is a (K−)Banach space if V is complete with respect to . Recall that any finite dimensional K-vector space admits a norm, any two norms are equivalent, and it is complete. The K-vector space C ⋄ (X , K) with the supremums norm f ∞ = sup γ∈X |f (γ)| is a K-Banach space.
) be a Banach space. An element µ ∈ Dist(X , V ) is a measure if µ is continuous with respect to the supremums norm, i.e. there exists C ∈ R, C > 0, such that X f dµ ≤ C f ∞ for all f ∈ C c (X , K) 0 . We will denote the space of V -valued measures on X by Meas(X , V ).
An element µ ∈ Meas(X , V ) can be integrated, not only against locally constant functions, but against any f ∈ C ⋄ (X , K), since C c (X , K) 0 is dense in the Banach space (C ⋄ (X , K), ∞ ). We obtain a continous functional Dist(X , L) ⊗ OK K −→ Dist(X , V ).

Iwasawa algebras.
Let G be a commutative pro-p group and let K be a p-adic field with valuation ring O K . Since O K is a lattice in the Banach space (K, | |), the K-vector space Meas(G, K) coincides with the tensor product Dist(G, O K ) ⊗ OK K. Let us consider the convolution product * : One checks that such convolution product endows Dist(G, O K ) with structure of O K -algebra, where the unit is given by the Dirac measure G f d1 := f (1) and the structural ring homomorphism corresponds to Observe that the natural map is a group homomorphism and the O K -module homomorphism is a Z p -module homomorphism. Indeed, The following result describes I/I 2 as the tensor product G ⊗ Zp O K .

Proposition 2.3 (Hurewicz Theorem).
Assume that G is a Z p -module of finite rank, then the map ϕ defines an isomorphism of O K -modules Proof. Let us consider the dual group Thus we have defined a O K -module morphism ψ : Since G is a Z p -module of finite rank, ι is an isomorphism. Thus, in order to prove our result, it is enough to show that ϕ is surjective.
Given the description of O K [[G]] as an inverse limit of group algebras, we observe that at each finite level This implies that the corresponding morphism ϕ H : G/H ⊗ Zp O K → I H /I 2 H is surjective. We conclude that ϕ is surjective an the result follows.
Corollary 2.4. Assume that G is a (free) Z p -module of finite rank and let G ∨ := Hom Zp (G, Z p ). Then the map Proof. Follows directly from the proof of Proposition 2.3.

3.2.
Universal unramified principal series. Let G = GL 2 (F ), and let us consider the following subgroups of G Hence Z is the center of G, and K is a maximal compact subgroup. For any ideal c ⊂ O write K 0 (c) ⊂ K for the subgroup of triangular matrices modulo c. Let R be a topological Hausdorff ring and assume α ∈ R × . Let us consider the unramified character µ α : . This provides a character on B and the induced R-representation If α = ±1, the representation Ind G B (µ −1 α ⊗µ α ) is reducible, since there is an invariant subspace of rank 1 over R generated by φ 0 (g) = α ν(det g) . We denote by (π R α , V R α ) the quotient representation of Ind G B (µ −1 α ⊗ µ α ) by this rank 1 subrepresentation. In the case α = ±1, we write (π R α , V R α ) for the induced representation Ind G Let us consider Let g ̟ = ̟ 1 . We consider the element of the Hecke algebra T ∈ H R K = (Ind G UZ 1 R ) U attached to 1 UZgω U , for U = K or K 0 (̟). Again by Frobenius reciprocity, elements φ i ∈ (V R α ) U provide G-module homomorphisms Theorem 20] Assume R is a ring endowed with the discrete topology. Then ϕ 0 is injective and ϕ 1 is an isomorphism. Moreover, if R is a field then ϕ 0 is also bijective.
Remark 3.2. We emphasize that ϕ 0 is not an isomorphism in general. If R is a domain and L its fraction field, we notice that Local distributions attached to a torus in GL 2 . Let T 2 be a 2-dimensional torus in G = GL 2 (F ). Note that T 2 acts on F 2 by means of the embedding T 2 ֒→ G. Definition 3.3. We say that T 2 is split if there is an element in F 2 that is an eigenvector for the action of all elements of T 2 . We say that T 2 is non-split otherwise.
Let R be a topological Haussdorf ring, and let us consider the action of T := T 2 /Z on C(T, R), given by t * f (x) := f (t −1 x). Assume that T 2 ⊂ B, thus B ∩ T 2 = Z and the natural map T → G/Z → B\G ≃ P 1 (F ) is injective. Let µ : B → R × be any continuous character trivial at Z. We can construct the following morphism which is well-defined, since B ∩ T = Z. Let α ∈ R × be as above, and let us consider the character µ = µ −1 α ⊗ µ α : B → R × . The composition ofδ µ T with the natural projection gives rise to a morphism (3.2) δ T : Since both Ind G B (µ) and π R α have trivial central character, restriction to T 2 provides a natural action of the group T = T 2 /Z. It is clear that both morphismsδ µ T and δ T are T -equivariant.
Lemma 3.5. Assume that R is a domain endowed with the discrete topology and α = ±1. Then there exists λ ∈ R such that where 1 H is the characteristic function of H, then the result will automatically follow. Indeed, we can choose λ ∈ R to be such that λδ T (1 H ) ∈ Ind G ZK 1 R /(T − a)Ind G ZK 1 R . Notice that the continuous equivariant map provides an injection of T in P 1 that sends 1 to ∞. The open subsets U n = {x ∈ P 1 , ord(x) < −n} (n ≥ 0) form a neighborhood basis for ∞ and their preimages give rise to neighborhood basis {H n } n of 1 ∈ T . We check that Let n 0 ∈ N be big enough that, for any n ≥ n 0 , This implies that δ T (1 Hn+1 ) = µ(g ̟ )π α (g −1 ̟ )δ T (1 Hn ) ∈ R[G]δ T (1 Hn ). By induction, we deduce that δ T (1 Hn ) ∈ R[G]δ T (1 Hn 0 ), for any n > 0. Since 1 Hn generate the T -module C c (T, R) and δ T is T -equivariant, the results follows.

3.4.
Torus and inner products. For this section, let F be a local field (either archimedean or nonarchimedean). Let D be the quaternion division algebra over F , and let T 2 be a two-dimensional torus as above. We fix an embedding T 2 ֒→ D × whenever it exists. Let χ : T = T 2 /Z → C be any continuous character. Proposition 3.6 (Saito-Tunnel [13], [16]). Let π be a representation of GL 2 (F ) with central character.
where π JL is the Jacquet-Langlands correspondence of π on D × .

Steinberg representations and intertwining operators.
In this section, we assume that our representation is Steinberg, namely, α = ±1. We denote by α s := q s α and µ s := µ −1 αs ⊗ µ αs , for any s ∈ C. We observe that the representation Ind G B (µ 1 ) admits an infinite dimensional subrepresentation (V C α1 , π C α1 ) by Corollary 8.3 with M = K, g 0 = 1 and h(g) = α ν(det(g)) φ(g) (in this case BM = BK = G). Let T 2 be a two-dimensional torus as above, and let T = T 2 /Z. Throughout this section, we assume that T 2 ⊂ B as above, hence T 2 ∩ B = Z. By Corollary 8.4 (comparison) we have that here the expression α ν(det(t)) is well-defined for t ∈ T , since ν(det(z)) ∈ 2Z, for z ∈ Z.
If t ∈ T and n ∈ N , let y ∈ T such that nω ∈ By −1 (this can be done for all n but maybe finitely many). Thus, by Comparison (Corollary 8.4).
. Thus, Due to the previous computation with the particular torus T 0 , we conclude Λ(φ 0 )(t) = I(φ 0 , 0, t) = 0 and (iii) follows. Finally, part (iv) follows from the fact that V C α is irreducible and Λ is nonzero.
3.6. Local pairings. In the previous sections, we have defined a T -equivariant morphism δ T : C ⋄ (T, C) −→ (π, V ), for any representation π := π C α associated with α ∈ C × . Moreover, we have defined the pairing β π,χ : V × V → C. The aim of this section is to compute β π, We assume that either α = ±1 or |α| 2 = q, the cardinal of the residue field of F . We know that the representation is unitarizable, namely, there is an invariant hermitian inner product ·, · : V × V → C. First, let us fix the inner product: Definition 3.11. If either α = ±1 or |α| 2 = q, we denote by ·, · the hermitian inner product on (V, π) := (V C α , π C α ) given by by Proposition 3.10 (ii).
The following result computes the pairing ·, · in terms of the torus T .
Proposition 3.13. Assume that T 2 ⊂ B is a 2-dimensional torus, T = T 2 /Z and ϑ 1 , ϑ 2 ∈ V . Then, there is a constant c T satisfying that The following proposition computes the period β π, Then, there is a non-zero constant c T , depending on T , such that and the result follows (we are allowed to exchange the order of the integrals, since f i ∈ C ⋄ (T, C)).
Let us assume for the rest of the section that (π, V ) is Steinberg, hence α = ±1. Proposition 3.14 implies that, in order to compute β π,χ (δ T (f 1 ), δ T (f 2 )), one has to describe the integral T Λ(δ T (f ))(t)χ(t)dt in terms of f ∈ C ⋄ (T, C). By Equation Again, the integral I T (χ, s) := T θ T (s)(t)χ(t)dt converges absolutely for Re(s) > 1/2 and admits analytic continuation to all s ∈ C. By abuse of notation, denote also by I T (χ, s) its analytic continuation. We conclude by Proposition 3.10 (ii). This implies that I T (χ, 0) = 0 in this case. We call this the Excepcional Zero Phenomenon.
Let E/F be the quadratic extension, such that T 2 = E × . Then T 2 is split if, and only if, E = F × F . If T 2 is non-split, we say that T 2 is inert if the extension E/F is inert, and we say that T 2 ramifies if E/F ramifies. Let O E be the integer ring of E. Let η be the quadratic character associated with T . Hence Note that the maximal compact subgroup K 0 of T admits a natural composition series K 0 ⊇ K 1 ⊇ · · · ⊇ K n ⊇ · · · such that [K n : K n+1 ] = q, for all n > 0. Given a character χ of T , its conductor n χ is the integer such that χ | Kn χ = 1 and χ | Kn χ−1 = 1.
There is an integer n T , depending on the embedding T ֒→ GL 2 (F ), such that the analytic continuation I T (χ, s) is given by where n χ is the conductor of χ and, for an unramified character χ, Proof. Let us assume that the embedding T 2 ֒→ GL 2 (F ) is given by Hence we compute Since any split torus is conjugated to the group of diagonal matrices, we compute that det(x) = x and c(x) = C(x − 1), for some C ∈ F . Since T 2 ⊂ B, we have C = 0. Hence we write n T = ord(C) > −∞. We compute Two of these integrals can be calculated easily: For any n ∈ N, write O × n := 1 + ̟ n O. Let n χ be the conductor of χ, namely, We conclude If we now consider the subrings O n := O + ̟ n αO, for every n ∈ N, we compute On the other side, if n = n χ − 1, With all these computations we obtain the value of I T (χ, s): We conclude that We compute Again we denote by n χ ≥ 1 the conductor of χ, namely, χ factorizes through Some computations analogous to the previous cases yield the formula Proof. This follows directly from the above result, observing that ζ(1) = 0, ζ(−2) −1 = 0, L(−1, π, χ) = 0 and L(0, π, χ) −1 = 0, if, and only if, χ(t) = α ν(det(t)) .
Then, there exist non-zero constants k T and k ′ T , depending on T , such that where n χ is the conductor of χ.

Cohomology of automorphic forms and Shimura curves
Let F be a totally real number field. Let G be the algebraic group associated with the multiplicative group of a quaternion algebra over F , that can be either totally definite or split at a single archimedean place σ. Write G(F ) + ⊂ G(F ) for the subgroup of elements of positive norm.
Let S be a finite set of nonarchimedean places, let F S = v∈S F v and F S = F ∩ v ∈S F v . Usually we shall consider G(F ) in G(F S ) by means of the natural monomorphism. Given any ring R, let N, M be a R[G(F )]-module and a R-module respectively. We define A S f (N, M ) to be the module of functions f : we have an isomorphism of (G(F ), G(F S ))-representations: Assume that M is an R-module and R → R ′ a flat ring homomorphism. Then the canonical map Proof. This result can be found essentially in [15,Corollary 4.7], let us reproduce its proof in our setting. It is enough to prove that Hence it is enough to prove that the N ) commutes with direct limits (any module is the direct limit of free modules of finite rank). By the Strong Approximation Theorem, there are only finitely many double cosets Since the group Γ gi is S-arithmetic, hence of type (VFL), the functor N → H q (Γ gi , N ) commutes with direct limits (see [14], p.101) and the result follows.

4.1.
Abel-Jacobi map on Shimura curves. In this section, we assume that G is the multiplicative group of a quaternion algebra that splits at a single place σ | ∞. Let us consider in this case the C-vector space A(C) of functions f : we assume that any f ∈ A(C) is K σ -finite, namely, its right translates by elements of K σ span a finite-dimensional vector space.
• We assume that any f ∈ A(C) must be Z-finite, where Z is the centre of the universal enveloping algebra of G(F σ ).
Write ρ for the action of G(F σ ) × G(F ) given by right translation, (A(C), ρ) defines a smooth G(F )-representation and a (G σ , K σ )-module, where G σ is the Lie algebra of G(F σ ). Moreover, A(C) is also equipped with the G(F )-action: In analogy with Remark 4.1, we define It is well known that the space of holomorphic forms where D is the discrete series representation of weight 2, f 2 ∈ D is a generator (see Apendix 2 §9), g f ∈ G(F ), g ∞ ∈ G(F σ ) + , and τ = g ∞ i ∈ h, where h is the Poincaré upper plane. Note that φ(f 2 )f −1 2 is a function on G(F σ ) + /SO(2)R + × G(F ) = H × G(F ). It defines a differential form on Y U because φ is G(F )-invariant. Moreover, ω φ is holomorphic since Lf 2 = 0 (see (9.37)), and φ is a morphism of (G σ , K σ )-modules.
The exact sequences (4.7) and (4.8) provide morphisms in cohomology We can identify H 1 (G(F ) + , A f (C) U ) with the singular cohomology of X U with coefficients in C. Moreover, once we interpret H 0 (G(F ), A σ (D, C) U ) as the holomorphic differentials of Y U , the compositions correspond to the morphisms by (4.9).
is the subspace where complex conjugation acts by ±1, respectively. Then it is clear makes the following diagram commutative Hence, deg * = ev ± • ι ± . The existence of ev ± 0 follows from a diagram chasing.
Hence, ev − 0 and ev + 0 define the real and imaginary part, respectively, of the image of (m, gU ) ∈ Div 0 (Y U ) under the Abel-Jacobi map.

4.2.
Multiplicity one. Let Π be an automorphic weight 2 representation of G(A F ) with trivial central character, let Π S be its restriction to G(F S ), and let L be its field of definition. Thus, there is a smooth irreducible L-representation V of G(F S ), such that Π S ≃ V ⊗ L C. For a field C containing L and a smooth semi-simple C- Let W be a G(F S )-representation over C of automorphic type. By strong multiplicity one, W Π is independent of the set S in the following sense: if S ′ ⊃ S and Proposition 4.6. Let G be a quaternion algebra over F that is either definite or splitting at a single archimedean place. Then, for any field C containing the field of definition of Π, the G(F )-representation H q (G(F ), A f (C)) is of automorphic type for all q ∈ Z. Moreover, Proof. Let U ⊂ G(F ) be an open compact subgroup.
In the definite case, the double coset space X U = G(F )\G(F )/UF × is a finite set of points. The group H k (G(F ), A f (C)) U can be identified with the singular cohomology of X U with coefficients in C. Thus, we deduce that H k (G(F ), A f (C)) = 0 for k > 0. Moreover, H 0 (G(F ), A f (C)) is in correspondence with the set of modular forms φ : G(F )\G(A F )/U G(F ∞ )F × → C, for some open compact subgroup U ⊂ G(F ). This proves that H k (G(F ), A f (C)) is of automorphic type and, by multiplicity one, H 0 (G(F ), A f (C)) Π = C.
In case G splits at a single archimedean place σ, the groups H k (G(F ) + , A f (C) U ) can be identified with the singular cohomology of the Shimura curve X U with coefficients in C. Thus, H k (G(F ) + , A f (C)) = 0, for k > 2, H 0 (G(F ) + , A f (C)) and H 2 (G(F ) + , A f (C)) contain only one-dimensional irreducible subrepresentations and, by Eichler-Shimura, H 1 (G(F ) + , A f (C)) Π = C⊕C. Moreover, the groups H k (G(F ) + , A f (C)) come equipped with an action of G(F )/G(F ) + ≃ Z/2Z given by conjugation. We can identify H k (G(F ), A f (C)) as the elements of H k (G(F ) + , A f (C)) fixed by G(F )/G(F ) + . This implies that H k (G(F ), A f (C)) is of automorphic type and H 1 (G(F ), A f (C)) Π ≃ C.

p-adic global distributions and measures
As in the previous section, F will be a totally real number field. Fix a prime P with uniformizer ̟ and residue characteristic q. We will denote by O P the integer ring of F P . 5.1. Definite anticyclotomic distributions. Throughout this section, E/F will be either a totally imaginary quadratic extension or the trivial extension E = F ×F . We will denote by T the torus E × /F × , likewise,T : Let P be a prime ideal of F above p, and denote by Σ ∞ the set of infinite places of F . Fixing an open subgroup Γ ⊆ T P , we shall consider the p-adic abelian extension of E associated with Γ, namely, the maximal abelian p-adic Galois group G Γ E,P such that the Artin map ρ A : A T /T → G Γ E,P factors through Γ.
Remark 5.1. Note that here we are considering either cyclotomic extensions of F , whenever E = F × F and therefore G Γ E,P is a quotient of A × F /F × , or anticyclotomic extensions of E, whenever E/F is totally imaginary and G Γ E,P is a quotient of Let G be the algebraic group associated with the multiplicative group of a quaternion algebra A over F that splits at P. Let (Π, V Π ) be an automorphic representation of G(A F ) with a trivial central character, and let us identify V Π with a subrepresentation of H 0 (G(F ), A(C)). Let also assume that ( Again by the Tensor Product Theorem, we have a G(F P )-equivariant morphism Remark 5.2. Note that the above morphism is not unique in general. Nevertheless, since dim C ( ′ v∤∞ V Πv ) U = 1, this morphism is unique up to constant if V Πv is trivial for all v | ∞. This will be the case when the quaternion algebra A is totally definite and the automorphic representation Π is of parallel weight 2.
Assume that there is a fixed embedding ı : E ֒→ A. Hence, we can consider E × , E × v and A × E inside G(F ), G(F v ) and G(A F ), respectively, by means of ı. Let us also assume that (E × P ∩ U P )/(F × P ∩ U P ) = Γ. We choose B P ⊂ G(F P ), some conjugate of the group of upper triangular matrices, in such a way that E × P ⊂ B P . Let R ⊂ C be any ring (endowed with the discrete topology) such that α ∈ R × . The map (3.2) provides a T P -equivariant R-module morphism and it induces the T P -equivariant morphism Finally, we define the distributionμ Π E,P on G Γ E,P as follows: where ρ A : A T /T → G Γ E,P is the Artin map, H ⊂ T P is an open subgroup small enough that g • ρ A is H-invariant, 1 H ∈ C c (T P , Z) ⊂ C c (T P , C) is the characteristic function of H, and H P is the maximal open subgroup of T P . Note that the above definition does not depend on the choice of H. Indeed, for any other H ′ ⊆ H, we where the second equality is obtained from the T P -equivariance of δ.
In the cyclotomic setting (E = F × F and T = F × ), the maximal abelian extension of F unramified outside ∞ and p is isomorphic to Z p . The following lemma describes the free part of the Galois group G Γ E,P , if E/F is a totally imaginary quadratic extension, and establishes a big difference between the cyclotomic and the anticyclotomic setting:

Lemma 5.3. Assume that E/F is a totally imaginary quadratic extension and let
Remark 5.4. Observe that G E,P does not depend on Γ.
Proof. First note that, in this case, the Artin map ρ A : A T /T Γ → G Γ E,P factors throughT /ΓT . Since Γ ⊆ T P is open,T /Γ = T P × T P /Γ where T P /Γ is discrete. Moreover, Hence T is a discrete subgroup ofT . We deduce that the Z p -rank of G Γ E,P coincides with the Z p -rank of O × E,P /O × F,P , which is clearly [F P : Q p ]. From now on, we shall consider the distributionsμ Π E,P restricted to functions supported on G E,P . 5.1.1. Waldspurger formula and interpolation properties. Let E be a quadratic extension of F , as above. Again, we denote by T the torus E × /F × . Let us consider (π, V π ), an irreducible cuspidal automorphic representation in L 2 (GL 2 (F )\GL 2 (A F )) with trivial central character and parallel weight (2, 2, · · · , 2), and let χ be a finite character of A T /T . Write L(s, π E , χ) for the Rankin-Selberg L-series associated with π, χ and E. We also consider the finite sets of places of F Let A be a quaternion algebra with ramification set Σ A and let G be the algebraic group associated with the multiplicative group of A. For any place v of F , denote by (π JL v , V π JL v ) the Jacquet-Langlands lift of the local representation . We also consider the global Jacquet-Langlands lift (π JL , V π JL ) of π on G(A F ). Invoking again the Tensor Product Theorem, . We define the following pairing on π JL is the quadratic character associated with the extension E/F (η is trivial if E = F × F ) and α π JL v are the local pairings defined in §3.4. The pairing β π JL ,χ is well-defined by Proposition 3.7. The following result is due to Waldspurger [19]: Moreover, the above expression is 0 unless Σ A = Σ χ π . By Saito-Tunnel (Proposition 3.6), if T 2 does not split at some place σ | ∞, then Σ ∞ ⊆ Σ χ π for every finite character χ. Since the C-vector space in C(G E,P , C) is generated by the set of finite characters with trivial component outside P, we deduce the following direct consequence of the Waldspurger formula: Corollary 5.6. Let E/F be a totally imaginary quadratic extension. Let G be the algebraic group associated with the multiplicative group of a quaternion algebra A. Then Σ 1 π \ {P} = Σ A is a necessary condition for the Jacquet-Langlands lift π JL and the distributionμ π JL E,P to be non-zero. In particular, A is totally definite and #(Σ 1 π \ {P}) + [F : Q] is even. Remark 5.7. The above result implies that whenever #(Σ 1 π \ {P}) + [F : Q] is odd we will not be able to construct non-zero anticyclotomic p-adic distributions of G E,P using the previous procedure. In §5.4, we will explain a different procedure to deal with this situation.
From now on, we assume that E/F is a totally imaginary quadratic extension, thus, we deal with the anticyclotomic situation. For a complete description using similar techniques to the cyclotomic case (interpolation property and exceptional zero phenomenon) see [15].

5.2.
Cohomological interpretation of µ π,I E,P . We showed in the proof of Lemma 5.3 that T is a discrete subgroup inT . The Artin map provides an isomorphism G E,P ≃T /T Γ, for some open compact subgroup Γ ⊂ T P . Hence, for any Hausdorff topological ring R, we have an isomorphism Moreover, the natural map is an isomorphism and, since T P /Γ is discrete, any f P ∈ C c (T P /Γ, R) 0 can be written as a finite combination of characteristic functions of T P /Γ. Since the representation (π JL , V π JL ) satisfies (π JL P , V π JL P ) ≃ (π C α , V C α ), equation (5.14) provides an element φ ∈ Hom G(FP ) (V C α , A f (C) U P ) = A P f (V C α , C) U P , which is unique up to constant by Remark 5.2. Since π JL is an automorphic representation Lemma 5.10. We have a natural isomorphism  a) (C = C orQ) by Lemma 3.1, the above result implies that we can assume that φ ∈ H 0 (G(F ), We deduce that where res : Q)) is the restriction map. 5.3. Heegner points and Gross-Zagier-Zhang formula. As in previous sections, let G be the multiplicative group of a quaternion algebra A/F that splits at a single archimedean place σ. Let E/F be a totally imaginary quadratic extension admitting an embedding E ֒→ A.
Proof. Note that A 0 π (C) is a free L-module of infinite rank, hence the first claim follows from the fact that H 0 (G(F ), A f (L)) π JL = 0 (Proposition 4.6).
On the other side, we know that ρ π is generated by ω φ ∈ ρ U π . Thus, if we prove that ∂(ϕ(ω φ )) = 0 the assertion will follow. By Remark 4.3, we have that under the identifications given in §4.1.1. For all c ∈ H 1 (X U , Z), Hence, the result follows.
The above Lemma implies that there exists a uniqueφ ∈ H 0 (G(F ), A f (∆, A 0 π (C))) π JL extending ϕ. Let us describeφ(ω φ ) geometrically in two different ways: On the one hand,φ can be described as the extension of the composition of the F -morphism ι : X U → Jac(X U ), given by a suitable multiple of the Hodge class (resp., of the cusp at infinity if A = M 2 (Q)), with the modular parametrization Jac(X U ) → A π . Indeed, on the degree zero divisors, by (4.13). On the other hand, let H U = (Ind UF × 1 Z ) U be the Hecke algebra of compactly supported and U -bi-invariant functions. By Frobenius reciprocity, H U acts on the 1-dimensional space ρ U π , providing a morphism of algebras We write where N : G(F ) →F × is the norm map. Notice that both H U and H 0 U act on Div(X U ).
Lemma 5.12. For any T ∈ H 0 U and any (z, gU ) ∈ Div(X U ), Proof. Since A is a quaternion algebra that splits at a single archimedean place, the norm map induces an isomorphism G(F )\G(F )/U ≃ F × \F × /N (U ). Write G(F )g a U for the class corresponding to F × aN (U ). We compute, has degree zero, hence T * (z, gU ) ∈ Div 0 (X U ).
Let T ∈ H 0 U such that λ(T ) = 0. Then, where AJ is the Abel-Jacobi map of (5.22). Moreover, the above description does not depend on T .
where ω q ∈ O FQ is an uniformizer and q = #(O FQ /ω q ). It is easy to check that T ∈ H 0 U . Moreover, λ(T ) = a Q − q − 1, where |a Q | ≤ q 1/2 , hence λ(T ) = 0. Let τ E ∈ h ⊂ C \ R be the unique point in the Poincaré hyperplane such that tτ E = τ E , for all t ∈ E × . Such τ E defines a G(F )-equivariant monomorphism Ind ). Shimura's reciprocity law asserts that the image of Φ T (ω φ ) lies in A 0 π (E ab ), where E ab is the maximal abelian extension of E, and the Galois action of Gal(E ab /E) is given by In analogy with §5.1.1, we consider the pairing on and let us also consider the Neron-Tate pairing on A π : , : A π (Q) × A π (Q) −→ R.
In contrast with Definition 5.8, we assume that #(Σ 1 π \ {P}) + [F : Q] is odd. Let A be the quaternion algebra with ramification set (Σ 1 π \ {P}) ∪ (Σ ∞ \ σ), for a fixed archimedean place σ. Let π JL be the corresponding Jacquet-Langlands lift to G, the algebraic group associated with the multiplicative group of A.
The previous conditions imply that A admits an embedding ı : E ֒→ A, that we fix once for all. Let us denote by T the torus associated with E × /F × . As above, let U = U P ×U P ⊂ G(F ) be an open compact subgroup such that dim C ′ v∤∞ π JL v U = 1 and U P = GL 2 (O P ) or K 0 (̟). We have constructed a morphism of G(F )representations Let R ⊂ C be any ring (endowed with the discrete topology) such that α ∈ R × . In analogy with the definite situation, we consider the T P -equivariant morphism Similarly as above, we decompose G Γ E,P = G Γ E,P × G E,P , where G Γ E,P is its torsion subgroup. By Lemma 5.3, G E,P ≃ Z does not depend on Γ. We will consider the anticyclotomic distributions of functions supported on G E,P . We know that the Artin map ρ A :T /T → G Γ E,P factors through Γ. For g ∈ C(G E,P , C), we define G Γ E,P g(γ)dµ π,II E,P (γ) := [H P : H] where the second equality is obtained from the T P -equivariance of Φ T •δ.
Remark 5.15. By Theorem 5.14, a necessary condition for the Jacquet-Langlands lift π JL and the above expression to be non-zero is precisely that the ramification

Theorem 5.16 (Interpolation Property).
There is a non-zero constant C E depending on E/F such that, for any continuous character χ : G E,P → C × , and n χ is the conductor of χ P .
Proof. The proof is completely analogous to the proof of Theorem 5.9, if the Waldspurger formula (Theorem 5.5) is replaced by the Gross-Zagier-Zhang formula (Theorem 5.14).

5.5.
Cohomological interpretation of µ π,II E,P . Recall that Notice that the composition π (E ab ))), we deduce that the image of (5.24) . Given the fixed embeddings O L ֒→Q ֒→ C p , let log p = log ω φ : A 0 π (E ab ) ⊗ LQ −→ C p . be the formal group logarithm attached to the differential ω φ ∈ Ω 1 XU . Composing with such formal logarithm, we obtain a morphism . From now on, we denote by µ π,II E,P ∈ Dist(G E,P , C p ) (again denoted the same way by abuse of notation) the p-adic distribution Thus µ π,II E,P ∈ Dist(G E,P , C p ) can be interpreted as the logarithm of the corresponding (A 0 π (E ab ) ⊗ L C)-valued distribution. Analogously to §5.2, equation (5.25) provides an element log φ ∈ H 0 (T, A P f (VQ α , C p ) U P ). If we recall the T P -equivariant morphism (5.21): κ : A P f (VQ α , C p ) U P −→ C c (T /Γ, C p ) ∨ 0 , we deduce that GE,P g(γ)dµ π,II E,P (γ) = κ(log φ) ∩ ∂g.
5.6. p-adic measures and p-adic L-functions. Let E/F be a totally imaginary quadratic extension. Let π be a cuspidal automorphic representation of GL 2 with parallel weight 2 and a trivial central character. Let Σ 1 π be the finite set of places defined in previous sections.
In the definite case (#(Σ 1 π \ {P}) + [F : Q] even), we have constructed the distribution µ π,I E,P defined by is some generator of the Jacquet-Langlands lift to a totally definite quaternion algebra.
In the indefinite case (#(Σ 1 π \ {P}) + [F : Q] odd), we have constructed the distribution µ π,II E,P defined by where log φ ∈ H 0 (T, A P f (VQ α , C p ) U P ) has been obtained from the p-adic formal logarithm of Heegner points associated with E on the Shimura curve attached to a quaternion algebra that splits at a single place.
Definition 5.17. We say that π is P-ordinary if π P is of the form Proposition 5.18. If π is P-ordinary then both µ π,I E,P and µ π,II E,P are p-adic measures.
We claim that, if ψ is in the image of the natural monomorphism then the distribution g → κ(ψ) ∩ ∂(g) is a p-adic measure. Indeed, by (5.19), the restriction of ∂ provides an isomorphism Moreover, by (5.20), Since α ∈Ō × (ordinary), by Lemma 3.5 there exists a fixed λ ∈Ō such that the restriction of the morphism κ of (5.21) factors through We conclude that, for any ψ ∈ H 0 (T, V), the map g → κ(ψ)∩∂(g) is a distribution in Dist(G E,P , λ −1 O Cp ). The claim follows from (2.1).
In the definite case, is an automorphic form on a totally definite quaternion algebra, hence its image is a finite set of values. This implies that, after scaling, we can assume that φ(v 0 ) has values inŌ. Since VŌ =Ō[G(F P )]v 0 , we deduce that φ(f ) has values inŌ, for any f ∈ VŌ. This implies that resφ ∈ H 0 (T, V), hence µ π,I E,P ∈ Meas(G E,P , C p ). In the indefinite case, ψ = log φ. By (5.23), where g ∈ G(F P ), g P ∈ G(F P ) ((g P , g) ∈ G(F )), T is some auxiliary Hecke operator in H U 0 , and AJ is the Abel-Jacobi map (5.22). By Shimura's reciprocity law, Thus, the Galois action on λ( P ⊂ C p be the local field extension generated by E Γ , let P Γ above P be its maximal ideal and let k be its residue field. Since G Γ E,P = G E,P × G Γ E,P , where G Γ E,P is finite and G E,P is the Galois group of an extension totally ramified at P, k is finite. Note that the formal logarithm (after normalization) is given by a formal series inŌ [[t]]. We have the exact sequence where G Aπ is the formal group of A π and A π (k) is finite. This implies that the set log p (A π (E Γ P )) has bounded denominators. We conclude that there exists λ ′ ∈ C p such that log Thus, log φ ∈ H 0 (T, V) ⊗ O Cp C p and µ π,II E,P ∈ Meas(G E,P , C p ).
Hence, in the P-ordinary case, µ π,I E,P , µ π,II E,P ∈ Meas(G E,P , C p ) define elements L I P (π, E) and L II P (π, E) in the Iwasawa algebra O Cp [[G E,P ]] ⊗ O Cp C p , called (anticyclotomic) p-adic L-functions. Interpolation properties (Theorem 5.9 and Theorem 5.16) and the vanishing of the local factor L(0, π P , 1) −1 when π P is the Steinberg representation with α = 1, show the appearance of what are known as Exceptional Zeros. In terms of Iwasawa algebras, this means that both L I P (π, E) and L II P (π, E) lie in the augmentation ideal I := ker(deg), where Corollary 5.19 (Exceptional Zero). Assume that π P is Steinberg with α = α(π P ) = 1. Then the p-adic L-functions satisfy in both definite and indefinite cases.

Automorphic L-invariants
Let G be the algebraic group associated with the multiplicative group of a quaternion algebra over F that can be either definite or split at a single archimedean place. In addition, assume that G(F P ) = GL 2 (F P ), where P is a prime ideal of F dividing p. Let (Π, V Π ) be an automorphic representation of G(A F ) of weight 2 with a trivial central character, and assume that (Π P , V ΠP ) is the Steinberg representation (π C α , V C α ) with α = 1. Let U ⊂ G(F ) be an open compact subgroup such that dim C (Π | G(F ) ) U = 1. In this section, we will assume that T 2 is a torus in G(F ) associated with a totally imaginary extension that splits at P. Write T = T 2 /Z as usual.
6.1. Extensions of the Steinberg representation. The main references in this section are [15, §2.7] and [8]. Let G := G(F P ) and B is its Borel subgroup. Recall that the Steinberg representation V C := V C 1 is defined by means of the exact sequence 1 for all g ∈ G(F P ). For any topological ring R, we defined in §3.2 its R-valued analogue (π R , V R ) := (π R 1 , V R 1 ). Since T 2 P splits, there are two eigenvectors v 1 , v 2 ∈ F 2 P and two eigenvalue morphisms λ 1 , λ 2 : T 2 P −→ F × P , such that tv i = λ i (t)v i and det(t) = λ 1 (t)λ 2 (t), for all t ∈ T 2 P . We fix the isomorphism ψ : T P ≃ → F × P provided by t → λ 1 (t)/λ 2 (t). Notice that we have the map that identifies B\G with P 1 (F P ). If T 2 P ⊂ B, the restriction of ϕ provides an injection where x 1 and x 2 ∈ P 1 (F P ) correspond to the spaces generated by v 1 and v 2 , respectively. Since ϕ(1) = ∞ ∈ ϕ(T P ), the points x i = ∞ can be seen as values in F P . If It is easy to check that Λ i (gt) = Λ i (g)λ i (t), for all t ∈ T 2 P . Let H ⊂ T P be the maximal open subgroup. Thus T P /H ≃ ̟ Z for some ̟ ∈ T P . Assume that x 1 = lim xn∈̟ n H x n in P 1 (F P ) and let U = x 1 ∪ n∈N ̟ n H.
6.2. L-invariants. As in §4.2, let C be a field endowed with the discrete topology and containing the field of definition of Π. Remark 4.1 implies that be the restriction of the class associated with the continuous morphism ord : F × P → Z (here the ring Z is considered with the discrete topology). Proposition 6.3. The cup product by c ord provides an isomorphism of 1-dimensional C-vector spaces Proof. Let us describe the extension E (ℓ) in the particular case ℓ = ord : This element is clearly K-invariant, thus, by Frobenius reciprocity, (φ K , 1) ∈ E (ord) KZ = Hom KZ (1 C , E (ord)) = Hom G (Ind G KZ 1 C , E (ord)). Let T ∈ End G (Ind G KZ 1 C ) = (Ind G KZ 1 C ) K be the Hecke operator corresponding to 1 Kg̟KZ . It is easy to compute that T (φ K , 1) = (q + 1)(φ K , 1), where q = O P /P, thus (φ K , 1) provides an homomorphism of C[G]-modules On the other side, the identity in Hom KZ (C, C) = Hom G (Ind G KZ 1 C , C) is compatible with T − a (a = q + 1) and provides a surjective homomorphism deg : Write K 0 := K 0 (̟), and let U ∈ End G (Ind G K0Z 1 C ) ≃ (Ind G K0Z 1 C ) K0 be the Hecke operator corresponding to 1 K0g̟ K0Z . The two natural forgetful morphism v 1 , v 2 : Ind G K0Z 1 C → Ind G KZ 1 C provides a surjective intertwining operator v 2 − v 1 : Ind G K0Z 1 C → ker(deg). It is easy to check that av 2 • (U − 1) = T v 1 • (U − 1), hence the above morphism gives rise to an isomorphism Conjecture 6.6. Let G 1 and G 2 be the multiplicative groups of two quaternion algebras over F that are either definite or split at a single archimedean place, but both split at P. If Π 1 and Π 2 are two automorphic representations of G 1 and G 2 , respectively, related by the Jacquet-Langlands correspondence, then the L-invariants coincide, namely, L P (Π 1 , ℓ) = L P (Π 2 , ℓ), for any continuous morphism ℓ : F × P → Z p . 6.3. Geometric L-invariants. Let A Π be the abelian variety of GL 2 -type associated with Π, and let B Π be its dual abelian variety. Let L be the field of definition of Π. Since Π is Steinberg with α = 1 at P, the abelian varieties A Π and B Π have purely multiplicative reduction at P, hence they admit the following analytic description: There is a pairing (determined up to canonical isomorphism) where X and Y are free abelian groups of rank d = [L : Q], and j is a bimultiplicative mapping such that the composition ord P • j tensored with Q gives a perfect duality of Q-vector spaces moreover, such that there is a pair of exact sequences of Gal(Q p /F P )-modules (X and Y endowed with trivial Galois action) where the morphisms on the left are induced by j.
Let O L ⊂ L be the endomorphism ring of A Π (and B Π ). Thus, X and Y are O L -modules and j(αx, y) = j(x, αy) for all x ∈ X, y ∈ Y and α ∈ O L . The non-degenerate pairing (6.30) provides an isomorphism of 1-dimensional L-vector spaces α : X ⊗ Q −→ Hom(Y ⊗ Q, Q) Given a continuous morphism ℓ : F × P → Z p , we consider the corresponding bilinear pairing and the corresponding homomorphism of L ⊗ Q p modules (free of rank 1) Hence there exist L P (A Π , ℓ) ′ ∈ L ⊗ Q p such that . We define L P (A Π , ℓ) ∈ C p to be the image of L P (A Π , ℓ) ′ under the homomorphism L ⊗ Q p → C p given by the fixed embeddingQ ֒→ C p .
Assume we are in the definite case, hence Π is generated by an automorphic form φ ∈ H 0 (G(F ), A f (O L ) U ), where G is the multiplicative group of a totally definite quaternion algebra. Since O L ≃ Z d , φ can be seen as . Fix g ∈ G(F P ). Since V R is the quotient of the space C(P 1 (F P ), R) modulo the subspace generated by 1 P 1 (FP ) , we can interpret f i (g) ∈ Hom(V Z , Z) as a distribution of P 1 (F P ) with integral values and such that P 1 (FP ) df i (g) = 0. Hence, it makes sense to consider the corresponding multiplicative integral. Let H p (Q p ) := P 1 (Q p ) \ P 1 (F P ) be the p-adic Poincaré hyperplane, write ∆ P = Z[H P ], is analogous to d 2 .

Exceptional zero phenomenon in the split case
The aim of the rest of the paper is to compute the class of L I P (π, E) and L II P (π, E) in I/I 2 in the presence of the Exceptional Zero phenomenon and in case T P splits. We will invoke Corollary 2.4 and so such class will be characterized by the integrals for all ℓ ∈ Hom Zp (G E,P , Z p ) = G ∨ E,P . Let H be the maximal open compact subgroup of T P ≃ F × P . We have the exact sequence Then we can consider the real manifold M = R × T P /Γ with the following natural action of T : Since we can identify H 0 (M, Z) with C c (T P /Γ, Z), we can consider the fundamental class ϑ of the oriented compact manifold M/T as an element of H 1 (T, C c (T P /Γ, Z)) by means of the identifications Let ℓ : G E,P → Z p be a continuous group homomorphism (ℓ ∈ C(G E,P , Z p ) not necessarily locally constant). It corresponds to a continuous homomorphism ℓ :T → Z p that factors through ΓT . Let ℓ P : T P → Z p and ℓ P : T P → Z p be its corresponding restriction to T P and T P . By topological reasons, ℓ P = 0. Let F be a fundamental compact domain forT /Γ under the action of T . Hence ∂ℓ = [l1 F ], where [l1 F ] ∈ H 0 (T, C c (T /Γ, Z p )) is the image ofl1 F and 1 F ∈ C c (T /Γ, Z) is the characteristic function of F . As above, we consider the natural injections ι P : T ֒→ T P and ι P : T ֒→ T P .
Let us consider again the open compact subset U = P 1 ∪ n∈N ̟ n H of P 1 . Since ℓ P = 0, the morphism ℓ depends only on ℓ P . Hence it makes sense to consider the cocycle z ℓP ∈ H 1 (T, C c (T P , Z p )) defined by z ℓP (t) := (1 − ι P (t))(ℓ P 1 U ).
Proposition 7.2. We have that Proof. Let F ⊂T /Γ be an open compact fundamental domain for the action of T such that HF = F . By definition, ∂(ℓ) is the image of the compactly supported functionl1 F in H 0 (T, C c (T /Γ, Z p )).
Let us consider a finite index subgroup of the form T = t Z × T P ⊆ T , such that ι P (T P ) ⊂ H and ι P (t) ∈ Γ. Let G ⊆ T P /H be the subgroup generated by t and F P a fundamental domain for T P /Γ under the action of T P . Hence, as above, U G × F P is a fundamental domain forT /Γ under the action of T . Note that, in this situation, by Shapiro's Lemma, H 1 (T , C c (T P /Γ, Z)) = H 1 (t Z , C(F P , Z)). We describe ϑ as the co-restriction of the class in H 1 (t Z , C(F P , Q)) defined by the cocycle Therefore, we compute where the second equality has been obtained from Remark 7.1. Since 1 UG×F P = g∈T /T g1 F andl is trivial on T , we deduce that the class ofl1 UG×F P = g∈T /T g(l1 F ) coincides with the class of [T : T ]l1 F in H 0 (T, C c (T /Γ, Z p )), hence the result follows.
Let us consider the subset T 1 = {t ∈ T : ι P (t) ∈ H} ⊂ T and let F 1 be a fundamental domain for T P /Γ under the action of T 1 . We can consider the subgroup X := U × F 1 ⊂T /Γ. As in previous results, let us identify V Z and C c (P 1 , Z). Hence ord : Proposition 7.3. The class of the characteristic function 1 X satisfies Proof. Since ι P (T ) is dense in T P , we have the exact sequence where, by abuse of notation, we also denote by ord the composition ord • ι P . Note that z ord is the image through the inflation map of an elementz ord ∈ H 1 (T /T 1 , (V Z ) T1 ).
On the other hand, let us consider ϑ 1 ∈ H 1 (T /T 1 , Z) ≃ H 1 (R/T, Z) given by the fundamental class of R/T (t ∈ T acts on R by tx = x + ord(ι P (t)) as above).
Then it is clear that [1 F1 ] ⊗ ϑ 1 is mapped to ϑ by means of the composition Thus, the result follows if we show thatz ord ∩ ϑ Indeed, if t ∈ T /T 1 is a generator then For any continous Z p -module homomorphism ℓ : G E,P → Z p , letl :T → Z p be the composition ℓ•ρ A , whereρ A :T → G E,P is the Artin map, and let ℓ P : T P → Z p be its restriction to T P (recall that ℓ P = 0). We will identify T P with F × P by means of the isomorphism ψ of §6.1. Recall the automorphic L-invariant L P (π JL , ℓ P ) introduced in Definition 6.5. Definition 7.4. By Corollary 2.4, the morphism in Hom Zp (G ∨ E,P , C p ) that maps ℓ ∈ G ∨ E,P to L P (π JL , ℓ P ) ∈ C p defines a class L P (π) ∈ I/I 2 , where I is the augmentation map of O Cp [[G E,P ]] ⊗ O Cp C p . Such class L P (π) is called automorphic L-invariant vector attached to π.
We have shown that L i P (π, E) ∈ I whenever π P Steinberg with α = 1. The main result of this section computes the class of L i P (π, E) in I/I 2 in terms of the automorphic L-invariant vector.
The (G, H)-module structure of I can be described as follows: Let L, R ∈ G be the Maass differential operators defined in [