---
abstract: 'A large number of natural language processing tasks exist to analyze syntax, semantics, and information content of human language. These seemingly very different tasks are usually solved by specially designed architectures. In this paper, we provide the simple insight that a great variety of tasks can be represented in a single unified format consisting of labeling spans and relations between spans, thus a single task-independent model can be used across different tasks. We perform extensive experiments to test this insight on 10 disparate tasks as broad as dependency parsing (syntax), semantic role labeling (semantics), relation extraction (information content), aspect based sentiment analysis (sentiment), and many others, achieving comparable performance as state-of-the-art specialized models. We further demonstrate benefits in multi-task learning. We convert these datasets into a unified format to build a benchmark, which provides a holistic testbed for evaluating future models for generalized natural language analysis.'
author:
- |
    Zhengbao Jiang\
    Language Technologies Institute\
    Carnegie Mellon University\
    `zhengbaj@cs.cmu.edu`\
    Wei Xu\
    Department of Computer Science and Engineering\
    Ohio State University\
    `xu.1265@osu.edu`\
    Jun Araki\
    Bosch Research North America\
    `jun.araki@us.bosch.com`\
    Graham Neubig\
    Language Technologies Institute\
    Carnegie Mellon University\
    `gneubig@cs.cmu.edu`\
bibliography:
- 'iclr2020\_conference.bib'
title: |
    Generalizing Natural Language Analysis\
    through Span-relation Representations
---

Introduction
============

A large number of natural language processing (NLP) tasks exist to analyze various aspects of human language, including syntax (e.g., constituency and dependency parsing), semantics (e.g., semantic role labeling), information content (e.g., named entity recognition and relation extraction), or sentiment (e.g. sentiment analysis). At first glance, these tasks are seemingly very different in both the structure of their output and the variety of information that they try to capture. To handle these different characteristics, researchers usually use specially designed neural network architectures. In this paper we ask the simple questions: are the task-specific architectures really necessary? Or with the appropriate representational methodology, can we devise *a single model that can perform — and achieve state-of-the-art performance on — a large number of natural language analysis tasks*?

[r]{}[0.4]{}

![image](brat2.png){width="35.00000%"}

Interestingly, in the domain of *efficient human annotation interfaces*, it is already standard to use unified representations for a wide variety of NLP tasks. On the right we show one example of the annotation interface BRAT [@stenetorp-etal-2012-brat], which has been used for annotating data for tasks as broad as part-of-speech tagging, named entity recognition, relation extraction, and many others. Notably, this interface has a single unified format that consists of spans (e.g. the span of an entity), labels on the spans (e.g. the variety of entity such as “person” or “location”), and labeled relations between the spans (e.g. “born-in”). These labeled relations can form a tree or graph structure (e.g., dependency tree), expressing the linguistic structure of sentences. We detail this BRAT format and how it can be used to represent a wide number of natural language analysis tasks in Section \[sec:brat\].

The simple hypothesis behind our paper is: *if humans can perform natural language analysis in a single unified format, then perhaps machines can as well*. Fortunately, there already exist NLP models that perform span prediction and prediction of relations between pairs of spans, such as the end-to-end neural coreference model of [@lee:17:e2ecoref]. We extend this model with minor architectural modifications (which are *not* our core contributions) and pre-trained contextualized representations (e.g., BERT; @devlin-etal-2019-bert[^1]) then demonstrate the applicability and versatility of this single model on 10 tasks, including named entity recognition (NER), relation extraction (RE), coreference resolution (Coref.), open information extraction (OpenIE), part-of-speech tagging (POS), dependency parsing (Dep.), constituency parsing (Consti.), semantic role labeling (SRL), aspect based sentiment analysis (ABSA), and opinion role labeling (ORL). While previous work has used similar formalisms to *understand* the representations learned by pre-trained embeddings [@tenney:19:bertpipeline; @tenney:19:bertprobe], to the best of our knowledge this is the first work that uses such a unified model to actually *perform analysis*. Moreover, despite it simplicity we demonstrate that such a model can achieve comparable performance with special-purpose state-of-the-art models on the tasks above (). We also demonstrate that this framework allows us to easily perform multi-task learning among different tasks, leading to improvements when there are related tasks to be learned from or data is sparse. In summary, our contributions are:

-   We provide the simple insight that a great variety of natural language analysis tasks can be represented and solved in a single unified format, i.e., span-relation representations. This insight may seem obvious in hindsight, but it has not been examined, particularly to this scale, by previous work on model-building for NLP.

-   We perform extensive experiments to test this insight on 10 disparate tasks, achieving comparable empirical results as the state-of-the-art, using a single task-independent modeling framework.

-   We further use this framework to perform an analysis of the benefits from multi-task learning across all of the tasks above, gleaning various insights about task relatedness and how multi-task learning performs with different token representations.

-   In addition, we will release our code and the **G**eneral **L**anguage **A**nalysis **D**atasets () benchmark with 8 datasets covering 10 tasks in the BRAT format on <https://github.com/jzbjyb/SpanRel>, and provide a leaderboard to facilitate future work on generalized models for NLP. Compared to the full sentence-level tasks in the GLUE leaderboard [@wang:19:superglue; @wang:19:glue], we cover a wide variety of natural language analysis tasks that require analyzing of the finer grained text units (e.g., words, phrases, clauses).

[0.47]{}

\[tab:demo\_span\]

[0.53]{}

\[tab:demo\_rel\]

Span-relation Representations {#sec:brat}
=============================

In this section, we explain how the BRAT format can be used to represent a large number of tasks. There are two fundamental types of annotations: span annotations and relation annotations. Given a sentence $\mathbf{x}=[w_1, w_2, ..., w_n]$ of $n$ tokens, a span annotation $(s_i, l_i)$ consists of a contiguous span of tokens $s_i=[w_{b_i}, w_{b_i+1}, ..., w_{e_i}]$ and its label $l_i$ ($l_i\in\mathcal{L}$), where $b_i$/$e_i$ are the start/end indices respectively, and $\mathcal{L}$ is a set of span labels. A relation annotation $(s_j, s_k, r_{jk})$ refers to a relation $r_{jk}$ ($r_{jk}\in\mathcal{R}$) between the head span $s_j$ and the tail span $s_k$, where $\mathcal{R}$ is a set of relation types. This span-relation representation can easily express many tasks by defining different $\mathcal{L}$ and $\mathcal{R}$, as summarized in and . These tasks fall in two categories: **span-oriented tasks**, where the goal is to predict labeled spans (e.g., named entities in NER) and **relation-oriented tasks**, where the goal is to predict relations between two spans (e.g., relation between two entities in RE).

-   **Span-oriented Tasks ()**

    -   **Named Entity Recognition** [@sang:03:conll2003] NER is traditionally considered as a sequence labeling task. We model named entities as spans over one or more tokens.

    -   **Constituency Parsing** [@collins-1997-three] Constituency parsing aims to produce a syntactic parse tree for each sentence. Each node in the tree is an individual span, and spans are nested.

    -   **Part-of-speech Tagging** [@ratnaparkhi-1996-maximum; @toutanova-etal-2003-feature] POS tagging is another sequence labeling task, where every single token is an individual span with a POS tag.

    -   **Aspect-based Sentiment Analysis** [@pontiki:14:semeval2014] ABSA is a task that consists of identifying certain spans as aspect terms and predicting their associated sentiments.

-   **Relation-oriented Tasks ()**

    -   **Relation Extraction** [@hendrickx:10:semeval2010] RE concerns the relation between two entities.

    -   **Coreference** [@pradhan:12:conll2012] Coreference resolution is to link named, nominal, and pronominal mentions that refer to the same concept, within or beyond a single sentence.

    -   **Semantic Role Labeling** [@gildea:2002:srl] SRL aims to identify arguments of a predicate (verb or noun) and classify them with semantic roles in relation to the predicate.

    -   **Open Information Extraction** [@banko:07:openie; @niklaus-etal-2018-survey] In contrast to the fixed relation types in RE, OpenIE aims to extract open-domain predicates and their arguments (usually subjects and objects) from a sentence.

    -   **Dependency Parsing** [@kubler2009dependency] Spans are single-word tokens and a relation links a word to its syntactic parent with the corresponding dependency type.

    -   **Opinion Role Labeling** [@yang:13:fgoe] ORL detects spans that are opinion expressions, as well as holders and targets related to these opinions.

While the tasks above represent a remarkably broad swath of NLP, it is worth mentioning what we have *not* covered, to properly scope the work. Notably, sentence-level tasks such as text classification and natural language inference are not covered, although they can also be formulated using this span-relation representation by treating the entire sentence as a span. We chose to omit these tasks because they are already well-represented by previous work on generalized architectures [@lan-xu-2018-neural] and multi-task learning [@devlin-etal-2019-bert; @liu:19:mtdnn], and thus we mainly focus on tasks using phrase-like spans. In addition, the span-relation representations described here are designed for natural language *analysis*, and cannot handle tasks that require *generation* of text, such as machine translation [@bojar:14:wmt14], dialog response generation [@lowe:15:ubuntu], and summarization [@nallapati:16:sum]. There are also a small number of analysis tasks such as semantic parsing to logical forms [@banarescu:13:amr] where the outputs are not directly associated with spans in the input, and handling these tasks is beyond the scope of this work.

Span-relation Model {#sec:spanrelationmodel}
===================

Now that it is clear that a very large number of analysis tasks can be formulated in a single format, we turn to devising a single model that can solve these tasks. We base our model on a span-based model first designed for end-to-end coreference resolution [@lee:17:e2ecoref], which is then adapted for other tasks [@he-etal-2018-jointly; @luan:18:mtlie; @luan-etal-2019-general; @dixit-al-onaizan-2019-span; @zhan:19:spanoie]. At the core of the model is a module to represent each span as a fixed-length vector, which is used to predict labels for spans or span pairs. We first briefly describe the span representation used and proven to be effective in previous works, then highlight some details we introduce to make this model generalize to a wide variety of tasks.

#### Span Representation

Given a sentence $\mathbf{x}=[w_1, w_2, ..., w_n]$ of $n$ tokens, a span $s_i=[w_{b_i}, w_{b_i+1}, ..., w_{e_i}]$ is represented by concatenating two components: a *content representation* $\mathbf{z}^c_i$ calculated as the weighted average across all token embeddings in the span, and a *boundary representation* $\mathbf{z}^u_i$ that concatenates the embeddings at the start/end positions of the span. Specifically, $$\begin{aligned}
\mathbf{c}_1,\mathbf{c}_2,...,\mathbf{c}_n &= \text{TokenRepr}(w_1, w_2, ..., w_n), \label{eq:tokenrepr}\\
\mathbf{u}_1,\mathbf{u}_2,...,\mathbf{u}_n &= \text{BiLSTM}(\mathbf{c}_1,\mathbf{c}_2,...,\mathbf{c}_n), \label{eq:bilstm}\\
\mathbf{z}_i^c = \text{SelfAttn}(\mathbf{c}_{b_i},\mathbf{c}_{b_i+1},&...,\mathbf{c}_{e_i}), \quad
\mathbf{z}_i^u = [\mathbf{u}_{b_i};\mathbf{u}_{e_i}], \quad 
\mathbf{z}_i = [\mathbf{z}_i^c;\mathbf{z}_i^u],\end{aligned}$$ where $\text{TokenRepr}$ could be non-contextualized embeddings, such as GloVe [@pennington:14:glove], or contextualized embeddings, such as ELMo [@peters-etal-2018-deep], BERT [@devlin-etal-2019-bert], and SpanBERT [@joshi:19:spanbert]. We refer to [@lee:17:e2ecoref] for further details.

#### Span and Relation Label Prediction

Since we extract spans and relations in an *end-to-end* fashion, we introduce two additional labels `NEG_SPAN` and `NEG_REL` in $\mathcal{L}$ and $\mathcal{R}$ respectively. `NEG_SPAN` indicates invalid spans (e.g., spans that are not named entities in NER) and `NEG_REL` indicates invalid span pairs without any relation between them (i.e., no relation exists between two arguments in SRL). We first predict labels for *all* spans up to a length of $l$ words using a multilayer perceptron (MLP): $\text{softmax}({\text{MLP}}^\text{span}(\mathbf{z}_i)) \in \Delta^{|\mathcal{L}|}$, where $\Delta^{|\mathcal{L}|}$ is a $|\mathcal{L}|$-dimensional simplex. Then we keep the top $K = \tau \cdot n$ spans with the lowest `NEG_SPAN` probabilities in relation prediction for efficiency, where smaller pruning threshold $\tau$ indicates more aggressive pruning. Another MLP is applied to pairs of the remaining spans to produce their relation score: $\mathbf{o}_{jk}={\text{MLP}}^\text{rel}([\mathbf{z}_j;\mathbf{z}_k;\mathbf{z}_j\cdot \mathbf{z}_k]) \in \mathbb{R}^{|\mathcal{R}|}$.[^2]

#### Application to Disparate Tasks

For most of the tasks, we can simply maximize the probability of the ground truth relation for *all pairs of the remaining spans*. However, some tasks might have different requirements, e.g., coreference resolution aims to cluster spans referring to the same concept and we do not care about which antecedent a span is linked to if there are multiple ones. To accommodate different requirements, we provide two training loss functions:

1.  **Pairwise** Maximize the probabilities of the ground truth relations for all pairs of the remaining spans independently: ${\mathrm{softmax}}(\mathbf{o}_{jk})_{r_{jk}}$, where $r_{jk}$ indexes the ground truth relation.

2.  **Head** Maximize the probability of selecting the ground truth head spans for a specific span $s_j$: $\sum_{k \in \text{head}(s_j)}{{\mathrm{softmax}}([o_{j1}, o_{j2}, ..., o_{jK}])_k}$, where $\text{head}(\cdot)$ returns indices of one or multiple heads and $o_{j\cdot}$ is the corresponding scalar from $\mathbf{o}_{j\cdot}$ indicating how likely two spans are related.

We use option 1 for all tasks except for coreference resolution which uses option 2. Note that the above loss functions *only* differ in how relation scores are normalized and the other parts of the model remain the same across different tasks. At test time, we follow previous inference methods to generate valid outputs. For coreference resolution, we link a span to the antecedent with highest score and build clusters [@lee:17:e2ecoref]. For constituency parsing, we use the greedy top-down decoding [@stern:17:spanconsti] to generate a valid parse tree. For dependency parsing, each word is linked to exactly one parent with the highest relation probability. For other tasks, we predict relations for all span pairs and use those not predicted as `NEG_REL` to construct outputs.

Our core insight is that the above formulation is largely *task-agnostic*, meaning that a task can be modeled in this framework as long as it can be formulated as a span-relation prediction problem with properly defined span labels $\mathcal{L}$ and relation labels $\mathcal{R}$. As shown in , this unified **Span**-**Rel**ation () model makes it simple to scale to a large number of language analysis tasks, with breadth far beyond that of previous work.

#### Multi-task Learning

The model makes it easy to perform multi-task learning (MTL) by sharing all parameters except for the MLPs used for label prediction. With shared span representations, different tasks can learn from each other. However, because different tasks capture different linguistic aspects, they are not equally beneficial to each other. It is expected that jointly training on related tasks is helpful, while forcing the same model to solve unrelated tasks might even hurt the performance [@ruder:17:mtl]. Compared to manually choosing source tasks based on prior knowledge, which might be sub-optimal when the number of tasks is large, offers a systematic way to examine relative benefits of source-target task pairs, as we will show in .

Benchmark and Results
=====================

We first describe our **G**eneral **L**anguage **A**nalysis **D**atasets () benchmark and evaluation metrics, then conduct experiments to (1) verify that can achieve comparable performance across all tasks (), and (2) demonstrate its benefits in multi-task learning ().

Experimental Settings {#sec:datasets}
---------------------

#### Benchmark and Evaluation Metrics

As summarized in , we convert 8 widely used datasets with annotations of 10 tasks into the BRAT format and include them in the benchmark. It covers diverse domains, spans, and relations, and provides a holistic testbed for natural language analysis evaluation. The major evaluation metric is span-based F$_1$ (denoted as F$_1$ unless otherwise noted), a standard metric for SRL. Precision is the proportion of extracted spans (spans not predicted as `NEG_SPAN`) that are consistent with the ground truth. Recall is the proportion of ground truth spans that are correctly extracted. F$_1$ is their harmonic mean. Span F$_1$ is also applicable to the case of relations, where an extracted relation (relations not predicted as `NEG_REL`) is correct iff both head and tail spans have correct boundaries and the predicted relation label is correct. To make fair comparisons with existing works, we also compute standard metrics for different tasks, as listed in . We refer to the corresponding papers for details.

#### Implementation Details

We attempted four token representation methods (), namely GloVe [@pennington:14:glove], ELMo [@peters-etal-2018-deep], BERT [@devlin-etal-2019-bert], and SpanBERT [@joshi:19:spanbert]. We use BERT$_\text{base}$ in our main results and report BERT$_\text{large}$ in . A three-layer BiLSTM with 256 hidden units is used (). Both span and relation prediction MLPs have two layers with 128 hidden units. Dropout [@srivastava:14:dropout] of 0.5 is applied to all layers. For GloVe and ELMo, we use Adam [@kingma:14:adam] with learning rate of 1e-3 and early stop with patience of 3. For BERT and SpanBERT, we follow standard fine-tuning and use Adam with learning rate of 5e-5, $\beta_1=0.9$, $\beta_2=0.999$, L2 weight decay of 0.01, warmup over the first 10% steps, and number of epochs tuned on development set. Task-specific hyperparameters maximal span length and pruning ratio are tuned on development set and listed in .

Comparison with task-specific SOTA methods {#sec:exp_sota}
------------------------------------------

We compare the model with state-of-the-art task-specific models by training on data from a single task. By doing so we attempt to answer the research question “can a single model with minimal task-specific engineering achieve competitive or superior performance to other models that have been specifically engineered?” We select competitive SOTA models mainly based on settings, e.g., single-task learning and end-to-end extraction of spans and relations. To make fair comparisons, token embeddings (GloVe, ELMo, BERT) and other hyperparameters (e.g., the number of antecedents in Coref. and the maximal span length in SRL) in our method are set to match those used by SOTA models, to focus on differences brought about by the model architecture.

As shown in , the model achieves comparable performances as the task-specific SOTA methods (regardless of whether the token representation is contextualized or not). This indicates that the span-relation format can generically represent a large number of natural language analysis tasks and it is possible to devise a single unified model that can achieves strong performance on all of them. It provides a strong and generic baseline for natural language analysis tasks and a way to examine the usefulness of task-specific designs.

Multi-task Learning with Span-relation Representation {#sec:exp_mtl}
-----------------------------------------------------

To demonstrate the benefit of the model in MTL, we perform single-task learning (STL) and MTL across all tasks using end-to-end settings.[^3] Following [@liu:19:mtdnn], we perform MTL+fine-tuning and show the results in separate columns of . Contextualized token representations yield significantly better results than GloVe on all tasks, indicating that pre-training on large corpora is almost universally helpful to NLP tasks. Comparing the results of MTL+fine-tuning with STL, we found that performance with GloVe drops on 8 out of 15 tasks, most of which are tasks with relatively sparse data. It is probably because the capacity of the GloVe-based model is too small to store all the patterns required by different tasks. The results of contextualized representations are mixed, with some tasks being improved and others remaining the same or degrading. We hypothesize that this is because different tasks capture different linguistic aspects, thus are not equally helpful to each other. Reconciling these seemingly different tasks in the same model might be harmful to some tasks. Notably, as the contextualized representations become stronger, the performance of MTL+FT becomes more favorable. 5 out of 15 tasks (NER, RE, OpenIE, SRL, ORL) observe improvements with SpanBERT, a contextualized embedding pre-trained with span-based training objectives, while only one task degrades (ABSA), indicating its superiority in reconciling spans from different tasks. The benchmark provides a holistic testbed for evaluating natural language analysis capability.

#### Task Relatedness Analysis {#sec:exp_pair_mtl}

To further investigate how different tasks interact with each other, we choose five source tasks (POS, NER, Consti., Dep., and SRL) that have been widely used in MTL [@hashimoto:17:mtlsocher; @strubell-etal-2018-linguistically] and six target tasks (OpenIE, NER, RE, ABSA, ORL, and SRL) to perform pairwise multi-task learning. We hypothesize that although language modeling pre-training is theoretically orthogonal to MTL [@swayamdipta-etal-2018-syntactic], in practice the benefit of pre-training tends to overlap or even overshadow the benefit of MTL. To analyze these two factors separately, we start with a weak representation GloVe to study task relatedness, then move to BERT to demonstrate how much we can still improve with MTL given strong and contextualized representations. As shown in Table \[tab:mtl\_pairwise\] (GloVe), tasks are not equally useful to each other. Notably, (1) for OpenIE and ORL, multi-task learning with SRL improves the performance significantly, while other tasks lead to less or no improvements. (2) Dependency parsing and SRL are generic source tasks that are beneficial to most of the target tasks. (3) ABSA is quite different from the source tasks and no improvement is observed with MTL. This unified makes it easy to perform MTL and decide beneficial source tasks.

\[tab:mtl\_pairwise\]

![image](srl_size){width="1.0\columnwidth"} \[fig:srl\_size\]

#### MTL under Different Settings

We analyze how token representations and sizes of the target dataset affect the performance of MTL. Comparing BERT and GloVe in Table \[tab:mtl\_pairwise\], the improvements of MTL become smaller or vanish as the token representation becomes stronger, e.g., improvement on OpenIE with SRL reduces from 5.8 to 1.6 and improvement on SRL with Dep. reduces from 2.5 to 1.1. This is expected because both large-scale pre-training and MTL aim to learn general representations and their benefits tend to overlap in practice. Interestingly, some helpful source tasks even become harmful when we shift from GloVe to BERT, such as OpenIE paired with Consti. or POS. We conjecture that the gains of MTL might have already been achieved by BERT, but the task-specific characteristics of Consti. and POS hurt the performance of OpenIE. The improvements of MTL shrink as we increase the size of the SRL datasets, as shown in , indicating that MTL is more useful when the target data is sparse.

Related Work {#sec:related}
============

#### General Architectures for NLP

There has been a rising interest in developing general architectures for different NLP tasks, with the most prominent examples being sequence labeling framework [@collobert:11:nlpscratch; @ma:16:lstmcnncrf] used for tagging tasks (e.g., NER, POS) and sequence-to-sequence framework [@sutskever:14:seq2seq] used for generation tasks (e.g., machine translation). Moreover, researchers typically pick related tasks, motivated by either linguistic insights or empirical results, and create a general framework to perform MTL, several of which are summarized in . For example, based on the belief that semantic structure of a sentence should conform with syntactic structure, [@swayamdipta-etal-2018-syntactic] and [@strubell-etal-2018-linguistically] use constituency and dependency parsing to improve SRL. [@luan:18:mtlie; @luan-etal-2019-general] use a span-based model to jointly solve three information-extraction-related tasks (NER, RE, and Coref.). Compared to existing works, we aim to create an output representation that can solve *nearly every* natural language analysis task in one fell swoop, allowing us to cover a far broader range of tasks with a single model.

In addition, NLP has seen a recent burgeoning of contextualized token embeddings pre-trained on large corpra (e.g., ELMo [@peters-etal-2018-deep] and BERT [@devlin-etal-2019-bert]). These methods focus on learning generic *input* representations, but are agnostic to the *output* representation, requiring different predictors to be designed for different tasks. In contrast, we present a methodology to formulate the output of different tasks in a unified format. Thus our work is orthogonal to those on contextualized embeddings. Indeed, in , we demonstrate that the model can benefit from stronger contextualized representation models, and even provide a testbed for their use in natural language analysis.

#### Benchmarks for Evaluating Natural Language Understanding

Due to the rapid development of NLP models, large-scale benchmarks, such as SentEval [@conneau-kiela-2018-senteval], GLUE [@wang:19:glue], and SuperGLUE [@wang:19:superglue] have been proposed to facilitate fast and holistic evaluation of models’ natural language understanding ability. They mainly focus on sentence-level tasks, such as text classification and natural language inference, while our benchmark focuses on token/phrase-level analysis tasks with diverse coverage of different linguistic structures. With different tasks represented under the same format, a model can be easily evaluated on all our tasks, reflecting various aspects of its natural language analysis capability. New tasks and datasets can be conveniently added to our benchmark as long as they are in the BRAT standoff format, which is one of the most commonly used data format in the NLP community, e.g., it has been used in the BioNLP shared tasks [@kim:2009:bionlp] and the Universal Dependency project [@mcdonald-etal-2013-universal].

Conclusion
==========

We provide the simple insight that a large number of natural language analysis tasks can be represented in a single format consisting of spans and relations between spans. As a result, these tasks can be solved in a single modeling framework that first extracts spans and predicts their labels, then predicts relations between extracted spans. We attempted 10 tasks with this model under this unified representation and show that this generic task-independent model can achieve competitive performance as state-of-the-art methods tailored for each tasks. We merge 8 datasets into our benchmark for evaluating future models for natural language analysis. Future directions include (1) devising hierarchical span representations that can handle spans of different length and diverse content and length more effectively and efficiently. (2) robust multitask learning or meta-learning algorithms that can learn to relate and reconcile very different tasks.

### Acknowledgments {#acknowledgments .unnumbered}

This work was supported by gifts from Bosch Research. We would like to thank Hiroaki Hayashi, Bohan Li, Pengcheng Yin, Hao Zhu, Paul Michel, Antonios Anastasopoulos for their insightful comments and suggestions.

Results of BERT large model {#ap:bertlarge}
===========================

Task-specific Hyperparameters {#ap:hyper}
=============================

As shown in , a larger maximum span length is used for tasks with longer spans (e.g., OpenIE), and a larger pruning ratio is used for tasks with more spans (e.g., SRL). Constituency parsing does not have span length limit because spans can be as long as the entire sentence. Since relation extraction aims to extract exactly two entities and their relation from a sentence, we keep pruning ratio fixed (top 5 spans in this case) regardless of the length of the sentence.

  ---------------------- ----- ---- -------- -------- --- ------ --------- ----- ------ -----
                                                                                        
                          NER   RE   Coref.   OpenIE       Dep.   Consti.         ABSA   ORL
   max span length $l$    10    5      10       30     1    1        -      30     10    30
   pruning ratio $\tau$    -    5     0.4      0.8     -   1.0       -      1.0    -     0.3
  ---------------------- ----- ---- -------- -------- --- ------ --------- ----- ------ -----

  : Task-specific hyperparameters. Span-oriented tasks do not need pruning ratio.[]{data-label="tab:hyperparam"}

[^1]: To contrast to work on pre-trained contextualized representations like ELMo [@peters-etal-2018-deep] or BERT [@devlin-etal-2019-bert], these works learn unified *features* to represent the *input* in different tasks, whereas we propose a unified *representational methodology* that represents the *output* of different tasks. Analysis models using BERT still designed special-purpose output predictors for specific tasks or task classes.

[^2]: The time complexity of span prediction is $\mathcal{O}(l \cdot n)$ for a sentence of $n$ tokens, and the time complexity of relation prediction is $\mathcal{O}(K^2)=\mathcal{O}(\tau^2 \cdot n^2)$. Another option for span prediction is to formulate it as a sequence labeling task, as did in previous works on SRL [@he-etal-2017-deep] and many others [@lample:16:ner; @stanovsky-etal-2018-supervised], and their time complexity is $\mathcal{O}(n)$. Although slower than token-based labeling models, span-based models offer the advantages of being able to model overlapping spans (e.g., overlapping arguments in SRL) and exploring span-level information for span prediction.

[^3]: Span-based F$_1$ is used as the evaluation metric in SemEval-2010 Task 8 and SemEval-2014 Task 4 as opposed to macro F$_1$ and accuracy reported in the original papers because we aim at end-to-end extractions.
