Datasets:
Add files using upload-large-folder tool
Browse files- parse/dev/-Aw0rrrPUF/-Aw0rrrPUF_middle.json +0 -0
- parse/dev/2-REuflJDT/2-REuflJDT.md +220 -0
- parse/dev/2-REuflJDT/2-REuflJDT_middle.json +0 -0
- parse/dev/2-REuflJDT/2-REuflJDT_model.json +0 -0
- parse/dev/A4fSkNAs6E1/A4fSkNAs6E1.md +422 -0
- parse/dev/A4fSkNAs6E1/A4fSkNAs6E1_content_list.json +0 -0
- parse/dev/A4fSkNAs6E1/A4fSkNAs6E1_middle.json +0 -0
- parse/dev/A4fSkNAs6E1/A4fSkNAs6E1_model.json +0 -0
- parse/dev/IajGRJuM7D3/IajGRJuM7D3_content_list.json +0 -0
- parse/dev/IajGRJuM7D3/IajGRJuM7D3_model.json +0 -0
- parse/dev/MR7XubKUFB/MR7XubKUFB_middle.json +0 -0
- parse/dev/RKiWwhocuiU/RKiWwhocuiU_model.json +0 -0
- parse/dev/T0GpzBQ1Fg6/T0GpzBQ1Fg6.md +481 -0
- parse/dev/T0GpzBQ1Fg6/T0GpzBQ1Fg6_middle.json +0 -0
- parse/dev/T0GpzBQ1Fg6/T0GpzBQ1Fg6_model.json +0 -0
- parse/dev/bdHkMjBJG_w/bdHkMjBJG_w.md +0 -0
- parse/dev/mTiHLHu3sP/mTiHLHu3sP.md +326 -0
- parse/dev/mTiHLHu3sP/mTiHLHu3sP_content_list.json +1891 -0
- parse/dev/mTiHLHu3sP/mTiHLHu3sP_middle.json +0 -0
- parse/dev/mTiHLHu3sP/mTiHLHu3sP_model.json +0 -0
parse/dev/-Aw0rrrPUF/-Aw0rrrPUF_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/2-REuflJDT/2-REuflJDT.md
ADDED
|
@@ -0,0 +1,220 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Fully Convolutional One-Stage 3D Object Detection on LiDAR Range Images
|
| 2 |
+
|
| 3 |
+
Zhi Tian1, Xiangxiang $\mathbf { C h u ^ { 1 } }$ , Xiaoming Wang2∗, Xiaolin Wei1, Chunhua Shen3†
|
| 4 |
+
|
| 5 |
+
1 Meituan Inc. 2 Northwestern Polytechnical University 3 Zhejiang University 1 {tianzhi02,chuxiangxiang,weixiaolin02}@meituan.com 2 chunhua@me.com 3 xiaomingwang80@163.com
|
| 6 |
+
|
| 7 |
+
# Abstract
|
| 8 |
+
|
| 9 |
+
We present a simple yet effective fully convolutional one-stage 3D object detector for LiDAR point clouds of autonomous driving scenes, termed FCOS-LiDAR. Unlike the dominant methods that use the bird-eye view (BEV), our proposed detector detects objects from the range view (RV, a.k.a. range image) of the LiDAR points. Due to the range view’s compactness and compatibility with the LiDAR sensors’ sampling process on self-driving cars, the range view-based object detector can be realized by solely exploiting the vanilla 2D convolutions, departing from the BEV-based methods which often involve complicated voxelization operations and sparse convolutions.
|
| 10 |
+
|
| 11 |
+
For the first time, we show that an RV-based 3D detector with standard 2D convolutions alone can achieve comparable performance to state-of-the-art BEV-based detectors while being significantly faster and simpler. More importantly, almost all previous range view-based detectors only focus on single-frame point clouds, since it is challenging to fuse multi-frame point clouds into a single range view. In this work, we tackle this challenging issue with a novel range view projection mechanism, and for the first time demonstrate the benefits of fusing multi-frame point clouds for a range-view based detector. Extensive experiments on nuScenes show the superiority of our proposed method and we believe that our work can be strong evidence that an RV-based 3D detector can compare favourably with the current mainstream BEV-based detectors. Code will be made publicly available.
|
| 12 |
+
|
| 13 |
+
# 1 Introduction
|
| 14 |
+
|
| 15 |
+
With the rise of autonomous driving, 3D object detection from the LiDAR point cloud has been recently drawing increasing attention. Similar to the 2D image object detection [RHGS15, TSCH19, $\mathrm { L A E ^ { + } } \dot { 1 } 6$ , RF17, RDGF16], 3D object detection requires the model to predict the (3D) locations of the objects of interest and the associated properties (e.g., categories, sizes, heading, and the state of motion). In spite of the unprecedented success that the computer vision community has attained on the 2D image object detection, it is still intractable to transfer the success to the 3D object detection task.
|
| 16 |
+
|
| 17 |
+
Most previous 3D object detection methods consider that the point cloud is amorphous and consists of a set of unordered points. Thus, this task is considered significantly different from its 2D detection counterpart, which works on structured RGB images. Moreover, the cornerstones of modern computer vision—CNNs or CNN-like vision transformers (e.g., Swin Transformers $[ \mathrm { L L C ^ { + } } 2 1 ]$ ) also assume that the inputs are well-organized as grids, which poses another difficulty of accurate 3D object detection in point clouds. As a result, in order to adopt these well-developed techniques, almost all top-performing point cloud object detection methods first partition the 3D space into structured voxels (or pillars) [ZT18, YZK21, YML18, $\mathrm { L V C ^ { + } } 1 9$ , Li17] and then follow a paradigm similar to that of 2D object detectors [RHGS15, ZWK19]. Additionally, given the prior that it is very rare two objects being stacked along with the elevation axis in autonomous driving scenes, most methods only carry out the detection task on the bird-eye view (BEV) of the point cloud, which can reduce the exponentially increasing complexity resulted from the third dimension. However, owing to incompatibility with the LiDAR’s sampling process in the autonomous driving scenes, BEV-based solutions often suffer from the following shortcomings. 1) In fact, the points in autonomous driving are regularly sampled in the spherical coordinate system with the origin being the LiDAR sensor. The BEV disregards this regularity, and causes the issue that the voxels far away from the origin have much fewer points than the ones near the origin; and a large number of voxels are even empty. This results in the need for sparse convolutions [YML18, YZK21, Gra14], significantly complicating the system, particularly for on-device applications. 2) The points in a voxel have to be sampled or padded so that every voxel has the same number of points. The sampling decimates a large number of points, leading to the loss of information before the model see anything. 3) From the BEV, some objects such as “pedestrian” and “traffic cone” become very small. Accurately detecting these objects requires a fine-grained voxel size, dramatically increasing the price of computation.
|
| 18 |
+
|
| 19 |
+

|
| 20 |
+
Figure 1: The range image of the point cloud (right). The size of the range image is $m \times n$ , where $m$ is the number of beams and $n$ is the number of measurements (i.e., sampling frequency) per scan cycle. A 3D point’s coordinates on the range image are computed by discretizing the azimuthal angle $\theta$ and the inclination angle $\phi$ in the spherical coordinate system (left). The $m , n$ , and $\Delta \phi$ depend on the LiDAR specifications.
|
| 21 |
+
|
| 22 |
+
In this work, we advocate a new solution for 3D object detection that works on the range view (RV). As noted by many previous works $[ \mathrm { F X W ^ { + } } 2 1$ , $\mathrm { S K D } ^ { + } 2 0$ , $\mathbf { M } \mathbf { L } \mathbf { K } ^ { + } \mathbf { 1 9 } ]$ , if we consider these points in the spherical coordinate system and project them in terms of their inclination and azimuth angles, they can form a compact 2D image with size being $m \times n$ (shown in Fig. 1), where $m$ is the number of beams (i.e., channels) of the LiDAR sensor and $n$ is the sampling frequency per scan cycle. The resulting image is referred to as “range image” or “range view” of the point cloud. Compared to the aforementioned BEV, the range image is nearly dense and compatible with the LiDAR sampling process, eliminating the need for sparse convolutions and alleviating the loss of points. In addition, the range image closely resembles the common RGB image, minimizing the cost of transferring the 2D detection methods to 3D ones. In the literature, some works attempted to detect objects on the range view such as RangeDet $[ \mathrm { F X W } ^ { + } 2 1 ]$ and LaserNet $[ \mathrm { M L K ^ { + } } 1 9 ]$ . These works have shown that RV-based methods can also achieve decent detection performance, showing the promise. However, previous RV-based methods only focus on the single-frame point cloud as the aforementioned range view structure does not hold anymore if the ego (and the origin) moves between the multiple frames. Additionally, the range image of a single-frame point cloud is already nearly dense so that there are not many vacancies the points from other frames can populate. These issues make the range-view based detectors difficult to benefit from the multi-frame fusion. In sharp contrast, the multi-frame fusion can dramatically improve the performance in the BEV-based detectors, as shown in [YZK21, $\mathrm { L V C ^ { + } } 1 9 ]$ . This makes the performance of RV-based detectors largely lag behind that of the BEV-based ones, hampering their development and application. In this work, we show this issue can be largely remedied with a well-designed Multi-round Range View (MRV) projection mechanism. The proposed MRV makes the RV-based detectors be able to enjoy the gain of multi-frame fusion and thus achieve competitive performance with multi-frame BEV-based detectors.
|
| 23 |
+
|
| 24 |
+
Here, we summarize our main contributions as follows.
|
| 25 |
+
|
| 26 |
+
• We propose a fully convolutional one-stage 3D object detector, termed FCOS-LiDAR. FCOS-LiDAR works on the LiDAR range images and minimizes the gap between the 3D and 2D detectors, while being substantially simpler than current mainstream BEV-based 3D detectors [YZK21, ZT18].
|
| 27 |
+
Compared to previous BEV-based detectors [ZT18, YZK21], FCOS-LiDAR sidesteps the complicated voxelization process and eliminates the need for sparse convolutions due to the highly compact range view representation of the point cloud. In the setting of only using the single-frame point cloud as inputs, FCOS-LiDAR can outperform the state-of-the-art BEV-based detector CenterPoint [YZK21] while being faster.
|
| 28 |
+
• We also present a well-designed Multi-round Range View (MRV) projection mechanism, making RV-based detectors be able to benefit from the multi-frame fusion of point clouds as well, and achieve competitive performance compared to the multi-frame BEV-based detectors. To our knowledge, we are the first one approaching the challenge of the RV-based multi-frame point clouds fusion and showing that RV-based detectors can also be boosted by the multi-frame fusion of point clouds.
|
| 29 |
+
• We believe that our excellent performance of the RV-based detector can be a strong evidence that RV-based detectors compare favorably against the mainstream BEV-based detectors and encourage the community to pay attention to this promising solution.
|
| 30 |
+
|
| 31 |
+
# 2 Related Work
|
| 32 |
+
|
| 33 |
+
Bird-view based 3D Detection. Most top-performing LiDAR-based 3D detectors $[ \mathrm { F P Z ^ { + } } 2 1$ , YML18, YZK21, $\mathrm { L V C ^ { + } } 1 9$ , ZT18] fall into this category, which first convert the point cloud into BEV images. VoxelNet [ZT18] is the first end-to-end BEV-based detector, which employs PointNet [QSMG17] to handle the representation within a voxel and 3D convolutions to generate high-level features for the region proposal network (RPN). SECOND [YML18] proposes to use sparse convolutions, which can save the computing burden of 3D convolutions. Another popular approach is to eliminate the voxelization along the elevation axis and convert the point cloud into the pillars $[ \mathrm { L V C ^ { + } } 1 9 ]$ . Based on the voxel-based or pillar-based BEV representation, CenterPoint [YZK21] achieves state-of-the-art performance by using the anchor-free pipelines.
|
| 34 |
+
|
| 35 |
+
Range-view based 3D Detection. Due to the compactness of the RV representation, some methods $[ \bar { \mathrm { S } } \mathrm { W } \mathrm { C } ^ { + } 2 1$ , $\mathrm { B S M ^ { + } } 2 1$ , $\mathrm { M L K ^ { + } } 1 9$ , $\mathrm { M L K ^ { + } } 1 9 ]$ also attempt to perform detection based on the representation. VeloFCN [LZX16] is the pioneering work to perform 3D objection using the range view, which transforms point cloud to the range image and then applies 2D convolution to detect 3D objects. After that, some following works $[ \mathrm { M L K ^ { + } } 1 9$ , $\mathrm { F X W } ^ { + } \bar { 2 } \bar { 1 } ]$ are proposed to narrow the performance gap between RV-based and BEV-based detectors. LaserNet $[ \mathrm { M L K ^ { + } } 1 9 ]$ models the distribution of 3D box corners to capture their uncertainty, resulting in more accurate defections. RCD $[ \mathbf { B } \mathbf { S } \mathbf { M } ^ { + } 2 1 ]$ introduces the range-conditioned dilation mechanism to dynamically adjust the dilation rate in terms of the measured range, which can alleviate the scale-sensitivity issue of the RV-based detectors. RangeDet $[ \mathrm { F X W } ^ { + } 2 1 ]$ further proposes the Range Conditioned Pyramid to mitigate the scale-variation issue and utilizes the Meta-Kernel convolution to better exploit the 3D geometric information of the points. To our knowledge, these existing RV-based detectors only take into consideration the single frame point cloud and neglect the substantial improvements brought by the multi-frame fusion as shown in BEV-based detectors.
|
| 36 |
+
|
| 37 |
+
# 3 Our Approach
|
| 38 |
+
|
| 39 |
+
# 3.1 Range View Representation
|
| 40 |
+
|
| 41 |
+
Given a LiDAR point $( x , y , z )$ in the Cartesian coordinate system with the $z$ -axis pointing upward, it can be uniquely transformed to the spherical coordinates $( r , \theta , \phi )$ with
|
| 42 |
+
|
| 43 |
+
$$
|
| 44 |
+
r = \sqrt { x ^ { 2 } + y ^ { 2 } + z ^ { 2 } } , \theta = \mathrm { a t a n 2 } ( y , x ) , \phi = \mathrm { a t a n 2 } ( z , \sqrt { x ^ { 2 } + y ^ { 2 } } ) ,
|
| 45 |
+
$$
|
| 46 |
+
|
| 47 |
+
where $r , \theta$ , and $\phi$ are the range, azimuthal angle, and inclination angle, respectively, as shown in Fig. 1(left). The LiDAR samples the points with a fixed number of beams (denoted by $m$ ), each of which has a fixed inclination angle. These LiDAR beams synchronously rotate around the $z$ -axis uniformly to obtain a $3 6 0 ^ { \circ }$ horizontal field of view and the LiDAR measures a certain number of times (denoted by $n$ ) per scan cycle (i.e., per frame). Thus, the difference of adjacent measurements’ azimuthal angles is $3 6 0 / n ^ { \circ }$ . For example, on the nuScenes dataset, the LiDAR measures $n = 1 0 8 6$ times per scan cycle and has $m = 3 2$ beams. The inclination angles of these beams are evenly spaced from $- 3 0 . 6 7 ^ { \circ }$ to $1 0 . 6 7 ^ { \circ }$ , inclusive. Note that the inclination angles are not always evenly spaced and subject to the specifications of the LiDAR.
|
| 48 |
+
|
| 49 |
+
Given the regularity of the azimuthal and inclination angles for a given LiDAR, we can discretize the azimuthal angles with $n$ bins, and inclination angles with $m$ bins, respectively. Let $( i , j )$ be the indices of the bins for azimuthal and inclination angles, respectively. By computing all the pairs of $( i , j )$ of the points in a single scan cycle, we can fill these points into a 2D image $\bar { I } \bar { \in } \mathbb { R } ^ { m \times n \bar { \times } C }$ (i.e., the range image), where $C = 9$ consists of the original Cartesian coordinates $( x , y , z )$ , the spherical coordinates $( r , \theta , \phi )$ , the reflected intensity $i$ , the existence $e$ of the point, and a relative timestamp $t$ The existence denotes whether or not the location is filled by a point, and the relative timestamp is only valid in the multi-frame point cloud inputs and denotes the time difference between the frame containing this point and the current frame. In practice, the vehicle itself is often in motion, and this causes that some points might be projected to the same bins on the range image. In this case, we keep the one with the minimal distance to the vehicle.
|
| 50 |
+
|
| 51 |
+
# 3.2 Multi-round Range View Projection (MRV)
|
| 52 |
+
|
| 53 |
+
The point cloud of a single frame is often sparse in the 3D space and of low resolutions. In order to improve the detection performance, the current frame is often combined with several previous frames as the network’s inputs [YZK21, ZT18]. Taking the nuScenes dataset as an example, the methods on this dataset often take as the inputs 10 frames, which is composed of the current frame and previous 9 frames, including ${ \sim } 2 4 0 \mathrm { K }$ points in total. The crucial issue of the range view representation is the collision that multiple points fall into the same bin happens much more frequently in the multi-frame case. For instance, on nuScenes, only ${ \sim } 2 8 \mathrm { K }$ points are finally kept in the range image and ${ \sim } 9 0 \%$ of the points are discarded due to the collision. The decimation makes the multi-frame point cloud have almost the same number of valid points with the single-frame version, which is the dominant reason that RV-based methods cannot enjoy the benefit of multi-frame inputs.
|
| 54 |
+
|
| 55 |
+
In order to cope with this crucial issue, we propose the Multi-round Range View (MRV) projection mechanism. To be specific, we first project the points with the method in Sec. 3.1. Then, instead of discarding the rejected points, we project them again with the same process and put them in another group of nine channels. This projection process is repeated until a sufficient number of points are kept. On the nuScenes dataset, this is repeated five times and the percentage of the retained points can be improved from ${ \sim } 1 0 \%$ to more than $50 \%$ . In theory, as long as we continue the process, all points can be kept. However, we found that the performance is saturated after 5 repetitions on the nuScenes dataset. Finally, the resulting range images of the five rounds are concatenated along the channel dimension and used as the inputs. Additionally, one caveat is that the points of the current frame should have the highest priority wherever the collision happens because the points of previous frames are stale and might not reflect the current status of the world. Despite being a very simple treatment, it significantly affects the effectiveness of the multi-frame fusion as shown in our experiments.
|
| 56 |
+
|
| 57 |
+
# 3.3 Modality-wise Convolutions
|
| 58 |
+
|
| 59 |
+
As mentioned before, each pixel on the single-frame range image contains nine channels. Different the RGB image, whose three channels are of the same modality (i.e., in the color space) and correlated for the manifold of natural images, the nine channels of the range image are not like that and belong to five modalities, i.e., $[ x , y , z ]$ , $[ r , \theta , \phi ]$ , [i], $[ e ]$ and $[ t ]$ , respectively, where the channels in the one pair of square brackets are of the same modality. For example, the correlation between the reflected intensity $i$ and the coordinate $x$ does not make sense. Further, even the different channel types in the same modality are orthogonal and less correlated as well. For instance, it is difficult to say there is a relationship between the azimuthal angle $\theta$ and the range $r$ of a point. As a result, one channel type should be viewed as an individual “modality”. By default, the conv. layer simultaneously computes spatial correlations and cross-channel correlations. However, as shown before, the channels of the range image are less correlated, and thus, it is not reasonable to use the default conv. layer here, and the channels of the range image should be processed separately. This can be easily implemented with the grouped convolutions. Here, we term it modality-wise convolution because it is based on the “modalities”. Once the high-level semantic features of these modalities are individually obtained, we can aggregate the features of these modalities with a $1 \times 1$ conv. layer (i.e., point-wise convolution) for further abstract analysis.
|
| 60 |
+
|
| 61 |
+

|
| 62 |
+
Figure 2: Modality-wise convolutions with a multi-frame range image. As we can see, we first rearrange the channels of the multi-frame range image so that the channels with the same type from different frames (e.g., $x _ { 0 }$ , $x _ { 1 }$ , ... $x _ { T - 1 } )$ are adjacent. Then, two successive 2D conv. layers with the number of groups being 9 (which is equal to the number of different channel types) are used to process these channels separately, mapping each channel type to a 32-channel features. Finally, the features of these channel types are merged by a $1 \times 1$ conv. layer.
|
| 63 |
+
|
| 64 |
+
In this way, the modality-wise convolution is analogous to the widely-used depth-wise convolution, but we highlight that the underlying nature is distinct. Our modality-wise convolution instantiates a reasonable inductive bias based on the prior that different modalities are less relevant, and thus it is expected to simultaneously improve both the effectiveness and efficiency, as shown in our experiments. This also leads to the fact that the modality-wise convolution can only be placed at the beginning of the network, where the channels are interpretable and have an explicit modality. In contrast, the depth-wise convolution (together with the point-wise convolution) is often viewed as an efficient approximation of the full conv. layer and thus it does not usually yield improved performance and can appear anywhere. Lastly, when it comes to the multi-frame point clouds, the channels of the same type from different frames should be handled together because they are closely correlated. The whole procedure of the modality-wise convolution is illustrated in Fig. 2.
|
| 65 |
+
|
| 66 |
+
# 3.4 Overall Architecture
|
| 67 |
+
|
| 68 |
+
The overall architecture of FCOS-LiDAR is shown in Fig. 3. FCOS-LiDAR follows the spirit of the anchor-free detector FCOS [TSCH19] in the image-based object detection and is a standard fully convolutional network [LSD15].
|
| 69 |
+
|
| 70 |
+
Taking a (multi-frame) range image $I \in \mathbb { R } ^ { m \times n \times ( T \times C ) }$ as an example, where $T$ is the number of the used frames, we first forward the range image through our backbone network, termed LiDAR-Net. LiDAR-Net is adapted from ResNet-50 [HZRS16]. Specifically, before the first conv. layer of ResNet50, we insert three branches of the modality-wise convolutions with three dilation rates being 1, 3, and 6, respectively. The branches with various dilation rates aim to capture the multi-scale context, whose outputs are summed up. Then, the first two $2 \times$ downsamplings of ResNet-50 are removed, which is of great importance due to the low resolutions of the range images. Moreover, we change the numbers of blocks of ResNet-50’s four stages from $( 3 , 4 , 6 , 3 )$ to $( 4 , 4 , 1 , 1 )$ and stop doubling the number of channels in the third and fourth stages because we found that the final performance is not sensitive to the capacity of the later stages but quite sensitive to that of the early stages. This ravels one of the important difference between the LiDAR-based and image-based object detection tasks. For object detection in RGB images, more convolutions in the later stages are often required to transform the RGB pixels into the highly semantic and abstract features that can be used to obtain the geometries of the objects. However, the LiDAR points themselves are already geometric points and thus that many convolutions in the later stages are no longer needed. Thus, we can instead allocate the capacity in the later stages to the early stages (before any downsampling) to better incorporate the geometric information carried by the raw points. Finally, the four levels of feature maps from LiDAR-Net’s four stages are used, denoted by $C _ { 2 }$ , $C _ { 3 }$ , $C _ { 4 }$ , and $C _ { 5 }$ , respectively.
|
| 71 |
+
|
| 72 |
+

|
| 73 |
+
Figure 3: Overall architecture. The overall architecture of FCOS-LiDAR resembles the 2D imagebased detector FCOS [TSCH19]. By taking as input an range image, the network obtains the multi-level FPN features, and then the classification and regression branches are attached to these feature levels to predict the final 3D boxes. Different from FCOS, the weights of the detection heads are not shared between the FPN levels as mentioned in Sec. 3.4. In addition, the class-specific regression heads are used instead of the class-agnostic ones in FCOS.
|
| 74 |
+
|
| 75 |
+
Next, following FCOS, the four levels of feature maps are sent into a feature pyramid network (FPN) $[ \mathrm { L D G ^ { + } i } \bar { 7 } ]$ to obtain six levels of pyramid feature maps denoted by $P _ { 2 }$ , $P _ { 3 }$ , $P _ { 4 }$ , $P _ { 5 }$ , $P _ { 6 }$ , and $P _ { 7 }$ . Their spatial downsampling ratios to the input are $1 / 1 , \bar { 1 / 2 } , \bar { 1 / 4 } , \bar { 1 / 8 } , \bar { 1 / } \bar { 1 6 }$ , and $^ { 1 / 3 2 }$ , respectively. Then, similar to FCOS, the classification and regression heads, each with four $3 \times 3$ conv. layers of channel 64 and a final prediction conv. layer (for the classification or regression), are attached to these feature levels. Unlike the heads in image-based detectors, whose weights are shared between these feature levels, it is important in the LiDAR-based detector to untie these weights. This is another important difference between image-based and LiDAR-based detectors. In image-based detectors, different sizes of objects can be normalized to similar sizes of objects by the downsampling the image with corresponding factors. That is what the “pyramid” means in the FPN. Thus, the image-based detectors can share the weights of the detection heads because the objects have been normalized to similar sizes after the FPN. However, in LiDAR-based detection, the objects’ sizes cannot be normalized in this way because the sizes of the objects are determined by the 3D points’ coordinate values in them and downsampling the range images cannot alter their real sizes in the 3D space. Therefore, it is no longer reasonable to share the detection heads between these FPN levels. This is also confirmed in our experiments.
|
| 76 |
+
|
| 77 |
+
Training Targets Computation. Similar to FCOS [TSCH19], we need to assign the training targets to each location of the feature maps computed with the range image. The training targets computation is described using the nuScenes dataset as an example. On nuScenes, an object’s ground-truth 3D box is parameterized by $( c _ { x } ^ { * } , c _ { y } ^ { * } , c _ { z } ^ { * } , w ^ { * } , h ^ { * } , l ^ { * } , \alpha ^ { * } )$ , where $( c _ { x } ^ { * } , c _ { y } ^ { * } , c _ { z } ^ { * } )$ is the 3D center of the box, and $w , h , l$ , and respectively are the width, height, length, and the yaw angle around the axis. First, each location on the feature maps is mapped to the pixel location on the range image by multiplying them by the feature maps’ downsampling ratio. Next, we use the 3D LiDAR point projected by the first-round MRV projection as the 3D point of the pixel. If the pixel’s 3D point is contained in an object’s 3D box, the feature location is responsible for the object and predicts its category, 3D box and etc.. Here, the 3D box regression targets of the feature location are relative to the 3D point coordinates of the pixel and are defined as
|
| 78 |
+
|
| 79 |
+
$$
|
| 80 |
+
\Delta c _ { x } = c _ { x } ^ { * } - x _ { 0 } , \Delta c _ { y } = c _ { y } ^ { * } - y _ { 0 } , \Delta c _ { z } = c _ { z } ^ { * } - z _ { 0 } , t _ { w } = \log ( w ^ { * } ) , t _ { h } = \log ( h ^ { * } ) , t _ { l } = \log ( l ^ { * } ) ,
|
| 81 |
+
$$
|
| 82 |
+
|
| 83 |
+
where $( x _ { 0 } , y _ { 0 } , z _ { 0 } )$ are the 3D point coordinates of the range image pixel. Similarly, the regression targets of the yaw angle $\alpha$ are also relative to the azimuthal angle of the pixel, and following the convention [YZK21], we decouple the relative azimuthal angle into $( \sin \Delta \alpha , \cos \Delta \alpha )$ . On nuScenes, we also need to predict the velocity vector $( v _ { x } ^ { * } , v _ { y } ^ { * } )$ of the object, which are used as the training targets as is. Other locations on the feature maps that correspond to 3D points not in any 3D box are used as the negative samples. Note that all the pixels within a object’s 3D box actually form a 2D mask on the range image.
|
| 84 |
+
|
| 85 |
+
Network Outputs. The nuScenes dataset has $C = 1 0$ classes of interest, which is predicted by the classification head followed by a softmax layer (the upper head in Fig. 3). The other regression targets are predicted by four sibling output heads of the regression branch, respectively, as shown in Fig. 3. Here, we use the class-specific regression predictions and thus the number of the output channels is amplified by $C$ times. Moreover, following $[ \mathrm { G L W ^ { + } } 2 1$ , RDGF16], each positive pixel also predicts the intersection-over-union (IoU) between the predicted 3D box and ground-truth one, which is multiplied to the classification score before the non-maximum suppression (NMS).
|
| 86 |
+
|
| 87 |
+
Loss Functions. The classification predictions are supervised with the cross entropy (CE) loss. Following $[ \mathrm { G L L ^ { + } } 2 1 ]$ , we dynamically reassign the classification labels during training. Specifically, for a ground-truth 3D box, only the top $K$ pixels whose predicted 3D boxes have the lowest costs with the ground-truth box are assigned with the positive labels and other pixels are considered negative, where the cost is defined as the summation of the classification loss and the opposite of the IoU between the predicted boxes and the ground-truth box, and $K$ is dynamically calculated, being the summation (rounded to an integer) of the highest $Q = 2 0$ IoUs between the predicted boxes and the ground-truth box. For the 3D box regression, we make use of both the IoU loss $[ \mathrm { Y } \mathrm { J } \mathrm { W } ^ { + } 1 6 ]$ and $L _ { 1 }$ loss. Following [TSCH19], the IoU predictions are penalized with the binary cross entropy (BCE) loss since they are in the range $[ 0 , 1 ]$ .
|
| 88 |
+
|
| 89 |
+
Inference. The inference is very similar to that of the 2D image-based detector FCOS. To be specific, the range images are forwarded through the network and the aforementioned predictions are obtained. The predictions are filtered in terms of the classification scores and only the predictions with the score greater than 0.01 are kept. The 3D boxes are restored by inverting the computation of the training targets. Then, the NMS on the 3D boxes is applied with threshold 0.2 to remove the duplications. Finally, the top 500 predictions with the highest scores are used as the final predictions.
|
| 90 |
+
|
| 91 |
+
# 4 Experiments
|
| 92 |
+
|
| 93 |
+
We conduct experiments on the nuScenes dataset $[ \mathrm { C B L ^ { + } } 2 0 ]$ , which contains 1000 scenes with 700, 150, and 150 scenes for training, validation, and testing, respectively. The training, validation, and testing sets have 28K, 6K, 6K keyframes annotated with 10 classes, respectively. For all ablation experiments, we train the models on the training set and report the performance on the validation set unless specified. The metrics of the 3D detection task are mean Average Precision (mAP) and the nuScenes detection score (NDS). The LiDAR sensor of the nuScenes dataset has $m = 3 2$ beams and $n = 1 0 8 6$ measurements per scan cycle. The mAP is based the center distances on the bird-eye view at thresholds $0 . 5 \mathrm { m }$ , 1m, $2 \mathrm { m }$ , $4 \mathrm { m }$ in place of the box IoUs. NDS is a weighted average of mAP, the translation error, the scale error, the orientation error, the velocity error, and the box attributes error.
|
| 94 |
+
|
| 95 |
+
Implementation Details. Unless specified, following [YZK21], FCOS-LiDAR is trained by 40 epochs with the AdamW [LH17] optimizer under the MMDetection3D framework [Con20], which takes ${ \sim } 2 6$ hours on 8 A100 GPUs. The one-cycle learning rate policy [ST19] with initial learning rate $1 0 ^ { - 3 }$ is used. The learning rate gradually increases to 0.01 in the first $40 \%$ epochs and then gradually decreases to $1 0 ^ { - 7 }$ in the rest of the training process. The weight decay is 0.01, and the momentum ranges from 0.85 to 0.95. In addition, due to the low vertical resolution of the range image on the nuScenes dataset, we upscale the range image in the vertical direction by 2 with the nearest interpolation. During training, the point cloud is randomly flipped along both the $x$ and $y$ axes and rotated in the range $[ - \pi , \pi ]$ , as well as globally scaled by a random factor from [0.95, 1.05]. The ground-truth copy-paste data augmentation from [YML18] is also used. For multi-frame point cloud, we use 10 sweeps in total, as in previous works [YZK21, $\mathrm { L V C ^ { + } } 1 9 ]$ . The inference time is measured on a 3090Ti GPU with batch size 1.
|
| 96 |
+
|
| 97 |
+
Table 1: Multi-round range view (MRV) projection. Time: the elapsed time of MRV.
|
| 98 |
+
|
| 99 |
+
<table><tr><td colspan="3">Single-frame</td><td colspan="3">Multi-frame</td></tr><tr><td>#Rounds</td><td>Time (ms)</td><td>mAP (%)</td><td>NDS (%)</td><td>mAP (%)</td><td>NDS (%)</td></tr><tr><td>1</td><td>0.66</td><td>53.14</td><td>51.52</td><td>55.02</td><td>61.27</td></tr><tr><td>3</td><td>0.72</td><td>53.76</td><td>53.62</td><td>56.01</td><td>62.82</td></tr><tr><td>5</td><td>0.76</td><td>53.42</td><td>53.40</td><td>57.08</td><td>63.15</td></tr><tr><td>7</td><td>0.76</td><td>53.06</td><td>53.10</td><td>56.99</td><td>63.47</td></tr></table>
|
| 100 |
+
|
| 101 |
+
Table 2: Whether to make the points of the current frame have the highest priority. The per-category mAP results are reported. “C.V.”, “Ped.” and “C.T.” indicate “construction vehicle”, “pedestrian” and “traffic cone”, respectively.
|
| 102 |
+
|
| 103 |
+
<table><tr><td>Prioritized? mAP(%) NDS(%)</td><td></td><td></td><td>Car</td><td>Truck</td><td>Bus</td><td>Trailer</td><td></td><td></td><td>C.V.Ped. Motor</td><td>Bicycle</td><td>T.C.</td><td>Barrier</td></tr><tr><td></td><td>54.29</td><td>62.31</td><td>76.8</td><td>47.3</td><td>62.0</td><td>32.0</td><td>16.5</td><td>80.3</td><td>53.8</td><td>38.2</td><td>70.1</td><td>65.9</td></tr><tr><td>√</td><td>57.08</td><td>63.15</td><td>82.1</td><td>52.3</td><td>65.2</td><td>33.6</td><td>18.3 84.1</td><td></td><td>58.5</td><td>35.3</td><td>73.4</td><td>67.9</td></tr></table>
|
| 104 |
+
|
| 105 |
+
# 4.1 Multi-round Range View Projection
|
| 106 |
+
|
| 107 |
+
Here, we conduct experiments to demonstrate the effectiveness of the proposed multi-round range view (MRV) projection. As shown in Table 1, in the single-frame settings, MRV is also helpful, for example, by increasing the number of rounds from 1 to 3, the mAP can be boosted by $0 . 6 2 \%$ . This is due to the fact that the vehicle is often in motion and the aforementioned collisions happen within a single frame as well. As you can see, if one round is used, the multi-frame fusion can improve the mAP by a substantial margin ${ \sim } 1 . 9 \%$ (from $5 3 . 1 4 \%$ to $5 5 . 0 2 \%$ ). The improvement can be dramatically increased to $3 . 9 \%$ mAP if we use 5 rounds in MRV $( 5 7 . 8 \%$ mAP), due to the fact that 5-round MRV can keep much more points in the multi-frame point clouds as mentioned in Sec. 3.2. This confirmed the effectiveness of MRV. Note that elapsed time of MRV is insensitive to the number of rounds as shown in Table 1.
|
| 108 |
+
|
| 109 |
+
More importantly, in the RV-based multi-frame settings, it is crucial to assign the highest priority to the points from the current frame when the collision happens. As shown in Table 2, without this treatment, the performance of the multi-frame fusion is significantly dropped from $5 7 . 0 8 \%$ to $5 4 . 2 9 \%$ in mAP. Note that the single-frame counterpart can already achieve mAP $5 3 . 4 2 \%$ . We argue that the neglect of this point in previous works is one of the main reasons that RV-based detectors can barely enjoy the benefit of multi-frame fusion.
|
| 110 |
+
|
| 111 |
+
# 4.2 Modality-wise Convolutions
|
| 112 |
+
|
| 113 |
+
Table 3: Modality-wise convolutions. “Multi-round”: whether to group together the channels with the same type from multiple projection rounds. Note that all the items here are with the multi-frame fusion and multi-round projections. The only difference is the way to group the channels. Time: the latency of this module.
|
| 114 |
+
|
| 115 |
+
<table><tr><td>Modality groups</td><td>Multi-round</td><td>Time (ms)</td><td>mAP (%)</td><td>NDS (%)</td></tr><tr><td>[x,y,z,r,0,Φ,i,t,e]</td><td>√</td><td>6.0</td><td>56.35</td><td>62.65</td></tr><tr><td>[x,y,z],[r,0,],[i],[t],[e]</td><td>√</td><td>4.2</td><td>56.34</td><td>63.07</td></tr><tr><td>[x],[y],[2],[r],[0],[],[],[,[e]</td><td>√</td><td>3.2</td><td>57.08</td><td>63.15</td></tr><tr><td>[x],[],[2],,[r],[0],,[],,[],[],[e]</td><td></td><td>3.8</td><td>56.83</td><td>63.15</td></tr></table>
|
| 116 |
+
|
| 117 |
+
The experimental results of our modality-wise convolutions are shown in Table 3. If we use the full convolutions here, which compute the correlation between all the channels of the range image, FCOS-LiDAR can achieve $5 6 . 3 5 \%$ in mAP. By splitting the channels into various modalities (2nd row), the performance can be slightly improved, i.e., from NDS $6 2 . 6 5 \%$ to $6 3 . 0 7 \%$ . Moreover, due to the fact that even the different channel types of the same modality are orthogonal and less correlated, we process each channel type individually. As shown in the table, the performance can be further boosted from mAP $5 6 . 3 4 \%$ to $5 7 . 0 8 \%$ (3rd row) while the lowest latency is achieved. Finally, the last row shows the results if we do not consider the channels with the same type from multiple rounds together, where the mAP is slightly worse. In Table 4, we vary the number of the conv. layers in the modality-wise convolutions. As we can see, using two conv. layers achieves the best performance here.
|
| 118 |
+
|
| 119 |
+
Table 4: Varying the number of the conv. layers in the modality-wise convolutions. Time: the latency of the modality-wise convolutions.
|
| 120 |
+
|
| 121 |
+
<table><tr><td>#Conv. Time (ms) mAP(%) NDS(%) Car Truck Bus Trailer C.V. Ped. Motor Bicycle T.C. Barrier</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>1</td><td>2.0</td><td>55.81</td><td>61.98</td><td></td><td>81.8 51.4</td><td>65.2</td><td>30.7</td><td>16.9 83.4</td><td>56.0</td><td>32.8 71.9</td><td>68.1</td></tr><tr><td>2</td><td>3.2</td><td>57.08</td><td>63.15</td><td></td><td>82.1 52.3 65.2</td><td></td><td>33.6</td><td>18.3 84.1</td><td>58.5</td><td>35.3 73.4</td><td>67.9</td></tr><tr><td>3</td><td>4.3</td><td>56.71</td><td>63.25</td><td>82.6 51.4 65.3</td><td></td><td></td><td>31.9</td><td>18.5 83.9</td><td>57.3 34.9</td><td>72.9</td><td>68.4</td></tr></table>
|
| 122 |
+
|
| 123 |
+
Table 5: Multi-scale context aggregation.
|
| 124 |
+
|
| 125 |
+
<table><tr><td>Dilations mAP(%)</td><td></td><td>NDS(%)</td><td>Car</td><td>Truck</td><td>Bus</td><td>Trailer</td><td>C.V.</td><td>Ped.</td><td>Motor</td><td>Bicycle</td><td>T.C.</td><td>Barrier</td></tr><tr><td>(1,)</td><td>55.87</td><td>62.68</td><td>81.8</td><td>51.0</td><td>64.1</td><td>32.6</td><td>16.9</td><td>83.8</td><td>56.3</td><td>31.2</td><td>72.7</td><td>68.3</td></tr><tr><td>(1,3)</td><td>56.39</td><td>62.96</td><td>82.3</td><td>52.1</td><td>65.3</td><td>32.8</td><td>17.1</td><td>83.7</td><td>58.2</td><td>32.5</td><td>72.0</td><td>67.8</td></tr><tr><td>(1,3,6)</td><td>57.08</td><td>63.15</td><td>82.1</td><td>52.3</td><td>65.2</td><td>33.6</td><td>18.3</td><td>84.1</td><td>58.5</td><td>35.3</td><td>73.4</td><td>67.9</td></tr><tr><td>(1,1,1)</td><td>56.63</td><td>63.12</td><td>82.1</td><td>51.5</td><td>65.2</td><td>32.9</td><td>17.1</td><td>83.7</td><td>58.8</td><td>33.7</td><td>73.1</td><td>68.0</td></tr></table>
|
| 126 |
+
|
| 127 |
+
In addition, as mentioned before, we employ multiple modality-wise convolution branches with various dilation rates in parallel to capture the multi-scale context. The experiments are shown in Table 5. As we can see, compared with the one using only one dilation rate, using multiple dilation rates can improve the performance by more than $1 \%$ in mAP (from $5 5 . 8 7 \%$ to $5 7 . 0 8 \%$ ).
|
| 128 |
+
|
| 129 |
+
# 4.3 Untied Weights of Detection Heads
|
| 130 |
+
|
| 131 |
+
Table 6: Whether to untie the weights of the detection heads.
|
| 132 |
+
|
| 133 |
+
<table><tr><td>Untied? mAP(%)</td><td></td><td>NDS(%)</td><td>Car</td><td>Truck</td><td>Bus</td><td>Trailer</td><td>C.V.</td><td>Ped.</td><td>Motor</td><td>Bicycle</td><td>T.C.</td><td>Barrier</td></tr><tr><td></td><td>56.44</td><td>63.09</td><td>82.0</td><td>51.1</td><td>64.3</td><td>31.1</td><td>18.3</td><td>83.8</td><td>57.9</td><td>34.7</td><td>72.9</td><td>68.4</td></tr><tr><td>√</td><td>57.08</td><td>63.15</td><td>82.1</td><td>52.3</td><td>65.2</td><td>33.6</td><td>18.3</td><td>84.1</td><td>58.5</td><td>35.3</td><td>73.4</td><td>67.9</td></tr></table>
|
| 134 |
+
|
| 135 |
+
As mentioned before, it is better to untie the weights of the detection heads between the FPN levels in the LiDAR-based detector. This is confirmed in Table 6. As we can see, by untying the weights, the performance can be improved from mAP $5 6 . 4 4 \%$ to $5 7 . 0 8 \%$ . This ravels one of the interesting differences between image-based and LiDAR-based detectors because the shared detection heads between FPN levels often achieve better performance in image-based detectors [TSCH19, $\mathrm { L D G ^ { + } } 1 7 ]$ .
|
| 136 |
+
|
| 137 |
+
Table 7: Inference time breakdowns. We compare against the state-of-the-art BEV-based CenterPoint [YZK21], which is trained with exactly the same strategies. We use the CenterPoint implementation in MMDetection3D [Con20] with sparse convolution version 1.2.1 [SPC21]. FCOS-LiDAR is faster as well as competitive in the multi-frame setting (and superior in the single-frame setting).
|
| 138 |
+
|
| 139 |
+
<table><tr><td colspan="7">Method Voxel/MRV(ms) Backbone(ms) Heads(ms) Overall(ms) mAP(%) NDS(%)</td></tr><tr><td>single-frame point cloud</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>CenterPoint [YZK21]</td><td>1.62</td><td>41</td><td>8</td><td>50.62</td><td>52.83</td><td>53.86</td></tr><tr><td>FCOS-LiDAR (Ours)</td><td>0.63</td><td>31</td><td>7</td><td>38.63</td><td>53.42</td><td>53.40</td></tr><tr><td>multi-frame point cloud</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>CenterPoint [YZK21]</td><td>1.95</td><td>63</td><td>9</td><td>73.95</td><td>60.40</td><td>67.25</td></tr><tr><td>FCOS-LiDAR(Ours)</td><td>0.76</td><td>31</td><td>7</td><td>38.76</td><td>57.08</td><td>63.15</td></tr></table>
|
| 140 |
+
|
| 141 |
+
Table 8: Comparisons with state-of-the-art methods on the nuScenes test set. The results are directly quoted from their original papers. All other methods on nuScenes rely on BEV or multiple views because previous RV-only methods are unable to handle the multi-frame fusion on this dataset. As you can see, our RV-based FCOS-LiDAR can achieve competitive performance with state-of-the-art BEV-based detectors.
|
| 142 |
+
|
| 143 |
+
<table><tr><td>Method mAP(%)NDS(%) Car Truck Bus TrailerC.V.Ped.Motor Bicycle T.C.Barrier</td></tr><tr><td></td><td>45.3</td><td></td><td></td><td>68.4 23.0 28.2 23.4</td><td>4.1 59.7 27.4 1.1 30.8</td></tr><tr><td>PointPillars [LVC+ 19] SSN [ZMW+20]</td><td>30.5 46.3 56.9</td><td>80.7 37.5 39.9</td><td>43.9 14.672.3 43.7</td></tr><tr><td>CVCNet [CSCY20] 55.3 64.4</td><td>82.7 46.1 46.6 49.4 22.679.8 59.1</td></tr><tr><td>CBGS[YZK21] 52.8 63.3</td><td>31.4 81.1 48.5 54.9 42.9 10.580.1 51.5</td></tr><tr><td>CenterPoint [YZK21] 58.0</td><td>22.3 70.9</td></tr><tr><td>AFDetV2 [HDG+22] 62.4 68.5 S2M2-SSD [ZHJF22] 62.9 69.3 86.3 56.0</td><td>65.5 84.6 51.0 60.2 53.2 17.583.4 53.7 23.7 76.7 86.3 54.2 62.5 58.9 26.785.8 63.8 34.3 80.1</td></tr></table>
|
| 144 |
+
|
| 145 |
+
# 4.4 Inference Time Comparisons
|
| 146 |
+
|
| 147 |
+
We compare the inference time of FCOS-LiDAR and the state-of-the-art BEV-based detector CenterPoint [YZK21]. As shown in Table 7, the proposed MRV is faster than the voxelization in CenterPoint. It is worth noting that the voxelization algorithm reported here is nondeterministic, which cannot yield stable results but being significantly faster. In the official code of MMDetection3D [Con20], the deterministic voxelization takes ${ \sim } 1 0 0 \mathrm { m s }$ for the multi-frame point clouds. In sharp contrast, the proposed MRV is always deterministic and highly efficient. Moreover, due to the compactness of the range image, our network can be implemented with the standard convolutions alone, thus being much more efficient than CenterPoint using the sparse convolutions as shown in the table. The elapsed time of the post-processing is omitted here as it is closely similar in both methods.
|
| 148 |
+
|
| 149 |
+
# 4.5 Comparisons with State-of-the-art Methods
|
| 150 |
+
|
| 151 |
+
We further compare FCOS-LiDAR with other state-of-the-art methods on the nuScenes test set. For the model on the test set, we increase the number of channels in the detection heads from 64 to 128, which improve the validation mAP by ${ \sim } 0 . 6 \%$ with slightly longer latency. Additionally, we remove the copy-paste data augmentation in the last 5 epochs during training as in [WMZY21] (termed as the “fade strategy” in [WMZY21]). This can improve the performance by about $2 \%$ mAP. As shown in Table 8, FCOS-LiDAR achieves competitive performance with other state-of-the-art BEV-based methods. Note that in order to leverage the multi-frame fusion on nuScenes, all other methods on nuScenes rely on BEV (or the multi-view fusion). FCOS-LiDAR is the first RV-only method that is able to benefit from the multi-frame fusion.
|
| 152 |
+
|
| 153 |
+
# 5 Conclusion
|
| 154 |
+
|
| 155 |
+
We have presented an efficient range-view-based 3D object detector FCOS-LiDAR. FCOS-LiDAR shows the challenging LiDAR-based object detection can also be solved with the standard convolutions alone, similar to what we have done in the image-based 2D object detection. We also for the first time show the RV-based 3D detector can also enjoy the benefit of the multi-frame fusion with the proposed MRV. We hope our strong results can encourage the community to pay more attention to this promising direction.
|
| 156 |
+
|
| 157 |
+
Societal Impacts. This paper presents a method that can locate the 3D location of the objects of interest in LiDAR point clouds. This technique might be abused for military purposes, for example, on lethal autonomous weapons.
|
| 158 |
+
|
| 159 |
+
Acknowledgments. C. Shen’s participation was in part supported by a major grant from Zhejiang Provincial Government.
|
| 160 |
+
|
| 161 |
+
# References
|
| 162 |
+
|
| 163 |
+
$[ \mathbf { B } \mathbf { S } \mathbf { M } ^ { + } 2 1 ]$ Alex Bewley, Pei Sun, Thomas Mensink, Dragomir Anguelov, and Cristian Sminchisescu. Range conditioned dilated convolutions for scale invariant 3d object detection. In Proc. Conf. Robot Learning, pages 627–641. PMLR, 2021.
|
| 164 |
+
$[ \mathrm { C B L } ^ { + } 2 0 ]$ Holger Caesar, Varun Bankiti, Alex Lang, Sourabh Vora, Venice Erin Liong, Qiang Xu, Anush Krishnan, Yu Pan, Giancarlo Baldan, and Oscar Beijbom. Nuscenes: A multimodal dataset for autonomous driving. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 11621–11631, 2020. [Con20] MMDetection3D Contributors. MMDetection3D: OpenMMLab next-generation platform for general 3D object detection. https://github.com/open-mmlab/mmdetection3d, 2020.
|
| 165 |
+
[CSCY20] Qi Chen, Lin Sun, Ernest Cheung, and Alan Yuille. Every view counts: Cross-view consistency in 3d object detection with hybrid-cylindrical-spherical voxelization. In Proc. Advances in Neural Inf. Process. Syst., volume 33, pages 21224–21235, 2020.
|
| 166 |
+
[DLSJ22] Shengheng Deng, Zhihao Liang, Lin Sun, and Kui Jia. Vista: Boosting 3d object detection via dual cross-view spatial attention. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 8448–8457, June 2022.
|
| 167 |
+
$[ \mathrm { F P Z } ^ { + } 2 1 ]$ Lue Fan, Ziqi Pang, Tianyuan Zhang, Yu-Xiong Wang, Hang Zhao, Feng Wang, Naiyan Wang, and Zhaoxiang Zhang. Embracing single stride 3d object detector with sparse transformer. arXiv preprint arXiv:2112.06375, 2021.
|
| 168 |
+
$[ \mathrm { F X W } ^ { + } 2 1 ]$ Lue Fan, Xuan Xiong, Feng Wang, Naiyan Wang, and Zhaoxiang Zhang. Rangedet: In defense of range view for lidar-based 3d object detection. In Proc. IEEE Int. Conf. Comp. Vis., pages 2918–2927, 2021.
|
| 169 |
+
$[ \mathrm { G L L ^ { + } } 2 1 ]$ Zheng Ge, Songtao Liu, Zeming Li, Osamu Yoshie, and Jian Sun. OTA: Optimal transport assignment for object detection. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 303–312, 2021.
|
| 170 |
+
$[ \mathrm { G L W } ^ { + } 2 1 ]$ Zheng Ge, Songtao Liu, Feng Wang, Zeming Li, and Jian Sun. Yolox: Exceeding yolo series in 2021. arXiv preprint arXiv:2107.08430, 2021. [Gra14] Benjamin Graham. Spatially-sparse convolutional neural networks. arXiv preprint arXiv:1409.6070, 2014.
|
| 171 |
+
$[ \mathrm { H D G } ^ { + } 2 2 ]$ Yihan Hu, Zhuangzhuang Ding, Runzhou Ge, Wenxin Shao, Li Huang, Kun Li, and Qiang Liu. Afdetv2: Rethinking the necessity of the second stage for object detection from point clouds. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 36, pages 969–979, 2022.
|
| 172 |
+
[HZRS16] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 770–778, 2016.
|
| 173 |
+
$[ \mathrm { L A E ^ { + } } 1 6 ]$ Wei Liu, Dragomir Anguelov, Dumitru Erhan, Christian Szegedy, Scott Reed, Cheng-Yang Fu, and Alexander Berg. SSD: Single shot multibox detector. In Proc. Eur. Conf. Comp. Vis., pages 21–37. Springer, 2016.
|
| 174 |
+
$[ \mathrm { L D G ^ { + } } 1 7 ]$ Tsung-Yi Lin, Piotr Dollár, Ross Girshick, Kaiming He, Bharath Hariharan, and Serge Belongie. Feature pyramid networks for object detection. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 2117–2125, 2017. [LH17] Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. arXiv preprint arXiv:1711.05101, 2017. [Li17] Bo Li. 3d fully convolutional network for vehicle detection in point cloud. In Proc. IEEE/RSJ Int. Conf. Intelligent Robots and Systems, pages 1513–1518, 2017.
|
| 175 |
+
$[ \mathrm { L L C } ^ { + } 2 1 ]$ Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin transformer: Hierarchical vision transformer using shifted windows. In Proc. IEEE Int. Conf. Comp. Vis., pages 10012–10022, 2021. [LSD15] Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 3431–3440, 2015.
|
| 176 |
+
$[ \mathrm { L V C ^ { + } } 1 9 ]$ Alex Lang, Sourabh Vora, Holger Caesar, Lubing Zhou, Jiong Yang, and Oscar Beijbom. Pointpillars: Fast encoders for object detection from point clouds. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 12697–12705, 2019. [LZX16] Bo Li, Tianlei Zhang, and Tian Xia. Vehicle detection from 3d lidar using fully convolutional network. arXiv preprint arXiv:1608.07916, 2016.
|
| 177 |
+
$[ \mathrm { M L K ^ { + } } 1 9 ]$ Gregory P Meyer, Ankit Laddha, Eric Kee, Carlos Vallespi-Gonzalez, and Carl Wellington. Lasernet: An efficient probabilistic 3d object detector for autonomous driving. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 12677–12686, 2019.
|
| 178 |
+
[QSMG17] Charles R Qi, Hao Su, Kaichun Mo, and Leonidas J Guibas. Pointnet: Deep learning on point sets for 3d classification and segmentation. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 652–660, 2017.
|
| 179 |
+
[RDGF16] Joseph Redmon, Santosh Divvala, Ross Girshick, and Ali Farhadi. You only look once: Unified, real-time object detection. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 779–788, 2016. [RF17] Joseph Redmon and Ali Farhadi. Yolo9000: Better, faster, stronger. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 7263–7271, 2017.
|
| 180 |
+
[RHGS15] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster R-CNN: Towards real-time object detection with region proposal networks. In Proc. Advances in Neural Inf. Process. Syst., pages 91–99, 2015.
|
| 181 |
+
$[ \mathrm { S K D } ^ { + } 2 0 ]$ Pei Sun, Henrik Kretzschmar, Xerxes Dotiwalla, Aurelien Chouard, Vijaysai Patnaik, Paul Tsui, James Guo, Yin Zhou, Yuning Chai, Benjamin Caine, et al. Scalability in perception for autonomous driving: Waymo open dataset. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 2446–2454, 2020. [SPC21] https://github.com/traveller59/spconv/tree/v1.2.1, 2021. [ST19] Leslie Smith and Nicholay Topin. Super-convergence: Very fast training of neural networks using large learning rates. In Artificial Intelligence and Machine Learning for Multi-domain Operations Applications, 2019.
|
| 182 |
+
$[ \mathrm { S W C } ^ { + } 2 1 ]$ Pei Sun, Weiyue Wang, Yuning Chai, Gamaleldin Elsayed, Alex Bewley, Xiao Zhang, Cristian Sminchisescu, and Dragomir Anguelov. RSN: Range sparse net for efficient, accurate lidar 3d object detection. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 5725–5734, 2021.
|
| 183 |
+
[TSCH19] Zhi Tian, Chunhua Shen, Hao Chen, and Tong He. FCOS: Fully convolutional one-stage object detection. In Proc. IEEE Int. Conf. Comp. Vis., pages 9627–9636, 2019.
|
| 184 |
+
[WMZY21] Chunwei Wang, Chao Ma, Ming Zhu, and Xiaokang Yang. PointAugmenting: Cross-modal augmentation for 3d object detection. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 11794–11803, 2021. [XBT22] Xinge Zhu Qingqiu Huang Yilun Chen Hongbo Fu Xuyang Bai, Zeyu Hu and Chiew-Lan Tai. TransFusion: Robust Lidar-Camera Fusion for 3d Object Detection with Transformers. CVPR, 2022.
|
| 185 |
+
$[ \mathrm { Y J W ^ { + } } 1 6 ]$ Jiahui Yu, Yuning Jiang, Zhangyang Wang, Zhimin Cao, and Thomas Huang. Unitbox: An advanced object detection network. In Proc. ACM Int. Conf. Multimedia, pages 516–520, 2016. [YML18] Yan Yan, Yuxing Mao, and Bo Li. Second: Sparsely embedded convolutional detection. Sensors, 18(10):3337, 2018. [YZK21] Tianwei Yin, Xingyi Zhou, and Philipp Krahenbuhl. Center-based 3d object detection and tracking. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 11784–11793, 2021. [ZHJF22] Wu Zheng, Mingxuan Hong, Li Jiang, and Chi-Wing Fu. Boosting 3d object detection by simulating multimodality on point clouds. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 13638–13647, 2022.
|
| 186 |
+
$[ Z \mathrm { M W } ^ { + } 2 0 ]$ Xinge Zhu, Yuexin Ma, Tai Wang, Yan Xu, Jianping Shi, and Dahua Lin. SSN: shape signature networks for multi-class object detection from point clouds. In European Conference on Computer Vision, pages 581–597. Springer, 2020. [ZT18] Yin Zhou and Oncel Tuzel. Voxelnet: End-to-end learning for point cloud based 3d object detection. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 4490–4499, 2018. [ZWK19] Xingyi Zhou, Dequan Wang, and Philipp Krähenbühl. Objects as points. arXiv: Comp. Res. Repository, 2019.
|
| 187 |
+
|
| 188 |
+
# Checklist
|
| 189 |
+
|
| 190 |
+
1. For all authors...
|
| 191 |
+
|
| 192 |
+
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes]
|
| 193 |
+
(b) Did you describe the limitations of your work? [Yes] ] In multi-frame settings, the RV-based detector still cannot outperform the BEV-based ones despite being faster.
|
| 194 |
+
(c) Did you discuss any potential negative societal impacts of your work? [Yes] See the conclusion section.
|
| 195 |
+
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
|
| 196 |
+
|
| 197 |
+
2. If you are including theoretical results...
|
| 198 |
+
|
| 199 |
+
(a) Did you state the full set of assumptions of all theoretical results? [N/A] (b) Did you include complete proofs of all theoretical results? [N/A]
|
| 200 |
+
|
| 201 |
+
3. If you ran experiments...
|
| 202 |
+
|
| 203 |
+
(a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [Yes] We will release our code and models on GitHub soon.
|
| 204 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes]
|
| 205 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [No] The used dataset is relatively large and none of the previous works reports the error bars on this dataset.
|
| 206 |
+
(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [Yes] See implementation details.
|
| 207 |
+
|
| 208 |
+
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
|
| 209 |
+
|
| 210 |
+
(a) If your work uses existing assets, did you cite the creators? [Yes]
|
| 211 |
+
(b) Did you mention the license of the assets? [N/A]
|
| 212 |
+
(c) Did you include any new assets either in the supplemental material or as a URL? [No]
|
| 213 |
+
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A]
|
| 214 |
+
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A]
|
| 215 |
+
|
| 216 |
+
5. If you used crowdsourcing or conducted research with human subjects...
|
| 217 |
+
|
| 218 |
+
(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
|
| 219 |
+
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
|
| 220 |
+
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
|
parse/dev/2-REuflJDT/2-REuflJDT_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/2-REuflJDT/2-REuflJDT_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/A4fSkNAs6E1/A4fSkNAs6E1.md
ADDED
|
@@ -0,0 +1,422 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# HIERARCHICAL GAUSSIAN MIXTURE BASED TASK GENERATIVE MODEL FOR ROBUST META-LEARNING
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Meta-learning enables quick adaptation of machine learning models to new tasks with limited data. While tasks could come from varying distributions in reality, most of the existing meta-learning methods consider both training and testing tasks as from the same uni-component distribution, overlooking two critical needs of a practical solution: (1) the various sources of tasks may compose a multicomponent mixture distribution, and (2) novel tasks may come from a distribution that is unseen during meta-training. In this paper, we demonstrate these two challenges can be solved jointly by modeling the density of task instances. We develop a meta-training framework underlain by a novel Hierarchical Gaussian Mixture based Task Generative Model (HTGM). HTGM extends the widely used empirical process of sampling tasks to a theoretical model, which learns task embeddings, fits the mixture distribution of tasks, and enables density-based scoring of novel tasks. The framework is agnostic to the encoder and scales well with large backbone networks. The model parameters are learned end-to-end by maximum likelihood estimation via an Expectation-Maximization algorithm. Extensive experiments on benchmark datasets indicate the effectiveness of our method for both sample classification and novel task detection.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Training models in small data regimes is of fundamental importance. It demands a model’s ability to quickly adapt to new environments and tasks. To compensate for the lack of training data for each task, meta-learning (a.k.a. learning to learn) has become an essential paradigm for model training by generalizing meta-knowledge across tasks (Snell et al., 2017; Finn et al., 2017). While most existing meta-learning approaches were built upon an assumption that all training/testing tasks are sampled from the same distribution, a more realistic scenario should accommodate training tasks that lie in a mixture of distributions, and testing tasks that may belong to or deviate from the learned distributions. For example, in recent medical research, a global model is typically trained on the historical medical records of a certain set of patients in the database (Shukla & Marlin, 2019; Wu et al., 2021). However, due to the uniqueness of individuals (e.g., gender, age, genetics), patients’ data have a substantial discrepancy, and the pre-trained model may demonstrate significant demographic or geographical biases when testing on a new patient (Purushotham et al., 2017). This issue can be mitigated by personalized medicine approaches (Chan & Ginsburg, 2011; Ni et al., 2022) where each patient is regarded as a task, and the pre-trained model is fine-tuned (i.e., personalized) on a support set of a few records collected in a short period (e.g., a few weeks) from every patient for adaptation. In this case, the training tasks (i.e., patients) could be sampled from a mixture of distributions (e.g., different age groups), and a testing task may or may not belong to any of the observed groups. As such, a meta-training strategy that is able to fit a mixture of task distributions and identify novel tasks is desirable for making meta-learning a practical solution.
|
| 12 |
+
|
| 13 |
+
One way to tackle the mixture distributions of tasks is to tailor the transferable knowledge to each task by learning a task-specific representation (Oreshkin et al., 2018; Vuorio et al., 2018; Lee & Choi, 2018), but as discussed in (Yao et al., 2019a), the over-customized knowledge prevents its generalization among closely related tasks (e.g., tasks from the same distribution). The more recent methods try to balance the generalization and customization of the meta-knowledge by promoting local generalization either among a cluster of related tasks (Yao et al., 2019a), or within a neighborhood of a meta-knowledge graph of tasks (Yao et al., 2019b). Neither of them explicitly learns the underlying distribution from which the tasks are generated, rendering them infeasible for detecting novel tasks that are out-of-distribution. However, detecting novel tasks is crucial in high-stake domains, such as medicine and finance, which provides users (e.g., physicians) confidence on whether to trust the results of a testing task or not, and facilitates the downstream decision-making.
|
| 14 |
+
|
| 15 |
+
In (Lee et al., 2019a), a task-specific tuning variable was introduced to modulate the initial parameters learned by MAML (Finn et al., 2017), so that the impacts of the meta-knowledge on different tasks are adjusted differently, e.g., novel tasks receive less impact than known tasks do. Whereas, this method focuses on improving model performance on different tasks (either known or novel), but neglects the critical mission of detecting which tasks are novel. In practice, providing an unreliable accuracy on a novel task, without differentiating it from other tasks may be meaningless and risky.
|
| 16 |
+
|
| 17 |
+
Since the aforementioned methods cannot simultaneously handle the mixture distribution of tasks and novel tasks, a practical solution is in demand. In this work, we consider tasks as instances, and demonstrate the dual problem of modeling the mixture of task distributions and detecting novel tasks are two sides of the same coin, i.e., density estimation on task instances. To this end, we propose a new Hierarchical Gaussian Mixture based Task Generative Model (HTGM) to explicitly model the generative process of task instances. Our contributions are summarized as follows.
|
| 18 |
+
|
| 19 |
+
• For the first time, the widely used empirical process of generating a task is theoretically extended to and specified by a hierarchy of Gaussian mixture (GM) distributions. HTGM generates a task embedding from a task-level GM, and uses it to define the task-conditioned mixture probabilities for a class-level GM, from which samples are drawn, for instantiating the generated task. To allow realistic classes per task, a new Gibbs distribution is proposed to underlie the class-level GM. • HTGM is an encoder-agnostic framework, thus is flexible to different domains. It inherits metricbased meta-learning methods, and only introduces a small overhead to an encoder for parameterizing its distributions, thus is efficient, and enables large-scale backbone networks. The model parameters are learned end-to-end by maximum likelihood estimation via a principled ExpectationMaximization (EM) algorithm. The bounds of our likelihood function is theoretically analyzed. • In the experiments, we evaluated HTGM on benchmark image datasets for validating its ability to take advantage of large backbone networks, its effectiveness in modeling the mixture distribution of tasks, and its usefulness in identifying novel tasks. The results demonstrate HTGM outperforms the state-of-the-art (SOTA) baselines with significant improvements in most cases.
|
| 20 |
+
|
| 21 |
+
# 2 RELATED WORK
|
| 22 |
+
|
| 23 |
+
To the best of our knowledge, this is the first work to explicitly model the generative process of task instances from a mixture of distributions for meta-learning with novel task detection. Meta-learning aims to handle the few-shot learning problem, which derives memory-based (Mishra et al., 2018), optimization-based (Finn et al., 2017; Li et al., 2017), and metric-based methods (Vinyals et al., 2016; Snell et al., 2017), which often consider an artificial scenario where training/test tasks are sampled from the same distribution. To enable more varying tasks, task-adaptive methods facilitates the customization of meta-knowledge by learning task-specific parameters (Rusu et al., 2018; Lee & Choi, 2018), temperature scaling parameters (Oreshkin et al., 2018), and task-specific modulation on model initialization (Vuorio et al., 2018; Yao et al., 2019a;b; Lee et al., 2019a). Among them, there are methods tackling the mixture distribution of tasks by clustering tasks (Yao et al., 2019a) or learning task graphs (Yao et al., 2019b), and method relocating the initial parameters for different tasks so that they use the meta-knowledge differently (Lee et al., 2019a). As discussed before, none of these methods jointly handle the mixture of task distributions and the detection of novel tasks.
|
| 24 |
+
|
| 25 |
+
Our model is built upon metric-based methods, and learns task embeddings for modeling task distributions. Achille et al. (2019) also proposed to learn embeddings for tasks and introduced a metalearning method, but not for few-shot learning. Its embeddings are from a pre-specified set of tasks (rather than episode-wise sampling), and the meta-learning framework is for model selection. The model in (Yao et al., 2019a) has an augmented encoder for task embedding, but it does not explicitly model task generation, and is not designed for novel task detection (empirical comparison in 4.1).
|
| 26 |
+
|
| 27 |
+
Conventional novelty detection aims to identify and reject samples from unseen classes (Cheng & Vasconcelos, 2021). It relates to open-set recognition (Vaze et al., 2022), which aims to simultaneously identify unknown samples and classify samples from known classes. Out-of-distribution (OOD) detection (Liang et al., 2018; Liu et al., 2020) can be seen as a special case of novelty detection where novel samples are from other problem domains or datasets, thus are considered to be easier to detect than novelties (Cheng & Vasconcelos, 2021). These methods are for large-scale training. In contrast, we want to detect novel tasks, which is a new problem in the small data regime.
|
| 28 |
+
|
| 29 |
+
Hierarchical Gaussian Mixture (HGM) model has appeared in some traditional works (Goldberger & Roweis, 2005; Olech & Paradowski, 2016; Athey et al., 2019) for hierarchical clustering by applying GM agglomeratively or divisively, which do not pre-train models for meta-learning, and is remarkably different from the topic in this paper. The differences are elaborated in Appendix B.1. Moreover, we discuss the relevant multi-task learning methods with task grouping in Appendix B.2.
|
| 30 |
+
|
| 31 |
+
# 3 HIERARCHICAL GAUSSIAN MIXTURE BASED TASK GENERATIVE MODEL
|
| 32 |
+
|
| 33 |
+
Meta-learning methods typically use an episodic learning strategy, where the meta-training set ${ \mathcal { D } } ^ { \mathrm { t r } }$ consists of a batch of episodes. Each episode samples a task $\tau$ from a distribution $p ( \tau )$ . Task $\tau$ has a support set $\mathcal { D } _ { \tau } ^ { \mathfrak { s } } = \{ ( \mathbf { x } _ { i } ^ { \mathfrak { s } } , y _ { i } ^ { \mathfrak { s } } ) \} _ { i = 1 } ^ { n _ { \mathfrak { s } } }$ for training, and a query set $\mathcal { D } _ { \tau } ^ { \mathfrak { q } } = \{ ( \mathbf { x } _ { i } ^ { \mathfrak { q } } , y _ { i } ^ { \mathfrak { q } } ) \} _ { i = 1 } ^ { n _ { \mathfrak { q } } }$ for testing, where $n _ { \mathsf { s } }$ is a small number to denote a few training samples. In particular, in a commonly used $N$ -way $K$ -shot $Q$ -query task (Vinyals et al., 2016), $\mathcal { D } _ { \tau } ^ { \mathsf { s } }$ and $\mathcal { D } _ { \tau } ^ { \mathfrak { q } }$ contain $N$ classes, with $K$ and $Q$ samples per class respectively, i.e., $n _ { \mathrm { s } } = N K$ and $n _ { \mathfrak { q } } = N Q$ .
|
| 34 |
+
|
| 35 |
+
Let $f _ { \pmb { \theta } } ( \mathbf { x } _ { i } ^ { * } ) \ y _ { i } ^ { * }$ be a base model $^ *$ denotes s or q), and $f _ { \pmb { \theta } } ( \cdot ; \mathcal { D } _ { \tau } ^ { \tt s } )$ be the adapted model on $\mathcal { D } _ { \tau } ^ { \mathsf { s } }$ . The training objective on $\tau$ is to minimize the average test error of the adapted model, i.e., $\mathbb { E } _ { ( \mathbf { x } _ { i } ^ { \mathfrak { q } } , y _ { i } ^ { \mathfrak { q } } ) \in \mathcal { D } _ { \tau } ^ { \mathfrak { q } } } \ell ( y _ { i } ^ { \mathfrak { q } } , f _ { \pmb { \theta } } ( \mathbf { x } _ { i } ^ { \mathfrak { q } } ; \mathcal { D } _ { \tau } ^ { \mathfrak { s } } ) )$ , where $\ell ( \cdot , \cdot )$ is a loss function (e.g., cross-entropy loss), and the metatraining process aims to find the parameter $\pmb \theta$ that minimizes this error over all episodes in ${ \mathcal { D } } ^ { \mathrm { t r } }$ . Then, $f _ { \theta }$ is evaluated on every episode of a meta-test set $\mathcal { D } ^ { \mathrm { t e } }$ that samples a task from the same distribution $p ( \tau )$ . Usually, $p ( \tau )$ is a simple distribution (Finn et al., 2017; Lee et al., 2019a). In this work, $p ( \tau )$ is generalized to a mixture distribution consisting of multiple components $p _ { 1 } ( \tau )$ , ..., $p _ { r } ( \tau )$ , and a test episode may sample a task either in or out of any component of $p ( \tau )$ . As such, given the training tasks in ${ \mathcal { D } } ^ { \mathrm { t r } }$ , our goal is to estimate the underlying density of $p ( \tau )$ , so that once a test task is given, we can (1) identify if it is a novel task, and (2) adapt $f _ { \theta }$ to it with optimal accuracy.
|
| 36 |
+
|
| 37 |
+
Specifically, the base model $f _ { \theta }$ can be written as a combination of an encoder $g _ { \pmb { \theta } _ { e } }$ and a predictor $h _ { \pmb { \theta } _ { p } }$ , i.e., $f _ { \pmb \theta } ( \mathbf { x } _ { i } ^ { * } ) = h _ { \pmb \theta _ { p } } ( g _ { \pmb \theta _ { e } } ( \mathbf { x } _ { i } ^ { * } ) )$ (Tian et al., 2020). In this work, we focus on a metric-based nonparametric learner, i.e., $\theta _ { p } = \mathcal { D }$ (e.g., prototypical networks (Snell et al., 2017)), not only because metric-based classifiers were confirmed as more effective than probabilistic classifiers for novelty detection (Jeong et al., 2021), but also for its better training efficiency that fits large-scale backbone networks than the costly nested-loop training of optimization-based methods (Tian et al., 2020).
|
| 38 |
+
|
| 39 |
+
Formally, our goal is to find the model parameter $\pmb { \theta }$ that maximizes the likelihood of observing a task $\tau$ . In other words, let $f _ { \pmb \theta } ( \mathbf { x } _ { i } ^ { * } ) = \mathbf { e } _ { i } ^ { * } \bar { \in } \mathbb { R } ^ { d }$ be the sample embedding, we want to maximize the likelihood of the joint distribution $p _ { \pmb { \theta } } ( \mathbf { e } _ { i } ^ { * } , y _ { i } ^ { * } )$ on the observed data in $\mathcal { D } _ { \tau } = \{ \mathcal { D } _ { \tau } ^ { \mathsf { s } } , \mathcal { D } _ { \tau } ^ { \mathsf { q } } \}$ . We consider each task $\tau$ as an instance, with a representation $\mathbf { v } _ { \tau } \in \mathbb { R } ^ { d }$ in the embedding space (the method to infer $\mathbf { v } _ { \tau }$ is described in Sec. 3.2). To model the unobserved mixture component, we associate every task with a latent variable $z _ { \tau }$ to indicate to which component it belongs. Suppose there are $r$ possible components, and let $n = n _ { \mathsf { s } } + n _ { \mathsf { q } }$ be the total number of samples in $\mathcal { D } _ { \tau }$ , the log-likelihood to maximize can be written by hierarchically factorizing it on $y _ { i } ^ { * }$ and marginalizing out $\mathbf { v } _ { \tau }$ and $z _ { \tau }$ .
|
| 40 |
+
|
| 41 |
+
$$
|
| 42 |
+
\begin{array} { l } { \displaystyle \ell ( \mathcal { D } _ { \tau } ; \pmb { \theta } ) = \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \log \left[ p _ { \pmb { \theta } } ( \mathbf { e } _ { i } ^ { * } , y _ { i } ^ { * } ) \right] = \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \log \left[ p _ { \pmb { \theta } } ( \mathbf { e } _ { i } ^ { * } | y _ { i } ^ { * } ) p ( y _ { i } ^ { * } ) \right] } \\ { \displaystyle ~ = \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \log \left[ p _ { \pmb { \theta } } ( \mathbf { e } _ { i } ^ { * } | y _ { i } ^ { * } ) [ \int _ { \mathbf { v } _ { \tau } } p ( y _ { i } ^ { * } | \mathbf { v } _ { \tau } ) p ( \mathbf { v } _ { \tau } ) d \mathbf { v } _ { \tau } ] \right] } \\ { \displaystyle ~ = \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \log \left[ p _ { \pmb { \theta } } ( \mathbf { e } _ { i } ^ { * } | y _ { i } ^ { * } ) \left[ \int _ { \mathbf { v } _ { \tau } } p ( y _ { i } ^ { * } | \mathbf { v } _ { \tau } ) \big [ \sum _ { z = 1 } ^ { r } p ( \mathbf { v } _ { \tau } | z _ { \tau } ) p ( z _ { \tau } ) \big ] d \mathbf { v } _ { \tau } \right] \right] } \end{array}
|
| 43 |
+
$$
|
| 44 |
+
|
| 45 |
+
where $p _ { \pmb { \theta } } ( \mathbf { e } _ { i } ^ { \ast } | y _ { i } ^ { \ast } )$ specifies the probability of sampling $\mathbf { e } _ { i } ^ { * }$ from the $y _ { i } ^ { * }$ -th class, $p ( y _ { i } ^ { * } | \mathbf { v } _ { \tau } )$ is the probability of sampling the $y _ { i } ^ { * }$ -th class for task $\tau$ , and $p ( \mathbf { v } _ { \tau } | z _ { \tau } )$ indicates the probability of generating a task $\tau$ from the $z _ { \tau }$ -th mixture component. $p ( z _ { \tau } )$ is a prior on the $z _ { \tau }$ -th component. Hence, Eq. (1) implies a generative process of task $\tau$ : $z _ { \tau } { \mathbf v } _ { \tau } y _ { i } ^ { * } { \mathbf e } _ { i } ^ { * }$ . Next, we define each of the aforementioned distributions and propose our HTGM method.
|
| 46 |
+
|
| 47 |
+
# 3.1 MODEL SPECIFICATION AND PARAMETERIZATION
|
| 48 |
+
|
| 49 |
+
In Eq. (1), the class-conditional distribution $p _ { \pmb { \theta } } ( \mathbf { e } _ { i } ^ { \ast } | y _ { i } ^ { \ast } )$ , the task-conditional distribution $p ( y _ { i } ^ { * } | \mathbf { v } _ { \tau } )$ , and the mixture distribution of tasks defined by $\{ p ( \mathbf { v } _ { \tau } | \boldsymbol { z } _ { \tau } ) , p ( \boldsymbol { z } _ { \tau } ) \}$ are not specified. To make Eq. (1) optimizable, we introduce our HTGM that models the generative process of tasks. Because $\mathcal { D } _ { \tau } ^ { \mathsf { s } }$ and $\mathcal { D } _ { \tau } ^ { \mathfrak { q } }$ follow the same distribution, in the following, we ignore the superscript $^ *$ for simplicity.
|
| 50 |
+
|
| 51 |
+
Class-Conditional Distribution.bution to model the embeddings $\mathbf { e } _ { i }$ irst, similar to (Lee et’s in every class. Let $\pmb { \mu } _ { y _ { i } } ^ { \mathsf { c } }$ 201and $\Sigma _ { y _ { i } } ^ { \mathsf { c } }$ 19b), we use Gaussian distri-be the mean and variance of the distribution of the $y _ { i }$ -th class, then $p _ { \pmb { \theta } } ( \mathbf { e } _ { i } | y _ { i } ) = \mathcal { N } ( \mathbf { e } _ { i } | \pmb { \mu } _ { y _ { i } } ^ { \mathrm { c } } , \pmb { \Sigma } _ { y _ { i } } ^ { \mathrm { c } } )$ yi. In fact, the samples in all of the classes of task comprise a Gaussian mixture distribution, where $p ( y _ { i } )$ is the mixture probability of the $y _ { i }$ -th class. In Eq. (1), $p ( y _ { i } )$ is factorized to be task-specific, i.e., $p ( y _ { i } | \mathbf { v } _ { \tau } )$ , which resorts to another mixture distribution $p ( \mathbf { v } _ { \tau } )$ of tasks, and establishes a structure of hierarchical mixture.
|
| 52 |
+
|
| 53 |
+
Task-Conditional Distribution. A straightforward definition of $p ( y _ { i } | \mathbf { v } _ { \tau } )$ is the density at $\mu _ { y _ { i } } ^ { \mathsf { c } }$ in a Gaussian distribution with $\mathbf { v } _ { \tau }$ as the mean, where $\mu _ { y _ { i } } ^ { \mathsf { c } }$ is the mean (or prototype) of the $y _ { i }$ -th class. However, doing so exposes two problems: (1) the density function of Gaussian distribution is logconcave with one global maximum. Given the mean and variance, maximizing its log-likelihood tends to collapse the prototypes $\mu _ { y _ { i } } ^ { \mathsf { c } }$ ’s of all classes in $\tau$ , making them indistinguishable and impairing classification; (2) given $\mathbf { v } _ { \tau }$ , this method tends to sample classes with small $D _ { \mathbf { v } _ { \tau } } ( \mu _ { y _ { i } } ^ { \mathsf { c } } )$ , where $D _ { \mathbf { v } _ { \tau } } ( \cdot )$ measures the Mahalanobis distance between a data point and the Gaussian distribution centered at $\mathbf { v } _ { \tau }$ . However, in most of the existing works, classes are often uniformly sampled from a domain without any prior on distances (Finn et al., 2017). Fitting the distance function with such “uniform” classes naively leads to an ill-posed learning problem with degenerated solutions. In light of these issues, we seek to define $p ( y _ { i } | \mathbf { \bar { v } } _ { \tau } )$ as a (parameterized) density function with at least $N$ global optimums so that it can distinguish the $N$ different class prototypes of $N$ -way tasks. The $N$ equal (global) optimums also allow it to fit $N$ classes uniformly sampled from a domain. To this end, let $\pmb { \mu } _ { k } ^ { \mathsf { c } }$ be the surrogate embedding of the $k$ -th class, we propose a Gibbs distribution $\pi ( \mu _ { k } ^ { \mathrm { c } } | \mathbf { v } _ { \tau } , \omega )$ defined by $\mathbf { v } _ { \tau }$ and trainable parameters $\omega$ with an energy function. Then we write $p ( y _ { i } = \dot { k } | \mathbf { v } _ { \tau } )$ as
|
| 54 |
+
|
| 55 |
+
$$
|
| 56 |
+
p _ { \omega } ( y _ { i } = k | \mathbf { v } _ { \tau } ) = \pi ( \mu _ { k } ^ { \mathrm { c } } | \mathbf { v } _ { \tau } , \omega ) = \frac { \exp \left[ - E _ { \omega } ( \mu _ { k } ^ { \mathrm { c } } ; \mathbf { v } _ { \tau } ) \right] } { \int _ { \mu _ { k } ^ { \mathrm { c } } } \exp \left[ - E _ { \omega } ( \mu _ { k } ^ { \mathrm { c } } ; \mathbf { v } _ { \tau } ) \right] }
|
| 57 |
+
$$
|
| 58 |
+
|
| 59 |
+
where $E _ { \omega } ( \pmb { \mu } _ { k } ^ { \mathsf { c } } ; \mathbf { v } _ { \tau } ) = \operatorname* { m i n } \left( \{ | | \pmb { \mu } _ { k } ^ { \mathsf { c } } - \mathbf { W } _ { j } \mathbf { v } _ { \tau } | | _ { 2 } ^ { 2 } \} _ { j = 1 } ^ { N } \right)$ is our energy function, and the denominator in Eq (2) is a normalizing constant (with respect to $\mu _ { k } ^ { \mathrm { c } } )$ , a.k.a. the partition function in an energybased model (EBM) (LeCun et al., 2006). $\boldsymbol { \omega } = \{ \mathbf { \tilde { W } } _ { 1 } , . . . , \mathbf { W } _ { N } \}$ are trainable parameters, with $\mathbf { W } _ { i } \in \mathbb { R } ^ { d \times d }$ . Given $\omega$ and $\mathbf { v } _ { \tau }$ , Eq. (2) has $N$ global maximums at $\pmb { \mu } _ { k } ^ { \mathrm { c } } = \mathbf { W } _ { 1 } \mathbf { v } _ { \tau } , . . . , \pmb { \mu } _ { k } ^ { \mathrm { c } } = \mathbf { W } _ { N } \mathbf { v } _ { \tau }$ . More interpretations of the proposed task-conditional distribution can be found in Appendix B.3.
|
| 60 |
+
|
| 61 |
+
Mixture Distribution of Tasks. In Eq. (1), the task distribution $p ( \mathbf { v } _ { \tau } )$ is factorized as a mixture of $p ( \mathbf { v } _ { \tau } | z _ { \tau } = 1 )$ , ..., $p ( \mathbf { v } _ { \tau } | z _ { \tau } = r )$ , weighted by their respective mixture probability $p ( z _ { \tau } )$ . Thus we specify $p ( \mathbf { v } _ { \tau } )$ as a Gaussian mixture distribution, and introduce $\mu _ { z _ { \tau } } ^ { \mathrm { t } }$ and $\Sigma _ { z _ { \tau } } ^ { \mathrm { t } }$ as the mean and variance for each component, i.e., $p ( \mathbf { v } _ { \tau } | z _ { \tau } ) = \mathcal { N } ( \mathbf { v } _ { \tau } | \pmb { \mu } _ { z _ { \tau } } ^ { \mathrm { t } } , \pmb { \Sigma } _ { z _ { \tau } } ^ { \mathrm { t } } )$ . Then the generation of $\mathbf { v } _ { \tau }$ involves two steps: (1) draw a latent variable $z _ { \tau }$ from a categorical distribution on $[ p ( z _ { \tau } = 1 ) , . . . , p ( z _ { \tau } = r ) ]$ , which can be Uniform $( r )$ , and (2) draw $\mathbf { v } _ { \tau }$ from $\bar { \mathcal { N } } ( \mu _ { z _ { \tau } } ^ { \mathrm { t } } , \Sigma _ { z _ { \tau } } ^ { \mathrm { t } } )$ (Bishop, 2006).
|
| 62 |
+
|
| 63 |
+
As such, our HTGM generative process of an $N$ -way $K$ -shot $Q$ -query task $\tau$ can be summarized as
|
| 64 |
+
|
| 65 |
+
1. Draw a latent task variable $z _ { T } \sim$ Categorical $( [ p ( z _ { \tau } = 1 ) , . . . , p ( z _ { \tau } = r ) ] )$ 0
|
| 66 |
+
2. Draw a task embedding $\mathbf { v } _ { \tau } \sim \mathcal { N } ( \pmb { \mu } _ { z _ { \tau } } ^ { \mathrm { t } } , \pmb { \Sigma } _ { z _ { \tau } } ^ { \mathrm { t } } )$ )
|
| 67 |
+
|
| 68 |
+
3. For $k = 1 , . . . , N$ :
|
| 69 |
+
|
| 70 |
+
(a) Draw a class prototype $\pmb { \mu } _ { k } ^ { \mathrm { c } } \sim \pi ( \pmb { \mu } _ { k } ^ { \mathrm { c } } | \mathbf { v } _ { \tau } , \omega )$ from the proposed Gibbs distribution in Eq. (2)
|
| 71 |
+
(b) For $i = 1 , . . . , K + Q$ : i. Set $y _ { i } = k$ , draw a sample embedding $\mathbf { e } _ { i } \sim \mathcal { N } ( \mathbf { e } _ { i } | \boldsymbol { \mu } _ { y _ { i } } ^ { \mathrm { c } } , \boldsymbol { \Sigma } _ { y _ { i } } ^ { \mathrm { c } } )$ ii. Allocate $( \mathbf { e } _ { i } , y _ { i } )$ to the support set $\mathcal { D } _ { \tau } ^ { \mathsf { s } }$ if $i \leq K$ ; else allocate $( \mathbf { e } _ { i } , y _ { i } )$ to the query set $\mathcal { D } _ { \tau } ^ { \sf q }$
|
| 72 |
+
|
| 73 |
+
To reduce complexity, we investigate the feasibility of using isotropic Gaussian with tied variance, i.e., $\pmb { \Sigma } _ { 1 } ^ { \mathrm { c } } = \ldots \bar { = } \pmb { \Sigma } _ { N } ^ { \mathrm { c } } = \sigma ^ { 2 } \mathbf { I }$ , for class distributions, which turned out to be efficient in our experiments. Here, I is the identity matrix, $\sigma$ is a hyperparameter. Tied variance is also a commonly used trick in Gaussian discriminate analysis (GDA) for generative classifiers (Lee et al., 2018). For task distributions, the variances $\Sigma _ { 1 } ^ { \mathrm { t } } , . . . , \dot { \Sigma } _ { r } ^ { \mathrm { t } }$ can be automatically inferred by our algorithm in Sec. 3.2.
|
| 74 |
+
|
| 75 |
+

|
| 76 |
+
Figure 1: An illustration of HTGM on its (a) the training process, and (b) the testing process. In (a), $\textcircled{1} \textcircled{2} \textcircled { 3 }$ are the three parts of the training loss in Eq. (3). In (b), the training task embeddings contain the embeddings of all training tasks, i.e. the outputs of the task-pooling in (a).
|
| 77 |
+
|
| 78 |
+
Finally, substituting $\mathbf { \nabla } _ { \theta } ( \mathbf { e } _ { i } | y _ { i } ) = \mathcal { N } ( \mathbf { e } _ { i } | \mu _ { y _ { i } } ^ { \circ } , \sigma ^ { 2 } \mathbf { I } ) , p _ { \omega } ( y _ { i } | \mathbf { v } _ { \tau } ) = \pi ( \mu _ { y _ { i } } ^ { \circ } | \mathbf { v } _ { \tau } , \omega ) ( y _ { i } = k ) , p ( \mathbf { v } _ { \tau } | z _ { \tau } ) = \delta ( \mathbf { v } _ { \tau } | y _ { \tau } ) = \delta ( \mathbf { v } _ { \tau } | y _ { \tau } ) .$ $\mathcal { N } ( { \bf v } _ { \tau } | \mu _ { z _ { \tau } } ^ { \mathrm { t } } , \Sigma _ { z _ { \tau } } ^ { \mathrm { t } } )$ and $p ( z _ { \tau } ) = \mathrm { U n i f o r m } ( r )$ in Eq. (1), whose probabilities are specified and parameterized, we get our HTGM induced loss $\ell _ { \mathrm { H T G M } } ( \mathcal { D } _ { \tau } ; \pmb \theta , \omega )$ . The class means $\mu _ { y _ { i } } ^ { \mathrm { c } }$ , task means $\mu _ { z _ { \tau } } ^ { \mathrm { t } }$ and variances $\Sigma _ { z _ { \tau } } ^ { \mathrm { t } }$ are inferred in the E-step of our EM algorithm (details are in Sec. 3.2 and A.4).
|
| 79 |
+
|
| 80 |
+
# 3.2 MODEL OPTIMIZATION
|
| 81 |
+
|
| 82 |
+
It is hard to directly optimize $\ell _ { \mathrm { H T G M } } ( \mathcal { D } _ { \tau } ; \pmb \theta , \omega )$ , because the exact posterior inference is intractable (due to the integration over $\mathbf { v } _ { \tau }$ ). To solve it, we resort to variational methods, and introduce an approximated posterior $q _ { \phi } ( \mathbf { v } _ { \tau } | \mathcal { D } _ { \tau } ^ { \mathsf { s } } )$ , which is defined by an inference network $\phi$ , and implies we want to infer $\mathbf { v } _ { \tau }$ from its observed support set $\mathcal { D } _ { \tau } ^ { \mathsf { s } }$ . The query set $\mathcal { D } _ { \tau } ^ { \mathfrak { q } }$ is not included because it is unavailable during model testing. Then we propose to maximize a lower-bound of Eq. (1), which is derived as (the details are in Appendix A.1)
|
| 83 |
+
|
| 84 |
+
$$
|
| 85 |
+
\begin{array} { l } { \displaystyle \ell _ { \mathrm { H T G M } } ( \mathcal { D } _ { \tau } ; \theta , \omega ) \geq \ell _ { \mathrm { H T G M - E L B O } } ( \mathcal { D } _ { \tau } ; \theta , \omega ) = \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \log p _ { \theta , \omega } ( \mathbf { e } _ { i } | y _ { i } ) } \\ { \displaystyle + \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \mathbb { E } _ { \mathbf { v } _ { \tau } \sim q _ { \phi } ( \mathbf { v } _ { \tau } | \mathcal { D } _ { \tau } ^ { \mathbb { S } } ) } \Big [ \log p _ { \omega } ( y _ { i } | \mathbf { v } _ { \tau } ) + \log \big ( \sum _ { z _ { \tau } = 1 } ^ { r } p ( \mathbf { v } _ { \tau } | z _ { \tau } ) p ( z _ { \tau } ) \big ) \Big ] + H \big ( q _ { \phi } ( \mathbf { v } _ { \tau } | \mathcal { D } _ { \tau } ^ { \mathbb { S } } ) \big ) } \end{array}
|
| 86 |
+
$$
|
| 87 |
+
|
| 88 |
+
where $\begin{array} { r } { H ( q _ { \phi } ( \mathbf { v } _ { \tau } | \mathcal { D } _ { \tau } ^ { \mathsf { s } } ) ) = - \int _ { \mathbf { v } _ { \tau } } q _ { \phi } ( \mathbf { v } _ { \tau } | \mathcal { D } _ { \tau } ^ { \mathsf { s } } ) \log q _ { \phi } ( \mathbf { v } _ { \tau } | \mathcal { D } _ { \tau } ^ { \mathsf { s } } ) d \mathbf { v } _ { \tau } } \end{array}$ is the entropy function. Similar to VAE (Kingma & Welling, 2013), Eq. (3) estimates the expectation (in the second term) by sampling ${ \bf v } _ { \tau }$ from $q _ { \phi } ( \mathbf { v } _ { \tau } | \mathcal { D } _ { \tau } ^ { \mathsf { s } } )$ , instead of the integration in Eq. (1), hence facilitates computation. Next, we elaborate on the inference network, the challenges of maximizing Eq. (3), and our workarounds.
|
| 89 |
+
|
| 90 |
+
Inference Network. Similar to VAE, $q _ { \phi } ( \mathbf { v } _ { \tau } | \mathcal { D } _ { \tau } ^ { \mathfrak { s } } )$ is defined as a Gaussian distribution $\mathcal { N } ( \mu _ { z _ { \tau } } ^ { \mathrm { a } } , \bar { \sigma } ^ { \mathrm { 2 } } \mathbf { I } )$ , where $\mu _ { z _ { \tau } } ^ { \mathsf { a } }$ is the output of the inference network, which approximates $\mu _ { z _ { \tau } } ^ { \mathrm { t } }$ in Step 2 of the generative process, and $\bar { \sigma }$ is a hyperparameter for the corresponding variance. As illustrated by Fig. 1(a), the inference network is built upon the base model $f _ { \pmb { \theta } } ( \cdot )$ with two non-parametric aggregation (i.e., mean pooling) functions, thus $\phi = \pmb \theta$ . The first function aggregates class-wise embeddings to prototypes $\mu _ { y _ { i } } ^ { \mathsf { c } }$ ’s, similar to prototypical networks (Snell et al., 2017). Differently, the second aggregates all prototypes to $\mu _ { z _ { \tau } } ^ { \mathsf { a } }$ . During model training, we use the reparameterization trick (Kingma & Welling, 2013) to sample $\mathbf { v } _ { \tau }$ from $\mathcal { N } ( \mu _ { z _ { \tau } } ^ { \mathrm { a } } , \bar { \sigma } ^ { \mathrm { 2 } } \mathbf { I } )$ . It is noteworthy that $H ( q _ { \phi } ( \mathbf { v } _ { \tau } \vert \mathcal { D } _ { \tau } ^ { \mathsf { s } } ) )$ in Eq. (3) becomes a constant now because $\bar { \sigma } ^ { 2 }$ is a constant.
|
| 91 |
+
|
| 92 |
+
Challenge 1: Trivial Solution. In Eq. (3), since the first term (constants are ignored) only penalizes the distance between a(i.e., intra-class distances) without considering inter-class re $\begin{array} { r } { \log p _ { \theta , \omega } ( \mathbf { e } _ { i } | y _ { i } ) = - \frac { 1 } { 2 \sigma ^ { 2 d } } \| \mathbf { e } _ { i } - \boldsymbol { \mu } _ { y _ { i } } ^ { \mathrm { c } } \| _ { 2 } ^ { 2 } } \end{array}$ $\mathbf { e } _ { i }$ $\mu _ { y _ { i } } ^ { \mathsf { c } }$ $\pmb { \mu } _ { 1 } ^ { \mathsf { c } }$
|
| 93 |
+
..., $\mu _ { N } ^ { \tt c }$ in task $\tau$ could collide, drawing all sample embeddings to the same spot. To avoid such
|
| 94 |
+
a trivial solution and improve the stability of optimization, we apply negative sampling (Mikolov
|
| 95 |
+
et al., 2013)
|
| 96 |
+
|
| 97 |
+
$$
|
| 98 |
+
\ell _ { \mathrm { n e g } } ( \mathcal { D } _ { \tau } ; y _ { i } , \pmb { \theta } , \omega ) = - \log \mathbb { E } _ { \mathbf { e } _ { j } \sim \mathcal { D } _ { \tau } } \big [ \exp { ( - \frac { 1 } { 2 \sigma ^ { 2 d } } \| \mathbf { e } _ { j } - \pmb { \mu } _ { y _ { i } } ^ { \mathrm { c } } \| _ { 2 } ^ { 2 } ) } \big ]
|
| 99 |
+
$$
|
| 100 |
+
|
| 101 |
+
where $\mathbf { e } _ { j }$ is a negative sample embedding from any class in the support set, and $\mu _ { y _ { i } } ^ { \mathrm { c } }$ is the mean of the positive class. In practice, we found it is beneficial to integrate $\ell _ { \mathrm { n { e g } } }$ with our likelihood $\ell _ { \mathrm { H T G M } }$ in Eq. (1) during training, i.e. $\begin{array} { r } { \ell _ { \mathrm { H T G M } } + \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \ell _ { \mathrm { n e g } } } \end{array}$ . Correspondingly, from Eq. (3) we have
|
| 102 |
+
|
| 103 |
+
$$
|
| 104 |
+
\ell ( \mathcal { D } _ { \tau } ; \pmb { \theta } , \omega ) = \ell _ { \mathrm { H T G M - E L B O } } ( \mathcal { D } _ { \tau } ; \pmb { \theta } , \omega ) + \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \ell _ { \mathrm { n e g } } ( \mathcal { D } _ { \tau } ; y _ { i } , \pmb { \theta } , \omega )
|
| 105 |
+
$$
|
| 106 |
+
|
| 107 |
+
which does not only serve as a robust training loss, but also helps solve the next challenge.
|
| 108 |
+
|
| 109 |
+
Challenge 2: The Partition Function in Eq. (2). The second term $p _ { \omega } ( y _ { i } | \mathbf { v } _ { \tau } )$ in Eq. (3) involves computing the partition function in Eq. (2) (i.e., the denominator), which is intractable because of the integration over all possible $\pmb { \mu } _ { k } ^ { \mathsf { c } }$ ’s. To solve it, we propose an upper bound of the partition function $\begin{array} { r } { \int _ { \pmb { \mu } _ { k } } \exp \big [ - E _ { \omega } ( \pmb { \mu } _ { k } ^ { \mathrm { c } } ; \mathbf { v } _ { \tau } ) \big ] d \pmb { \mu } _ { k } ^ { \mathrm { c } } \leq N \sqrt { 2 ^ { d - 1 } \pi ^ { d } } } \end{array}$ (the derivation is in Appendix A.2), which is a constant with a specific $N$ . By replacing the partition function in Eq. (2) with $N { \sqrt { 2 ^ { d - 1 } \pi ^ { d } } }$ , we got a lower bound of $p _ { \omega } ( y _ { i } | \mathbf { v } _ { \tau } )$ , which in turn relaxes the lower bound in Eq. (3). The following theorem (the proof is in Appendix A.3) states the tightness of the relaxed bound is controllable.
|
| 110 |
+
|
| 111 |
+
Theorem 1. Among the $N$ global maximums $\mathbf { W } _ { 1 } \mathbf { v } _ { \tau }$ , ..., ${ \bf W } _ { T } { \bf v } _ { \tau }$ of Eq. (2), let $\mathbf { W } _ { h } \mathbf { v } _ { \tau }$ and $\mathbf { W } _ { l } \mathbf { v } _ { \tau }$ $( 1 \leq h , l \leq N )$ be the pair with the smallest Euclidean distance $D ( \mathbf { W } _ { h } \mathbf { v } _ { \tau } , \mathbf { W } _ { l } \mathbf { v } _ { \tau } )$ , we have
|
| 112 |
+
|
| 113 |
+
$$
|
| 114 |
+
\operatorname * { l i m } _ { \substack { D ( \mathbf { W } _ { h } \mathbf { v } _ { \tau } , \mathbf { W } _ { l } \mathbf { v } _ { \tau } ) \infty } } \int _ { \mu _ { k } } \exp \Big [ - E _ { \omega } \big ( \pmb { \mu } _ { k } ^ { c } ; \mathbf { v } _ { \tau } \big ) \Big ] d \pmb { \mu } _ { k } ^ { c } = N \sqrt { 2 ^ { d - 1 } \pi ^ { d } }
|
| 115 |
+
$$
|
| 116 |
+
|
| 117 |
+
This theorem indicates the partition function approximates $N { \sqrt { 2 ^ { d - 1 } \pi ^ { d } } }$ when all pairs of the global maximums are far apart. It is noteworthy that during training (i.e., maximizing the likelihood) we fit ${ \bf W } _ { 1 } { \bf v } _ { \tau } , . . . , { \bf W } _ { N } \bar { \bf v _ { \tau } }$ to the different class prototypes $\pmb { \mu } _ { 1 } ^ { \mathsf { c } } , . . . , \pmb { \mu } _ { N } ^ { \mathsf { c } }$ in $N$ -way tasks. Because $\ell _ { \mathrm { n e g } }$ in Eq. (4) tends to maximize the distances between different prototypes through the negative samples, maximizing the joint loss $\ell$ in Eq. (5) tends to separate $\mathbf { W } _ { 1 } \mathbf { v } _ { \tau } , . . . , \mathbf { W } _ { N } \mathbf { v } _ { \tau }$ , thus tighten the relaxed bound after using $N { \sqrt { 2 ^ { d - 1 } \pi ^ { d } } }$ according to Theorem 1. This is another benefit of negative sampling.
|
| 118 |
+
|
| 119 |
+
Optimization via Expectation-Maximization. In the third term of $\ell _ { \mathrm { H T G M } }$ -ELBO in Eq. (3), we need to estimate the mixture distribution $p ( z _ { \tau } )$ . Similar to optimizing Gaussian mixture models, we alternately infer $p ( z _ { \tau } )$ and solve the model parameters $\{ \theta , \omega \}$ through an Expectation-Maximization algorithm. In E-step, we infer $p ( z _ { \tau } )$ when fixing model parameters. In M-step, when fixing $p ( z _ { \tau } )$ , $\{ \theta , \omega \}$ can be efficiently solved by optimizing Eq. (5) with stochastic gradient descent (SGD). The formula to infer $p ( z _ { \tau } )$ and the detailed training algorithm of HTGM can be found in Appendix A.4.
|
| 120 |
+
|
| 121 |
+
# 3.3 MODEL ADAPTATION
|
| 122 |
+
|
| 123 |
+
Fig. 1(b) illustrates the adaptation process of HTGM. Given a new $N$ -way task $\tau ^ { \prime }$ from the metatest set $\mathcal { D } ^ { \mathrm { t e } }$ , its support set $\mathcal { D } _ { \tau ^ { \prime } } ^ { \mathsf { s } }$ is fed to the inference network to generate (1) class prototypes $\pmb { \mu } _ { 1 } ^ { \mathsf { c } }$ , ..., $\mu _ { N } ^ { \mathrm { c } }$ (similar to prototypical networks), and (2) distribution $q _ { \phi } ( \mathbf { v } _ { \tau ^ { \prime } } | \mathcal { D } _ { \tau ^ { \prime } } ^ { \mathsf { s } } )$ , from which we draw the average task embedding $\mathbf { v } _ { \tau ^ { \prime } } = \mu _ { z _ { \tau ^ { \prime } } } ^ { \mathsf { a } }$ . Recall that the inference network is the base model $f _ { \theta } ( \cdot )$ with class-pooling and task-pooling layers, as illustrated in Fig. 1(b), and $\phi = \theta$ . Then $\mathbf { v } _ { \tau ^ { \prime } }$ is projected to $\mathbf { W } _ { 1 } \mathbf { v } _ { \tau ^ { \prime } } , . . . , \mathbf { W } _ { N } \mathbf { v } _ { \tau ^ { \prime } }$ which represent the $N$ optimal choices of class prototypes for task $\tau ^ { \prime }$ as learned by the Gibbs distribution in Eq. (2) from the training tasks. They are used to adapt $\mu _ { 1 } ^ { \mathsf { c } } , . . . , \mu _ { N } ^ { \mathsf { c } }$ so that the adapted prototypes are drawn towards the closest classes from the mixture component that task $\tau ^ { \prime }$ belongs to. The adaptation is performed by selecting the closest optimum for each prototype, i.e., $\bar { \pmb { \mu } } _ { j } ^ { \mathrm { c } } = \alpha \pmb { \mu } _ { j } ^ { \mathrm { c } } + ( 1 - \alpha ) \mathbf { W } _ { l ^ { \ast } } \mathbf { v } _ { \tau ^ { \prime } }$ where $l ^ { * } = \arg \operatorname* { m i n } _ { 1 \leq l \leq N } D ( \pmb { \mu } _ { j } ^ { \mathrm { c } } , \mathbf { W } _ { l } \mathbf { v } _ { \tau ^ { \prime } } )$ using Euclidean distance $D ( \cdot , \cdot )$ and $\alpha$ is a hyperparameter. Finally, we (1) assess if $\tau ^ { \prime }$ is a novelty by computing the likelihood of $\mathbf { v } _ { \tau ^ { \prime } }$ in a pre-fitted GMM on the embeddings $\mathbf { v } _ { \tau }$ ’s of the training tasks in ${ \mathcal { D } } ^ { \mathrm { t r } }$ , and (2) perform classification on each sample $\mathbf { x } _ { i } ^ { \prime }$ in the query set $\mathcal { D } _ { \tau ^ { \prime } } ^ { \mathfrak { q } }$ using the adapted prototypes by $\begin{array} { r } { p ( y _ { i } ^ { \prime } = j ^ { \prime } | \mathbf { x } _ { i } ^ { \prime } ) = \frac { \exp { ( - D ( f _ { \theta } ( \mathbf { x } _ { i } ^ { \prime } ) , \bar { \mu } _ { j ^ { \prime } } ^ { \mathrm { c } } ) ) } } { \sum _ { j = 1 } ^ { N } \exp { ( - D ( f _ { \theta } ( \mathbf { x } _ { i } ^ { \prime } ) , \bar { \mu } _ { j } ^ { \mathrm { c } } ) ) } } } \end{array}$ .
|
| 124 |
+
|
| 125 |
+
<table><tr><td rowspan=1 colspan=1>Setting</td><td rowspan=1 colspan=6>Model</td><td rowspan=1 colspan=1>Bird</td><td rowspan=1 colspan=6>Texture</td><td rowspan=1 colspan=1>Aircraft</td><td rowspan=1 colspan=2>Fungi</td><td rowspan=1 colspan=1>Average</td></tr><tr><td rowspan=5 colspan=1>5-way</td><td rowspan=3 colspan=6>TAMLMAMLMeta-SGD</td><td rowspan=1 colspan=1>55.77±1.43</td><td rowspan=1 colspan=6>31.78±1.30</td><td rowspan=1 colspan=1>48.56±1.37</td><td rowspan=1 colspan=2>41.00±1.50</td><td rowspan=1 colspan=1>44.28</td></tr><tr><td rowspan=1 colspan=1>53.94±1.45</td><td rowspan=1 colspan=6>31.66±1.31</td><td rowspan=1 colspan=1>51.37±1.38</td><td rowspan=1 colspan=2>42.12±1.36</td><td rowspan=1 colspan=1>44.77</td></tr><tr><td rowspan=1 colspan=6>Meta-SGD</td><td rowspan=1 colspan=1>55.58±1.43</td><td rowspan=1 colspan=4>32.38±1.32</td><td rowspan=1 colspan=2>32</td><td rowspan=1 colspan=1>32</td><td rowspan=1 colspan=1>52.99±1.36</td><td rowspan=1 colspan=1>41.74±1.34</td><td rowspan=1 colspan=1>34</td><td rowspan=1 colspan=1>45.67</td></tr><tr><td rowspan=2 colspan=3>HSML</td><td rowspan=3 colspan=4>MUMOMAMLHSMLARML</td><td rowspan=2 colspan=1>56.82±1.4960.98±1.50</td><td></td><td></td><td rowspan=1 colspan=2>31+1</td><td rowspan=1 colspan=2>1.36</td><td rowspan=1 colspan=1>6</td><td></td><td rowspan=1 colspan=1>53.14±1.39</td><td rowspan=2 colspan=2>42.22±1.4044.02±1.39</td><td rowspan=2 colspan=1>46.5049.35</td></tr><tr><td rowspan=1 colspan=4>35.01±1.36</td><td rowspan=1 colspan=2>36</td><td rowspan=1 colspan=1>57.38±1.40</td></tr><tr><td rowspan=1 colspan=1>1-shot</td><td rowspan=1 colspan=2>ARML</td><td rowspan=1 colspan=1>62.33±1.47</td><td rowspan=1 colspan=3>35.65±1.40</td><td rowspan=1 colspan=2>35.65±1.40</td><td rowspan=1 colspan=1>0</td><td></td><td rowspan=1 colspan=1>58.56±1.41</td><td rowspan=1 colspan=2>44.82±1.38</td><td rowspan=1 colspan=1>50.34</td></tr><tr><td rowspan=5 colspan=1></td><td rowspan=5 colspan=6>ProtoNetMetaOptNetProtoNet-AugNCAFEATS</td><td rowspan=1 colspan=1>Net</td><td rowspan=5 colspan=6>61.54±1.2762.80±1.2965.04±1.2962.58±1.2562.60±1.31</td><td rowspan=1 colspan=1>38.84±1.42</td><td rowspan=2 colspan=2>38.84±1.4244.30±1.45</td><td rowspan=1 colspan=1>42</td></tr><tr><td></td><td rowspan=1 colspan=1>68.64±1.29</td><td rowspan=1 colspan=2>47.04±1.38</td><td rowspan=1 colspan=1>55.70</td></tr><tr><td></td><td rowspan=3 colspan=6>44.68±1.4340.98±1.4444.12±1.49</td><td rowspan=1 colspan=1>70.44±1.32</td><td rowspan=1 colspan=2>49.30±1.40</td><td rowspan=1 colspan=1>57.37</td></tr><tr><td></td><td rowspan=1 colspan=1>68.70±1.26</td><td rowspan=2 colspan=2>46.36±1.3447.92±1.34</td><td rowspan=1 colspan=1>54.66</td></tr><tr><td></td><td rowspan=1 colspan=1>68.86±1.28</td><td rowspan=1 colspan=1>55.88</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=6>HTGM (ours)</td><td rowspan=1 colspan=1>70.12±1.28</td><td rowspan=1 colspan=6>47.76±1.49</td><td rowspan=1 colspan=1>75.52±1.24</td><td rowspan=1 colspan=2>52.06±1.41</td><td rowspan=1 colspan=1>61.37</td></tr><tr><td rowspan=6 colspan=1>5-way5-shot</td><td rowspan=11 colspan=6>TAMLMAMLMeta-SGDMUMOMAMLHSMLARMLProtoNetMetaOptNetProtoNet-AugNCAFEATS</td><td rowspan=3 colspan=1>69.50±0.7568.52±0.7967.87±0.74</td><td rowspan=1 colspan=6>45.11±0.69</td><td rowspan=1 colspan=1>65.92±0.74</td><td rowspan=1 colspan=2>50.99±0.87</td><td rowspan=1 colspan=1>57.88</td></tr><tr><td rowspan=2 colspan=6>44.56±0.6845.49±0.68</td><td rowspan=1 colspan=1>66.18±0.71</td><td rowspan=1 colspan=2>51.85±0.85</td><td rowspan=1 colspan=1>57.78</td></tr><tr><td rowspan=1 colspan=1>66.84±0.70</td><td rowspan=1 colspan=2>52.51±0.81</td><td rowspan=1 colspan=1>58.18</td></tr><tr><td rowspan=4 colspan=1>70.49±0.7671.68±0.7373.34±0.7078.88±0.72</td><td rowspan=1 colspan=6>45.89±0.69</td><td rowspan=1 colspan=1>67.31±0.68</td><td rowspan=1 colspan=2>53.96±0.82</td><td rowspan=1 colspan=1>59.41</td></tr><tr><td rowspan=3 colspan=6>48.08±0.6949.67±0.6757.93±0.75</td><td rowspan=1 colspan=1>73.49±0.68</td><td rowspan=1 colspan=2>56.32±0.80</td><td rowspan=1 colspan=1>62.39</td></tr><tr><td rowspan=1 colspan=1>74.88±0.64</td><td rowspan=1 colspan=2>57.55±0.82</td><td rowspan=1 colspan=1>63.86</td></tr><tr><td rowspan=5 colspan=1></td><td rowspan=1 colspan=1>86.42±0.57</td><td rowspan=1 colspan=2>62.52±0.79</td><td rowspan=1 colspan=1>71.44</td></tr><tr><td rowspan=3 colspan=1></td><td rowspan=3 colspan=1>81.66±0.7180.62±0.7179.16±0.75</td><td rowspan=1 colspan=6>61.97±0.78</td><td rowspan=1 colspan=1>84.03±0.56</td><td rowspan=1 colspan=2>63.80±0.81</td><td rowspan=1 colspan=1>72.87</td></tr><tr><td rowspan=1 colspan=6>58.30±0.77</td><td rowspan=1 colspan=1>87.05±0.53</td><td rowspan=1 colspan=2>63.62±0.81</td><td rowspan=1 colspan=1>72.39</td></tr><tr><td rowspan=1 colspan=6>58.69±0.76</td><td rowspan=1 colspan=1>85.27±0.53</td><td rowspan=1 colspan=2>61.68±0.80</td><td rowspan=1 colspan=1>71.20</td></tr><tr><td rowspan=1 colspan=1>78.37±0.72</td><td rowspan=1 colspan=6>57.02±0.73</td><td rowspan=1 colspan=1>85.55±0.54</td><td rowspan=1 colspan=2>61.56±0.80</td><td rowspan=1 colspan=1>70.63</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=6>HTGM (ours)</td><td rowspan=1 colspan=1>82.27±0.74</td><td rowspan=1 colspan=6>60.67±0.78</td><td rowspan=1 colspan=1>88.48±0.52</td><td rowspan=1 colspan=2>65.70±0.79</td><td rowspan=1 colspan=1>74.28</td></tr></table>
|
| 126 |
+
|
| 127 |
+
Table 1: Results (accuracy $\pm 9 5 \%$ confidence) of the compared methods on Plain-Multi dataset.
|
| 128 |
+
|
| 129 |
+
# 4 EXPERIMENTS
|
| 130 |
+
|
| 131 |
+
In this section, we evaluate HTGM’s effectiveness on few-shot classification and novel task detection on benchmark datasets, and compare it with SOTA methods.
|
| 132 |
+
|
| 133 |
+
Datasets. The first is the Plain-Multi benchmark proposed in (Yao et al., 2019a). It includes four fine-grained image classification datasets, i.e., CUB-200-2011 (Bird), Describable Textures Dataset (Texture), FGVC of Aircraft (Aircraft), and FGVCx-Fungi (Fungi). In each episode, a task samples classes from one of the four datasets, so that different tasks are from a mixture of the four domains. The second is the Art-Multi benchmark from (Yao et al., 2019b), whose distribution is more complex than Plain-Multi. Similar to (Jerfel et al., 2019), each image in Plain-Multi was applied with two filters, i.e., blur filter and pencil filter, respectively, to simulate a changing distribution of few-shot tasks. Afterward, together with the original four datasets, a total of 12 datasets comprise Art-Multi, and each task is sampled from one of them. Both benchmarks were divided into the meta-training, meta-validation, and meta-test sets by following their corresponding papers.
|
| 134 |
+
|
| 135 |
+
Baselines. We compare HTGM with the most relevant SOTA methods on meta-learning, including (1) optimization-based methods: MAML (Finn et al., 2017) and Meta-SGD (Li et al., 2017) learn globally shared initialization among tasks. MUMOMAML (Vuorio et al., 2018) is a task-specific method. TAML (Lee et al., 2019a) handles imbalanced tasks. HSML (Yao et al., 2019a) and ARML (Yao et al., 2019b) learn locally shared initial parameters in clusters of tasks and neighborhoods of a meta-graph of tasks, respectively; and (2) Metric-based methods: ProtoNet (Snell et al., 2017) learns prototypes with distance-based classifier. MetaOptNet (Lee et al., 2019c) uses an SVM classifier with kernel metrics. ProtoNet-Aug (Su et al., 2020), FEATS (Ye et al., 2020) and NCA (Laenen & Bertinetto, 2021) were built upon ProtoNet by augmenting images (e.g., rotation, jigsaw), adding prototype aggregator (e.g., Transformer), and using contrastive training loss, (instead of prototypebased loss), respectively. The detailed setup of these methods is deferred to Appendix C.1.
|
| 136 |
+
|
| 137 |
+
Implementation. Following (Tian et al., 2020), optimization-based baselines use the standard fourblock convolutional layers as the base learner, and metric-based methods use ResNet-12 as the base learner. The output dimension of these networks is 640 (MetaOptNet uses 16000 as in its paper). In our experiments, we observed the optimization-based methods have out-of-memory issues when using ResNet-12, indicating their limitation in using large backbone networks. To test them on ResNet-12, we followed the ANIL method (Raghu et al., 2020) by pre-training ResNet-12 via ProtoNet, freezing the encoder, and fine-tuning the last fully-connected layer. In this case, HSML and ARML cannot work properly as they require joint training of the encoder and other layers. The details are in Appendix D.5. For training, Adam optimizer was used. Each batch contains 4 tasks. Each model was trained with 20000 episodes. The learning rate of metric-based methods is $1 e ^ { - 3 }$ . The learning rates for inner- and outer-loops for optimization-based methods are $1 e ^ { - 3 }$ and $1 e ^ { - 4 }$ . The weight decay was $1 e ^ { - 4 }$ . For HTGM, we set $\sigma = 1 . 0$ , $\bar { \sigma } = 0 . 1$ , $\alpha = 0 . 5$ (0.9) for 1-shot (5-shot) tasks. The number of mixture components $r$ varies w.r.t. different datasets, and was grid-searched within [2, 4, 8, 16, 32]. All hyperparameters were set according to the meta-validation sets.
|
| 138 |
+
|
| 139 |
+
<table><tr><td rowspan=1 colspan=1>Setting</td><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>Original</td><td rowspan=1 colspan=2>Blur</td><td rowspan=1 colspan=2>Pencil</td><td rowspan=1 colspan=1>Average</td></tr><tr><td rowspan=7 colspan=1>5-way,1-shot</td><td rowspan=7 colspan=1>TAMLMAMLMeta-SGDMUMOMAMLHSMLARMLProtoNetMetaOptNetProtoNet-AugNCAFEATS</td><td rowspan=7 colspan=1>42.22±1.3942.70±1.3544.21±1.3845.63±1.3947.92±1.3445.68±1.3455.23±1.3156.10±1.3557.63±1.3456.12±1.3554.33±1.33</td><td rowspan=6 colspan=2>40.02±1.4140.53±1.3842.36±1.3941.59±1.3844.43±1.3442.62±1.3451.70±1.4252.33±1.4355.00±1.4050.80±1.49</td><td rowspan=1 colspan=2>35.11±1.34</td><td rowspan=1 colspan=1>39.11</td></tr><tr><td rowspan=1 colspan=2>36.71±1.37</td><td rowspan=1 colspan=1>39.98</td></tr><tr><td rowspan=1 colspan=2>37.21±1.3939.24±1.3641.44±1.34</td><td rowspan=1 colspan=1>41.2642.1544.60</td></tr><tr><td rowspan=1 colspan=2>39.78±1.3449.22±1.4449.08±1.45</td><td rowspan=1 colspan=1>42.6952.0552.50</td></tr><tr><td rowspan=1 colspan=2>49.73±1.53</td><td rowspan=1 colspan=1>54.12</td></tr><tr><td rowspan=1 colspan=2>47.99±1.45</td><td rowspan=1 colspan=1>51.64</td></tr><tr><td rowspan=1 colspan=2>50.90±1.48</td><td rowspan=1 colspan=2>47.96±1.48</td><td rowspan=1 colspan=1>51.07</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>HTGM (ours)</td><td rowspan=1 colspan=1>61.18±1.34</td><td rowspan=1 colspan=2>58.80±1.42</td><td rowspan=1 colspan=2>53.23±1.48</td><td rowspan=1 colspan=1>57.74</td></tr><tr><td rowspan=8 colspan=1>5-way,1-shot</td><td rowspan=4 colspan=1>TAMLMAMLMeta-SGDMUMOMAML</td><td rowspan=4 colspan=1>58.54±0.7358.30±0.7457.82±0.7258.60±0.75</td><td rowspan=1 colspan=2>55.23±0.75</td><td rowspan=1 colspan=2>49.23±0.75</td><td rowspan=1 colspan=1>54.33</td></tr><tr><td rowspan=1 colspan=1>55</td><td rowspan=1 colspan=1>55.71±0.74</td><td rowspan=1 colspan=2>49.59±0.73</td><td rowspan=1 colspan=1>54.50</td></tr><tr><td rowspan=1 colspan=2>55.54±0.73</td><td rowspan=1 colspan=2>50.24±0.72</td><td rowspan=1 colspan=1>54.53</td></tr><tr><td rowspan=1 colspan=2>51.15±0.73</td><td rowspan=2 colspan=1>55.3557.4958.5967.6568.37</td></tr><tr><td rowspan=4 colspan=1>HSMLARMLProtoNetMetaOptNetProtoNet-AugNCAFEATS</td><td rowspan=4 colspan=1>60.63±0.7361.78±0.7471.34±0.7372.33±0.7272.87±0.7172.44±0.7271.99±0.71</td><td rowspan=2 colspan=2>57.91±0.7258.73±0.7567.28±0.7568.90±0.7870.50±0.72</td><td rowspan=1 colspan=2>53.93±0.7255.27±0.7364.32±0.7663.89±0.71</td></tr><tr><td rowspan=1 colspan=2>63.98±0.73</td><td rowspan=1 colspan=1>68.78</td></tr><tr><td rowspan=2 colspan=2>67.33±0.7167.54±0.72</td><td rowspan=1 colspan=2>62.98±0.78</td><td rowspan=2 colspan=1>67.5867.54</td></tr><tr><td rowspan=1 colspan=2>63.09±0.76</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>HTGM (ours)</td><td rowspan=1 colspan=1>74.67±0.70</td><td rowspan=1 colspan=2>71.24±0.73</td><td rowspan=1 colspan=2>65.22±0.77</td><td rowspan=1 colspan=1>70.37</td></tr></table>
|
| 140 |
+
|
| 141 |
+
Table 2: Results (accuracy $\pm 9 5 \%$ confidence) of the compared methods on Art-Multi dataset.
|
| 142 |
+
|
| 143 |
+
# 4.1 EXPERIMENTAL RESULTS
|
| 144 |
+
|
| 145 |
+
Few-shot classification. Following (Tian et al., 2020), we report the mean accuracy and $9 5 \%$ confidence interval of 1000 random tasks with 5-way 1-shot/5-shot, 5/25-query tests. Following (Yao et al., 2019b), we report the accuracy of each domain (Bird, Texture, Aircraft and Fungi) and the overall average accuracy for Plain-Multi, and report the accuracy of each image filtering strategy and the overall average accuracy for Art-Multi.
|
| 146 |
+
|
| 147 |
+
Table 1 and 2 summarize the results. From the tables, we have several observations. First, metricbased methods generally outperform optimization-based methods. This is because of the efficiency of metric-based methods, enabling them to fit a larger backbone network, which is consistent with the results in (Tian et al., 2020). Built upon the metric-based method, HTGM only introduces a few distribution-related parameters and thus has the flexibility to scale with the encoder size. Second, baselines designed for dealing with mixture distributions of tasks, i.e., HSML and ARML, outperform their counterparts without such design, demonstrating the importance to consider mixture task distribution in practice. Finally, HTGM outperforms the SOTA baselines in most cases by large margins, suggesting its effectiveness in modeling the generative process of task instances.
|
| 148 |
+
|
| 149 |
+
Novel task detection. We also evaluate HTGM on the task of detecting novel $N$ -way- $K$ -shot tasks $N = 5$ , $K = 1$ ) that are drawn out of the training task distributions. To this end, we train each comapred model in the Original domain in Art-Multi dataset, and test the model on tasks drawn from either Original domain (i.e., known tasks), or {Blur, Pencil} domains (i.e., novel tasks), and evaluate if the model can tell whether a testing task is known or novel.
|
| 150 |
+
|
| 151 |
+

|
| 152 |
+
Figure 2: The frequency of tasks w.r.t. the normalized likelihood for (a) HSML (b) MetaOptNet (c) ProtoNet-Aug (d) HTGM. The $\mathbf { X } ^ { } -$ -axis ranges vary as only $9 5 \%$ tasks with top scores were preserved.
|
| 153 |
+
|
| 154 |
+
For comparison, since none of the baselines detects novel tasks, we adapt them as follows. For metric-based methods, since they use a fixed encoder for all training/testing tasks, we averaged the sample embeddings in each task to represent the task. Then a separate GMM model was built upon the training task embeddings, and its likelihood was adapted to score the novelty of testing tasks (some details of setup are in Appendix C.2. However, optimization-based models perform gradient descent on the support set of each task, leading to varying encoders per task. As such, sample embeddings of different tasks are not comparable, and we cannot obtain task embeddings in the same way as before. Among them, only HSML has an augmented task-level encoder for task embedding, allowing us to include it for comparison. For a fair comparison, our HTGM also trains a GMM on its task embeddings for detecting novel tasks. Moreover, two HTGM variants were included for ablation analysis to understand some design choices: (1) HTGM-Gaussian replaces the Gibbs distribution in Eq. (2) with a Gaussian distribution; (2) HTGM w/o GMM removes the task-level GM, i.e., the third term in Eq. (3). The classification results of the ablation variants are in Appendix D.4. Following (Cheng & Vasconcelos, 2021; Vaze et al., 2022; Sharma et al., 2021), we report Area Under ROC (AUROC), Average Precision (AP), and Max-F1 for performance evaluation.
|
| 155 |
+
|
| 156 |
+
Table 3 summarize the results, from which we observe HTGM outperforms all baselines over all evaluation metrics, indicating the superior quality of task embeddings learned by our model. The embeddings follow the specified mixture distribution of tasks $p ( \mathbf { v } _ { \tau } )$ as described in Sec. 3.1, which fits the mixture data well hence allowing to detect novel tasks that are close to the boundary. Since the baselines learn embeddings without explicit constraint, they even don’t fit the post-hoc GMM very well. Moreover, HTGM outperforms HTGM w/o GMM, which is even worse than some other baselines. This further validates the neces
|
| 157 |
+
|
| 158 |
+
Table 3: Comparison between HTGM and its variants and the applicable baselines on novel task detection.
|
| 159 |
+
|
| 160 |
+
<table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>AUROC</td><td rowspan=1 colspan=1>AP</td><td rowspan=1 colspan=1>Max-F1</td></tr><tr><td rowspan=2 colspan=1>HSMLProtoNetMetaOptNetNCAProtoNet-AugFEATS</td><td rowspan=1 colspan=1>55.96</td><td rowspan=1 colspan=1>37.94</td><td rowspan=1 colspan=1>50.17</td></tr><tr><td rowspan=1 colspan=1>65.1772.7166.2872.6759.35</td><td rowspan=1 colspan=1>41.5163.7751.4557.9342.57</td><td rowspan=1 colspan=1>56.0758.3352.7459.0749.31</td></tr><tr><td rowspan=1 colspan=1>HTGMw/oGMMHTGM-GaussianHTGM</td><td rowspan=1 colspan=1>70.2474.0675.66</td><td rowspan=1 colspan=1>62.4566.1868.03</td><td rowspan=1 colspan=1>57.7560.6260.51</td></tr></table>
|
| 161 |
+
|
| 162 |
+
sity to introduce the regularization of task-level mixture distribution $p ( \mathbf { v } _ { \tau } )$ . Also, the drops of AUROC and AP of HTGM-Gaussian demonstrate the importance of our unique design of the Gibbs distribution for the task-conditional distribution in Eq. (2). Similar to (Vaze et al., 2022), in Fig. 2, we visualized the normalized likelihood histogram of known and novel tasks for HSML, MetaOptNet (the best baseline), ProtoNet-Aug (the near-best baseline), and HTGM. The figures indicate the likelihoods (i.e., novelty scores) of HTGM are more distinguishable for known and novel tasks than the baselines. We also analyzed the hyperparameters of HTGM, which are in D.1, D.2, D.3.
|
| 163 |
+
|
| 164 |
+
# 5 CONCLUSION
|
| 165 |
+
|
| 166 |
+
In this paper, we propose a novel Hierarchical Gaussian Mixture based Task Generative Model (HTGM). HTGM models the generative process of task instances, and performs maximum likelihood estimation to learn task embeddings, which can help adjust prototypes acquired by the feature extractor and thus achieve better performance. Moreover, by explicitly modeling the mixture distribution of tasks in the embedding space, HTGM can effectively detect the tasks that are drawn from distributions unseen in the meta-training stage. The extensive experimental results indicate the advantage of the proposed method on both few-shot classification and novel task detection.
|
| 167 |
+
|
| 168 |
+
# REFERENCES
|
| 169 |
+
|
| 170 |
+
Alessandro Achille, Michael Lam, Rahul Tewari, Avinash Ravichandran, Subhransu Maji, Charless C Fowlkes, Stefano Soatto, and Pietro Perona. Task2vec: Task embedding for meta-learning. In ICCV, pp. 6430–6439, 2019.
|
| 171 |
+
|
| 172 |
+
Brandon Amos and J. Zico Kolter. OptNet: Differentiable optimization as a layer in neural networks. In ICML, volume 70 of Proceedings of Machine Learning Research, pp. 136–145. PMLR, 2017.
|
| 173 |
+
|
| 174 |
+
Thomas L Athey, Benjamin D Pedigo, Tingshan Liu, and Joshua T Vogelstein. Autogmm: Automatic and hierarchical gaussian mixture modeling in python. arXiv preprint arXiv:1909.02688, 2019.
|
| 175 |
+
|
| 176 |
+
M. Christopher Bishop. Pattern recognition and machine learning. Springer, 2006.
|
| 177 |
+
|
| 178 |
+
Isaac S Chan and Geoffrey S Ginsburg. Personalized medicine: progress and promise. Annual review of genomics and human genetics, 12:217–244, 2011.
|
| 179 |
+
|
| 180 |
+
Jiacheng Cheng and Nuno Vasconcelos. Learning deep classifiers consistent with fine-grained novelty detection. In CVPR, pp. 1664–1673, 2021.
|
| 181 |
+
|
| 182 |
+
Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In ICML, pp. 1126–1135. PMLR, 2017.
|
| 183 |
+
|
| 184 |
+
Jacob Goldberger and Sam T Roweis. Hierarchical clustering of a mixture model. In NeurIPS, pp. 505–512, 2005.
|
| 185 |
+
|
| 186 |
+
Laurent Jacob, Jean-philippe Vert, and Francis Bach. Clustered multi-task learning: A convex formulation. In NIPS, 2008.
|
| 187 |
+
|
| 188 |
+
Minki Jeong, Seokeon Choi, and Changick Kim. Few-shot open-set recognition by transformation consistency. In CVPR, pp. 12566–12575, 2021.
|
| 189 |
+
|
| 190 |
+
Ghassen Jerfel, Erin Grant, Tom Griffiths, and Katherine A Heller. Reconciling meta-learning and continual learning with online mixtures of tasks. NeurIPS, 32, 2019.
|
| 191 |
+
|
| 192 |
+
Zhuoliang Kang, Kristen Grauman, and Fei Sha. Learning with whom to share in multi-task feature learning. In ICML, 2011.
|
| 193 |
+
|
| 194 |
+
Diederik $\mathrm { \bf P }$ Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013.
|
| 195 |
+
|
| 196 |
+
Abhishek Kumar and Hal Daume III. Learning task grouping and overlap in multi-task learning. In ´ ICML, pp. 1723–1730, 2012.
|
| 197 |
+
|
| 198 |
+
Steinar Laenen and Luca Bertinetto. On episodes, prototypical networks, and few-shot learning. NeurIPS, 34:24581–24592, 2021.
|
| 199 |
+
|
| 200 |
+
Yann LeCun, Sumit Chopra, Raia Hadsell, M Ranzato, and F Huang. A tutorial on energy-based learning. Predicting structured data, 1(0), 2006.
|
| 201 |
+
|
| 202 |
+
Hae Beom Lee, Hayeon Lee, Donghyun Na, Saehoon Kim, Minseop Park, Eunho Yang, and Sung Ju Hwang. Learning to balance: Bayesian meta-learning for imbalanced and out-of-distribution tasks. arXiv preprint arXiv:1905.12917, 2019a.
|
| 203 |
+
|
| 204 |
+
Kimin Lee, Kibok Lee, Honglak Lee, and Jinwoo Shin. A simple unified framework for detecting out-of-distribution samples and adversarial attacks. NeurIPS, 31, 2018.
|
| 205 |
+
|
| 206 |
+
Kimin Lee, Sukmin Yun, Kibok Lee, Honglak Lee, Bo Li, and Jinwoo Shin. Robust inference via generative classifiers for handling noisy labels. In ICML, pp. 3763–3772. PMLR, 2019b.
|
| 207 |
+
|
| 208 |
+
Kwonjoon Lee, Subhransu Maji, Avinash Ravichandran, and Stefano Soatto. Meta-learning with differentiable convex optimization. In CVPR, pp. 10657–10665, 2019c.
|
| 209 |
+
|
| 210 |
+
Yoonho Lee and Seungjin Choi. Gradient-based meta-learning with learned layerwise metric and subspace. In ICML, pp. 2927–2936. PMLR, 2018.
|
| 211 |
+
|
| 212 |
+
Zhenguo Li, Fengwei Zhou, Fei Chen, and Hang Li. Meta-sgd: Learning to learn quickly for fewshot learning. arXiv preprint arXiv:1707.09835, 2017.
|
| 213 |
+
|
| 214 |
+
Shiyu Liang, Yixuan Li, and R Srikant. Enhancing the reliability of out-of-distribution image detection in neural networks. In ICLR, 2018.
|
| 215 |
+
|
| 216 |
+
Weitang Liu, Xiaoyun Wang, John Owens, and Yixuan Li. Energy-based out-of-distribution detection. pp. 21464–21475, 2020.
|
| 217 |
+
|
| 218 |
+
Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg S Corrado, and Jeff Dean. Distributed representations of words and phrases and their compositionality. In NeurIPS, 2013.
|
| 219 |
+
|
| 220 |
+
Nikhil Mishra, Mostafa Rohaninejad, Xi Chen, and Pieter Abbeel. A simple neural attentive metalearner. In ICLR, 2018.
|
| 221 |
+
|
| 222 |
+
Jingchao Ni, Wei Cheng, Zhengzhang Chen, Takayoshi Asakura, Tomoya Soma, Sho Kato, and Haifeng Chen. Superclass-conditional gaussian mixture model for learning fine-grained embeddings. In ICLR, 2022.
|
| 223 |
+
|
| 224 |
+
Łukasz P Olech and Mariusz Paradowski. Hierarchical gaussian mixture model with objects attached to terminal and non-terminal dendrogram nodes. In Proceedings of the 9th International Conference on Computer Recognition Systems CORES 2015, pp. 191–201. Springer, 2016.
|
| 225 |
+
|
| 226 |
+
Boris Oreshkin, Pau Rodr´ıguez Lopez, and Alexandre Lacoste. Tadam: Task dependent adaptive ´ metric for improved few-shot learning. Advances in neural information processing systems, 31, 2018.
|
| 227 |
+
|
| 228 |
+
Alexandre Passos, Piyush Rai, Jacques Wainer, and Hal Daume III. Flexible modeling of latent task ´ structures in multitask learning. In ICMl, pp. 1283–1290, 2012.
|
| 229 |
+
|
| 230 |
+
Sanjay Purushotham, Wilka Carvalho, Tanachat Nilanon, and Yan Liu. Variational recurrent adversarial deep domain adaptation. In ICLR, 2017.
|
| 231 |
+
|
| 232 |
+
Aniruddh Raghu, Maithra Raghu, Samy Bengio, and Oriol Vinyals. Rapid learning or feature reuse? towards understanding the effectiveness of maml. In ICLR, 2020.
|
| 233 |
+
|
| 234 |
+
Andrei A Rusu, Dushyant Rao, Jakub Sygnowski, Oriol Vinyals, Razvan Pascanu, Simon Osindero, and Raia Hadsell. Meta-learning with latent embedding optimization. In ICLR, 2018.
|
| 235 |
+
|
| 236 |
+
Ketan Rajshekhar Shahapure and Charles Nicholas. Cluster quality analysis using silhouette score. In 2020 IEEE 7th International Conference on Data Science and Advanced Analytics (DSAA), pp. 747–748. IEEE, 2020.
|
| 237 |
+
|
| 238 |
+
Karishma Sharma, Yizhou Zhang, Emilio Ferrara, and Yan Liu. Identifying coordinated accounts on social media through hidden influence and group behaviours. In Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery & Data Mining, pp. 1441–1451, 2021.
|
| 239 |
+
|
| 240 |
+
Satya Narayan Shukla and Benjamin Marlin. Interpolation-prediction networks for irregularly sampled time series. In ICLR, 2019.
|
| 241 |
+
|
| 242 |
+
Jake Snell, Kevin Swersky, and Richard Zemel. Prototypical networks for few-shot learning. In NeurIPS, 2017.
|
| 243 |
+
|
| 244 |
+
Jong-Chyi Su, Subhransu Maji, and Bharath Hariharan. When does self-supervision improve fewshot learning? In ECCV, pp. 645–666. Springer, 2020.
|
| 245 |
+
|
| 246 |
+
Yonglong Tian, Yue Wang, Dilip Krishnan, Joshua B Tenenbaum, and Phillip Isola. Rethinking fewshot image classification: a good embedding is all you need? In ECCV, pp. 266–282. Springer, 2020.
|
| 247 |
+
|
| 248 |
+
Sagar Vaze, Kai Han, Andrea Vedaldi, and Andrew Zisserman. Open-set recognition: A good closed-set classifier is all you need. In ICLR, 2022.
|
| 249 |
+
|
| 250 |
+
Oriol Vinyals, Charles Blundell, Timothy Lillicrap, Daan Wierstra, et al. Matching networks for one shot learning. NIPS, 29, 2016.
|
| 251 |
+
|
| 252 |
+
Risto Vuorio, Shao-Hua Sun, Hexiang Hu, and Joseph J Lim. Toward multimodal model-agnostic meta-learning. arXiv preprint arXiv:1812.07172, 2018.
|
| 253 |
+
|
| 254 |
+
Yinjun Wu, Jingchao Ni, Wei Cheng, Bo Zong, Dongjin Song, Zhengzhang Chen, Yanchi Liu, Xuchao Zhang, Haifeng Chen, and Susan B Davidson. Dynamic gaussian mixture based deep generative model for robust forecasting on sparse multivariate time series. In AAAI, volume 35, pp. 651–659, 2021.
|
| 255 |
+
|
| 256 |
+
Ya Xue, Xuejun Liao, Lawrence Carin, and Balaji Krishnapuram. Multi-task learning for classification with dirichlet process priors. Journal of Machine Learning Research, 8(1), 2007.
|
| 257 |
+
|
| 258 |
+
Huaxiu Yao, Ying Wei, Junzhou Huang, and Zhenhui Li. Hierarchically structured meta-learning. In ICML, pp. 7045–7054. PMLR, 2019a.
|
| 259 |
+
|
| 260 |
+
Huaxiu Yao, Xian Wu, Zhiqiang Tao, Yaliang Li, Bolin Ding, Ruirui Li, and Zhenhui Li. Automated relational meta-learning. In ICLR, 2019b.
|
| 261 |
+
|
| 262 |
+
Han-Jia Ye, Hexiang Hu, De-Chuan Zhan, and Fei Sha. Few-shot learning via embedding adaptation with set-to-set functions. In CVPR, pp. 8808–8817, 2020.
|
| 263 |
+
|
| 264 |
+
# A APPENDIX FOR DETAILS OF DERIVING HTGM
|
| 265 |
+
|
| 266 |
+
# A.1 THE LOWER-BOUND OF THE LIKELIHOOD FUNCTION
|
| 267 |
+
|
| 268 |
+
In this section, we provide the details of the lower-bound in Eq. (3). By introducing the approximated posterior $q _ { \phi } ( \mathbf { v } _ { \tau } | \mathcal { D } _ { \tau } ^ { \mathsf { s } } )$ , the likelihood in Eq. (1) becomes (the superscript $^ *$ is neglected for clarity)
|
| 269 |
+
|
| 270 |
+
$$
|
| 271 |
+
\begin{array} { r l } { \langle \mathcal { D } _ { r } , \theta \rangle = \frac { 1 } { w _ { 2 } } \displaystyle \sum _ { t = 1 } ^ { n } \log ( w _ { t } | \theta ) | \theta \rangle + \frac { 1 } { n } \displaystyle \sum _ { t = 1 } ^ { n } \log \Big ( \displaystyle \int _ { w _ { 1 } } w _ { t } \log ( w _ { t } | \theta ) | w _ { t } \Big ) } & { } \\ { = \frac { 1 } { n } \displaystyle \sum _ { t = 1 } ^ { n } \log ( w _ { 1 } | \theta ) + \frac { 1 } { w _ { 2 } } \displaystyle \sum _ { t = 1 } ^ { n } \log \Big ( \displaystyle \int _ { w _ { 1 } } w _ { t } \log ( w _ { 1 } | w _ { t } ) \displaystyle \frac { w _ { t } ( w _ { 1 } | w _ { t } ) } { \mu _ { 1 } ( w _ { 1 } ) } \Big ) \Big ( w _ { 1 } \log ( w _ { 1 } | w _ { t } ) \Big ) } & { } \\ { = \frac { 1 } { n } \displaystyle \sum _ { t = 1 } ^ { n } \log ( w _ { 1 } | \theta ) + \frac { 1 } { n } \displaystyle \sum _ { t = 1 } ^ { n } \log \Big ( \displaystyle \int _ { w _ { 1 } } w _ { t } \log ( w _ { 1 } | w _ { t } ) \displaystyle \frac { w _ { t } ( w _ { 1 } | w _ { t } ) } { \mu _ { 1 } ( w _ { 1 } ) } \Big ) \Big ( w _ { 1 } \log ( w _ { 1 } | w _ { t } ) \Big ) } & { } \\ { \geq \frac { 1 } { n } \displaystyle \sum _ { t = 1 } ^ { n } \log ( w _ { 1 } | w _ { 1 } ) + \frac { 1 } { n } \displaystyle \sum _ { t = 1 } ^ { n } \log ( w _ { 1 } | w _ { 1 } ) \displaystyle \frac { w _ { t } ( w _ { 1 } | w _ { 1 } ) } { \mu _ { 1 } ( w _ { 1 } ) } \Big [ \log ( w _ { 1 } | w _ { 1 } ) + \log ( w _ { 1 } | w _ { 1 } ) \displaystyle \sum _ { t = 1 } ^ { n } \log ( w _ { 1 } | w _ { t } ) \Big ] \Big ( w _ { 1 } \log ( w _ { 1 } | w _ { t } ) \Big ) } & { } \\ = \displaystyle \frac { 1 } { n } \displaystyle \sum _ { t = 1 } ^ { n } \log ( w _ { 1 } | w _ { 1 } ) + \displaystyle \frac { 1 } { n } \displaystyle \sum _ { t = 1 } ^ { n } \int _ w _ 1 \end{array}
|
| 272 |
+
$$
|
| 273 |
+
|
| 274 |
+
where the fourth step uses Jensen’s inequality. This completes the derivation of Eq. (3).
|
| 275 |
+
|
| 276 |
+
# A.2 THE UPPER-BOUND OF THE PARTITION FUNCTION
|
| 277 |
+
|
| 278 |
+
In Sec. 3.2, we apply an upper bound on the partition function in Eq. (2) for solving the challenging 2. The derivation of the upper bound is as follows.
|
| 279 |
+
|
| 280 |
+
$$
|
| 281 |
+
\begin{array} { r l } & { \displaystyle \int _ { \mu _ { y _ { i } } ^ { \mathrm { c } } } \exp \big [ - E _ { \omega } \big ( \mu _ { y _ { i } } ^ { \mathrm { c } } ; \mathbf { v } _ { \tau } \big ) \big ] d \mu _ { y _ { i } } ^ { \mathrm { c } } = \int _ { \mu _ { y _ { i } } ^ { \mathrm { c } } } \exp \big [ - \operatorname* { m i n } \big ( \xi \big | \big | \mu _ { y _ { i } } ^ { \mathrm { c } } - \mathbf { W } _ { j } \mathbf { v } _ { \tau } \big | \big | _ { 2 } ^ { 2 } \big ) _ { j = 1 } ^ { N } \big ) \Big ] d \mu _ { y _ { i } } ^ { \mathrm { c } } } \\ & { = \displaystyle \int _ { \mu _ { y _ { i } } ^ { \mathrm { c } } } \operatorname* { m a x } \Big ( \big \{ \exp \big [ - \big | \big | \mu _ { y _ { i } } ^ { \mathrm { c } } - \mathbf { W } _ { j } \mathbf { v } _ { \tau } \big | \big | _ { 2 } ^ { 2 } \big ] \big \} _ { j = 1 } ^ { N } \Big ) d \mu _ { y _ { i } } ^ { \mathrm { c } } < \int _ { \mu _ { y _ { i } } ^ { \mathrm { c } } } \displaystyle \sum _ { j = 1 } ^ { N } \exp \big [ - \big | \big | \mu _ { y _ { i } } ^ { \mathrm { c } } - \mathbf { W } _ { j } \mathbf { v } _ { \tau } \big | \big | _ { 2 } ^ { 2 } \big ] d \mu _ { y _ { i } } ^ { \mathrm { c } } } \\ & { = \displaystyle \sum _ { j = 1 } ^ { N } \int _ { \mu _ { y _ { i } } ^ { \mathrm { c } } } \exp \big [ - \big | \big | \mu _ { y _ { i } } ^ { \mathrm { c } } - \mathbf { W } _ { j } \mathbf { v } _ { \tau } \big | \big | _ { 2 } ^ { 2 } \big ] d \mu _ { y _ { i } } ^ { \mathrm { c } } = \sqrt { 2 ^ { d - 1 } \pi ^ { d } } } \end{array}
|
| 282 |
+
$$
|
| 283 |
+
|
| 284 |
+
where the last equation is from the multidimensional Gaussian integral. This completes the derivation of the upper bound of the partition function.
|
| 285 |
+
|
| 286 |
+
# A.3 THE PROOF OF THEOREM 1
|
| 287 |
+
|
| 288 |
+
Proof. Let $B _ { j }$ denote a ball in $\mathbb { R } ^ { d }$ . Its center is at ${ \bf W } _ { j } { \bf v } _ { \tau }$ and its radius is $D ( \mathbf { W } _ { h } \mathbf { v } _ { \tau } , \mathbf { W } _ { l } \mathbf { v } _ { \tau } ) / 3$ . Because $\mathbf { W } _ { h } \mathbf { v } _ { \tau }$ and $\mathbf { W } _ { l } \mathbf { v } _ { \tau }$ $( 1 ~ \le ~ h , l ~ \le ~ N )$ is the pair with the smallest Euclidean distance $D ( \mathbf { W } _ { h } \mathbf { v } _ { \tau } , \mathbf { W } _ { l } \mathbf { v } _ { \tau } )$ , for any pair of balls $B _ { j }$ and $B _ { m }$ we have $B _ { j } \cup B _ { m } = \varnothing$ .
|
| 289 |
+
|
| 290 |
+
In other words, there is no overlap between any pair of balls. Therefore, if we compute the integral over the joint of all balls, we have
|
| 291 |
+
|
| 292 |
+
$$
|
| 293 |
+
\int _ { \mu _ { k } ^ { \mathbb { C } } \in \bigcup _ { m = 1 } ^ { N } B _ { m } } \exp \big [ - E _ { \omega } ( \mu _ { k } ^ { \mathbb { C } } ; { \mathbf { v } } _ { \tau } ) \big ] d \mu _ { k } ^ { \mathbb { c } } = \sum _ { m = 1 } ^ { N } \int _ { \mu _ { k } ^ { \mathbb { C } } \in B _ { m } } \exp \big [ - E _ { \omega } ( \mu _ { k } ^ { \mathbb { C } } ; { \mathbf { v } } _ { \tau } ) \big ] d \mu _ { k } ^ { \mathbb { c } }
|
| 294 |
+
$$
|
| 295 |
+
|
| 296 |
+
Also, because there is no overlap between any pair of balls, for each point $\pmb { \mu } _ { k } ^ { \mathsf { c } } \in B _ { m }$ , we have
|
| 297 |
+
|
| 298 |
+
$$
|
| 299 |
+
- \operatorname* { m i n } \left( \{ | | \pmb { \mu } _ { k } ^ { \mathrm { c } } - \mathbf { W } _ { j } \mathbf { v } _ { \tau } | | _ { 2 } ^ { 2 } \} _ { j = 1 } ^ { N } \right) = - | | \pmb { \mu } _ { k } ^ { \mathrm { c } } - \mathbf { W } _ { m } \mathbf { v } _ { \tau } | | _ { 2 } ^ { 2 }
|
| 300 |
+
$$
|
| 301 |
+
|
| 302 |
+
Therefore, we have the following derivation from Eq. (9).
|
| 303 |
+
|
| 304 |
+
$$
|
| 305 |
+
\begin{array} { l l } { \displaystyle \int _ { \mu _ { k } ^ { \mathbb { c } } \in \bigcup _ { m = 1 } ^ { N } B _ { m } } \exp \big [ - E _ { \omega } ( \mu _ { k } ^ { \mathbb { c } } ; \mathbf { v } _ { \tau } ) \big ] d \mu _ { k } ^ { \mathbb { c } } = \displaystyle \sum _ { m = 1 } ^ { N } \int _ { \mu _ { k } ^ { \mathbb { c } } \in B _ { m } } \exp \big [ - E _ { \omega } ( \mu _ { k } ^ { \mathbb { c } } ; \mathbf { v } _ { \tau } ) \big ] d \mu _ { k } ^ { \mathbb { c } } } \\ { \displaystyle = \displaystyle \sum _ { m = 1 } ^ { N } \int _ { \mu _ { k } ^ { \mathbb { c } } \in B _ { m } } \exp \big [ - | | \mu _ { k } ^ { \mathbb { c } } - \mathbf { W } _ { m } \mathbf { v } _ { \tau } | | _ { 2 } ^ { 2 } \big ] d \mu _ { k } ^ { \mathbb { c } } = N \int _ { \mu _ { k } \in B _ { m } } \exp \big [ - | | \mu _ { k } ^ { \mathbb { c } } - \mathbf { W } _ { m } \mathbf { v } _ { \tau } | | _ { 2 } ^ { 2 } \big ] d \mu _ { k } ^ { \mathbb { c } } } \end{array}
|
| 306 |
+
$$
|
| 307 |
+
|
| 308 |
+
Meanwhile, since $\textstyle \bigcup _ { m = 1 } ^ { N } B _ { m }$ is a sub-area of the entire $\mathbb { R } ^ { d }$ space, we have
|
| 309 |
+
|
| 310 |
+
$$
|
| 311 |
+
\int _ { \mu _ { k } ^ { \mathbb { C } } \in \bigcup _ { m = 1 } ^ { N } B _ { m } } \exp \big [ - E _ { \omega } \big ( \mu _ { k } ^ { \mathbb { C } } ; { \mathbf { v } } _ { \tau } \big ) \big ] d \mu _ { k } ^ { \mathbb { C } } \leq \int _ { \mu _ { k } ^ { \mathbb { C } } } \exp \big [ - E _ { \omega } \big ( \mu _ { k } ^ { \mathbb { C } } ; { \mathbf { v } } _ { \tau } \big ) \big ] d \mu _ { k } ^ { \mathbb { C } }
|
| 312 |
+
$$
|
| 313 |
+
|
| 314 |
+
According to the multidimensional Gaussian integral, we have
|
| 315 |
+
|
| 316 |
+
$$
|
| 317 |
+
\operatorname* { l i m } _ { \substack { D ( \mathbf { W } _ { h } \mathbf { v } _ { \tau } , \mathbf { W } _ { l } \mathbf { v } _ { \tau } ) \infty } } \int _ { \pmb { \mu } _ { k } ^ { \mathbb { c } } \in B _ { m } } \exp \big [ - E _ { \omega } ( \pmb { \mu } _ { k } ^ { \mathbb { c } } ; \mathbf { v } _ { \tau } ) \big ] d \pmb { \mu } _ { k } ^ { \mathbb { c } } = \sqrt { 2 ^ { d - 1 } \pi ^ { d } }
|
| 318 |
+
$$
|
| 319 |
+
|
| 320 |
+
Therefore,
|
| 321 |
+
|
| 322 |
+
$$
|
| 323 |
+
\operatorname* { l i m } _ { \substack { D ( \mathbf { W } _ { h } \mathbf { v } _ { \tau } , \mathbf { W } _ { l } \mathbf { v } _ { \tau } ) \infty } } \int _ { \mu _ { k } ^ { \mathrm { c } } } \exp \Big [ - E _ { \omega } \big ( \mu _ { k } ^ { \mathrm { c } } ; \mathbf { v } _ { \tau } \big ) \Big ] d \mu _ { k } ^ { \mathrm { c } } \geq N \sqrt { 2 ^ { d - 1 } \pi ^ { d } }
|
| 324 |
+
$$
|
| 325 |
+
|
| 326 |
+
Since $N { \sqrt { 2 ^ { d - 1 } \pi ^ { d } } }$ is its upper bound, based on the squeeze theorem, we have
|
| 327 |
+
|
| 328 |
+
$$
|
| 329 |
+
\operatorname* { l i m } _ { \substack { D ( \mathbf { W } _ { h } \mathbf { v } _ { \tau } , \mathbf { W } _ { l } \mathbf { v } _ { \tau } ) \infty } } \int _ { \mu _ { k } ^ { \mathbb { C } } } \exp \big [ - E _ { \omega } ( \mu _ { k } ^ { \mathbb { C } } ; \mathbf { v } _ { \tau } ) \big ] d \mu _ { k } ^ { \mathbb { C } } = N \sqrt { 2 ^ { d - 1 } \pi ^ { d } }
|
| 330 |
+
$$
|
| 331 |
+
|
| 332 |
+
which completes the proof of Theorem 1.
|
| 333 |
+
|
| 334 |
+
A.4 THE TRAINING ALGORITHM OF HTGM
|
| 335 |
+
|
| 336 |
+
The training algorithm of HTGM is summarized in Algorithm 1.
|
| 337 |
+
|
| 338 |
+
B APPENDIX FOR FURTHER DISCUSSION
|
| 339 |
+
|
| 340 |
+
# B.1 DISCUSSION ABOUT THE RELATIONSHIP BETWEEN HTGM AND HGM MODEL
|
| 341 |
+
|
| 342 |
+
To the best of our knowledge, the Hierarchical Gaussian Mixture (HGM) model has appeared in the traditional works (Goldberger & Roweis, 2005; Olech & Paradowski, 2016; Athey et al., 2019) for hierarchical clustering by applying Gaussian Mixture model agglomeratively or divisively on the input samples. They are unsupervised methods that infer clusters of samples, but do not pretrain embedding models (or parameter initializations) that could be fine-tuned for the adaptation to new tasks in meta-learning. Therefore, these methods are remarkably different from meta-learning methods, and we think it is a non-trivial problem to adapt the concept of HGM to solve the metalearning problem. To this end, we need to (1) identify the motivation; and (2) solve the new technical challenges. For (1), we found the hierarchical structure of mixture distributions naturally appears when we want to model the generative process of tasks from a mixture of distributions, where each task contains another mixture distribution of classes (as suggested by Eq. (1)). In other words, the motivating point of our method is more on meta-learning than HGM. However, we think drawing such a connection between meta-learning and HGM is a novel contribution. For (2), our method is different from traditional HGM in (a) its generative process of tasks (Sec. 3.1), which is a theoretical extension of the widely used empirical process of generating tasks in meta-learning; (b) its Gibbsstyle task-conditional distribution (Eq. (2)) for fitting uniformly sampled classes; (c) the metricbased end-to-end meta-learning framework (Fig. 1) (note the traditional HGM is not for learning embeddings); (d) the non-trivial derivation of the optimization algorithm in Sect. 3.2 and Alg. 1; and (e) the novel model adaptation process in Sec. 3.3. Solving the technical challenges in the new generative model is another novel contribution of the proposed method.
|
| 343 |
+
|
| 344 |
+
Input: encoder $f _ { \theta }$ , training dataset ${ \mathcal { D } } ^ { \mathrm { t r } }$ , hyperparameters $r$ , $\sigma$ , $\bar { \sigma }$ Output: model parameters $\{ \theta , \omega \}$
|
| 345 |
+
|
| 346 |
+
1 Pre-train the encoder $f _ { \theta }$ via ProtoNet with augmentations.
|
| 347 |
+
2 Pre-train the energy function in Eq. (2) by maximizing $\begin{array} { r } { \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \log p _ { \theta , \omega } ( \mathbf { e } _ { i } | y _ { i } ) + \log p _ { \omega } ( y _ { i } | \mathbf { v } _ { \tau } ) } \end{array}$
|
| 348 |
+
3 for $i \gets 1$ to MaxEpoch do
|
| 349 |
+
|
| 350 |
+
/ $\star$ E-step $\star /$ 4 $\nu = \emptyset$ 5 for $\{ \mathcal { D } _ { \tau } ^ { s } = \{ ( \mathbf { x } _ { i } ^ { s } , y _ { i } ^ { s } ) \} _ { i = 1 } ^ { n _ { s } } , \mathcal { D } _ { \tau } ^ { q } = \{ ( \mathbf { x } _ { i } ^ { q } , y _ { i } ^ { q } ) \} _ { i = 1 } ^ { n _ { q } } \}$ in Dataloader $\mathcal { D } ^ { t r } .$ ) do / $\star$ load a task episode $\star /$ 6 $\{ { \bf e } _ { i } ^ { \mathfrak { s } } \} _ { i = 1 } ^ { n _ { \mathfrak { s } } } = \{ f _ { \pmb { \theta } } ( \mathbf { x } _ { i } ^ { \mathfrak { s } } ) \} _ { i = 1 } ^ { n _ { \mathfrak { s } } }$ // embeddings of the support set 7 $\pmb { \mu } _ { z _ { \tau } } ^ { \mathrm { a } } = \mathrm { T a s k - P o o l i n g } ( \mathrm { C l a s s - P o o l i n g } ( \{ ( \mathbf { e } _ { i } ^ { \mathrm { s } } , y _ { i } ^ { \mathrm { s } } ) \} _ { i = 1 } ^ { n _ { \mathrm { s } } } ) )$ // the mean of $q _ { \phi } \big ( \mathbf { v } _ { \tau } | \mathcal { D } _ { \tau } ^ { \mathfrak { s } } \big )$ 8 Sample a task embedding $\mathbf { v } _ { \tau }$ from $q _ { \phi } ( \mathbf { v } _ { \tau } | \mathcal { D } _ { \tau } ^ { \mathsf { s } } ) = \mathcal { N } ( \pmb { \mu } _ { z _ { \tau } } ^ { \mathsf { a } } , \bar { \sigma } ^ { 2 } \mathbf { I } )$ 9 $\mathcal { V } = \mathcal { V } \cup \{ \mathbf { v } _ { \tau } \}$ 10 end 11 $\left\{ z _ { \tau } \right\} _ { \tau = 1 } ^ { | \mathcal { V } | } , \left\{ \mu _ { 1 } ^ { \mathrm { t } } , . . . , \mu _ { r } ^ { \mathrm { t } } , \Sigma _ { 1 } ^ { \mathrm { t } } , . . . , \Sigma _ { r } ^ { \mathrm { t } } \right\} = \mathbf { G } \mathbf { M } \mathbf { M } ( \mathcal { V } ) .$ . // fit a GMM to $\nu$ , where $\{ z _ { \tau } \} _ { \tau = 1 } ^ { | \nu | }$ represents the labeling of the ${ \bf { v } } _ { \tau } \prime _ { \mathrm { ~ S ~ } }$ in $\nu$ /\* M-step \*/ 12 for $\{ \mathcal { D } _ { \tau } ^ { s } = \{ ( \mathbf { x } _ { i } ^ { s } , y _ { i } ^ { s } ) \} _ { i = 1 } ^ { n _ { s } } , \mathcal { D } _ { \tau } ^ { q } = \{ ( \mathbf { x } _ { i } ^ { q } , y _ { i } ^ { q } ) \} _ { i = 1 } ^ { n _ { q } } \}$ in Dataloader $\mathcal { D } ^ { t r } )$ do / $\star$ load a task episode $\star /$ 13 14 $\{ { \bf e } _ { i } ^ { \mathfrak { s } } \} _ { i = 1 } ^ { n _ { \mathfrak { s } } } = \{ f _ { \pmb { \theta } } ( \mathbf { x } _ { i } ^ { \mathfrak { s } } ) \} _ { i = 1 } ^ { n _ { \mathfrak { s } } }$ $\{ \mathbf { e } _ { i } ^ { \mathfrak { q } } \} _ { i = 1 } ^ { n _ { \mathfrak { q } } } = \{ f _ { \theta } ( \mathbf { x } _ { i } ^ { \mathfrak { q } } ) \} _ { i = 1 } ^ { n _ { \mathfrak { q } } }$ // forward pass// forward pass 15 $\{ \mu _ { 1 } ^ { \mathfrak { c } } , . . . , \mu _ { N } ^ { \mathfrak { c } } \} ^ { \mathfrak { s } } = \mathbf { C l a s s - P o o l i n g } ( \{ ( \mathbf { e } _ { i } ^ { \mathfrak { s } } , y _ { i } ^ { \mathfrak { s } } ) \} _ { i = 1 } ^ { n _ { \mathfrak { s } } } )$ 16 $\pmb { \mu } _ { z _ { \tau } } ^ { \mathrm { a } } = \mathrm { T a s k - P o o l i n g } ( \{ \pmb { \mu } _ { 1 } ^ { \mathrm { c } } , . . . , \pmb { \mu } _ { N } ^ { \mathrm { c } } \} ^ { \mathrm { s } } )$ // the mean of $q _ { \phi } \big ( \mathbf { v } _ { \tau } | \mathcal { D } _ { \tau } ^ { \mathtt { S } } \big )$ 17 Sample a task embedding $\mathbf { v } _ { \tau }$ from $q _ { \phi } ( \mathbf { v } _ { \tau } | \mathcal { D } _ { \tau } ^ { \mathsf { s } } ) = \mathcal { N } ( \pmb { \mu } _ { z _ { \tau } } ^ { \mathsf { a } } , \bar { \sigma } ^ { 2 } \mathbf { I } )$ 18 for $j = I , . . . , N$ do 19 $\begin{array} { r l } { \lvert } & { { } \bar { \pmb { \mu } } _ { j } ^ { \mathrm { c } } = \alpha { \pmb { \mu } } _ { j } ^ { \mathrm { c } } + ( 1 - \alpha ) { \bf W } _ { l ^ { * } } { \bf v } _ { \tau ^ { \prime } } } \end{array}$ where $l ^ { * } = \arg \operatorname* { m i n } _ { 1 \leq l \leq N } D ( \pmb { \mu } _ { j } ^ { \mathrm { c } } , \mathbf { W } _ { l } \mathbf { v } _ { \tau ^ { \prime } } )$ 20 end 21 Calculate $\ell ( \{ \mathbf { e } _ { i } ^ { \mathfrak { q } } \} _ { i = 1 } ^ { n _ { \mathfrak { q } } } , \boldsymbol { \mathcal { V } } , \{ \bar { \mu } _ { j } ^ { \mathfrak { c } } \} _ { j = 1 } ^ { N } , \{ \mu _ { 1 } ^ { \mathfrak { t } } , . . . , \mu _ { r } ^ { \mathfrak { t } } , \Sigma _ { 1 } ^ { \mathfrak { t } } , . . . , \Sigma _ { r } ^ { \mathfrak { t } } \} , \sigma , \omega )$ // calculate the loss in Eq. (5) using Eq. (3) and Eq. (4) 22 $\pmb { \theta } , \omega = \mathrm { S G D } ( \ell , \pmb { \theta } , \omega )$ // update model parameters 23 end 24 end
|
| 351 |
+
|
| 352 |
+
# B.2 DISCUSSION ABOUT THE RELATED MULTI-TASK LEARNING METHODS
|
| 353 |
+
|
| 354 |
+
The modeling of the clustering/grouping structure of tasks or the mixture of distributions of tasks has been studied in multi-tasking learning (MTL). In (Xue et al., 2007; Jacob et al., 2008), tasks are assumed to have a clustering structure, and the model parameters of the tasks in the same cluster are drawn to each other via optimization on their L2 distances. In (Kang et al., 2011), a subspace based regularization framework was proposed for grouping task-specific model parameters, where the tasks in the same group are assumed to lie in the same low dimensional subspace for parameter sharing. The method in (Kumar & Daume III ´ , 2012) also uses the subspace based sharing of task parameters, but allows two tasks from different groups to overlap by having one or more bases in common. The method in (Passos et al., 2012) introduces a generative model for task-specific model parameters that encourages parameter sharing by modeling the latent mixture distribution of the parameters via the Dirichlet process and Beta process.
|
| 355 |
+
|
| 356 |
+
The key difference between these methods and our method HTGM lies in the difference between MTL and meta-learning. In an MTL method, all tasks are known a priori, i.e., the testing tasks are from the set of training tasks, and the model is non-inductive at the task-level (but it is inductive at the sample-level). In HTGM, testing tasks can be disjoint from the set of training tasks, thus the model is inductive at the task-level. In particular, we aim to allow testing tasks that are not from the distribution of the training tasks by enabling the detection of novel tasks, which is an extension of the task-level inductive model. The second difference lies in the generative process. The method in (Passos et al., 2012) models the generative process of the task-specific model parameters (e.g., the weights in a regressor). In contrast, HTGM models the generative process of each task by generating the classes in it, and the samples in the classes hierarchically, i.e., the $\left( \mathbf { x } , y \right)$ ’s (in Eq. (1) and Sec. 3.1). In this process, we allow our model to fit uniformly sampled classes given a task (without specifying a prior on the distance function on classes) by the proposed Gibbs distribution in Eq. (2). Other remarkable differences to the aforementioned MTL methods include the inference network (Fig. 1(b)), which allows the inductive inference on task embeddings and class prototypes; the optimization algorithm (Sec. 3.2) to our specific loss function in Eq. (3), which is from the likelihood in Eq. (1); and the model adaptation algorithm (Sec. 3.3) for performing predictions in a testing task, and detecting novel tasks. As such, the MTL methods can not be trivially applied to solve our problem.
|
| 357 |
+
|
| 358 |
+
# B.3 FURTHER INTERPRETATION OF THE TASK-CONDITIONAL DISTRIBUTION
|
| 359 |
+
|
| 360 |
+
The task-conditional class distribution $p _ { \omega } ( y _ { i } = k | \mathbf { v } _ { \tau } )$ in Eq. (2) is defined through an energy function $E _ { \omega } ( \pmb { \mu } _ { k } ^ { \mathsf { c } } ; \mathbf { v } _ { \tau } ) = \operatorname* { m i n } \left( \{ | | \pmb { \mu } _ { k } ^ { \mathsf { c } } - \mathbf { W } _ { j } \mathbf { v } _ { \tau } | | _ { 2 } ^ { 2 } \} _ { j = 1 } ^ { N } \right)$ with trainable parameters $\boldsymbol { \omega } = \{ \mathbf { W } _ { 1 } , . . . , \mathbf { W } _ { N } \}$ for allowing uniformly sampled classes per task. The conditional distribution $p ( y _ { i } | \mathbf { v } _ { \tau } )$ represents how classes distribute for a given task $\tau$ . The reason for its definition in Eq. (2) is as follows. If it is a Gaussian distribution with $\mathbf { v } _ { \tau }$ (i.e., task embedding) as the mean, $p ( y _ { i } = k | \mathbf { v } _ { \tau } )$ can be interpreted as the density at the representation of the $k$ -th class in this Gaussian distribution, i.e., the density at $\pmb { \mu } _ { k }$ , which is the mean/surrogate embedding of the $k$ -th class. One problem of this Gaussian $p ( y _ { i } | \mathbf { v } _ { \tau } )$ is that different classes, i.e., different $\pmb { \mu } _ { y _ { i } }$ ’s, are not uniformly distributed, contradicting the practice that given a dataset (e.g., images), classes are often uniformly sampled for constituting a task in the empirical studies. Using a uniformly sampled set of classes to fit the Gaussian distribution $p ( y _ { i } | v _ { \tau } )$ will lead to an ill-posed learning problem, as described in Sec. 3.1. To solve it, we introduced $\omega = \{ \mathbf { W } _ { 1 } , . . . , \mathbf { W } _ { N } \}$ in the energy function $E _ { \omega } ( \mu _ { k } ^ { \circ } ; \mathbf { v } _ { \tau } )$ in Eq. (2). $\mathbf { W } _ { j } \in \mathbb { R } ^ { d \times d }$ $( 1 \leq j \leq N )$ ) can be interpreted as projecting $\mathbf { v } _ { \tau }$ to the $j$ -th space spanned by the basis (i.e., columns) of $\mathbf { W } _ { j }$ . There are $N$ different spaces for $j = 1 , . . . , N$ . Thus, the $N$ projected task means $\mathbf { W } _ { 1 } \mathbf { v } _ { \tau } , . . . , \mathbf { W } _ { N } \bar { \mathbf { v } _ { \tau } }$ are in $N$ different spaces. Fitting the energy function $E _ { \omega } ( \mu _ { k } ^ { \circ } ; \mathbf { v } _ { \tau } )$ to $N$ uniformly sampled classes $\mu _ { 1 } ^ { \mathsf { c } } , . . . , \mu _ { N } ^ { \mathsf { c } }$ , which tend to be far from each other because they are uniformly random, tends to learn $\mathbf { W } _ { 1 } , . . . , \mathbf { W } _ { N }$ that project $\mathbf { v } _ { \tau }$ to $N$ far apart spaces that fit each of the $\mu _ { 1 } ^ { \mathsf { c } } , . . . , \mu _ { N } ^ { \mathsf { c } }$ by closeness, due to the min-pooling operation. This mitigates the aforementioned ill-posed learning problem.
|
| 361 |
+
|
| 362 |
+
# C APPENDIX FOR IMPLEMENTATION DETAILS
|
| 363 |
+
|
| 364 |
+
# C.1 THE SETUP OF THE COMPARED MODELS
|
| 365 |
+
|
| 366 |
+
Encoder of Metric-based Meta-Learning. For fairness, for all metric-based methods, including ProtoNet (Snell et al., 2017), MetaOptNet (Lee et al., 2019c), ProtoNet-Aug (Su et al., 2020), FEATS (Ye et al., 2020) and NCA (Laenen & Bertinetto, 2021), following (Tian et al., 2020; Lee et al., 2019c), we apply ResNet-12 as the encoder. ResNet-12 has 4 residual blocks, each has 3 convolutional layers with a kernel size of $3 \times 3$ . ResNet-12 uses dropblock as a regularizer, and its number of filters is (60, 160, 320, 640). For MetaOptNet, following its paper (Lee et al., 2019c), we flattened the output of the last convolutional layer to acquire a 16000-dimensional feature as the image embedding. For other baselines, following (Tian et al., 2020), we used a global averagepooling layer on the top of the last residual block to acquire a 640-dimensional feature as the image embedding.
|
| 367 |
+
|
| 368 |
+
Further Details. Following (Snell et al., 2017), ProtoNet, ProtoNet-Aug, and NCA use Adam optimizer with $\beta _ { 1 } = 0 . 9$ and $\beta _ { 2 } = 0 . 9 9$ . We did grid-search for the initial learning rate of the Adam within $\{ 1 e ^ { - 2 } , 1 e ^ { - 3 } , 1 e ^ { - 4 } \}$ , where $1 e ^ { - 3 }$ was selected, which is the same as the official implementation provided by the authors. For FEATS, we chose transformer as the set-to-set function based on the results reported by (Ye et al., 2020). When pre-training the encoder in FEATS, following its paper (Ye et al., 2020), we applied the same setting as ProtoNet, which is to use Adam optimizer with an initial learning rate of $\bar { 1 { e } } ^ { - 3 }$ , $\beta _ { 1 } = 0 . 9$ and $\beta _ { 2 } = 0 . 9 9$ . When training its aggregation function, we grid-searched the initial learning rate in $\{ 1 e ^ { - 4 } , 5 e ^ { - 4 } , 1 e ^ { - 5 } \}$ since a larger learning rate leads to invalid results on our datasets. The optimal choice is $1 e ^ { - 4 }$ . For MetaOptNet, following its paper (Lee et al., 2019c), we used SGD with Nesterov momentum of 0.9, an initial learning rate of 0.1 and a scheduler to optimize it, and applied the quadratic programming solver OptNet (Amos & Kolter, 2017) for the SVM solution in it.
|
| 369 |
+
|
| 370 |
+
# C.2 THE DETAILS OF THE SETUP FOR NOVEL TASK DETECTION
|
| 371 |
+
|
| 372 |
+
In the experiments on novel task detection in Sec. 4.1, the number of in-distribution tasks (from the Original domain) in the test set is 4000 (1000 per task cluster) and the number of novel tasks (from the Blur and Pencil domains) in the test set is 8000 (4000 for the Blur and 4000 for the Pencil).
|
| 373 |
+
|
| 374 |
+
# D APPENDIX FOR EXPERIMENTAL RESULTS
|
| 375 |
+
|
| 376 |
+
# D.1 ANALYSIS OF $\sigma$
|
| 377 |
+
|
| 378 |
+
Table 4: Analysis of different $\sigma$
|
| 379 |
+
|
| 380 |
+
<table><tr><td>Setting of σ</td><td>Bird</td><td>Texture</td><td>Aircraft</td><td>Fungi</td></tr><tr><td>0.1</td><td>69.33</td><td>46.92</td><td>75.20</td><td>50.78</td></tr><tr><td>0.5</td><td>70.00</td><td>47.98</td><td>75.38</td><td>52.38</td></tr><tr><td>1.0 (Ours)</td><td>70.12</td><td>47.76</td><td>75.52</td><td>52.06</td></tr><tr><td>10.0</td><td>69.4</td><td>47.28</td><td>75.32</td><td>51.5</td></tr></table>
|
| 381 |
+
|
| 382 |
+
Tabel 4 report the effect of different $\sigma$ on the classification performance (5-way-1-shot classification on Multi-Plain dataset). As shown in the table, although the too low or too high setting of this hyper-parameter will hurt the performance, in general the model is robust toward the setting of $\sigma$ .
|
| 383 |
+
|
| 384 |
+
# D.2 ANALYSIS OF $\bar { \sigma }$
|
| 385 |
+
|
| 386 |
+
Table 5: Analysis of different $\bar { \sigma }$
|
| 387 |
+
|
| 388 |
+
<table><tr><td>Setting of π</td><td>Bird</td><td>Texture</td><td>Aircraft</td><td>Fungi</td></tr><tr><td>0.05</td><td>69.78</td><td>48.36</td><td>74.36</td><td>51.34</td></tr><tr><td>0.1(Ours)</td><td>70.12</td><td>47.76</td><td>75.52</td><td>52.06</td></tr><tr><td>0.2</td><td>70.02</td><td>47.50</td><td>75.30</td><td>51.74</td></tr><tr><td>0.5</td><td>69.02</td><td>46.66</td><td>74.46</td><td>51.00</td></tr></table>
|
| 389 |
+
|
| 390 |
+
Tabel 5 summarize how different $\bar { \sigma }$ influence classification performance (5-way-1-shot classification on Multi-Plain dataset). In general, different settings of $\bar { \sigma }$ will influence the model performance at a marginal level, indicating our model’s robustness toward this hyper-parameter.
|
| 391 |
+
|
| 392 |
+
# D.3 IMPACT OF GMM COMPONENT NUMBER
|
| 393 |
+
|
| 394 |
+
Table 6: Analysis on the number of mixture components
|
| 395 |
+
|
| 396 |
+
<table><tr><td rowspan=1 colspan=1>Number of components r</td><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>4</td><td rowspan=1 colspan=1>8</td><td rowspan=1 colspan=1>16</td><td rowspan=1 colspan=1>32</td></tr><tr><td rowspan=1 colspan=1>Silhouette score</td><td rowspan=1 colspan=1>47.70</td><td rowspan=1 colspan=1>57.61</td><td rowspan=1 colspan=1>12.76</td><td rowspan=1 colspan=1>7.81</td><td rowspan=1 colspan=1>6.19</td></tr></table>
|
| 397 |
+
|
| 398 |
+
Different choices of the number of mixture components does not significantly influence the model classification performance. However, the clustering quality may vary due to the different numbers of components. Here, we report the Silhouette score (Shahapure & Nicholas, 2020; Sharma et al., 2021) w.r.t. the number in Table 6. From Table 6, we can see that selecting a component number close to the ground-truth component number of the distribution can benefit the clustering quality.
|
| 399 |
+
|
| 400 |
+
# D.4 CLASSIFICATION PERFORMANCE OF THE ABLATION VARIANTS
|
| 401 |
+
|
| 402 |
+
We summarize the classification performance of the two Ablation Variants HTGM w/o GMM and HTGM-Gaussian in Table 7. As we can see, our unique designs improve the novel task detection performance without significantly decreasing the classification performance.
|
| 403 |
+
|
| 404 |
+
Table 7: Ablation study of different variants of our proposed method.
|
| 405 |
+
|
| 406 |
+
<table><tr><td>Ablation Variants</td><td>Bird</td><td>Texture</td><td>Aircraft</td><td>Fungi</td></tr><tr><td>HTGMw/oGMM</td><td>68.86</td><td>48.00</td><td>75.74</td><td>52.28</td></tr><tr><td>HTGM-Gaussian</td><td>69.52</td><td>47.3</td><td>75.38</td><td>51.34</td></tr><tr><td>HTGM</td><td>70.12</td><td>47.76</td><td>75.52</td><td>52.06</td></tr></table>
|
| 407 |
+
|
| 408 |
+
<table><tr><td>Setting</td><td>Model</td><td>Bird</td><td>Texture</td><td>Aircraft</td><td>Fungi</td><td>Average</td></tr><tr><td rowspan="4">5-way-1-shot</td><td>ANIL-MAML ANIL-HSML</td><td>62.64±0.90</td><td>43.86±0.78</td><td>70.03±0.85</td><td>48.34±0.89</td><td>56.22</td></tr><tr><td></td><td>64.33±0.87</td><td>43.77±0.79</td><td>69.71±0.84</td><td>47.75±0.89</td><td>56.39</td></tr><tr><td>ANIL-ARML</td><td>65.98±0.87</td><td>43.57±0.78</td><td>70.28±0.84</td><td>48.48±0.92</td><td>57.08</td></tr><tr><td>HTGM (ours)</td><td>70.12±1.28</td><td>47.76±1.49</td><td>75.52±1.24</td><td>52.06±1.41</td><td>61.37</td></tr><tr><td rowspan="4">5-way-5-shot</td><td>ANIL-MAML</td><td>74.38±0.73</td><td>55.36±0.74</td><td>79.78±0.63</td><td>59.57±0.79</td><td>67.27</td></tr><tr><td>ANIL-HSML</td><td>78.18±0.71</td><td>57.70±0.75</td><td>81.32±0.62</td><td>59.83±0.81</td><td>69.26</td></tr><tr><td>ANIL-ARML</td><td>78.79±0.71</td><td>57.61±0.73</td><td>81.86±0.59</td><td>60.19±0.81</td><td>69.61</td></tr><tr><td>HTGM (ours)</td><td>82.27±0.74</td><td>60.67±0.78</td><td>88.48±0.52</td><td>65.70±0.79</td><td>74.28</td></tr></table>
|
| 409 |
+
|
| 410 |
+
Table 8: More results (accuracy $\pm 9 5 \%$ confidence) of the optimization-based methods.
|
| 411 |
+
|
| 412 |
+
# D.5 ABLATION ANALYSIS OF OPTIMIZATION-BASED METHODS
|
| 413 |
+
|
| 414 |
+
Table 8 summarizes the performance of MAML, HSML and ARML trained in ANIL method (Raghu et al., 2020), i.e., we pre-trained the ResNet-12 by ProtoNet, froze the encoder, and fine-tuned the last fully-connected layers using MAML, HSML and ARML on Plain-Multi dataset. From Table 8, the performance of ANIL-MAML is better than MAML in Table 1, similar to the observation in (Raghu et al., 2020), indicating the effectiveness of ANIL method. However, ANIL-HSML and ANIL-ARML perform similarly to ANIL-MAML, losing their superiority of modeling the mixture distribution of tasks achieved when implemented without ANIL as in Table 1 (up to $5 . 6 \%$ average improvement). This is because the cluster layer in HSML and the graph layer in ARML both affect the embeddings learned through backpropagation, i.e., they were designed for joint training with the encoder. When the encoder is frozen, they cannot work properly. For this reason, to be consistent with the existing researches (Yao et al., 2019a;b) that demonstrated the difference between HSML/ARML and MAML, we used their original designs in Sec. 4. Meanwhile, we observe the proposed HTGM outperforms MAML, HSML, and ARML trained in ANIL method, this is because MAML cannot model the mixture distribution of tasks, while HSML and ARML cannot work properly when trained in ANIL method.
|
| 415 |
+
|
| 416 |
+
D.6 LIMITATIONS OF THE PROPOSED METHOD
|
| 417 |
+
|
| 418 |
+
<table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>5-way-1-shot</td><td rowspan=1 colspan=1>5-way-5-shot</td></tr><tr><td rowspan=1 colspan=1>ProtoNet-AugHTGM</td><td rowspan=1 colspan=1>59.40±0.9361.80±0.95</td><td rowspan=1 colspan=1>74.68±0.4574.55±0.45</td></tr></table>
|
| 419 |
+
|
| 420 |
+
Table 9: Comparison of our proposed method with other models on mini-imagenet dataset.
|
| 421 |
+
|
| 422 |
+
In the case when the task distribution is not a mixture, our model would degenerate to and perform similarly to the general metric-based meta-learning methods, e.g., ProtoNet, which only considers a uni-component distribution. To confirm this, we added an experiment that compares our model with ProtoNet-Aug on Mini-Imagenet (Vinyals et al., 2016), which does not have the same explicit mixture distributions as in the Plain-Multi and Art-Multi datasets in Section 4. The results are summarized in Table 9. From the table, we observe our method performs comparably to ProtoNet, which validates the aforementioned guess. Meanwhile, together with the results in Table 1 and Table 2, the proposed method could be considered as a generalization of the metric-based methods to the mixture of task distributions.
|
parse/dev/A4fSkNAs6E1/A4fSkNAs6E1_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/A4fSkNAs6E1/A4fSkNAs6E1_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/A4fSkNAs6E1/A4fSkNAs6E1_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/IajGRJuM7D3/IajGRJuM7D3_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/IajGRJuM7D3/IajGRJuM7D3_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/MR7XubKUFB/MR7XubKUFB_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/RKiWwhocuiU/RKiWwhocuiU_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/T0GpzBQ1Fg6/T0GpzBQ1Fg6.md
ADDED
|
@@ -0,0 +1,481 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# STEP-UNROLLED DENOISING AUTOENCODERS FOR TEXT GENERATION
|
| 2 |
+
|
| 3 |
+
Nikolay Savinov\* Junyoung Chung\* Mikołaj Binkowski ´ \* Erich Elsen Aaron van den Oord ¨ DeepMind, London, UK
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
In this paper we propose a new generative model of text, Step-unrolled Denoising Autoencoder (SUNDAE), that does not rely on autoregressive models. Similarly to denoising diffusion techniques, SUNDAE is repeatedly applied on a sequence of tokens, starting from random inputs and improving them each time until convergence. We present a simple new improvement operator that converges in fewer iterations than diffusion methods, while qualitatively producing better samples on natural language datasets. SUNDAE achieves state-of-the-art results (among non-autoregressive methods) on the WMT’14 English-to-German translation task and good qualitative results on unconditional language modeling on the Colossal Cleaned Common Crawl dataset and a dataset of Python code from GitHub. The non-autoregressive nature of SUNDAE opens up possibilities beyond left-to-right prompted generation, by filling in arbitrary blank patterns in a template.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Autoregressive (AR) models have shown excellent results in generating text (e.g., GPT-3, Brown et al., 2020). However, while their training scales very well, sampling is prohibitively slow for many practical applications. Moreover, there are limitations to the kinds of conditioning AR models can seamlessly handle: the left-to-right restriction makes it hard to “fill in the gaps” in a partially written text draft. Even more importantly, this prohibits iterative refinement of complete text drafts to make them more self-consistent, which is a common task for human writers. Finally, AR models require network architectures to be causal, severely limiting the kinds of neural network architectures that can be used for text-modeling. All of these motivated the machine learning community to make extensive efforts to propose alternatives to AR models.
|
| 12 |
+
|
| 13 |
+
Machine translation (MT) was perhaps one of the first tasks where non-AR approaches were shown to seriously rival the AR-based state of the art: methods like CMLM (Ghazvininejad et al., 2019) and DisCo (Kasai et al., 2020) show promising results and their decoding speed is excellent compared to AR. However, while their performance is competitive, they are still behind the AR benchmark and actually require distillation of a larger AR model — without which, performance drops considerably.
|
| 14 |
+
|
| 15 |
+
Non-AR methods have proven hard to apply to the general unconditional language modeling (LM) task. When there is no conditioning, the multi-modality problem becomes paramount, as shown by Gu et al. (2017), which likely makes it problematic to use methods like CMLM and DisCo because their decoding mechanism is deterministic and does not model uncertainty. Yet, recently the community has seen promising results from non-AR models like Multinomial Diffusion (Hoogeboom et al., 2021) and D3PM (Austin et al., 2021). These methods optimize a lower bound (ELBO) on likelihoods and have shown negative log-likelihood (NLL) results approaching AR models on several benchmarks like text8 (Mahoney, 2011) and LM1B (Chelba et al., 2013). However, a major gap in NLL persists, and samples from those models lack coherence.
|
| 16 |
+
|
| 17 |
+
In this paper we propose a novel non-autoregressive method which shows state-of-the-art results in machine translation on WMT’14 EN→DE raw data (without distillation from AR) amongst non-AR methods and good qualitative results on unconditional language modeling on the Colossal Clean Common Crawl (C4) dataset (Raffel et al., 2019) and a dataset of Python code from GitHub. Our model operates as a time-homogeneous Markov Chain similar to that of Lee et al. (2018): conditioned on the corrupted data, it tries to approximate the original uncorrupted samples by a per-token factorised distribution. During generation, we unroll the chain by sampling from the transition distribution and feeding samples back into the input. We propose a new training mechanism called unrolled denoising, which uses unrolls of the chain during training as well, and which we empirically show to be crucial for practical performance of the algorithm in ablation studies. This feature motivates the name for the model, Step-unrolled Denoising Autoencoder (SUNDAE). The difference between usual denoising and unrolled denoising is illustrated in Figure 1.
|
| 18 |
+
|
| 19 |
+

|
| 20 |
+
Figure 1: The difference between denoising and unrolled denoising. Original text (top) is randomly corrupted, producing a text (middle) where some tokens are original (green) and others are corrupted (red). This text is denoised by sampling from the generative model to produce another noisy text (bottom). While standard denoising autoencoders only learn a mapping from the middle text to the top text, Step-unrolled Denoising Autoencoder learns a mapping from bottom to top (including middle as a special case of zero unroll steps). This has an intuitive meaning: during generation time, the network will mostly (right after the first step) encounter texts like the bottom one, not like the middle one — so unrolls prepare the model during training for inputs it will get at generation time.
|
| 21 |
+
|
| 22 |
+
To summarize our contributions:
|
| 23 |
+
|
| 24 |
+
• We present SUNDAE, a new generative model of text that unrolls the denoising process during training.
|
| 25 |
+
• SUNDAE achieves state-of-the-art results on WMT’14 English-to-German translation task among non-AR methods. We demonstrate good qualitative results for unconditional generation and inpainting on Colossal Clean Common Crawl dataset and a dataset of Python code from GitHub.
|
| 26 |
+
• We carefully ablate and analyze the properties of the proposed method, and show that unrolls during training are crucial for the model’s performance.
|
| 27 |
+
|
| 28 |
+
# 2 METHOD
|
| 29 |
+
|
| 30 |
+
We approach the problem of generative modelling of discrete sequences by bringing together the framework of denoising autoencoders and Markov chain models. In this section, we first discuss the definition of the generative model, and then describe the training process, which includes our main contribution, unrolled denoising.
|
| 31 |
+
|
| 32 |
+
For a fixed prior distribution $p _ { 0 }$ on some space $X$ consider a process $\mathbf { x } _ { t } \sim f _ { \theta } ( \cdot | \mathbf { x } _ { t - 1 } )$ , where $f _ { \theta }$ is a parametric transition function. Then $\{ { \bf { x } } _ { t } \} _ { t }$ is a time-homogeneous Markov chain, and transition $t$ -steps ahead has the following form1
|
| 33 |
+
|
| 34 |
+
$$
|
| 35 |
+
p _ { t } ( \pmb { x } _ { t } | \pmb { x } _ { 0 } ) = \sum _ { \substack { \pmb { x } _ { 1 } , \pmb { x } _ { 2 } , \ldots , \pmb { x } _ { t - 1 } \in X } } \ \prod _ { s = 1 } ^ { t } f _ { \theta } ( \pmb { x } _ { s } | \pmb { x } _ { s - 1 } ) .
|
| 36 |
+
$$
|
| 37 |
+
|
| 38 |
+
For a fixed number of steps $T$ , the prior $p _ { 0 }$ and decoder $p _ { T }$ together determine our model distribution $p _ { T } ( \mathbf { x } _ { T } ) = p _ { T } ( \mathbf { x } _ { T } \vert \mathbf { x } _ { 0 } ) p _ { 0 } ( \mathbf { x } _ { 0 } )$ .
|
| 39 |
+
|
| 40 |
+
We assume $X = \{ 1 , \ldots , v \} ^ { N }$ to be the space of sequences of length $N$ with values at all positions coming from a vocabulary of size $v$ , and the prior $p _ { 0 }$ to be uniform over $X$ . Let $p _ { \mathrm { d a t a } }$ be a distribution of the data and assume that $f _ { \theta }$ induces a conditional probability distribution $f _ { \boldsymbol { \theta } } ( \cdot | \boldsymbol { x } ^ { \prime } )$ that can be
|
| 41 |
+
|
| 42 |
+
factorised into a conditionally-indepedent product as follows:
|
| 43 |
+
|
| 44 |
+
$$
|
| 45 |
+
f _ { \theta } ( \pmb { x } | \pmb { x } ^ { \prime } ) = f _ { \theta } ^ { ( 1 ) } ( \pmb { x } ^ { ( 1 ) } | \pmb { x } ^ { \prime } ) f _ { \theta } ^ { ( 2 ) } ( \pmb { x } ^ { ( 2 ) } | \pmb { x } ^ { \prime } ) \cdot \cdot \cdot f _ { \theta } ^ { ( N ) } ( \pmb { x } ^ { ( N ) } | \pmb { x } ^ { \prime } ) , \qquad \mathrm { f o r } \ \pmb { x } , \pmb { x } ^ { \prime } \in X .
|
| 46 |
+
$$
|
| 47 |
+
|
| 48 |
+
Note that although for $t = 1$ the distribution $p _ { 1 } ( \cdot | \pmb { x } _ { 0 } )$ is limited by product structure (Eq. 2), the subsequent $p _ { t } \mathbf { s }$ are not restricted in the same way, and after each step they belong to potentially more and more expressive family.
|
| 49 |
+
|
| 50 |
+
# 2.1 TRAINING WITH UNROLLED DENOISING
|
| 51 |
+
|
| 52 |
+
Due to intractability of the likelihood of the model $p _ { T }$ as well as the computational requirements of optimising the whole chain $\{ p _ { t } \} _ { t }$ , we propose an efficient two-step training method which we term unrolled denosing and visualise in Figure 1. We consider a smaller number of steps than $T$ that we intend to use at sampling, but to compensate for that, we unroll the chain starting from corrupted data samples, rather than the prior $p _ { 0 }$ . This way, the model learns to denoise the samples it is likely to encounter during the full unroll used at sample time. While using a single step would resemble the training strategy of BERT (Devlin et al., 2018), using at least two steps is essential for the performance of our model.
|
| 53 |
+
|
| 54 |
+
Consider a corruption distribution $q ( \pmb { x } ^ { c } | \mathbf { x } )$ that replaces a random proportion of tokens in a sentence $\mathbf { x }$ with ones randomly sampled from a uniform distribution. Our objective is given by $L ^ { ( 1 : 2 ) } =$ $\begin{array} { r } { \frac { 1 } { 2 } \left( L ^ { ( 1 ) } + L ^ { ( 2 ) } \right) } \end{array}$ where
|
| 55 |
+
|
| 56 |
+
$$
|
| 57 |
+
\begin{array} { r } { L ^ { ( t ) } ( \theta ) : = - \mathbb { E } \underset { \mathbf { x } _ { 0 } \sim q ( \cdot | \mathbf { x } ) } { \sim p _ { \mathrm { d a t a } } } ~ [ \log f _ { \theta } ( \mathbf { x } | \mathbf { x } _ { t - 1 } ) ] , } \\ { \quad \quad \quad \quad \quad \mathbf { x } _ { 1 } \sim f _ { \theta } ( \cdot | \mathbf { x } _ { 0 } ) } \\ { \quad \quad \quad \quad \mathbf { x } _ { t - 1 } \sim \dot { f } _ { \theta } ^ { \cdots } ( \cdot | \mathbf { x } _ { t - 2 } ) } \end{array}
|
| 58 |
+
$$
|
| 59 |
+
|
| 60 |
+
i.e. the reconstruction loss of the chain after $t$ steps, starting from a corrupted sample $\mathbf { x } _ { \mathrm { 0 } }$ . In Appendix A.1 we show that $L ^ { ( t ) }$ is an upper bound on the actual negative log-likelihood from the model distribution $p _ { t }$ :
|
| 61 |
+
|
| 62 |
+
$$
|
| 63 |
+
\widetilde { L ^ { ( t ) } } ( \boldsymbol { \theta } ) : = - \mathbb { E } \underset { \mathbf { x } ^ { c } \sim q ( \cdot | \mathbf { x } ) } { \mathbf { x } \sim p _ { \mathrm { d a t a } } } [ \log p _ { t } ( \mathbf { x } | \mathbf { x } ^ { c } ) ] .
|
| 64 |
+
$$
|
| 65 |
+
|
| 66 |
+
Note that $\widetilde { L ^ { ( T ) } }$ is the actual term we would like to minimise if $p _ { T }$ were tractable, and in fact is closely related to evidence lower bound (ELBO) via a fixed encoder $q ( \mathbf { x } ^ { c } | \mathbf { x } )$ (Appendix A.2). However, due to the inherent non-differentiable nature of discrete Markov chain models, optimisation of $\widetilde { L ^ { ( T ) } }$ would not only be costly, but also limit the gradient flow to the last step of the chain. We found instead that optimising several steps together without propagating the gradient through sampling is sufficient for obtaining good results. Averaging more $L ^ { ( t ) }$ terms can lead to minor improvements in performance (see Figure 4d in Appendix C), but it considerably slows down the training speed. We discuss these and other loss variants further in Section 3.1.
|
| 67 |
+
|
| 68 |
+
Since function $f _ { \theta }$ is modelled as a neural network, the logarithm under expectation on the right hand side of Eq. 3 is obtained from predicted logits, thus we term $L ^ { ( 1 ) } ( \theta )$ and $L ^ { ( 2 ) } ( \theta )$ logits loss and unrolled logits loss, respectively.
|
| 69 |
+
|
| 70 |
+
Corruption function. To corrupt texts, we first sample a proportion of tokens uniformly from $[ 0 , 1 ]$ , randomly select positions according to this proportion and then change tokens at those positions to random tokens sampled uniformly from the vocabulary. This way, we want to ensure that samples seen at various steps during a generative unroll (including the first one, sampled from the uniform prior) are well-represented in corruptions applied during training. More details and relations to the forward diffusion process (Hoogeboom et al., 2021) are presented in Appendix A.3.
|
| 71 |
+
|
| 72 |
+
# 2.2 SAMPLING
|
| 73 |
+
|
| 74 |
+
At sampling time we follow the structure of the Markov process and sample sequentially $\mathbf { \mathcal { x } } _ { t } \sim$ $f _ { \theta } ( \pmb { x } _ { t } | \pmb { x } _ { t - 1 } )$ for some fixed number of steps $T$ , beginning from a random sequence $\scriptstyle { \mathbf { { \mathit { x } } } } _ { 0 }$ (potentially starting with a prompt or a template for conditional generation). To control the speed of convergence, we propose three improved strategies which allow the use of a much smaller number of steps:
|
| 75 |
+
|
| 76 |
+
• Low-temperature sampling. For temperature $\tau$ and trained network $f _ { \theta }$ we consider modified function $f _ { \theta } ^ { \tau }$ such that $\begin{array} { r } { \operatorname * { l o g } f _ { \theta } ^ { \tau } ( { \cdot } | x ) \propto \frac { 1 } { \tau } \log f _ { \theta } ( { \cdot } | x ) } \end{array}$ . We found that sampling with temperatures lower than 1 leads to much faster convergence than with the original logits, and allowed generation of high-quality samples in a matter of 10-16 steps.
|
| 77 |
+
|
| 78 |
+
Table 1: Test BLEU scores of AR and non-AR systems on the WMT’14 English-to-German $\mathrm { E N } { } \mathrm { D E } )$ ) and German-to-English $( \mathrm { D E } \to \mathrm { E N } )$ ) translation tasks. The number of reranked candidates is denoted $n$ . SUNDAE does not use an AR model for re-ranking. We highlight BLEU scores of the best non-AR systems in bold font. All the entries are ordered based on the $\mathrm { E N } { } \mathrm { D E }$ BLEU score. ∗indicates the results of the Transformer baselines implemented by the authors of DisCo. †DisCo has a dynamic inference mode for which we report the average number of steps.
|
| 79 |
+
|
| 80 |
+
<table><tr><td rowspan="2">Model</td><td colspan="2">Raw BLEU</td><td colspan="2">AR-distilled BLEU</td></tr><tr><td>Steps (T)</td><td>EN→DE</td><td>DE→EN</td><td>EN→DE DE→EN</td></tr><tr><td>ARModels</td><td></td><td></td><td></td><td></td></tr><tr><td>Transformer Base (65M) (Vaswani et al.,2017) (n=4)</td><td>27.3</td><td>31.78*</td><td></td><td></td></tr><tr><td>Non-AR Models</td><td></td><td></td><td></td><td></td></tr><tr><td>NAT (Gu et al., 2017) (n =100)</td><td>1</td><td></td><td>19.17</td><td>23.20</td></tr><tr><td>LVM-DAE (Lee et al.,2018)</td><td></td><td></td><td>21.54</td><td>25.43</td></tr><tr><td>NAT-REG (Wang et al.,2019) (n =9)</td><td>= 1</td><td></td><td>一</td><td>24.61 28.90</td></tr><tr><td>LV-NAR (Shu et al., 2020) (n = 50)</td><td>1</td><td>11.8</td><td>=</td><td>25.10</td></tr><tr><td>NART w/ hints (Li et al.,2019)(n =9)</td><td>1</td><td>=</td><td>-</td><td>25.20 29.52</td></tr><tr><td>FlowSeq (Ma et al.,2019) (n=30)</td><td>1</td><td>23.64</td><td>28.29</td><td>25.31 30.68</td></tr><tr><td>ReorderNAT (Ran et al., 2019)</td><td>1</td><td>=</td><td>=</td><td>26.49 31.13</td></tr><tr><td>NART (Sun et al.,2019) (n =19)</td><td>1</td><td>=</td><td></td><td>26.80 30.04</td></tr><tr><td>CMLM(Ghazvininejad et al.,2019) + Mask-Predict (n =5)</td><td>4</td><td>22.25</td><td>=</td><td>25.94 29.90</td></tr><tr><td>CMLM(Ghazvininejad et al.,2019)+ Mask-Predict (n=5)</td><td>10</td><td>24.61</td><td></td><td>27.03 30.53</td></tr><tr><td>DisCo (Kasai et al.,2020) + Mask-Predict (n=5)</td><td>4</td><td>-</td><td></td><td>25.83 30.15</td></tr><tr><td>DisCo (Kasai et al.,202O) + Mask-Predict (n=5)</td><td>10</td><td>=</td><td></td><td>27.06 30.89</td></tr><tr><td>DisCo (Kasai et al., 202O) + Easy-First (n=5)</td><td>4-5†</td><td>24.8</td><td></td><td>27.34 31.31</td></tr><tr><td>NARLVM (Lee et al.,2020) (n= 25)</td><td>4</td><td>-</td><td></td><td>27.40 ■</td></tr><tr><td>JM-NAT (Guo et al., 2020) (n =3)</td><td>4</td><td></td><td></td><td>27.05 31.51</td></tr><tr><td>JM-NAT (Guo et al., 2020) (n = 3)</td><td>10</td><td></td><td>27.69</td><td>32.54</td></tr><tr><td>SMART (Ghazvininejad et al., 2020) (n =5)</td><td>4</td><td></td><td></td><td>27.03 30.87</td></tr><tr><td>SMART (Ghazvininejad et al., 2020) (n =5)</td><td>10</td><td>■</td><td></td><td>27.65 31.27</td></tr><tr><td>Imputer (Saharia et al., 2020) (n =1)</td><td>4</td><td>24.7</td><td></td><td>28.0 31.0</td></tr><tr><td>Imputer (Saharia et al.,2020) (n = 1)</td><td>8</td><td>25.2</td><td>28.2</td><td>31.3</td></tr><tr><td>SUNDAE (ours 63M)</td><td></td><td></td><td></td><td></td></tr><tr><td>Deterministic (n=16)</td><td>4</td><td>25.01</td><td>29.53</td><td>28.33 32.25</td></tr><tr><td>Deterministic (n=16)</td><td>8</td><td>25.53</td><td>30.01</td><td>28.32 32.27</td></tr><tr><td>Deterministic (n =16)</td><td>10</td><td>25.54</td><td>30.11</td><td>28.32 32.27</td></tr><tr><td>Stochastic (n=16)</td><td>4</td><td>23.05</td><td>28.13</td><td>27.94 32.10</td></tr><tr><td>Stochastic (n=16)</td><td>8</td><td>26.08</td><td>30.48</td><td>28.23 32.33</td></tr><tr><td>Stochastic (n=16)</td><td>10</td><td>26.25</td><td>30.80</td><td>28.33 32.29</td></tr><tr><td>Stochastic (n=16)</td><td>16</td><td>26.24</td><td>30.76</td><td>28.46 32.30</td></tr></table>
|
| 81 |
+
|
| 82 |
+
• Argmax-unrolled decoding. At the limit $\tau 0$ sampling with temperature reduces to deterministic argmax decoding where the most probable token is chosen at each step. Relatedly to our unrolled logits loss, we modify this strategy by resampling the low-certainty tokens in accordance with unrolled logits. This heuristic allowed further improvements to sampling speed while maintaining the high quality of the samples. We discuss it in detail in Section 3.1.
|
| 83 |
+
|
| 84 |
+
• Updating fewer tokens. In tasks where diversity is paramount (like unconditional text generation), we found that updating a random subset of tokens at each decoding step leads to faster convergence. This likely happens because independent sampling of all tokens might create uncoordinated changes which could take some time to fix in the subsequent steps. We use this strategy in Section 3.2.
|
| 85 |
+
|
| 86 |
+
# 3 EXPERIMENTS
|
| 87 |
+
|
| 88 |
+
# 3.1 MACHINE TRANSLATION
|
| 89 |
+
|
| 90 |
+
We first evaluate SUNDAE on Machine Translation (MT) benchmarks. We compare SUNDAE against AR and non-AR models in terms of the translation quality using BLEU (Papineni et al., 2002) as the metric. We demonstrate that without using techniques like sequence-level knowledge distillation (Kim & Rush, 2016), SUNDAE performs almost as well as the AR model and outperforms all other methods that do not rely on AR models.
|
| 91 |
+
|
| 92 |
+
Target Length Prediction. Unlike their AR counterparts, non-AR models do not explicitly learn to predict an end of sequence, but instead have been shown to benefit from auxiliary target length prediction (Lee et al., 2018; Ghazvininejad et al., 2019; Kasai et al., 2020). A common approach is to treat it as a classification task, predicting either the exact length or the difference between the source and target lengths. The decoding process has to commit to the predicted length, and often multiple length beams are used to get the best translation results. In our models, we use a separate network that receives source encodings as input and predicts corresponding target length. Target length embedding vector is prepended to source embeddings so that decoder can attend to it. During training, we use the reference target length, while at sampling, a predicted one, although the model does not need to fully commit to the predicted length like some previous non-AR models (Saharia et al., 2020). Note that the length classification loss does not affect the encoder parameters. Our models are also trained to predict the padding tokens at the end of the text. For more details, see Appendix B.
|
| 93 |
+
|
| 94 |
+
Experiment Settings. We conduct experiments on WMT’14 parallel corpora using $\mathrm { E N } { } \mathrm { D E }$ (4.5M pairs) and $\operatorname { E N } { } \operatorname { F R }$ (36M pairs) translation tasks. The raw texts are encoded using BPE (Sennrich et al., 2015) as the subword units, and we use the same preprocessed data as in Vaswani et al. (2017) for fair comparisons. We evaluate the performance by measuring BLEU (Papineni et al., 2002; Post, 2018) on the test split of each translation $\mathrm { t a s k } ^ { 2 }$ . We use the encoder-decoder Transformer architecture for MT (Vaswani et al., 2017), but remove the causality masking in the decoder. There are 6 attention layers for both encoder and decoder, 8 attention heads, 512 model dimension and 2048 feedforward hidden dimension. The total number of parameters is 63M including the target length prediction module described in 3.1. We use dropout $( p = 0 . 1 )$ ) and label smoothing $\epsilon = 0 . 1 $ ) during training for all tasks, except for AR-distilled $\mathrm { E N } { } \mathrm { D E }$ , where we found lower dropout $\scriptstyle ( p = 0 . 0 5 )$ and no label smoothing produces better results on validation. The training batch size is 4096, and we use Adam (Kingma & Ba, 2014) with $\beta _ { 1 } = 0 . 9$ , $\beta _ { 2 } = 0 . 9 9 9$ , $\epsilon = 1 0 ^ { - 6 }$ and weight decay of 0.1 (Loshchilov & Hutter, 2017). We warm up the learning rate from $1 0 ^ { - 7 }$ to $1 0 ^ { - 4 }$ in the first 5K steps and decay it to $1 0 ^ { - 5 }$ using cosine annealing (Loshchilov & Hutter, 2016). Our models were trained for $1 0 ^ { 6 }$ steps using 16 TPU accelerators using bfloat16 precision. We crop sequences that have more than 128 tokens (this occurs less than $0 . 2 \%$ in training data). Finally, we average the last 10 checkpoints to obtain a single model for the evaluation. All hyperparameter tuning is performed on a held-out validation set.
|
| 95 |
+
|
| 96 |
+
Decoding. We decode translations from SUNDAE using two different types of heuristic decoding methods in MT experiments. The decoding process always begins with an array of random integers sampled from the discrete uniform prior $y _ { 0 } \sim p _ { 0 }$ , while the encoder input - the source sentence - remains the same throughout the process. The first decoding method is low-temperature sampling, where we iteratively sample $\pmb { y } _ { t } \sim f _ { \theta } ^ { \tau } ( \cdot | \pmb { y } _ { t - 1 } )$ for $T$ iterations (with the decoder output logits divided by $\tau$ , see Section 2.2), with $T \leq 1 6$ and $\tau \in [ 0 . 1 , 0 . 6 ]$ determined based on the validation performance. The second method is argmax-unrolled decoding, which requires a smaller number of iterations compared to its stochastic counterpart. In argmax-unrolled decoding, we first compute the logits $\lambda _ { 1 } = f _ { \theta } ( \cdot | \pmb { y } _ { 0 } )$ of the initial sample array $\mathbf { { \boldsymbol { { y } } } _ { 0 } }$ and obtain the samples $\mathbf { \nabla } _ { \mathbf { \eta } _ { \mathbf { 3 } } } \mathbf { \eta } _ { \mathbf { 1 } }$ , pass a tuple $( \pmb { y } _ { 1 } , \lambda _ { 1 } )$ to the next iteration. At each step $t \geq 2$ , the method finds top- $\boldsymbol { \rho }$ share of the tokens that are sorted by the log-probability in descending order (i.e. uncertain tokens) from $\lambda _ { t - 1 }$ , where $\rho \in [ 0 . 1 , 0 . 6 ]$ is another hyperparameter searched for in the validation stage. We compute unrolled logits for those top- $\rho$ tokens and then apply arg max to obtain unrolled tokens. For the rest of the input tokens of $\mathbf { \nabla } _ { \mathbf { y } _ { t - 1 } }$ we compute logits once and obtain $\begin{array} { r } { \lambda _ { t } ~ = ~ f _ { \theta } ( \cdot | \pmb { y } _ { t - 1 } ) } \end{array}$ and then apply arg max to obtain predicted tokens. Finally, we combine unrolled tokens for uncertain input positions with predicted tokens for remaining positions to obtain ${ \mathbf { } } _ { \mathbf { } } \mathbf { \mathbf { } } _ { \mathbf { } } \mathbf { \mathbf { } } _ { \mathbf { } } \mathbf { \mathbf { } } _ { \mathbf { } } \mathbf { \mathbf { } } _ { \mathbf { } } \mathbf { \mathbf { } } _ { \mathbf { } } \mathbf { \mathbf { } } _ { \mathbf { } } \mathbf { \mathbf { } } _ { \mathbf { } } \mathbf { \Xi } _ { \mathbf { } } \mathbf { \Lambda } _ { \mathbf { } } \mathbf { \Lambda } _ { \mathbf { } } \textbf { } _ { \mathbf { } } \textbf { } \textbf { } _ { \mathrm { } }$ , and the tuple $( \pmb { y } _ { t } , \lambda _ { t } )$ is provided as the input to the next iteration. This procedure is repeated over a fixed number of iterations $T$ . We always decode $n$ samples in parallel and rerank them based on the model score. We show the relative speed gain of SUNDAE in Table 2, the Transformer base is used as the AR baseline, for which we perform incremental sampling by caching the previous attention states.
|
| 97 |
+
|
| 98 |
+
Baselines. We compare SUNDAE with Transformer base (Vaswani et al., 2017) as the AR baseline and several non-AR models including CMLM (Ghazvininejad et al., 2019) and DisCo (Kasai et al., 2020). The last two are both iterative non-AR models that share a substantial amount of common ground with SUNDAE. However, their best results come from the variants distilled from Transformer large (Vaswani et al., 2017), with only few test results available without distillation. As we aim to remove any kinds of dependencies on AR approaches, we would like to make a distinction
|
| 99 |
+
|
| 100 |
+

|
| 101 |
+
Figure 2: BLEU scores on EMNLP2017 News. Left is better, lower is better. Quality/variation is controlled by changing the temperature.
|
| 102 |
+
|
| 103 |
+
<table><tr><td>Steps (T)</td><td>Relative Speed Improvement</td></tr><tr><td>4</td><td>4.7x</td></tr><tr><td>8</td><td>2.6x</td></tr><tr><td>10</td><td>2.2x</td></tr><tr><td>16</td><td>1.4x</td></tr></table>
|
| 104 |
+
|
| 105 |
+
Table 2: Relative speed gain of SUNDAE over AR Transformer base (greedy decoding) on WMT’14 EN DE validation set.
|
| 106 |
+
|
| 107 |
+
between raw, fully-non-AR models, and AR-distilled ones, i.e. those trained via distillation from large AR teachers (which typically perform better than the student models), or via AR reranking.
|
| 108 |
+
|
| 109 |
+
Results and Ablation Studies. In Table 1, we show test BLEU scores from SUNDAE and other baselines. On E $\mathrm { \Gamma } \to \mathrm { D E }$ , SUNDAE achieved 26.25 BLEU, and it performed the best among the raw non-AR models. To the best of our knowledge, SUNDAE achieved the closest result ( $\triangle = 1 . 0 5 )$ ) to the score of Transformer base (Vaswani et al., 2017) without the aid of AR models.3 In the raw setting, argmax-unrolled decoding outperforms mask-predict (Ghazvininejad et al., 2019) and easyfirst (Kasai et al., 2020) by 0.74 BLEU when using the same amount of the worst-case compute budget. At $T = 8$ , SUNDAE performs better than Imputer (Saharia et al., 2020), which is a strong baseline that can generate high-quality translation within few (4-8) iterations. We discovered that as $T$ increases, low-temperature sampling outperforms argmax-unrolled decoding, and at $T = 1 0$ , lowtemperature sampling outperforms Mask-Predict (Ghazvininejad et al., 2019) and Easy-First (Kasai et al., 2020) by 1.5 BLEU score. SUNDAE achieved 30.80 BLEU on $\mathrm { D E } { } \mathrm { E N }$ , where there are not that many raw baselines to compare with. The difference between SUNDAE and the AR baseline on $) \mathrm { E } { } \mathrm { E N }$ is 0.98. Finally, SUNDAE achieved 37.53 BLEU on $\operatorname { E N } { } \operatorname { F R }$ at $T = 1 0$ , while the Transformer base (Vaswani et al., 2017) reported 38.1 BLEU on this task. Thus, SUNDAE without distillation is only 0.57 BLEU behind the standard AR baseline on EN FR. We present more details on $\operatorname { E N } { } \operatorname { F R }$ scores in Table 7 in Appendix G.
|
| 110 |
+
|
| 111 |
+
While knowledge distillation was outside our main focus, we also report scores for AR-distilled SUNDAE.4 It again performed well, establishing new SotA on $\mathrm { E N } { } \mathrm { D E }$ translation among AR– distilled models, and being second only to JM-NAT (Guo et al., 2020) in DE EN task.
|
| 112 |
+
|
| 113 |
+
We ablate the number of steps of unrolled denoising on $\mathrm { E N } { } \mathrm { D E }$ test split. We observe that having at least one unrolled denoising step is crucial to obtain good performance in translation. With only the $L ^ { ( 1 ) }$ loss, SUNDAE achieves 11.19 BLEU, whereas using $L ^ { ( 1 : 2 ) }$ , the score improves to 26.57 BLEU. Using $L ^ { ( 1 : 3 ) }$ , i.e. averaging more unrolled denoising loss terms, did not improve the performance further, scoring 26.25 BLEU. The target length prediction also turned out to be an important component of our model: without it, the translation performance degrades on average by 2 BLEU score points on EN DE (see Appendix C). Finally, we qualitatively show how translation improves along the sampling steps by elimination of incoherent/repeated tokens in Table 5 in Appendix E.
|
| 114 |
+
|
| 115 |
+
# 3.2 TEXT GENERATION
|
| 116 |
+
|
| 117 |
+
Unconditional Text Generation (Qualitative). We train our method on a large high-quality publicly available Colossal Clean Common Crawl (C4) dataset (Raffel et al., 2019) to demonstrate samples. We tokenize the data using SentencePiece (Kudo & Richardson, 2018) 5 with vocabulary size 32K and train on randomly cropped sequences of length 32. The network is the same as the Transformer decoder part for MT in Section 3.1 but is much larger — 335M parameters: 24 layers,
|
| 118 |
+
|
| 119 |
+
Table 3: Inpainting from our model trained on C4 (cherry-picked).
|
| 120 |
+
|
| 121 |
+
<table><tr><td></td><td>IndexType</td><td>Text</td></tr><tr><td rowspan="2">1</td><td>Prompt</td><td>Seeing****** for any visitor toa national park.While it is an exciting moment,a bear can*******</td></tr><tr><td>Completion</td><td>Seingabigbearisamustforanyvisitortoaationalpark.Whileitisanexcitingmoment,abearcanbeintimidatingasitilome</td></tr><tr><td rowspan="2">2</td><td>Prompt</td><td>Seeing****** for any visitor toa national park.While it is an exciting moment,a moose can******</td></tr><tr><td>Completion</td><td>SeingmooseisqeeerecefoiottioalarkWileitieciigontooeaigateisaogot</td></tr></table>
|
| 122 |
+
|
| 123 |
+
1024 embedding size, 4096 hidden size, 16 attention heads. Same as in the MT setup, we remove the causal mask since our model is non-autoregressive. We train up to 400K steps with Adam optimizer with batch size 4096 and use cosine annealing for scheduling the learning rate with minimum $1 0 ^ { - 5 }$ , maximum $2 * 1 0 ^ { - 3 }$ and linear warm-up of 10K steps from starting value of $1 0 ^ { - 7 }$ .
|
| 124 |
+
|
| 125 |
+
The trained model is then used for unconditional sampling. Starting with 32 random tokens, we iteratively perform up to 1K steps from our model, stopping earlier if samples do not change anymore. To make convergence faster, we use temperature 0.8 and update only $3 0 \%$ of all tokens at each step, chosen randomly — as explained in Section 2.2. We show 10 non-cherry-picked samples from our model in Table 8 of Appendix H. Of those samples, all but one resemble reasonable internet texts.
|
| 126 |
+
|
| 127 |
+
Unconditional Text Generation (Quantitative). While C4 is one of the largest high-quality datasets publicly available, it does not have an established benchmark among non-AR methods. To quantitatively evaluate our algorithm, we train it on the EMNLP2017 News6 dataset, which has numerous text GAN baselines, including a strong ScratchGAN method (d’Autume et al., 2019). We also compare to several other baselines reported in (d’Autume et al., 2019; Caccia et al., 2020): SeqGAN (Yu et al., 2017), LeakGAN (Guo et al., 2017), RankGAN (Lin et al., 2017), MaliGAN (Che et al., 2017) and autoregressive (AR) language models.
|
| 128 |
+
|
| 129 |
+
We use the same architecture and optimizer as in qualitative experiments and train with batch size 1024 for 8K steps (chosen to achieve the lowest validation loss). We follow the same tokenization strategy as d’Autume et al. (2019), with vocabulary size of 5.7K and maximum length 52 tokens, padding shorter sequences to this maximum length. During sampling, we perform 1K steps and update all the tokens at each step (which we found beneficial for the chosen metrics). The quality/- variation trade-off is controlled by changing the sampling temperature in the range [0.1, 2.0], using 60 values overall. For every temperature, we sample 10K texts for evaluating quality and another 10K texts for evaluating diversity, as done by d’Autume et al. (2019).
|
| 130 |
+
|
| 131 |
+
The results are shown in Figure 2. SUNDAE demonstrates good quality/variation trade-off, as measured by BLEU/self-BLEU metrics, outperforming 4 out of 5 GAN baselines, and competing with ScratchGAN and AR model. In the higher quality region, SUNDAE outperforms ScratchGAN, while in higher diversity region it slightly underperforms. The advantage of ScratchGAN in higher diversity region could be explained by its autoregressive decoding (it is a hybrid between AR and GAN). Interestingly, the curve for SUNDAE has a more complicated shape than the baselines — possibly because of its Markov Chain sampling, which can empirically exhibit something akin to “phase transitions”. We show samples from SUNDAE in Table 9 of Appendix I.
|
| 132 |
+
|
| 133 |
+
Text In-painting. The non-autoregressive nature of our model opens up possibilities beyond leftto-right prompted generation, such as filling in arbitrary blank patterns in a template. In this section, we qualitatively investigate this new capability, using the C4-trained model described in previous sections, and another one, trained on a dataset of Python code from GitHub. All the architecture/training settings remain the same, except we train twice longer: up to 800K steps. Sampling settings are also the same, except we update all the tokens at each step as diversity is less of an issue with stronger conditioning. We construct the code dataset by extracting files ending in .py from open source GitHub repositories with licenses that are one of apache-2.0, mit, bsd-3-clause, bsd-2-clause, unlicense, $\mathtt { C C } 0 - 1 . 0 ,$ , isc, artistic-2.0. We perform document level de-duplication checking for exact matches.
|
| 134 |
+
|
| 135 |
+
For the C4 dataset, we present a model with a particular type of prompt [CTX1][MSK1][CTX2][MSK2], where [CTX] stands for “context” and [MSK] for “masked”, in Table 3, which shows how information can be “teleported” from arbitrary location to another arbitrary location, while taking into account bidirectional context. We change a species of the animal in [CTX2] and observe that the model actually uses the right word while in-painting [MSK1] and plausibly continues [MSK2] according to the species. This kind of task would be impossible to perform for an AR model: with left-to-right causality it would be unable to correctly guess the name of the animal, while with a right-to-left one it would have to start filling [MSK2] tokens first, so it would just ignore the conditioning. By contrast, our model succeeds in this task.
|
| 136 |
+
|
| 137 |
+
Table 4: Inpainting from our model trained on GitHub (cherry-picked).
|
| 138 |
+
|
| 139 |
+
<table><tr><td>Index</td><td>Type</td><td>Text</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>1</td><td>Prompt</td><td></td><td></td><td>def trunc_len(x,t):</td><td></td><td></td><td>★★*★★*★*★******</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>return min(n,t)</td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>Completion</td><td></td><td></td><td>n = len(x)</td><td>def trunc_len(x,t):</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td>return min(n,t)</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>2</td><td>Prompt</td><td></td><td></td><td></td><td>is_even = lambda x:</td><td></td><td></td><td></td><td>**★**★</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td>is_odd = lambda x:</td><td></td><td></td><td></td><td></td><td>not******</td><td></td><td></td><td></td><td>#</td><td>reuse</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>Completion</td><td>is_odd = lambda x:</td><td></td><td></td><td>is_even = lambda x:</td><td></td><td></td><td></td><td>x%2==0 not is_even(x)</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr></table>
|
| 140 |
+
|
| 141 |
+
For GitHub Python data, we use two different kinds of prompts for our model in Table 4: [CTX1][MSK1][CTX2] and [CTX1][MSK1][CTX2][MSK2][CTX3]. In the first example, our model guesses that n should be the length of the input sequence and correctly in-paints [MSK1] region. This would again be impossible to do for AR models. Looking from left-to-right, it is impossible to guess that n will be the name of the length variable and t is meant to be a threshold. Looking from right-to-left, it is unclear what variables n and t represent and what is the function being computed. Only a bidirectional model can perform well in this task. In the second example, our model correctly follows the suggestion to reuse the function which it also has to in-paint.
|
| 142 |
+
|
| 143 |
+
# 4 RELATED WORK
|
| 144 |
+
|
| 145 |
+
In this section we provide an overview of generative models, focusing on applications in text domain.
|
| 146 |
+
|
| 147 |
+
# 4.1 AUTOREGRESSIVE MODELS
|
| 148 |
+
|
| 149 |
+
Early attempts to perform autoregressive modelling of text using neural networks began with Bengio et al. (2003); later Sutskever et al. (2011) extended this approach with RNNs. Since then, improvements in neural network architecture, such as the Transformer (Vaswani et al., 2017), and scaling up as with GPT-3 (Brown et al., 2020) dramatically improved the performance of AR models. While the architectures evolved, the loss function remained the same with minor modifications.
|
| 150 |
+
|
| 151 |
+
Insertion (Stern et al., 2019) and Levenshtein (Gu et al., 2019) Transformers are deviations from the standard paradigm of training and could potentially overcome some of AR problems. However, in the parallel decoding regime, they have to rely on AR distillation for obtaining competitive results.
|
| 152 |
+
|
| 153 |
+
# 4.2 NON-AUTOREGRESSIVE MODELS IN GENERAL
|
| 154 |
+
|
| 155 |
+
Non-autoregressive models evolved in parallel with autoregressive ones but have so far struggled to address the same spectrum of tasks with the same quality as AR models.
|
| 156 |
+
|
| 157 |
+
Diffusion for generative models was originally introduced by Sohl-Dickstein et al. (2015). Recently Ho et al. (2020) proposed a different parametrization: instead of modeling one-step transitions, one could instead model $p ( x _ { 0 } | x _ { t } )$ and later convert those to $p ( x _ { t - 1 } | x _ { t } )$ by probabilistic reasoning. This was recently up-scaled for image modeling by Nichol & Dhariwal (2021) and extended to continuous time by Song et al. (2020). In terms of applications to text generation, two recent works addressed this: Hoogeboom et al. (2021) and Austin et al. (2021). Likelihoods obtained in those works are promising, but still behind AR and lacking sample quality as well.
|
| 158 |
+
|
| 159 |
+
Some diffusion works like Mittal et al. (2021) also approached modeling discrete sequences in another way: first encode sequences with a VAE into a continuous space and then apply continuous diffusion approaches commonly used for image generation.
|
| 160 |
+
|
| 161 |
+
Variational Autoencoders (VAEs) were proposed by Rezende et al. (2014) and Kingma & Welling (2013) as a likelihood-based extension of autoencoders. Application of such methods to text has been problematic empirically: as it was first noted in Bowman et al. (2015), good results come from using a strong AR decoder instead of a simple factorised one, but the latents are often ignored — which was named “posterior collapse problem”. This problem was later tackled by Delta-VAEs (Razavi et al., 2019), with limited success in the text domain (Bosc & Vincent, 2020).
|
| 162 |
+
|
| 163 |
+
Normalising Flows (Dinh et al., 2014; Rezende & Mohamed, 2015; Dinh et al., 2016) are another prominent family of generative models, originally proposed for real-valued data and recently revisited for text generation by Hoogeboom et al. (2021). While conceptually interesting, the text samples of such methods lack in fidelity.
|
| 164 |
+
|
| 165 |
+
Generative Adversarial Networks (GANs) were originally introduced by Goodfellow et al. (2014) and remain one of the dominant methods for image generation. They were later adapted to text generation in Yu et al. (2017); Guo et al. (2017); Lin et al. (2017); Che et al. (2017). However, text generation with such methods is still a challenge, with a more recent ScratchGAN (d’Autume et al., 2019) showing relatively low-quality samples. At least part of the problem with applying GANs to text generation comes from non-differentiability of discrete text samples, which requires usage of zeroth order optimization methods.
|
| 166 |
+
|
| 167 |
+
Energy-Based models have a long history dating back to Hopfield (1982); Hinton (2002); LeCun et al. (2006); Ranzato et al. (2007). Recently, Deng et al. (2020) shows promising results for text.
|
| 168 |
+
|
| 169 |
+
# 4.3 NON-AUTOREGRESSIVE MODELS FOR MACHINE TRANSLATION
|
| 170 |
+
|
| 171 |
+
There have been many attempts to apply non-autoregressive methods to machine translation. Latent transformer (Kaiser et al., 2018) generated latent variables autoregressively and then decoded feedforwardly. NAT (Gu et al., 2017) was the first to characterize a problem with non-autoregressive generation — “multi-modality”. FlowSeq (Ma et al., 2019) applied Normalising Flows to machine translation. LVM-DAEs (Lee et al., 2018) are perhaps most related to our method, but these models do not have unrolled denoising and their decoding method is deterministic. The leading methods in this area are CMLM (Ghazvininejad et al., 2019) and DisCo (Kasai et al., 2020). While conceptually similar to LVM-DAEs (Lee et al., 2018), these works have introduced significant improvements to the training and decoding procedure, and, as a result, shown strong competition to AR methods. Both of them also do not have unrolled denoising and sampling like we do, but they are still powerful baselines. Later, there were attempts to combine CMLM with local AR (Kong et al., 2020). Perhaps the most related to our work is the SMART (Ghazvininejad et al., 2020) follow-up of the CMLM. However, this method is not probabilistic and it does not show unconditional generation capabilities. Finally, a recent line of work called Imputer (Chan et al., 2020; Saharia et al., 2020) achieves strong results in machine translation by aligning target to source via dynamic programming.
|
| 172 |
+
|
| 173 |
+
# 4.4 DENOISING OBJECTIVE IN GENERAL
|
| 174 |
+
|
| 175 |
+
With the advent of BERT (Devlin et al., 2018), the denoising objective became very popular for text representation learning. The original idea was later simplified in RoBERTa (Liu et al., 2019) by removing the unnecessary next-sentence-prediction task and only retaining the denoising task (the cloze task). This is similar to our work, however, we do not apply masking to corrupt the input tokens, and instead only switch them to random ones. More importantly, RoBERTa does not use unrolled denoising. Another work, Electra (Clark et al., 2020a), deals with the same kind of corruption that we use, but instead of predicting the original token before the corruption, Electra predicts whether it was corrupted or not. Electric (Clark et al., 2020b) does not perform masking, but instead uses noise-contrastive loss to learn a representation of text. BART (Lewis et al., 2019) uses both BERT-style denoising and autoregressive modeling for learning representations. All of these methods were originally motivated by improving representation learning of text. There were a few attempts to heuristically decode models like BERT and turn them into text generative models such as in Wang & Cho (2019), however, samples from these models lack coherence.
|
| 176 |
+
|
| 177 |
+
# 5 CONCLUSION
|
| 178 |
+
|
| 179 |
+
In this paper we have proposed a novel non-autoregressive method that operates within the framework of denoising autoencoders and, crucially, unrolls the denoising process during training. Unrolled denoising allows us to achieve state-of-the art results in WMT’14 English-to-German translation task amongst non-AR methods (without distillation from large AR models) and good qualitative results in unconditional text modeling on C4 dataset. We have also qualitatively demonstrated new inpainting capabilities on C4 and GitHub Python data, which opens up new avenues for creative text editing where a human could more naturally collaborate with a machine on writing and even programming.
|
| 180 |
+
|
| 181 |
+
# AUTHOR CONTRIBUTIONS
|
| 182 |
+
|
| 183 |
+
Nikolay Savinov came up with the idea of unrolled denoising, wrote the first prototype of unconditional generation, contributed to the machine translation codebase and co-led the project. Junyoung Chung wrote most of the machine translation codebase, came up with the length prediction conditioning, suggested argmax-unrolled decoding and co-led the project. Mikołaj Binkowski came ´ up with theoretical insights about our model, wrote most of the evaluation codebase, implemented model improvements and co-led the project. All three first authors contributed equally to writing the paper. Erich Elsen gave high-level scientific guidance, suggested text in-painting experiments and made substantial edits to the paper draft. Aaron van den Oord originally suggested to look into de- ¨ noising generative models for text, gave high-level scientific guidance, proposed machine translation experiments and made substantial edits to the paper draft.
|
| 184 |
+
|
| 185 |
+
# ACKNOWLEDGMENTS
|
| 186 |
+
|
| 187 |
+
We would like to thank Jean-Baptiste Alayrac and Miruna Pˆıslar for valuable discussions on the machine translation experiments, William Chan and Chitwan Saharia for sharing distilled translation datasets, Mihaela Rosca and Cyprien de Masson d’Autume for sharing text GAN evaluation code, Yujia Li and Jack Rae for sharing a dataset of Python code from GitHub, Sander Dieleman and Oriol Vinyals for in-depth feedback about our work, Jungo Kasai for responses to our questions about DisCo, Dani Yogatama for sharing knowledge on machine translation evaluation, and Jeff Donahue for feedback and discussions.
|
| 188 |
+
|
| 189 |
+
# REFERENCES
|
| 190 |
+
|
| 191 |
+
Jacob Austin, Daniel Johnson, Jonathan Ho, Danny Tarlow, and Rianne van den Berg. Structured denoising diffusion models in discrete state-spaces. arXiv preprint arXiv:2107.03006, 2021.
|
| 192 |
+
|
| 193 |
+
Yoshua Bengio, Rejean Ducharme, Pascal Vincent, and Christian Janvin. A neural probabilistic ´ language model. The journal of machine learning research, 3:1137–1155, 2003.
|
| 194 |
+
|
| 195 |
+
Tom Bosc and Pascal Vincent. Do sequence-to-sequence vaes learn global features of sentences? arXiv preprint arXiv:2004.07683, 2020.
|
| 196 |
+
|
| 197 |
+
Samuel R Bowman, Luke Vilnis, Oriol Vinyals, Andrew M Dai, Rafal Jozefowicz, and Samy Bengio. Generating sentences from a continuous space. arXiv preprint arXiv:1511.06349, 2015.
|
| 198 |
+
|
| 199 |
+
Tom B Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. arXiv preprint arXiv:2005.14165, 2020.
|
| 200 |
+
|
| 201 |
+
Massimo Caccia, Lucas Caccia, William Fedus, Hugo Larochelle, Joelle Pineau, and Laurent Charlin. Language gans falling short. In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net, 2020. URL https://openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ BJgza6VtPB.
|
| 202 |
+
|
| 203 |
+
William Chan, Chitwan Saharia, Geoffrey Hinton, Mohammad Norouzi, and Navdeep Jaitly. Imputer: Sequence modelling via imputation and dynamic programming. In International Conference on Machine Learning, pp. 1403–1413. PMLR, 2020.
|
| 204 |
+
|
| 205 |
+
Tong Che, Yanran Li, Ruixiang Zhang, R Devon Hjelm, Wenjie Li, Yangqiu Song, and Yoshua Bengio. Maximum-likelihood augmented discrete generative adversarial networks. arXiv preprint arXiv:1702.07983, 2017.
|
| 206 |
+
|
| 207 |
+
Ciprian Chelba, Tomas Mikolov, Mike Schuster, Qi Ge, Thorsten Brants, and Phillipp Koehn. One billion word benchmark for measuring progress in statistical language modeling. CoRR, abs/1312.3005, 2013. URL http://arxiv.org/abs/1312.3005.
|
| 208 |
+
|
| 209 |
+
Kevin Clark, Minh-Thang Luong, Quoc V Le, and Christopher D Manning. Electra: Pre-training text encoders as discriminators rather than generators. arXiv preprint arXiv:2003.10555, 2020a.
|
| 210 |
+
|
| 211 |
+
Kevin Clark, Minh-Thang Luong, Quoc V Le, and Christopher D Manning. Pre-training transformers as energy-based cloze models. arXiv preprint arXiv:2012.08561, 2020b.
|
| 212 |
+
|
| 213 |
+
Cyprien de Masson d’Autume, Mihaela Rosca, Jack Rae, and Shakir Mohamed. Training language gans from scratch. arXiv preprint arXiv:1905.09922, 2019.
|
| 214 |
+
|
| 215 |
+
Yuntian Deng, Anton Bakhtin, Myle Ott, Arthur Szlam, and Marc’Aurelio Ranzato. Residual energy-based models for text generation. arXiv preprint arXiv:2004.11714, 2020.
|
| 216 |
+
|
| 217 |
+
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018.
|
| 218 |
+
|
| 219 |
+
Laurent Dinh, David Krueger, and Yoshua Bengio. Nice: Non-linear independent components estimation. arXiv preprint arXiv:1410.8516, 2014.
|
| 220 |
+
|
| 221 |
+
Laurent Dinh, Jascha Sohl-Dickstein, and Samy Bengio. Density estimation using real nvp. arXiv preprint arXiv:1605.08803, 2016.
|
| 222 |
+
|
| 223 |
+
Marjan Ghazvininejad, Omer Levy, Yinhan Liu, and Luke Zettlemoyer. Mask-predict: Parallel decoding of conditional masked language models. arXiv preprint arXiv:1904.09324, 2019.
|
| 224 |
+
|
| 225 |
+
Marjan Ghazvininejad, Omer Levy, and Luke Zettlemoyer. Semi-autoregressive training improves mask-predict decoding. arXiv preprint arXiv:2001.08785, 2020.
|
| 226 |
+
|
| 227 |
+
Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. Advances in neural information processing systems, 27, 2014.
|
| 228 |
+
|
| 229 |
+
Jiatao Gu, James Bradbury, Caiming Xiong, Victor OK Li, and Richard Socher. Non-autoregressive neural machine translation. arXiv preprint arXiv:1711.02281, 2017.
|
| 230 |
+
|
| 231 |
+
Jiatao Gu, Changhan Wang, and Jake Zhao. Levenshtein transformer. arXiv preprint arXiv:1905.11006, 2019.
|
| 232 |
+
|
| 233 |
+
Jiaxian Guo, Sidi Lu, Han Cai, Weinan Zhang, Yong Yu, and Jun Wang. Long text generation via adversarial training with leaked information. arxiv e-prints, art. arXiv preprint arXiv:1709.08624, 2017.
|
| 234 |
+
|
| 235 |
+
Junliang Guo, Linli Xu, and Enhong Chen. Jointly masked sequence-to-sequence model for nonautoregressive neural machine translation. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pp. 376–385, 2020.
|
| 236 |
+
|
| 237 |
+
Geoffrey E Hinton. Training products of experts by minimizing contrastive divergence. Neural computation, 14(8):1771–1800, 2002.
|
| 238 |
+
|
| 239 |
+
Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. arXiv preprint arXiv:2006.11239, 2020.
|
| 240 |
+
|
| 241 |
+
Emiel Hoogeboom, Didrik Nielsen, Priyank Jaini, Patrick Forre, and Max Welling. Argmax ´ flows and multinomial diffusion: Towards non-autoregressive language models. arXiv preprint arXiv:2102.05379, 2021.
|
| 242 |
+
|
| 243 |
+
John J Hopfield. Neural networks and physical systems with emergent collective computational abilities. Proceedings of the national academy of sciences, 79(8):2554–2558, 1982.
|
| 244 |
+
|
| 245 |
+
Lukasz Kaiser, Samy Bengio, Aurko Roy, Ashish Vaswani, Niki Parmar, Jakob Uszkoreit, and Noam Shazeer. Fast decoding in sequence models using discrete latent variables. In International Conference on Machine Learning, pp. 2390–2399. PMLR, 2018.
|
| 246 |
+
|
| 247 |
+
Jungo Kasai, James Cross, Marjan Ghazvininejad, and Jiatao Gu. Non-autoregressive machine translation with disentangled context transformer. In International Conference on Machine Learning, pp. 5144–5155. PMLR, 2020.
|
| 248 |
+
|
| 249 |
+
Yoon Kim and Alexander M Rush. Sequence-level knowledge distillation. arXiv preprint arXiv:1606.07947, 2016.
|
| 250 |
+
|
| 251 |
+
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
|
| 252 |
+
Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013.
|
| 253 |
+
Xiang Kong, Zhisong Zhang, and Eduard Hovy. Incorporating a local translation mechanism into non-autoregressive translation. arXiv preprint arXiv:2011.06132, 2020.
|
| 254 |
+
Taku Kudo and John Richardson. Sentencepiece: A simple and language independent subword tokenizer and detokenizer for neural text processing. arXiv preprint arXiv:1808.06226, 2018.
|
| 255 |
+
Yann LeCun, Sumit Chopra, Raia Hadsell, M Ranzato, and F Huang. A tutorial on energy-based learning. Predicting structured data, 1(0), 2006.
|
| 256 |
+
Jason Lee, Elman Mansimov, and Kyunghyun Cho. Deterministic non-autoregressive neural sequence modeling by iterative refinement. arXiv preprint arXiv:1802.06901, 2018.
|
| 257 |
+
Jason Lee, Raphael Shu, and Kyunghyun Cho. Iterative refinement in the continuous space for non-autoregressive neural machine translation. arXiv preprint arXiv:2009.07177, 2020.
|
| 258 |
+
Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Ves Stoyanov, and Luke Zettlemoyer. Bart: Denoising sequence-to-sequence pretraining for natural language generation, translation, and comprehension. arXiv preprint arXiv:1910.13461, 2019.
|
| 259 |
+
Zhuohan Li, Zi Lin, Di He, Fei Tian, Tao Qin, Liwei Wang, and Tie-Yan Liu. Hint-based training for non-autoregressive machine translation. arXiv preprint arXiv:1909.06708, 2019.
|
| 260 |
+
Kevin Lin, Dianqi Li, Xiaodong He, Zhengyou Zhang, and Ming-Ting Sun. Adversarial ranking for language generation. arXiv preprint arXiv:1705.11001, 2017.
|
| 261 |
+
Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692, 2019.
|
| 262 |
+
Ilya Loshchilov and Frank Hutter. Sgdr: Stochastic gradient descent with warm restarts. arXiv preprint arXiv:1608.03983, 2016.
|
| 263 |
+
Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. arXiv preprint arXiv:1711.05101, 2017.
|
| 264 |
+
Xuezhe Ma, Chunting Zhou, Xian Li, Graham Neubig, and Eduard Hovy. Flowseq: Non-autoregressive conditional sequence generation with generative flow. arXiv preprint arXiv:1909.02480, 2019.
|
| 265 |
+
Matt Mahoney. Text 8 dataset. http://mattmahoney.net/dc/textdata, 2011. Accessed: 2021-09-29.
|
| 266 |
+
Gautam Mittal, Jesse Engel, Curtis Hawthorne, and Ian Simon. Symbolic music generation with diffusion models. arXiv preprint arXiv:2103.16091, 2021.
|
| 267 |
+
Alex Nichol and Prafulla Dhariwal. Improved denoising diffusion probabilistic models. arXiv preprint arXiv:2102.09672, 2021.
|
| 268 |
+
Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th annual meeting of the Association for Computational Linguistics, pp. 311–318, 2002.
|
| 269 |
+
Matt Post. A call for clarity in reporting bleu scores. arXiv preprint arXiv:1804.08771, 2018.
|
| 270 |
+
Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. arXiv e-prints, 2019.
|
| 271 |
+
|
| 272 |
+
Qiu Ran, Yankai Lin, Peng Li, and Jie Zhou. Guiding non-autoregressive neural machine translation decoding with reordering information. arXiv preprint arXiv:1911.02215, 2019.
|
| 273 |
+
|
| 274 |
+
Marc’Aurelio Ranzato, Y-Lan Boureau, Sumit Chopra, and Yann LeCun. A unified energy-based framework for unsupervised learning. In Artificial Intelligence and Statistics, pp. 371–379. PMLR, 2007.
|
| 275 |
+
|
| 276 |
+
Ali Razavi, Aaron van den Oord, Ben Poole, and Oriol Vinyals. Preventing posterior collapse with ¨ delta-vaes. arXiv preprint arXiv:1901.03416, 2019.
|
| 277 |
+
|
| 278 |
+
Danilo Rezende and Shakir Mohamed. Variational inference with normalizing flows. In International conference on machine learning, pp. 1530–1538. PMLR, 2015.
|
| 279 |
+
|
| 280 |
+
Danilo Jimenez Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In International conference on machine learning, pp. 1278–1286. PMLR, 2014.
|
| 281 |
+
|
| 282 |
+
Chitwan Saharia, William Chan, Saurabh Saxena, and Mohammad Norouzi. Non-autoregressive machine translation with latent alignments. arXiv preprint arXiv:2004.07437, 2020.
|
| 283 |
+
|
| 284 |
+
Rico Sennrich, Barry Haddow, and Alexandra Birch. Neural machine translation of rare words with subword units. arXiv preprint arXiv:1508.07909, 2015.
|
| 285 |
+
|
| 286 |
+
Raphael Shu, Jason Lee, Hideki Nakayama, and Kyunghyun Cho. Latent-variable nonautoregressive neural machine translation with deterministic inference using a delta posterior. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pp. 8846–8853, 2020.
|
| 287 |
+
|
| 288 |
+
Jascha Sohl-Dickstein, Eric Weiss, Niru Maheswaranathan, and Surya Ganguli. Deep unsupervised learning using nonequilibrium thermodynamics. In International Conference on Machine Learning, pp. 2256–2265. PMLR, 2015.
|
| 289 |
+
|
| 290 |
+
Yang Song, Jascha Sohl-Dickstein, Diederik P Kingma, Abhishek Kumar, Stefano Ermon, and Ben Poole. Score-based generative modeling through stochastic differential equations. arXiv preprint arXiv:2011.13456, 2020.
|
| 291 |
+
|
| 292 |
+
Mitchell Stern, William Chan, Jamie Kiros, and Jakob Uszkoreit. Insertion transformer: Flexible sequence generation via insertion operations. In International Conference on Machine Learning, pp. 5976–5985. PMLR, 2019.
|
| 293 |
+
|
| 294 |
+
Zhiqing Sun, Zhuohan Li, Haoqing Wang, Zi Lin, Di He, and Zhi-Hong Deng. Fast structured decoding for sequence models. arXiv preprint arXiv:1910.11555, 2019.
|
| 295 |
+
|
| 296 |
+
Ilya Sutskever, James Martens, and Geoffrey E Hinton. Generating text with recurrent neural networks. In ICML, 2011.
|
| 297 |
+
|
| 298 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in neural information processing systems, pp. 5998–6008, 2017.
|
| 299 |
+
|
| 300 |
+
Alex Wang and Kyunghyun Cho. Bert has a mouth, and it must speak: Bert as a markov random field language model. arXiv preprint arXiv:1902.04094, 2019.
|
| 301 |
+
|
| 302 |
+
Yiren Wang, Fei Tian, Di He, Tao Qin, ChengXiang Zhai, and Tie-Yan Liu. Non-autoregressive machine translation with auxiliary regularization. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pp. 5377–5384, 2019.
|
| 303 |
+
|
| 304 |
+
Lantao Yu, Weinan Zhang, Jun Wang, and Yong Yu. Seqgan: Sequence generative adversarial nets with policy gradient. In Proceedings of the AAAI conference on artificial intelligence, volume 31, 2017.
|
| 305 |
+
|
| 306 |
+
# A METHOD DETAILS
|
| 307 |
+
|
| 308 |
+
Using Markov property and the form of $p _ { t } = f _ { \theta } ( \cdot | \mathbf { x } _ { t - 1 } )$ , for any $t > 0$ we obtain
|
| 309 |
+
|
| 310 |
+
$$
|
| 311 |
+
\begin{array} { l } { { \displaystyle p _ { t } \big ( { \bf x } _ { t } | { \bf x } _ { 0 } \big ) = \sum _ { { \bf x } _ { t - 1 } \in X } p _ { t - 1 } \big ( { \bf x } _ { t - 1 } | { \bf x } _ { 0 } \big ) f _ { \theta } \big ( { \bf x } _ { t } | { \bf x } _ { t - 1 } \big ) } \ ~ } \\ { ~ = \mathbb { E } _ { { \bf x } _ { t - 1 } \sim p _ { t - 1 } \cdot ( \cdot | { \bf x } _ { 0 } ) } f _ { \theta } \big ( { \bf x } _ { t } | { \bf x } _ { t - 1 } \big ) . } \end{array}
|
| 312 |
+
$$
|
| 313 |
+
|
| 314 |
+
By induction, we can keep unrolling the chain for all steps $s = t - 1 , t - 2 , \dots , 1$ , eventually obtaining
|
| 315 |
+
|
| 316 |
+
$$
|
| 317 |
+
\begin{array} { r l } { { p _ { t } ( { \pmb x } _ { t } | { \pmb x } _ { 0 } ) = \sum _ { { \pmb x } _ { 1 } , \dots , { \pmb x } _ { t - 1 } } \prod _ { s = 1 } ^ { t } f _ { \theta } ( { \pmb x } _ { s } | { \pmb x } _ { s - 1 } ) } \ ~ } & { } \\ & { = \mathbb { E } _ { { \pmb x } _ { 1 } \sim p _ { 1 } ( \cdot | { \pmb x } _ { 0 } ) } \ [ f _ { \theta } ( { \pmb x } _ { t } | { \pmb x } _ { t - 1 } ) ] , } \\ & { ~ { \pmb x } _ { t - 1 } \sim p _ { t - 1 } ( \cdot | { \pmb x } _ { t - 2 } ) } \end{array}
|
| 318 |
+
$$
|
| 319 |
+
|
| 320 |
+
which proves the from of the model distribution (Eq. 1).
|
| 321 |
+
|
| 322 |
+
A.1 UPPER BOUND ON THE LOSS.
|
| 323 |
+
|
| 324 |
+
Using Jensen’s inequality we can swap log and expectation in Eq. 7 to obtain
|
| 325 |
+
|
| 326 |
+
$$
|
| 327 |
+
\begin{array} { r } { - \log p _ { t } ( \mathbf { x } | \mathbf { x } _ { 0 } ) \leq - \mathbb { E } _ { \mathbf { \lambda } _ { \mathbf { x } _ { 1 } \sim p _ { 1 } ( \cdot | \mathbf { x } _ { 0 } ) } } \left[ \log f _ { \theta } ( \mathbf { x } | \mathbf { x } _ { t - 1 } ) \right] , } \\ { \mathbf { x } _ { t - 1 } { \sim } p ( \cdot | \mathbf { x } _ { t - 2 } ) \qquad } \end{array}
|
| 328 |
+
$$
|
| 329 |
+
|
| 330 |
+
hence
|
| 331 |
+
|
| 332 |
+
$$
|
| 333 |
+
\begin{array} { r } { \widetilde { L ^ { ( t ) } } ( \boldsymbol { \theta } ) = - \mathbb { E } \underset { \mathbf { x } _ { 0 } \sim q ( \cdot | \mathbf { x } ) } { \mathbf { x } } \left[ \log p _ { t } ( \mathbf { x } | \mathbf { x } _ { 0 } ) \right] \leq - \mathbb { E } \underset { \mathbf { x } _ { 0 } \sim q ( \cdot | \mathbf { x } ) } { \mathbf { x } } \quad [ \log f _ { \boldsymbol { \theta } } ( \mathbf { x } | \mathbf { x } _ { t - 1 } ) ] = L ^ { ( t ) } ( \boldsymbol { \theta } ) . } \\ { \mathbf { x } _ { 1 } \sim f _ { \boldsymbol { \theta } } ( \cdot | \mathbf { x } _ { 0 } ) } \\ { \mathbf { x } _ { t - 1 } \sim f _ { \boldsymbol { \theta } } ( \cdot | \mathbf { x } _ { t - 2 } ) } \end{array}
|
| 334 |
+
$$
|
| 335 |
+
|
| 336 |
+
# A.2 RELATION TO VAE
|
| 337 |
+
|
| 338 |
+
Variational Autoencoders (Kingma & Welling, 2013; Rezende et al., 2014) optimise the expected evidence lower bound (ELBO) on the marginal likelihood
|
| 339 |
+
|
| 340 |
+
$$
|
| 341 |
+
\begin{array} { r } { \log p ( \mathbf { x } ) \geq - D _ { \mathrm { K L } } ( q ( \mathbf { z } | \mathbf { x } ) \Vert p _ { 0 } ( \mathbf { z } ) ) + \mathbb { E } _ { \mathbf { z } \sim q ( \cdot | \mathbf { x } ) } \left[ \log p ( \mathbf { x } | \mathbf { z } ) \right] , } \end{array}
|
| 342 |
+
$$
|
| 343 |
+
|
| 344 |
+
with respect to parameters of both the variational distribution $q$ and generative distribution $p$ , where $p _ { 0 }$ remains the prior for for the latent variables. Denosing autoencoders limit the optimisation to the second term, assuming a fixed encoder $q$ , which is also the case with SUNDAE: identifying encoder with our corruption distribution and generative distribution $p$ with the distribution of our chain at the last step $p _ { T }$ , expected ELBO becomes
|
| 345 |
+
|
| 346 |
+
$$
|
| 347 |
+
\begin{array} { r l } & { \mathbb { E } _ { \mathbf { x } \sim p _ { \mathrm { d a t a } } } [ \log p _ { T } ( \mathbf { x } ) ] \geq - \mathbb { E } _ { \mathbf { x } \sim p _ { \mathrm { d a t a } } } \left[ D _ { \mathrm { K L } } ( q ( \mathbf { z } | \mathbf { x } ) \| p _ { 0 } ( \mathbf { z } ) ) \right] + \mathbb { E } _ { \mathbf { \phi } \sim p _ { \mathrm { d a t a } } } \left[ \log p _ { t } ( \mathbf { x } | \mathbf { x } ^ { c } ) \right] } \\ & { \qquad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \qquad \geq - \mathbb { E } _ { \mathbf { x } \sim p _ { \mathrm { d a t a } } } \left[ D _ { \mathrm { K L } } ( q ( \mathbf { z } | \mathbf { x } ) \| p _ { 0 } ( \mathbf { z } ) ) \right] - L ^ { ( T ) } ( \theta ) . } \end{array}
|
| 348 |
+
$$
|
| 349 |
+
|
| 350 |
+
where the second inequality is a consequence of the upper bound 3. Hence, minimizing $L ^ { ( T ) }$ would lead to maximisation of the lower bound on the model likelihood.
|
| 351 |
+
|
| 352 |
+
# A.3 CORRUPTION FUNCTION
|
| 353 |
+
|
| 354 |
+
Our corruption function is obtained in stages:
|
| 355 |
+
|
| 356 |
+
• sample uniform expected corruption proportion $\alpha \sim \mathcal { U } ( [ 0 , 1 ] )$ , • sample Bernoulli mask, independently for each token $m \sim ( { \mathrm { B e r n o u l l i } } ( \alpha ) ) ^ { N }$ , • sample noise $\boldsymbol \eta \sim ( \mathcal { U } ( \{ 1 , 2 , \dots , v \} ) ^ { N }$ ,
|
| 357 |
+
|
| 358 |
+

|
| 359 |
+
Figure 3: Overview of target length prediction. During SUNDAE training, we simultaneously train the length predictor with cross-entropy loss and give ground-truth target length as input to the decoder (green dashed arrow), thus teacher-forcing it. During sampling, we give the most likely target length prediction from the network to the decoder (red dashed arrow).
|
| 360 |
+
|
| 361 |
+
• compute corruption $\pmb { x } ^ { c } = c _ { \alpha , \pmb { m } , \eta } ( \pmb { x } ) = ( 1 - \pmb { m } ) \cdot \pmb { x } + \pmb { m } \cdot \eta$ (with multiplications taken element-wise).
|
| 362 |
+
|
| 363 |
+
The distribution $p ^ { c } ( \cdot | \pmb { x } ) p _ { \mathrm { d a t a } } ( \pmb { x } )$ obtained in this process covers the entire input space $X$ , with probability skewed towards samples whose parts come from $p _ { \mathrm { d a t a } }$ . Note that except for corruption proportion, all steps are independent for all individual tokens. Given $\alpha$ $, p ^ { c _ { \alpha } } ( \pmb { y } | \pmb { x } )$ can be factorised as
|
| 364 |
+
|
| 365 |
+
$$
|
| 366 |
+
\prod _ { n } p ^ { c _ { \alpha } } ( \pmb { y } ^ { ( n ) } | \pmb { x } ^ { ( n ) } ) = \prod _ { n } h ( \pmb { y } ^ { ( n ) } ) ^ { T } \pmb { Q } _ { \alpha } h ( \pmb { x } ^ { ( n ) } ) ,
|
| 367 |
+
$$
|
| 368 |
+
|
| 369 |
+
where $Q _ { \alpha } = \alpha I + ( 1 - \alpha ) V$ is a transition matrix, $V$ is a $v \times v$ matrix with all entries equal to $\textstyle { \frac { 1 } { v } }$ , and ith ra $h ( a )$ denotes one-hot vector representation of corresponds to a multinomial-diffusion for $a \in \{ 1 , 2 , \ldots , v \}$ . In this con probability xt, corruptionof remaining $\alpha$ $\alpha$ in the same state, as proposed by (Hoogeboom et al., 2021).
|
| 370 |
+
|
| 371 |
+
# B DETAILS OF TARGET LENGTH PREDICTION
|
| 372 |
+
|
| 373 |
+
We provide a simplified high-level overview of the target length predictor in Figure 3. In the rest of this section we focus on implementation details.
|
| 374 |
+
|
| 375 |
+
The target length prediction module consists of 6 residual blocks. The length prediction module takes the source encodings $h _ { \pmb { x } } = e n c o d e r ( \pmb { x } )$ as the input, where $_ { \textbf { \em x } }$ is a sequence of source tokens. We first project $h _ { x }$ into a vector $\pmb { v _ { x } } \in \mathbb { R } ^ { d _ { L P } }$ , where $d _ { L P } = 1 2 8$ is the hidden size of the target length prediction module. We add a source length embedding vector $v _ { l e n } = S _ { ( N _ { s o u r c e } \times d _ { L P } ) } ( l _ { \pmb { x } } )$ to ${ \pmb v } _ { { \pmb x } }$ and obtain the final encoder state representation ${ \pmb v _ { \pmb x } ^ { \prime } } = { \pmb v _ { \pmb x } } + { \pmb v _ { l e n } }$ , where $l _ { x }$ is the number of the source tokens, and $N _ { s o u r c e } = 1 2 8$ is the maximum number of the source tokens. The target length prediction module then takes ${ \pmb v } _ { { \pmb x } }$ as the input and predicts the (downsampled) target length $\tilde { l } _ { d }$ . We found beneficial downsampling the target lengths for the length prediction by a factor of 2, i.e. $l _ { d } = \lceil { l } / 2 \rceil$ as compared to exact prediction of $l$ ; since the maximum number of target tokens is $N = 1 2 8$ , the maximum size of the outcome of length prediction is $N _ { d } = 6 4$ .
|
| 376 |
+
|
| 377 |
+
We prepend an embedding $\pmb { h } _ { l e n } \in \mathbb { R } ^ { d _ { e n c } }$ of target length to the source encodings $\begin{array} { r l } { h _ { x } } & { { } \in \ } \end{array}$ $\mathbb { R } ^ { N _ { s o u r c e } ^ { \bullet } \times d _ { e n c } }$ for each source example $_ { \textbf { \em x } }$ and allow the decoder to attend to it $\boldsymbol { \mathrm { \Delta } d _ { e n c } }$ here denotes the dimensionality of the encoder). $\boldsymbol { h } _ { l e n }$ is obtained by applying an embedding matrix $V _ { ( N _ { d } \times d _ { e n c } ) }$ to ground truth (downsampled) length $l _ { d }$ at training time, or to predicted one $\tilde { l } _ { d }$ during sampling. Note that optimisation of the length classification loss does not affect the encoder parameters.
|
| 378 |
+
|
| 379 |
+
# C EFFECTS OF TARGET LENGTH PREDICTION
|
| 380 |
+
|
| 381 |
+
It is shown empirically that the length of the translated results can affect BLEU score. Approximate search methods such as beam search usually incorporate a length normalization term in order to prevent the search algorithm to prefer shorter sentences. This is due to the fact that the scoring function is usually chosen as the likelihood modelled by the translation system, and beams containing shorter sequences tend to score higher likelihoods. In non-AR models, the end of sequence is not explicitly learned by the models, thus they can benefit by knowing the target sequence length in advance to generating the translation. However, the length of the target sequence cannot be known at inference time, therefore, a model should predict it instead. We show how BLEU scores can differ in WMT’14 translation tasks with and without the target length prediction in Figure 4a-4c.
|
| 382 |
+
|
| 383 |
+

|
| 384 |
+
Figure 4: Validation BLEU curves during training with and without target length prediction on WMT’ $1 4 ~ \mathrm { E N } { } \mathrm { D E }$ , D $\mathrm { E } { } \mathrm { E N }$ and $\operatorname { E N } { } \operatorname { F R }$ tasks shown in Figure 4a, 4b and 4c, respectively. Figure 4d shows the effect of unrolled denoising terms on translation quality, here $L ( k ) = L ^ { ( 1 : k ) }$ . All models are trained with a batch size of 256 using 20 different random seeds to display uncertainty.
|
| 385 |
+
|
| 386 |
+
Table 5: German-to-English translation process. Since initialization is quite long, we substitute the trailing tokens with [...]. Tokens changed from previous step are highlighted in gray. The process converges after 3 steps, while AR would take 10 steps (one for each token in the translation).
|
| 387 |
+
|
| 388 |
+
<table><tr><td>Source</td><td>Ich habe dort Dinge gesehen, aus denen ich gestarkt hervorgegangen bin.</td></tr><tr><td>Initialization</td><td> ThirVerschlMarta moderatopposed frameworks solidierweitert [..]</td></tr><tr><td>Step 1</td><td>I saw things there that which I I stronger..</td></tr><tr><td>Step 2</td><td>I saw things there from which I me stronger..</td></tr><tr><td>Step 3</td><td>I saw things there from which I emerged stronger.</td></tr><tr><td>Step 4</td><td>I saw things there from which I emerged stronger.</td></tr><tr><td>Reference</td><td>I saw some things there and came out stronger.</td></tr></table>
|
| 389 |
+
|
| 390 |
+
# D EFFECTS OF UNROLLED LOGITS LOSSES
|
| 391 |
+
|
| 392 |
+
We show how varying the number of unrolled logits can affect the MT performance in Figure 4d.
|
| 393 |
+
|
| 394 |
+

|
| 395 |
+
Figure 5: Model score (left) and BLEU (right) evolution throughout sampling for various temperatures. The reference score on the left hand side denotes the model score obtained for ground truth inputs. Overall, medium-low temperatures give the best results.
|
| 396 |
+
|
| 397 |
+
# E TRANSLATION ANALYSIS
|
| 398 |
+
|
| 399 |
+
We show how our algorithm works step-by-step for translation in Table 5. It is interesting to observe how the multimodality problem (Gu et al., 2017) gets resolved with more steps. Multimodality usually manifests in repeated tokens in translation, which intrinsically comes from inability to coordinate decisions when independently sampling multiple tokens at once. However, after a few steps all repetitions are corrected, because the model conditions on the previous step and hence can better coordinate further changes.
|
| 400 |
+
|
| 401 |
+
Figure 5 shows how the model and the BLEU scores evolve during sampling for various temperatures. The model score here refers to the cross-entropy between translation and model logits produced by giving this translation as the input. While for very low temperatures the scores initially improve faster, they are eventually outperformed by scores for higher temperatures, possibly due to low diversity induced by near-deterministic sampling. For very high temperatures, on the other hand, the scores improve slowly, and hence using such temperatures is rather impractical.
|
| 402 |
+
|
| 403 |
+
# F DISTILLATION SCORES OBTAINED WITH TRANSFORMER–BASE
|
| 404 |
+
|
| 405 |
+
In Table 6 we also present results for SUNDAE trained on data distilled from autoregressive Transformer-Base model, which allows direct comparison with similarly obtained Imputer scores (Saharia et al., 2020). The results show that SUNDAE noticeably outperforms Imputer at 8 steps for both $\Im \mathrm { N } \substack { \mathrm { D E } }$ and DE EN language pairs.
|
| 406 |
+
|
| 407 |
+
Table 6: Test BLEU scores of SUNDAE and Imputer (Saharia et al., 2020) distilled from AR Transformer–Base model on English-to-German $\mathrm { E N } { } \mathrm { D E } )$ ) and German-to-English $( \mathrm { D E \mathrm { \to E N } } )$ translation tasks.
|
| 408 |
+
|
| 409 |
+
<table><tr><td colspan="2"></td><td colspan="2">AR-distilled BLEU</td></tr><tr><td>Model</td><td>Steps (T)</td><td>EN→DE</td><td>DE→EN</td></tr><tr><td>Imputer (Saharia et al., 2020) (n =1)</td><td>4</td><td>27.9</td><td>30.9</td></tr><tr><td>Imputer (Saharia et al., 2020) (n=1)</td><td>8</td><td>27.9</td><td>31.1</td></tr><tr><td>SUNDAE (63M)</td><td></td><td></td><td></td></tr><tr><td>Deterministic (n=16)</td><td>4</td><td>28.00</td><td>31.82</td></tr><tr><td>Deterministic (n=16)</td><td>8</td><td>28.01</td><td>31.84</td></tr><tr><td>Deterministic (n = 16)</td><td>10</td><td>28.01</td><td>31.84</td></tr><tr><td>Stochastic (n= 16)</td><td>4</td><td>27.78</td><td>31.42</td></tr><tr><td>Stochastic (n = 16)</td><td>8</td><td>28.14</td><td>31.78</td></tr><tr><td>Stochastic (n=16)</td><td>10</td><td>28.11</td><td>31.87</td></tr><tr><td>Stochastic (n=16)</td><td>16</td><td>28.11</td><td>31.87</td></tr><tr><td>Stochastic (n=16)</td><td>32</td><td>28.02</td><td>31.92</td></tr></table>
|
| 410 |
+
|
| 411 |
+
# G SACREBLEU SCORES FOR WMT’14 EXPERIMENTS
|
| 412 |
+
|
| 413 |
+
SacreBLEU (Post, 2018) is a library for computing BLEU score7 that does not require the user to manually tokenize the reference and candidate translations. We report BLEU scores measured with SacreBLEU library in order to provide a reference for future studies. We show all the BLEU scores in Table 7.
|
| 414 |
+
|
| 415 |
+
<table><tr><td></td><td></td><td colspan="2">EN→DE</td><td colspan="2">DE→EN</td><td colspan="2">EN→FR</td></tr><tr><td>Model</td><td>Steps (T)</td><td>BLEU</td><td>BLEU*</td><td>BLEU</td><td>BLEU*</td><td>BLEU</td><td>BLEU*</td></tr><tr><td>Deterministic (n = 16)</td><td>2</td><td>20.29</td><td>20.13</td><td>25.28</td><td>24.83</td><td>31.60</td><td>30.51</td></tr><tr><td>Deterministic (n =16)</td><td>3</td><td>24.07</td><td>23.84</td><td>28.64</td><td>28.12</td><td>35.88</td><td>34.68</td></tr><tr><td>Deterministic (n =16)</td><td>4</td><td>25.01</td><td>24.75</td><td>29.53</td><td>28.99</td><td>36.85</td><td>35.61</td></tr><tr><td>Deterministic (n=16)</td><td>10</td><td>25.54</td><td>25.25</td><td>30.11</td><td>29.54</td><td>37.15</td><td>35.92</td></tr><tr><td>Stochastic (n = 16)</td><td>4</td><td>23.05</td><td>22.75</td><td>28.13</td><td>27.62</td><td>35.27</td><td>34.03</td></tr><tr><td>Stochastic (n = 16)</td><td>8</td><td>26.22</td><td>26.08</td><td>30.48</td><td>30.00</td><td>37.45</td><td>36.16</td></tr><tr><td>Stochastic (n=16)</td><td>10</td><td>26.25</td><td>25.99</td><td>30.80</td><td>30.24</td><td>27.53</td><td>36.23</td></tr><tr><td>Stochastic (n=16)</td><td>32</td><td>26.57</td><td>26.31</td><td>30.74</td><td>30.11</td><td>37.60</td><td>36.20</td></tr></table>
|
| 416 |
+
|
| 417 |
+
Table 7: Test BLEU without AR distillation (raw). Scores computed with SacreBLEU library are denoted as BLEU?.
|
| 418 |
+
|
| 419 |
+
# H UNCONDITIONAL SAMPLES FOR C4
|
| 420 |
+
|
| 421 |
+
We provide samples for our model trained on C4 dataset as described in the main text (Section 3.2).
|
| 422 |
+
All of them resemble reasonable-quality internet texts, except perhaps sample $\# 4$ .
|
| 423 |
+
|
| 424 |
+
Table 8: Unconditional samples from our model trained on C4 (without cherry-picking). Since C4 was crawled from the web, newline symbols are abundant both in the training data and the samples.
|
| 425 |
+
|
| 426 |
+
<table><tr><td>Index</td><td>Sample from our model</td></tr><tr><td>1</td><td>Ihadto gobackandforthandstartovertoseewhathadhappened,what was working,andallthepeces wereintherightplaces.</td></tr><tr><td>2</td><td>tossed in a delicious sauce.</td></tr><tr><td></td><td>Beef brisket is a hearty cut of meat -thick and tender. When you make a lot of meat</td></tr><tr><td>3</td><td>canexpect to see more of the same in 'Wild Herring',although not very often enough to achieve the same effect.</td></tr><tr><td></td><td>In 'Herring',</td></tr><tr><td>4</td><td>,she was considered to be a fake.</td></tr><tr><td></td><td>Dr. Deborah Chienna has 93 in the last 365 days., headaches,stomach pain, sore</td></tr><tr><td></td><td>as an artist.</td></tr><tr><td>5</td><td>printing photo cards,artwork,and posters.</td></tr><tr><td></td><td>email me for some ideas.</td></tr><tr><td></td><td>"Rebecca's studio</td></tr><tr><td>6</td><td>Jesee</td></tr><tr><td>7</td><td>'s location.</td></tr><tr><td></td><td>ThisresearchwassuportedbyagrantfomtheNationalAsociatioforteAdvancementofSciencetroughtheU.SDeparmentofEnergy</td></tr><tr><td>8</td><td>different artists,we would love to show you the piece we have in our shop!</td></tr><tr><td></td><td>Keep an eye on our Gallery-all you have to do is</td></tr><tr><td>9</td><td>6.3 million from $8.8 million reported by Zacks.com back in February.</td></tr><tr><td></td><td>Brad Brickley, general manager of Irvine, Calif.-based</td></tr><tr><td>10</td><td>towritingwitteusgetomeofhsswillspendimeinheasroomtadomfromthialook.Fomewe</td></tr></table>
|
| 427 |
+
|
| 428 |
+
# I UNCONDITIONAL SAMPLES FOR EMNLP2017 NEWS
|
| 429 |
+
|
| 430 |
+
We provide samples from our model trained on EMNLP2017 News dataset in Table 9, accompanying the quantitative results in the main text (Section 3.2). These samples are obtained at temperature 0.8. None of them appear in the training set, so the model does not merely memorize the data it is given. To provide a point of reference, we also include samples from ScratchGAN (d’Autume et al., 2019).
|
| 431 |
+
|
| 432 |
+
<table><tr><td>Index</td><td>Sample</td></tr><tr><td colspan="2">ScratchGAN</td></tr><tr><td>1</td><td>We are pleased for the trust and it was incredible,our job quickly learn the shape and get on that way.</td></tr><tr><td>2</td><td>ButIobviously have him with the guys,maybe in Melbourne,the players that weren 'tquite clear there .</td></tr><tr><td>3</td><td>Thereistask nowthatthe UKwillmakeforthe societyto seek secureenough governmentbudget fundreduce theeconomy</td></tr><tr><td>4</td><td>KeithisalsoeldidTed’sucessfulcapaspoesoanforsudentsdyougrotrshastodatafato</td></tr><tr><td>5</td><td>Police aid howaDemocratic police oficer,would choose the honorof alcoholand reduce his defenseand foundation.</td></tr><tr><td>6</td><td>We do not go the Blues because that Ispent in ten months and soIdidn'thave a great job in a big revolution.</td></tr><tr><td>7</td><td>The28-year-old-son Dr Pricesaid she would havebeen invitedto Britain forher”friend”inalovely family.</td></tr><tr><td>8</td><td>And as long as it is lower about,our families are coming from a friend of a family</td></tr><tr><td colspan="2">SUNDAE</td></tr><tr><td>1</td><td>Ms Sturgeon was quoted as saying that she is prepared to quit the EU by the end of March next year .</td></tr><tr><td>2</td><td>They’ve been around a long time,but it’s too natural to ignore what has happened .</td></tr><tr><td>3</td><td>” It’sa busy road,and we’ve got to get through it,”he said.</td></tr><tr><td>4</td><td>That means some voters will decide if they'll change their minds before the first day of the debate .</td></tr><tr><td>5</td><td>”We don’t learn very much from my point of view because we live here,”he said.</td></tr><tr><td>6</td><td>”I spent my whole life at the stage and nowI’ma normal father,”hecontinued.</td></tr><tr><td>7</td><td>Whether your phone is near or online,you can check if your phone is tied to your Instagram account .</td></tr><tr><td>8</td><td>”Itis onlytoo earlyto know why the incidentoccurred shortlyafter it happened,”he toldthe Associated Press.</td></tr><tr><td>9</td><td>The website will be updated on a day -to -day basis,as well as other special services</td></tr><tr><td>10</td><td>So it’stoo early to know exactly what each candidate has to say in terms of the American election .</td></tr></table>
|
| 433 |
+
|
| 434 |
+
Table 9: Unconditional samples from our model SUNDAE trained on EMNLP2017 News (without cherry-picking). We also provide samples from ScratchGAN (d’Autume et al., 2019) for comparison.
|
| 435 |
+
|
| 436 |
+
# J PSEUDOCODE OF SUNDAE
|
| 437 |
+
|
| 438 |
+
We provide Python-like pseudocode for our method in Listing 1. The main functions are build loss fn, which should be used for training, and sampling fn which should be used for sampling. For simplicity, we consider the decoder-only setup as in unconditional generation experiments (Section 3.2).
|
| 439 |
+
|
| 440 |
+
def get_random_text(shape, vocab_size): 2 random_text $=$ rand_int(shape, minva $\beth = 0$ , maxval $=$ vocab_size) return random_text 5 6 def corrupt_text(batched_text, vocab_size): corruption_prob_per_sequence $=$ rand_uniform([batched_text.shape[0], 1]) 8 rand $=$ rand_uniform(batched_text.shape) 9 mask $=$ rand $<$ corruption_prob_per_sequence 10 random_text $=$ get_random_text(batched_text.shape, vocab_size) 11 corrupted $=$ mask $\star$ random_text $^ +$ (1 - mask) $\star$ batched_text 12 return corrupted 13 14 15 def build_logits_fn(vocab_size, n_unrolled_steps, enable_sampling): 16 17 def logits_fn(batched_text): 18 model $=$ Transformer(vocab_size, use_causal_mask ${ \bf \Phi } . = { \bf { \Phi } }$ False) 19 20 def fn(input_batched_text): 21 logits $=$ model(input_batched_text) 22 return logits 23 24 def unrolled_fn(input_batched_text): 25 samples $=$ corrupt_text(input_batched_text, vocab_size) 26 all_logits $=$ [] 27 for _ in range(n_unrolled_steps):
|
| 441 |
+
|
| 442 |
+
28 logits $=$ fn(samples)
|
| 443 |
+
29 samples $=$ stop_grad(rand_categorical(logits))
|
| 444 |
+
30 all_logits $+ =$ [logits]
|
| 445 |
+
31 final_logits $=$ concatenate(all_logits, axi $\mathtt { S } = 0$ )
|
| 446 |
+
32 return final_logits
|
| 447 |
+
33
|
| 448 |
+
34 if enable_sampling:
|
| 449 |
+
35 return fn(batched_text)
|
| 450 |
+
36 else:
|
| 451 |
+
37 return unrolled_fn(batched_text)
|
| 452 |
+
38
|
| 453 |
+
39 return logits_fn
|
| 454 |
+
40
|
| 455 |
+
41
|
| 456 |
+
42 def build_loss_fn(vocab_size, n_unrolled_step ${ \sf S } = 2$ ):
|
| 457 |
+
43 logits_fn $=$ build_logits_fn(
|
| 458 |
+
44 vocab_size, n_unrolled_steps, enable_sampling $=$ False)
|
| 459 |
+
45
|
| 460 |
+
46 def loss_fn(batched_text):
|
| 461 |
+
47 logits $=$ logits_fn(batched_text)
|
| 462 |
+
48 # repeat batched_text to fit unrolled logits
|
| 463 |
+
49 targets $=$ concatenate([batched_text] $\star$ n_unrolled_steps, axi $\scriptstyle \vdots = 0$ )
|
| 464 |
+
50 one_hot_targets $=$ one_hot(targets, vocab_size)
|
| 465 |
+
51 loss_per_token $=$ -sum(
|
| 466 |
+
52 one_hot_targets $\star$ log_softmax(logits), axi $\hphantom { 0 } \mathsf { S } = - 1$ )
|
| 467 |
+
53 loss $=$ mean(loss_per_token)
|
| 468 |
+
54 return loss
|
| 469 |
+
55
|
| 470 |
+
56 return loss_fn
|
| 471 |
+
57
|
| 472 |
+
58
|
| 473 |
+
59 def sampling_fn(logits_fn, steps, temperature, batch_size,
|
| 474 |
+
60 sequence_length, vocab_size):
|
| 475 |
+
61 batched_text $=$ get_random_text(
|
| 476 |
+
62 shape $=$ [batch_size, sequence_length], vocab_size)
|
| 477 |
+
63 for _ in range(steps):
|
| 478 |
+
64 logits $=$ logits_fn(batched_text)
|
| 479 |
+
65 samples $=$ rand_categorical(logits / temperature)
|
| 480 |
+
66 batched_text $=$ samples
|
| 481 |
+
67 return batched_text
|
parse/dev/T0GpzBQ1Fg6/T0GpzBQ1Fg6_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/T0GpzBQ1Fg6/T0GpzBQ1Fg6_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/bdHkMjBJG_w/bdHkMjBJG_w.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/mTiHLHu3sP/mTiHLHu3sP.md
ADDED
|
@@ -0,0 +1,326 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# GPT-RE: In-context Learning for Relation Extraction using Large Language Models
|
| 2 |
+
|
| 3 |
+
Zhen Wan 1 Fei Cheng Zhuoyuan Mao 1
|
| 4 |
+
Qianying Liu1 Haiyue Song1 Jiwei $\mathbf { L i } ^ { 2 }$ Sadao Kurohashi1 1 Kyoto University, Japan 2 Zhejiang University, China
|
| 5 |
+
{zhenwan, zhuoyuanmao, ying, song}@nlp.ist.i.kyoto-u.ac.jp {feicheng, kuro}@i.kyoto-u.ac.jp {jiwei_li}@zju.edu.cn
|
| 6 |
+
|
| 7 |
+
# Abstract
|
| 8 |
+
|
| 9 |
+
In spite of the potential for ground-breaking achievements offered by large language models (LLMs) (e.g., GPT-3) via in-context learning (ICL), they still lag significantly behind fullysupervised baselines (e.g., fine-tuned BERT) in relation extraction (RE). This is due to the two major shortcomings of ICL for RE: (1) low relevance regarding entity and relation in existing sentence-level demonstration retrieval approaches for ICL; and (2) the lack of explaining input-label mappings of demonstrations leading to poor ICL effectiveness.
|
| 10 |
+
|
| 11 |
+
In this paper, we propose GPT-RE to successfully address the aforementioned issues by (1) incorporating task-aware representations in demonstration retrieval; and (2) enriching the demonstrations with gold label-induced reasoning logic. We evaluate GPT-RE on four widely-used RE datasets and observe that GPTRE achieves improvements over not only existing GPT-3 baselines, but also fully-supervised baselines as in Figure 1. Specifically, GPT-RE achieves SOTA performances on the Semeval and SciERC datasets, and competitive performances on the TACRED and ACE05 datasets.
|
| 12 |
+
|
| 13 |
+
Additionally, a critical issue of LLMs revealed by previous work, the strong inclination to wrongly classify NULL examples into other predefined labels, is substantially alleviated by our method. We show an empirical analysis.1
|
| 14 |
+
|
| 15 |
+
# 1 Introduction
|
| 16 |
+
|
| 17 |
+
The emergence of large language models (LLMs) such as GPT-3 (Brown et al., 2020; Thoppilan et al., 2022; Chowdhery et al., 2022; Rae et al., 2021; Hoffmann et al., 2022) represents a significant advancement in natural language processing (NLP). Instead of following a pretraining-and-finetuning pipeline (Devlin et al., 2019; Beltagy et al., 2019; Raffel et al., 2019; Lan et al., 2019; Zhuang et al., 2021), which finetunes a pre-trained model on a task-specific dataset in a fully-supervised manner, LLMs employ a new paradigm known as incontext learning (ICL) (Brown et al., 2020; Min et al., 2022a) which formulates an NLP task under the paradigm of language generation and makes predictions by learning from a few demonstrations. Under the framework of ICL, LLMs achieve remarkable performance rivaling previous fullysupervised methods even with only a limited number of demonstrations provided in various tasks such as solving math problems, commonsense reasoning, text classification, fact retrieval, natural language inference, and semantic parsing (Brown et al., 2020; Min et al., 2022b; Zhao et al., 2021; Liu et al., 2022b; Shin et al., 2021).
|
| 18 |
+
|
| 19 |
+

|
| 20 |
+
Figure 1: Micro F1 performances on two RE datasets. Previous GPT baselines (GPT-Random: randomly selected demonstrations and $G P T – S e n t$ : sentence-level demonstration retrieval) largely underperform finetuning baseline PURE while our GPT-RE substantially outperforms all baselines.
|
| 21 |
+
|
| 22 |
+
Despite the overall promising performance of LLMs, the utilization of ICL for relation extraction (RE) is still suboptimal. RE is the central task for knowledge retrieval requiring a deep understanding of natural language, which seeks to identify a predefined relation between a specific entity pair mentioned in the input sentence or NULL if no relation is found. Given a test input, ICL for RE prompts the input of LLMs with the task instruction, a few demonstrations retrieved from the training data, and the test input itself. Then LLMs generate the corresponding relation. Recent research (Gutiérrez et al., 2022) has sought to apply GPT-3 ICL to biomedical RE, but the results are relatively negative and suggest that GPT-3 ICL still significantly underperforms fine-tuned models.
|
| 23 |
+
|
| 24 |
+

|
| 25 |
+
Figure 2: Retrieval without considering the task-aware triplet results in noisy demonstrations.
|
| 26 |
+
|
| 27 |
+
The reasons that cause the pitfall of GPT-3 ICL in RE are two folds: (1) The low relevance regarding entity and relation in the retrieved demonstrations for ICL. Demonstrations are selected randomly or via $k$ -nearest neighbor $( k \mathbf { N N } )$ search based on sentence embedding (Liu et al., 2022b; Gutiérrez et al., 2022). Regrettably, $k \mathbf { N N }$ -retrieval based on sentence embedding is more concerned with the relevance of the overall sentence semantics and not as much with the specific entities and relations it contains, which leads to low-quality demonstrations. As shown in Figure 2, the test input retrieves a semantically similar sentence but is not desired in terms of entities and relations.
|
| 28 |
+
|
| 29 |
+
(2) The lack of explaining input-label mappings in demonstrations leads to poor ICL effectiveness: A vanilla form of ICL lists all demonstrations as input-label pairs without any explanations. This may mislead LLMs to learn shallow clues from surface words, while a relation can be presented in diverse forms due to language complexity. Especially when ICL has a maximal input length, optimizing the learning efficiency of each single demonstration becomes extremely important.
|
| 30 |
+
|
| 31 |
+
To this end, we propose GPT-RE for the RE task. GPT-RE employs two strategies to resolve the issues above: (1) task-aware retrieval and (2) gold label-induced reasoning. For (1) task-aware retrieval, its core is to use representations that deliberately encode and emphasize entity and relation information rather than sentence embedding for $k \mathbf { N N }$ search. We achieve this by two different retrieval approaches: (a) entity-prompted sentence embedding; (b) fine-tuned relation representation, which naturally places emphasis on entities and relations. Both methods contain more RE-specific information than sentence semantics, thus effectively addressing the problem of low relevance.
|
| 32 |
+
|
| 33 |
+

|
| 34 |
+
Figure 3: Confusion matrix on Semeval dataset with three selected relation labels. The NULL examples are overpredicted to other relations by GPT-3. CE: CauseEffect, IA: Instrument-Agency, PP: Product-Producer.
|
| 35 |
+
|
| 36 |
+
For (2) gold label-induced reasoning, we propose to inject the reasoning logic into the demonstration to provide more evidence to align an input and the label, a strategy akin to the Chain-ofThought (CoT) research (Wei et al., 2022; Wang et al., 2022b; Kojima et al., 2022). But different from previous work, we allow LLMs to elicit the reasoning process to explain not only why a given sentence should be classified under a particular label but also why a NULL example should not be assigned to any of the pre-defined categories. This process significantly improves the ability of LLMs to align the relations with diverse expression forms.
|
| 37 |
+
|
| 38 |
+
Recent work reveals another crucial problem named “overpredicting” as shown in Figure 3: we observe that LLMs have the strong inclination to wrongly classify NULL examples into other predefined labels . A similar phenomenon has also been observed in other tasks such as NER (Gutiérrez et al., 2022; Blevins et al., 2022). In this paper, we show that this issue can be alleviated if the representations for retrieval can be supervised with the whole set of NULL in the training data.
|
| 39 |
+
|
| 40 |
+
We evaluate our proposed method on three popular general domain RE datasets: Semeval 2010 task 8, TACRED and ACE05, and one scientific domain dataset SciERC. We observe that GPT-RE achieves improvements over not only existing GPT-3 baselines, but also fully-supervised baselines. Specifically, GPT-RE achieves SOTA performances on the Semeval and SciERC datasets, and competitive performances on the TACRED and ACE05 datasets.
|
| 41 |
+
|
| 42 |
+

|
| 43 |
+
Figure 4: An illustration of GPT-RE. Given a test input, we first leverage two different task-aware retrieval methods to search for highly relevant demonstrations from the training set, and then incorporate the gold label-induced reasoning for each demonstration. Above contents will then be included in the prompt construction to make the prediction.
|
| 44 |
+
|
| 45 |
+
# 2 Methodology: GPT-RE
|
| 46 |
+
|
| 47 |
+
# 2.1 Task Definition
|
| 48 |
+
|
| 49 |
+
Let $\mathcal { C }$ denote the input context and $e _ { \mathrm { s u b } } ~ \in ~ \mathcal { C }$ $e _ { \mathrm { o b j } } \in { \mathcal { C } }$ denote the pair of subject and object entity. Given a set of pre-defined relation classes $\mathbb { R }$ , relation extraction aims to predict the relation $y \in \mathbb { R }$ between the pair of entities $( e _ { \mathrm { s u b } } , e _ { \mathrm { o b j } } )$ within the context $\mathcal { C }$ , or if there is no pre-defined relation between them, predict $y = \mathrm { N U L L }$ .
|
| 50 |
+
|
| 51 |
+
# 2.2 Overview
|
| 52 |
+
|
| 53 |
+
We will first introduce the prompt construction to formalize RE as a language generation task in Sec. 2.3. Then to improve the ICL framework for RE, we will introduce two modules: (1) task-aware demonstration retrieval to select higherquality demonstrations (Sec. 2.4); (2) gold labelinduced reasoning to enrich each demonstration with explanations (Sec. 2.5). In Figure 4, we show the concrete workflow of processing a test input.
|
| 54 |
+
|
| 55 |
+
# 2.3 Prompt Construction
|
| 56 |
+
|
| 57 |
+
We construct a prompt for each given test example, which is fed to the GPT-3 model. Each prompt consists of the following components:
|
| 58 |
+
|
| 59 |
+
Instructions $\mathcal { T }$ We provide a succinct overview of the RE task description and the set of pre-defined classes $\mathbb { R }$ . The model is explicitly asked to output the relation, which belongs to the pre-defined classes. Otherwise, the model will output NULL.
|
| 60 |
+
|
| 61 |
+
ICL Demonstrations $\mathcal { D }$ We first leverage a taskaware retriever to acquire a $k$ -shot demonstration set, then enrich each demonstration $( x _ { i } , y _ { i } )$ with the gold label-induced reasoning $r _ { i }$ to build a new set of $( x _ { i } , y _ { i } , r _ { i } )$ as $\mathcal { D }$ .
|
| 62 |
+
|
| 63 |
+
Test Input $x _ { t e s t }$ Similar to the demonstrations, we offer the test input $x _ { t e s t }$ , and GPT-3 is expected to generate the corresponding relation $y _ { t e s t }$ .
|
| 64 |
+
|
| 65 |
+
In summary, GPT-RE can be formulated as:
|
| 66 |
+
|
| 67 |
+
$$
|
| 68 |
+
p \left( y _ { t e s t } \in \mathbb { R } \cup \left\{ \mathrm { N U L L } \right\} \vert \mathbb { Z } , \mathcal { D } , x _ { t e s t } \right)
|
| 69 |
+
$$
|
| 70 |
+
|
| 71 |
+
# 2.4 Task-aware Demonstration Retrieval
|
| 72 |
+
|
| 73 |
+
Since ICL demonstrations closer to the test sample in the embedding space result in more consistent and robust performance (Liu et al., 2022b). Recent work (Gutiérrez et al., 2022; Liu et al., 2022b) employs the $k \mathbf { N N }$ to retrieve the most similar examples in the training set as the few-shot demonstrations for each test input. As $k \mathbf { N N }$ relies on the choice of the embedding space to encode both test input and examples in the training set, they propose to obtain sentence embedding using pre-trained language models, or other improved sentence embedding.
|
| 74 |
+
|
| 75 |
+
However, using sentence embedding for $k \mathbf { N N }$ retrieval has a severe drawback: relation extraction focuses on pair-wise entities, which diverge from the semantic meaning of the entire sentence, leading to an ambiguous retrieval using sentence embedding. In this study, we propose two novel methods to provide more robust representations for better retrieval quality: (1) a naive entity-prompted sentence embedding in Sec. 2.4.1; (2) an advanced fine-tuned relation representation in Sec. 2.4.2.
|
| 76 |
+
|
| 77 |
+
# 2.4.1 Entity-Prompted Sentence Embedding
|
| 78 |
+
|
| 79 |
+
Given the discrepancy between sentence embedding and relation extraction, the original context is insufficient for demonstration retrieval. Considering the importance of entity information in RE, we propose reconstructing the context by incorporating entity pair information. For example, given the context $^ { \circ \circ } \underline { { H } } e$ has a sister Lisa,” the reconstructed context with the entity prompted will be “The relation between ‘He’ and ‘Lisa’ in the context: He has a sister Lisa.” This approach preserves both the semantic meaning of the sentence and the entity pair-centered information during retrieval. In the paper, we employ the latest robust model SimCSE (Gao et al., 2021) for computing sentence embedding-based similarity.
|
| 80 |
+
|
| 81 |
+
# 2.4.2 Fine-tuned Relation Representation
|
| 82 |
+
|
| 83 |
+
Compared to prompt entity information into context sentences, a more straightforward solution is to extract the relation representation from a fine-tuned RE model for retrieving demonstrations.
|
| 84 |
+
|
| 85 |
+
Current BERT-based fine-tuning methods for RE (Baldini Soares et al., 2019; Zhong and Chen, 2021; Wan et al., 2022) attempts to capture both the context information and the entity information by adding extra marker tokens to highlight the subject and object entities and their types. Specifically, given an example: $^ { \circ \circ } \underline { { H } } e$ has a sister Lisa.”, the input tokens are “[CLS] [SUB_PER] He [/SUB_PER] has a sister [OBJ_PER] Lisa [/OBJ_PER]. [SEP]” where “PER” is the entity type if provided. Denote the $n$ -th hidden representation of the BERT encoder as $\mathbf { h } _ { n }$ . Assuming $i$ and $j$ are the indices of two beginning entity markers [SUB_PER] and [OBJ_PER], we define the relation representation as $\mathbf { R e l } = \mathbf { h } _ { i } \oplus \mathbf { h } _ { j }$ where $\bigoplus$ stands for concatenation of representations in the first dimension. Subsequently, this representation is fed into a feedforward network for predicting the relation probability $p ( y \in \mathbb { R } \cup \{ \mathrm { N U L L } \} \mid \mathbf { R e l } )$ .
|
| 86 |
+
|
| 87 |
+
The entity markers have explicitly encoded subject and object entities and the relation representation $\mathbf { R e l }$ is naturally enriched with the entity information. We believe this approach can potentially compensate for the limitations of GPT-3 in RE. While GPT-3 ICL has a constraint of limited demonstrations, the fine-tuning process is unbundled and can be done on the whole train data. It has two subsequent merits. First, the relation representations are directly fine-tuned to fit the RE task, which could significantly boost the overall retrieval quality. Second, the overpredicting NULL issue will be substantially alleviated because the similar NULL demonstrated can be accurately recognized by the fine-tuned model.
|
| 88 |
+
|
| 89 |
+

|
| 90 |
+
Figure 5: An illustration of adding reasoning.
|
| 91 |
+
|
| 92 |
+
Table 1: Statistics of datasets.
|
| 93 |
+
|
| 94 |
+
<table><tr><td>Dataset</td><td>#Relation</td><td># Train</td><td>#Dev</td><td># Test (# Subset)</td><td>NULL (%)</td></tr><tr><td>Semeval</td><td>9</td><td>6.507</td><td>1,493</td><td>2,717 (2,717)</td><td>17.40%</td></tr><tr><td>TACRED</td><td>41</td><td>68,124</td><td>22.631</td><td>15,509 (1,600)</td><td>79.40%</td></tr><tr><td>SciERC</td><td>7</td><td>16,872</td><td>2.033</td><td>4,088 (4.088)</td><td>90.16%</td></tr><tr><td>ACE05</td><td>6</td><td>121,368</td><td>27,597</td><td>24,420 (2,442)</td><td>95.60%</td></tr></table>
|
| 95 |
+
|
| 96 |
+
# 2.5 Gold Label-induced Reasoning
|
| 97 |
+
|
| 98 |
+
Recent CoT work has reported significant progress in the commonsense and numerical reasoning tasks by automatically eliciting the reasoning steps for solving a question. While in the RE task, two entities can possibly hold multiple relations, e.g., “Joe Biden” can be either the president of or lives in “U.S.”. The reasoning generation could be out of focus if it lacks interaction with the gold label.
|
| 99 |
+
|
| 100 |
+
In this section, we propose to let GPT-3 induce the reasoning logic for each demonstration by the corresponding gold relation label. As shown in Figure 5, given a selected demonstration, we first generate a query prompt “What are the clues that lead to the relation between [entity1] and [entity2] to be [relation] in the sentence [context]?” based on the demonstration and subsequently ask GPT-3 to generate clues “It is because: ...” on the labeled relation between the pair of entities in the context. Finally, we augment the demonstration by incorporating the generated clues induced by GPT-3.
|
| 101 |
+
|
| 102 |
+
Table 2: Main Results on four RE datasets. All results are given by Micro-F1. \* denotes the same $k$ -shot for the comparison with $^ +$ Reasoning. Due to the costly GPT-3 expense, we conducted Reasoning experiments on the two relatively smaller datasets Semeval and TACRED. $\clubsuit$ denotes that this performance is not comparable as it evaluates on the entire test set. The underline denotes the results outperforming the fine-tuning baseline PURE.
|
| 103 |
+
|
| 104 |
+
<table><tr><td>Methods</td><td>Retriever</td><td>Semeval</td><td>TACRED</td><td>SciERC</td><td>ACE05</td></tr><tr><td colspan="6">GPT-3 Baselines (Best k-shot)</td></tr><tr><td>GPT-Random</td><td></td><td>70.04 (30)</td><td>32.49 (15)</td><td>17.92 (25)</td><td>9.04 (25)</td></tr><tr><td>GPT-Sent</td><td>SimCSE</td><td>79.94 (30)</td><td>33.45 (15)</td><td>20.96 (25)</td><td>6.31 (25)</td></tr><tr><td colspan="6">Ours (Best k-shot)</td></tr><tr><td>GPT-RE_SimCSE</td><td>SimCSE</td><td>81.02 (30)</td><td>37.44 (15)</td><td>26.46 (25)</td><td>8.67 (25)</td></tr><tr><td>GPT-RE_SimCSE*</td><td>SimCSE</td><td>77.49 (15)</td><td>31.58 (10)</td><td>-</td><td>-</td></tr><tr><td>+ Reasoning</td><td>SimCSE</td><td>79.88 (15)</td><td>33.18 (10)</td><td>-</td><td>:</td></tr><tr><td>GPT-RE_FT</td><td>PURE</td><td>91.90 (25)</td><td>72.14 (15)</td><td>69.00 (30)</td><td>68.73 (25)</td></tr><tr><td>GPT-RE_FT*</td><td>PURE</td><td>91.11 (15)</td><td>70.38 (10)</td><td></td><td>-</td></tr><tr><td>+ Reasoning</td><td>PURE</td><td>91.82 (15)</td><td>70.97 (10)</td><td></td><td>■</td></tr><tr><td colspan="6">Fine-tuned RE Baselines</td></tr><tr><td>Cohen et al. (2020)</td><td></td><td>91.90</td><td>1</td><td></td><td></td></tr><tr><td>Wang et al. (2022a)</td><td></td><td>1</td><td>$76.80</td><td></td><td></td></tr><tr><td>PURE (Zhong and Chen, 2021)</td><td></td><td>89.90</td><td>69.72</td><td>68.45</td><td>70.09</td></tr></table>
|
| 105 |
+
|
| 106 |
+
# 3 Experiment Setup
|
| 107 |
+
|
| 108 |
+
# 3.1 Datasets
|
| 109 |
+
|
| 110 |
+
We evaluate on three popular general domain RE datasets and one scientific domain dataset. Due to the cost of running the model in the API with GPT-3, in our main results, we sample a subset (See Appendix C) from the original test set for two datasets: ACE05 and TACRED as shown in Table 1.
|
| 111 |
+
|
| 112 |
+
Semeval 2010 task 8 Hendrickx et al. (2010) focuses on semantic relations between pairs of nominals collected from general domain resources.
|
| 113 |
+
|
| 114 |
+
TACRED Zhang et al. (2017) is a large-scale relation extraction dataset with 106,264 examples built over newswire and web text.
|
| 115 |
+
|
| 116 |
+
prompt construction (Sec. 2.3) via OpenAI API. We implement two categories of GPT-3 baselines:
|
| 117 |
+
|
| 118 |
+
(1) GPT-Random Instead of randomly selecting few-shot demonstrations from the training data for each test input, we add extra constraints to make the label distribution of selected demonstrations more uniform. Our preliminary experiments suggest that this is a stronger baseline than the vanilla random.
|
| 119 |
+
|
| 120 |
+
(2) GPT-Sent Previous work attempts various sentence embedding in retrieval. In this work, our implementation adopted SimCSE (Gao et al., 2021), which has been demonstrated to be the state-of-theart method for sentence similarity tasks.
|
| 121 |
+
|
| 122 |
+
SciERC Luan et al. (2018) collects AI paper abstracts and annotated relations, especially for scientific knowledge graph construction.
|
| 123 |
+
|
| 124 |
+
ACE05 contains the entity, relation, and event annotations collected from domains including newswire, broadcast, discussion forums, etc.
|
| 125 |
+
|
| 126 |
+
# 3.2 Baseline Methods
|
| 127 |
+
|
| 128 |
+
GPT-3 baselines For GPT-3 baselines and our methods, we select “text-davinci-003” with maximal 4,097 input tokens and use the identical
|
| 129 |
+
|
| 130 |
+
Fine-tuned RE Models In our experiment, we choose PURE (Zhong and Chen, 2021), an entity marker-based fine-tuned model mentioned in Sec. 2.4.2 to obtain the representations for retrieval. Meanwhile, PURE performs as a directly comparable baseline. We also compare with corresponding SOTA fine-tuned baselines on Semeval Cohen et al. (2020) (reformulate RE as the question answering task) and TACRED Wang et al. (2022a) (extra pretraining to capture RE structure) datasets.
|
| 131 |
+
|
| 132 |
+
All implementation details are in Appendix A.
|
| 133 |
+
|
| 134 |
+

|
| 135 |
+
Figure 6: Ablation study on the retrieval and reasoning components on Semeval. We sampled a subset from the test data with 300 examples. We show the ‘w/o reasoning’ results with $k = 3 0$ for comparison.
|
| 136 |
+
|
| 137 |
+
# 4 Experimental Results
|
| 138 |
+
|
| 139 |
+
# 4.1 Main Results
|
| 140 |
+
|
| 141 |
+
We compare our main experiment results with previous methods in Table 2. GPT-RE_SimCSE denotes our entity-prompted sentence embedding for retrieval and GPT-RE_FT denotes our fine-tuned relation representation for retrieval. From the table, we can observe that: (1) both GPT-RE_SimCSE and $G P T – R E \_ F T$ outperform the retrieval-based GPTSent, indicating that it is necessary to inject the taskspecific information into sentence embedding for selecting proper demonstrations; (2) GPT-RE_FT succeeds to outperform the fine-tuning baseline PURE on three datasets by $+ 2 . 0 0$ , $+ 2 . 4 2$ , $+ 0 . 5 5$ Micro-F1. It suggests that GPT-3 has the potential to beat fine-tuning when the retriever has prior task knowledge. GPT-RE_FT eventually achieves SOTA results on Semeval and SciERC. (3) reasoning module improves $G P T – R E \_ S i m C S E$ by around $2 \%$ Micro-F1, indicating that gold label-induced reasoning successfully enriches the knowledge of demonstrations. Meanwhile, the high-quality demonstrations obtained by $G P T – R E \_ F T$ offset the effort of enriching reasoning into demonstrations, which shows relatively trivial improvements. Since reasoning aims at enriching demonstrations, this feature potentially works better with fewer demonstrations, as shown in Section 4.3.
|
| 142 |
+
|
| 143 |
+

|
| 144 |
+
Micro-F1
|
| 145 |
+
Figure 7: Low-resource Scenario on Semeval. We limit the percentage of training data for both fine-tuning and retrieval in GPT-RE.
|
| 146 |
+
|
| 147 |
+
# 4.2 Ablation Study on Task-aware Retrieval
|
| 148 |
+
|
| 149 |
+
We first implement the ablation experiments of the retrieval component with the setting of increasing $k$ -shot demonstrations (Figure 6a). We find that: (1) compared to GPT-Random, all the retrievalbased models have higher F1 scores and large gradients of the performance curves. It means that GPT-3 can learn from high-quality demonstrations more effectively; (2) after adding entity information to the SimCSE retrieval, $G P T – R E \_ S i m C S E$ achieves better performance throughout all $K$ shots, indicating that task-aware sentence embedding can capture the feature of RE and provide more proper demonstrations; (3) finally, the fine-tuned relation representation retriever $G P T – R E \_ F T$ significantly outperforms all retrieval-based methods and beats the fine-tuning baseline when $k > 1 5$ . Note that even with $k = 5$ demonstrations, $G P T – R E \_ F T$ still works better than $G P T – R E \_ S i m C S E$ with $k = 3 0$ $( 8 0 . 3 0 8 3 . 4 3 ( + 3 . 1 3 ) )$ , which indicates that the quality of demonstrations shows much more important than the number of demonstrations.
|
| 150 |
+
|
| 151 |
+
# 4.3 Ablation Study on Reasoning Enhancing
|
| 152 |
+
|
| 153 |
+
We then check the influence of our proposed reasoning-enhanced demonstration, as shown in Figure 6b. Due to the limited amount of input tokens of GPT-3, we have to set the $k \leq 1 5$ for the tokens of reasoning, leading to a trade-off between adding reasoning and adding more demonstrations. From the result, we find that: (1) with reasoningenhanced demonstrations, GPT-3 always achieves better scores across all the $k$ -shot settings of both $G P T – R E \_ S i m C S E$ and $G P T – R E \_ F T$ , indicating that the reasoning induced from ground truth relation labels can effectively unlock the reasoning ability of GPT-3 and improve the ICL with a deeper understanding of demonstrations. Specifically, for GPT$R E { \_ } F T ,$ , the performance improvement becomes less significant when more demonstrations are provided, which is feasible as with more high-quality demonstrations available, GPT-3 can already learn the internal reasoning behind each demonstration; (2) since the reasoning enhancement works better with fewer demonstrations, we expect this method can be an effective solution to low-shot relation extraction (Han et al., 2018; Geng et al., 2020; Liu et al., 2022a), which aims at recognizing novel relations with very few or no examples, and we leave this for future work.
|
| 154 |
+
|
| 155 |
+

|
| 156 |
+
Figure 8: Analysis on the effects of NULL examples. w/o NULL refers to the classification setting that NULL examples are excluded from the train and test data. $\mathsf { w } /$ NULL refers to the original extraction setting. We use the full test set for the evaluation.
|
| 157 |
+
|
| 158 |
+
# 4.4 Low-resource Scenario
|
| 159 |
+
|
| 160 |
+
We conduct the experiment for observing the lowresource performance in the general domain Semeval task. As shown in Figure 7, we observe that: (1) all the GPT-3 based results work better than fine-tuning in when the training examples are less than # 650 $( 1 0 \% )$ . It indicates that in the general domain RE, GPT-3 benefits from its abundant prior knowledge to understand the relations; (2) GPT-RE_SimCSE starts to show a substantial difference to GPT-Sent after the training size surpasses $30 \%$ . We believe fewer training candidates could limit the effects of retrieval; (3) GPT-RE_FT achieves an upper bound performance in all settings, even when the fine-tuned model shows poor performance with hundreds of training data (from #100 to $\# 4 0 0$ ). This emphasizes the impressive effectiveness of fine-tuned relation representations for capturing higher-quality demonstrations. The observation in the low-resource setting is very different from Gutiérrez et al. (2022). We assume the difference could be caused by the domain and NULL proportion of the task.
|
| 161 |
+
|
| 162 |
+
# 5 Analysis
|
| 163 |
+
|
| 164 |
+
# 5.1 The Issue of “Overpredicting”
|
| 165 |
+
|
| 166 |
+
To analyze the influence of NULL class, we compare the effectiveness of each method for alleviating this issue on two datasets: general domain Semeval with $1 7 . 4 \%$ NULL examples and scientific domain SciERC with $9 0 . 1 6 \%$ NULL examples. As shown in Figure 8, (1) by comparing the performance on Semeval and SciERC, a larger percentage of NULL examples results in more significant performance drop showing the negative influence of overpredicting NULL examples; (2) by comparing w/o NULL and w/ NULL, our $G P T – R E \_ F T$ shows the most robustness to the influence of NULL examples, indicating that the RE fine-tuned representations in retrieval can release the overpredicting issue of GPT-3 by providing higher-quality demonstrations; (3) however, even with task-aware representations, all GPT-3 methods still underperform the fine-tuning baseline on NULL examples, this is due to the confusing definition of NULL, in many cases, there is a certain relation between entities in the context, but out of the distribution of predefined classes. In these cases, GPT-3 tends to overpredict as the relation information may be covered in its prior knowledge. We think this ability of GPT-3 can be useful in more open fields, such as open RE (Banko and Etzioni, 2008) which has no pre-defined relation classes.
|
| 167 |
+
|
| 168 |
+

|
| 169 |
+
Figure 9: A case study of demonstration quality on Semeval. [NULL] is the gold label here.
|
| 170 |
+
|
| 171 |
+
# 5.2 Case Study of Demonstration Quality
|
| 172 |
+
|
| 173 |
+
We select one typical test example to better illustrate the amendment of our task-aware demonstration retrieval. As shown in Figure 9, given the NULL Example, we show the most similar demonstration in retrieval based on three methods. The GPT-Sent retrieved demonstration focuses on the semantic meaning of “CONTENT AND CONTAINER” which is shared in the test context, but not revealed in the target entity pair. This mismatch confirms the problem of lacking entity information in retrieval. Instead, GPT-RE_SimCSE retrieves a much more relevant demonstration that shows the same semantic relation between “catch” and “fish” but still faces a minor mismatch as the gold label is between “catch” and “scuttle.” Finally, GPT$R E \_ F T$ demonstration shares a similar structure with the test input regarding the pair of entities, which is the key clue for predicting the relation between entities. This result shows a level-bylevel enhancement with more entity information provided in retrieval. We also show some other case examples in Appendix B.
|
| 174 |
+
|
| 175 |
+
# 6 Related Work
|
| 176 |
+
|
| 177 |
+
In-context Learning Recent work shows that ICL of GPT-3 (Brown et al., 2020) can perform numerous tasks when provided a few examples in a natural language prompt. Existing work focuses on various aspects to effectively utilize the advantages of GPT-3, from prompt design (Perez et al., 2021) for proper input to coherence calibration (Malkin et al., 2022) for tackling the diverse generated output. Another research path locates in the demonstration part, including ordered prompts (Lu et al., 2022) and retrieval-based demonstrations (Rubin et al., 2022; Liu et al., 2022b; Shin et al., 2021).
|
| 178 |
+
|
| 179 |
+
To the best of our knowledge, there is no previous work exploring the potential of GPT-3 on general domain RE tasks. A recent work attempts to leverage GPT-3 in biomedical information extraction (NER and RE), and reveals issues of ICL that may be detrimental to IE tasks in general. Our work succeeds in overcoming these issues to some extent and confirms the potential of GPT-3 in both general and the scientific domain RE.
|
| 180 |
+
|
| 181 |
+
Retrieval-based Demonstrations Several studies have demonstrated that dynamically selecting few-shot demonstrations for each test example, instead of utilizing a fixed set, leads to significant improvement in GPT-3 ICL (Liu et al., 2022b; Shin et al., 2021; Rubin et al., 2022). They also show that nearest neighbor in-context examples yield much better results than the farthest ones. This leads to the significance of better retrieval modules for demonstrations. Existing attempts rely on sentence embedding in retrieval, including the sentence encoders of PLMs such as BERT (Devlin et al., 2019), RoBERTa (Zhuang et al., 2021) KATE (Liu et al., 2022b) , SimCSE (Gao et al., 2021), Sentence-BERT (Reimers and Gurevych, 2019; Wolf et al., 2020). Unlike these sentence embeddings, we propose to fine-tune PLMs on our target RE tasks to produce more task-specific and robust representations for retrieval.
|
| 182 |
+
|
| 183 |
+
# 7 Conclusions
|
| 184 |
+
|
| 185 |
+
This work explores the potential of GPT-3 ICL on RE for bridging the performance gap to the fine-tuning baselines via two strategies: (1) taskaware demonstration retrieval emphasizes entity and relation information for improving the accuracy of searching demonstrations; (2) gold labelinduced reasoning enriches the reasoning evidence of each demonstration. To the best of our knowledge, GPT-RE is the first GPT-3 ICL research that significantly outperforms the fine-tuning baseline on three datasets and achieves SOTA on Semeval and SciERC. We implement detailed studies to explore how GPT-3 overcomes the difficulties such as NULL example influence.
|
| 186 |
+
|
| 187 |
+
# Limitations
|
| 188 |
+
|
| 189 |
+
Despite the overall positive results, GPT-RE still faces two shortcomings: (1) the issue of overpredicting has been significantly alleviated but not completely solved, and the NULL recall still lags behind full-supervised baselines, especially on the datasets containing a large proportion of NULL examples such as ACE05 $( ^ { 6 6 } 9 5 . 6 0 \% ^ { 3 3 } )$ ; (2) Though the task-aware retriever optimizes the representations of PLMs such as SimCSE and BERT, it is widely considered that LLMs can generate more robust representations than small PLMs. Future work can replace representations generated by smaller PLMs with GPT-3 itself. However, due to the access limitation to the representations of GPT-3, we can nearly confirm this proposal up to now.
|
| 190 |
+
|
| 191 |
+
# References
|
| 192 |
+
|
| 193 |
+
Livio Baldini Soares, Nicholas FitzGerald, Jeffrey Ling, and Tom Kwiatkowski. 2019. Matching the blanks: Distributional similarity for relation learning. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 2895– 2905, Florence, Italy. Association for Computational Linguistics.
|
| 194 |
+
|
| 195 |
+
Michele Banko and Oren Etzioni. 2008. The tradeoffs between open and traditional relation extraction. In Proceedings of ACL-08: HLT, pages 28–36, Columbus, Ohio. Association for Computational Linguistics.
|
| 196 |
+
|
| 197 |
+
Iz Beltagy, Kyle Lo, and Arman Cohan. 2019. SciBERT: A pretrained language model for scientific text. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 3615– 3620, Hong Kong, China. Association for Computational Linguistics.
|
| 198 |
+
|
| 199 |
+
Terra Blevins, Hila Gonen, and Luke Zettlemoyer. 2022. Prompting language models for linguistic structure. CoRR, abs/2211.07830.
|
| 200 |
+
|
| 201 |
+
Samuel R. Bowman, Gabor Angeli, Christopher Potts, and Christopher D. Manning. 2015. A large annotated corpus for learning natural language inference.
|
| 202 |
+
|
| 203 |
+
In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pages 632–642, Lisbon, Portugal. Association for Computational Linguistics.
|
| 204 |
+
|
| 205 |
+
Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel Ziegler, Jeffrey Wu, Clemens Winter, Chris Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. 2020. Language models are few-shot learners. In Advances in Neural Information Processing Systems, volume 33, pages 1877–1901. Curran Associates, Inc.
|
| 206 |
+
|
| 207 |
+
akanksha Chowdhery, Sharan Narang, Jacob Devlin, Maarten Bosma, Gaurav Mishra, Adam Roberts, Paul Barham, Hyung Won Chung, Charles Sutton, Sebastian Gehrmann, Parker Schuh, Kensen Shi, Sasha Tsvyashchenko, Joshua Maynez, Abhishek Rao, Parker Barnes, Yi Tay, Noam Shazeer, Vinodkumar Prabhakaran, Emily Reif, Nan Du, Ben Hutchinson, Reiner Pope, James Bradbury, Jacob Austin, Michael Isard, Guy Gur-Ari, Pengcheng Yin, Toju Duke, Anselm Levskaya, Sanjay Ghemawat, Sunipa Dev, Henryk Michalewski, Xavier Garcia, Vedant Misra, Kevin Robinson, Liam Fedus, Denny Zhou, Daphne Ippolito, David Luan, Hyeontaek Lim, Barret Zoph, Alexander Spiridonov, Ryan Sepassi, David Dohan, Shivani Agrawal, Mark Omernick, Andrew M. Dai, Thanumalayan Sankaranarayana Pillai, Marie Pellat, Aitor Lewkowycz, Erica Moreira, Rewon Child, Oleksandr Polozov, Katherine Lee, Zongwei Zhou, Xuezhi Wang, Brennan Saeta, Mark Diaz, Orhan Firat, Michele Catasta, Jason Wei, Kathy Meier-Hellstern, Douglas Eck, Jeff Dean, Slav Petrov, and Noah Fiedel. 2022. Palm: Scaling language modeling with pathways. CoRR, abs/2204.02311.
|
| 208 |
+
|
| 209 |
+
Amir D. N. Cohen, Shachar Rosenman, and Yoav Goldberg. 2020. Relation extraction as two-way spanprediction. CoRR, abs/2010.04829.
|
| 210 |
+
|
| 211 |
+
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 4171–4186, Minneapolis, Minnesota. Association for Computational Linguistics.
|
| 212 |
+
|
| 213 |
+
Tianyu Gao, Xingcheng Yao, and Danqi Chen. 2021. SimCSE: Simple contrastive learning of sentence embeddings. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 6894–6910, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.
|
| 214 |
+
|
| 215 |
+
Xiaoqing Geng, Xiwen Chen, Kenny Q. Zhu, Libin Shen, and Yinggong Zhao. 2020. MICK: A metalearning framework for few-shot relation classification with small training data. In CIKM ’20: The 29th ACM International Conference on Information and Knowledge Management, Virtual Event, Ireland, October 19-23, 2020, pages 415–424. ACM.
|
| 216 |
+
|
| 217 |
+
Bernal Jiménez Gutiérrez, Nikolas McNeal, Clay Washington, You Chen, Lang Li, Huan Sun, and Yu Su. 2022. Thinking about GPT-3 in-context learning for biomedical ie? think again. CoRR, abs/2203.08410.
|
| 218 |
+
|
| 219 |
+
Xu Han, Hao Zhu, Pengfei Yu, Ziyun Wang, Yuan Yao, Zhiyuan Liu, and Maosong Sun. 2018. FewRel: A large-scale supervised few-shot relation classification dataset with state-of-the-art evaluation. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 4803–4809, Brussels, Belgium. Association for Computational Linguistics.
|
| 220 |
+
|
| 221 |
+
Iris Hendrickx, Su Nam Kim, Zornitsa Kozareva, Preslav Nakov, Diarmuid Ó Séaghdha, Sebastian Padó, Marco Pennacchiotti, Lorenza Romano, and Stan Szpakowicz. 2010. SemEval-2010 task 8: Multiway classification of semantic relations between pairs of nominals. In Proceedings of the 5th International Workshop on Semantic Evaluation, pages 33–38, Uppsala, Sweden. Association for Computational Linguistics.
|
| 222 |
+
|
| 223 |
+
Jordan Hoffmann, Sebastian Borgeaud, Arthur Mensch, Elena Buchatskaya, Trevor Cai, Eliza Rutherford, Diego de Las Casas, Lisa Anne Hendricks, Johannes Welbl, Aidan Clark, Tom Hennigan, Eric Noland, Katie Millican, George van den Driessche, Bogdan Damoc, Aurelia Guy, Simon Osindero, Karen Simonyan, Erich Elsen, Jack W. Rae, Oriol Vinyals, and Laurent Sifre. 2022. Training compute-optimal large language models.
|
| 224 |
+
|
| 225 |
+
Takeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo, and Yusuke Iwasawa. 2022. Large language models are zero-shot reasoners. CoRR, abs/2205.11916.
|
| 226 |
+
|
| 227 |
+
Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, and Radu Soricut. 2019. Albert: A lite bert for self-supervised learning of language representations.
|
| 228 |
+
|
| 229 |
+
Fangchao Liu, Hongyu Lin, Xianpei Han, Boxi Cao, and Le Sun. 2022a. Pre-training to match for unified lowshot relation extraction. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 5785– 5795, Dublin, Ireland. Association for Computational Linguistics.
|
| 230 |
+
|
| 231 |
+
Jiachang Liu, Dinghan Shen, Yizhe Zhang, Bill Dolan, Lawrence Carin, and Weizhu Chen. 2022b. What makes good in-context examples for GPT-3? In Proceedings of Deep Learning Inside Out (DeeLIO 2022): The 3rd Workshop on Knowledge Extraction and Integration for Deep Learning Architectures, pages 100–114, Dublin, Ireland and Online. Association for Computational Linguistics.
|
| 232 |
+
|
| 233 |
+
Yao Lu, Max Bartolo, Alastair Moore, Sebastian Riedel, and Pontus Stenetorp. 2022. Fantastically ordered prompts and where to find them: Overcoming fewshot prompt order sensitivity. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 8086–8098, Dublin, Ireland. Association for Computational Linguistics.
|
| 234 |
+
|
| 235 |
+
Yi Luan, Luheng He, Mari Ostendorf, and Hannaneh Hajishirzi. 2018. Multi-task identification of entities, relations, and coreference for scientific knowledge graph construction. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 3219–3232, Brussels, Belgium. Association for Computational Linguistics.
|
| 236 |
+
|
| 237 |
+
Nikolay Malkin, Zhen Wang, and Nebojsa Jojic. 2022. Coherence boosting: When your pretrained language model is not paying enough attention. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 8214–8236, Dublin, Ireland. Association for Computational Linguistics.
|
| 238 |
+
|
| 239 |
+
Sewon Min, Xinxi Lyu, Ari Holtzman, Mikel Artetxe, Mike Lewis, Hannaneh Hajishirzi, and Luke Zettlemoyer. 2022a. Rethinking the role of demonstrations: What makes in-context learning work?
|
| 240 |
+
|
| 241 |
+
Sewon Min, Xinxi Lyu, Ari Holtzman, Mikel Artetxe, Mike Lewis, Hannaneh Hajishirzi, and Luke Zettlemoyer. 2022b. Rethinking the role of demonstrations: What makes in-context learning work? CoRR, abs/2202.12837.
|
| 242 |
+
|
| 243 |
+
Ethan Perez, Douwe Kiela, and Kyunghyun Cho. 2021. True few-shot learning with language models. In Advances in Neural Information Processing Systems 34: Annual Conference on Neural Information Processing Systems 2021, NeurIPS 2021, December 6-14, 2021, virtual, pages 11054–11070.
|
| 244 |
+
|
| 245 |
+
Jack W. Rae, Sebastian Borgeaud, Trevor Cai, Katie Millican, Jordan Hoffmann, Francis Song, John Aslanides, Sarah Henderson, Roman Ring, Susannah Young, Eliza Rutherford, Tom Hennigan, Jacob Menick, Albin Cassirer, Richard Powell, George van den Driessche, Lisa Anne Hendricks, Maribeth Rauh, Po-Sen Huang, Amelia Glaese, Johannes Welbl, Sumanth Dathathri, Saffron Huang, Jonathan Uesato, John Mellor, Irina Higgins, Antonia Creswell, Nat McAleese, Amy Wu, Erich Elsen, Siddhant Jayakumar, Elena Buchatskaya, David Budden, Esme Sutherland, Karen Simonyan, Michela Paganini, Laurent Sifre, Lena Martens, Xiang Lorraine Li, Adhiguna Kuncoro, Aida Nematzadeh, Elena Gribovskaya, Domenic Donato, Angeliki Lazaridou, Arthur Mensch, Jean-Baptiste Lespiau, Maria Tsimpoukelli, Nikolai Grigorev, Doug Fritz, Thibault Sottiaux, Mantas Pajarskas, Toby Pohlen, Zhitao Gong, Daniel Toyama, Cyprien de Masson d’Autume, Yujia
|
| 246 |
+
|
| 247 |
+
Li, Tayfun Terzi, Vladimir Mikulik, Igor Babuschkin, Aidan Clark, Diego de Las Casas, Aurelia Guy, Chris Jones, James Bradbury, Matthew Johnson, Blake Hechtman, Laura Weidinger, Iason Gabriel, William Isaac, Ed Lockhart, Simon Osindero, Laura Rimell, Chris Dyer, Oriol Vinyals, Kareem Ayoub, Jeff Stanway, Lorrayne Bennett, Demis Hassabis, Koray Kavukcuoglu, and Geoffrey Irving. 2021. Scaling language models: Methods, analysis & insights from training gopher.
|
| 248 |
+
|
| 249 |
+
Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. 2019. Exploring the limits of transfer learning with a unified text-to-text transformer.
|
| 250 |
+
|
| 251 |
+
Nils Reimers and Iryna Gurevych. 2019. SentenceBERT: Sentence embeddings using Siamese BERTnetworks. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 3982–3992, Hong Kong, China. Association for Computational Linguistics.
|
| 252 |
+
|
| 253 |
+
Ohad Rubin, Jonathan Herzig, and Jonathan Berant. 2022. Learning to retrieve prompts for in-context learning. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 2655–2671, Seattle, United States. Association for Computational Linguistics.
|
| 254 |
+
|
| 255 |
+
Richard Shin, Christopher Lin, Sam Thomson, Charles Chen, Subhro Roy, Emmanouil Antonios Platanios, Adam Pauls, Dan Klein, Jason Eisner, and Benjamin Van Durme. 2021. Constrained language models yield few-shot semantic parsers. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 7699–7715, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.
|
| 256 |
+
|
| 257 |
+
Romal Thoppilan, Daniel De Freitas, Jamie Hall, Noam Shazeer, Apoorv Kulshreshtha, Heng-Tze Cheng, Alicia Jin, Taylor Bos, Leslie Baker, Yu Du, YaGuang Li, Hongrae Lee, Huaixiu Steven Zheng, Amin Ghafouri, Marcelo Menegali, Yanping Huang, Maxim Krikun, Dmitry Lepikhin, James Qin, Dehao Chen, Yuanzhong Xu, Zhifeng Chen, Adam Roberts, Maarten Bosma, Vincent Zhao, Yanqi Zhou, ChungChing Chang, Igor Krivokon, Will Rusch, Marc Pickett, Pranesh Srinivasan, Laichee Man, Kathleen Meier-Hellstern, Meredith Ringel Morris, Tulsee Doshi, Renelito Delos Santos, Toju Duke, Johnny Soraker, Ben Zevenbergen, Vinodkumar Prabhakaran, Mark Diaz, Ben Hutchinson, Kristen Olson, Alejandra Molina, Erin Hoffman-John, Josh Lee, Lora Aroyo, Ravi Rajakumar, Alena Butryna, Matthew Lamm, Viktoriya Kuzmina, Joe Fenton, Aaron Cohen, Rachel Bernstein, Ray Kurzweil, Blaise AgueraArcas, Claire Cui, Marian Croak, Ed Chi, and Quoc Le. 2022. Lamda: Language models for dialog applications.
|
| 258 |
+
|
| 259 |
+
Zhen Wan, Qianying Liu, Zhuoyuan Mao, Fei Cheng, Sadao Kurohashi, and Jiwei Li. 2022. Rescue implicit and long-tail cases: Nearest neighbor relation extraction. CoRR, abs/2210.11800.
|
| 260 |
+
|
| 261 |
+
Chenguang Wang, Xiao Liu, Zui Chen, Haoyun Hong, Jie Tang, and Dawn Song. 2022a. DeepStruct: Pretraining of language models for structure prediction. In Findings of the Association for Computational Linguistics: ACL 2022, pages 803–823, Dublin, Ireland. Association for Computational Linguistics.
|
| 262 |
+
|
| 263 |
+
Xuezhi Wang, Jason Wei, Dale Schuurmans, Quoc V. Le, Ed H. Chi, and Denny Zhou. 2022b. Selfconsistency improves chain of thought reasoning in language models. CoRR, abs/2203.11171.
|
| 264 |
+
|
| 265 |
+
Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Ed H. Chi, Quoc Le, and Denny Zhou. 2022. Chain of thought prompting elicits reasoning in large language models. CoRR, abs/2201.11903.
|
| 266 |
+
|
| 267 |
+
Adina Williams, Nikita Nangia, and Samuel Bowman. 2018. A broad-coverage challenge corpus for sentence understanding through inference. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), pages 1112–1122, New Orleans, Louisiana. Association for Computational Linguistics.
|
| 268 |
+
|
| 269 |
+
Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Remi Louf, Morgan Funtowicz, Joe Davison, Sam Shleifer, Patrick von Platen, Clara Ma, Yacine Jernite, Julien Plu, Canwen Xu, Teven Le Scao, Sylvain Gugger, Mariama Drame, Quentin Lhoest, and Alexander Rush. 2020. Transformers: State-of-the-art natural language processing. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 38–45, Online. Association for Computational Linguistics.
|
| 270 |
+
|
| 271 |
+
Yuhao Zhang, Victor Zhong, Danqi Chen, Gabor Angeli, and Christopher D. Manning. 2017. Position-aware attention and supervised data improve slot filling. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 35–45, Copenhagen, Denmark. Association for Computational Linguistics.
|
| 272 |
+
|
| 273 |
+
Zihao Zhao, Eric Wallace, Shi Feng, Dan Klein, and Sameer Singh. 2021. Calibrate before use: Improving few-shot performance of language models. In Proceedings of the 38th International Conference on Machine Learning, ICML 2021, 18-24 July 2021, Virtual Event, volume 139 of Proceedings of Machine Learning Research, pages 12697–12706. PMLR.
|
| 274 |
+
|
| 275 |
+
Zexuan Zhong and Danqi Chen. 2021. A frustratingly easy approach for entity and relation extraction. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 50–61, Online. Association for Computational Linguistics.
|
| 276 |
+
|
| 277 |
+
Liu Zhuang, Lin Wayne, Shi Ya, and Zhao Jun. 2021. A robustly optimized BERT pre-training approach with post-training. In Proceedings of the 20th Chinese National Conference on Computational Linguistics, pages 1218–1227, Huhhot, China. Chinese Information Processing Society of China.
|
| 278 |
+
|
| 279 |
+
Table 3: GPT-3 Hyperparamters.
|
| 280 |
+
|
| 281 |
+
<table><tr><td>Hyperparameter</td><td>In Experiment</td></tr><tr><td>Engine</td><td>text-davinci-003</td></tr><tr><td>Temperature</td><td>0.0</td></tr><tr><td>Max_tokens</td><td>256</td></tr><tr><td>Top_p</td><td>1</td></tr><tr><td>Frequency_penalty</td><td>0.0</td></tr><tr><td>Presence_penalty</td><td>0.0</td></tr><tr><td>Best_of</td><td>1</td></tr><tr><td>Logprob</td><td>1</td></tr></table>
|
| 282 |
+
|
| 283 |
+
Table 4: Search range for each dataset.
|
| 284 |
+
|
| 285 |
+
<table><tr><td>Dataset</td><td>Lower bound</td><td>Upper bound</td></tr><tr><td>Semeval</td><td>5</td><td>30</td></tr><tr><td>TACRED</td><td>5</td><td>15</td></tr><tr><td>SciERC</td><td>5</td><td>30</td></tr><tr><td>ACE05</td><td>5</td><td>25</td></tr></table>
|
| 286 |
+
|
| 287 |
+
# A Hyperparameters
|
| 288 |
+
|
| 289 |
+
# A.1 GPT-3 Hyperparameters
|
| 290 |
+
|
| 291 |
+
We use the GPT-3 API during the experiments and set the hyperparameters as in Table 3. Since the “Temperature” is set to be 0.0, denoting the stable output of GPT-3, we report the result of the single run for all experiments. Due to the input length limitation of GPT-3 and the various average lengths of contexts from each dataset, we set different search ranges for the number of demonstrations of each dataset as shown in Table 4.
|
| 292 |
+
|
| 293 |
+
# A.2 Fine-tuning Baseline PURE
|
| 294 |
+
|
| 295 |
+
We follow their single-sentence setup to keep consistency among datasets as Semeval and TACRED are both sentence-level RE datasets. For the PLMs, we also follow PURE by using scibert-scivocabuncased (Beltagy et al., 2019) as the base encoder for SciERC and bert-base-uncased (Devlin et al., 2019) for the remaining three general domain datasets. We follow hyperparameters in their paper. We used 2 NVIDIA RTX3090 for training.
|
| 296 |
+
|
| 297 |
+
# A.3 Sentence Embedding Methods
|
| 298 |
+
|
| 299 |
+
Gutiérrez et al. (2022) uses the [CLS] of RoBERTalarge as the representation in retrieval, Liu et al. (2022b) fine-tunes RoBERTa-large on two natural language inference (NLI) datasets: SNLI (Bowman et al., 2015) and MultiNLI (Williams et al., 2018) to enhance the quality of sentence embedding. For the sentence embedding method SimCSE in our experiment, we utilize the version: sup-simcse-bert-base-uncased.
|
| 300 |
+
|
| 301 |
+

|
| 302 |
+
|
| 303 |
+

|
| 304 |
+
Figure 10: More casees.
|
| 305 |
+
|
| 306 |
+
(b) [ENTITY AND DESTINATION] denotes the gold label.
|
| 307 |
+
|
| 308 |
+
Table 5: ACE05
|
| 309 |
+
|
| 310 |
+
<table><tr><td>Label</td><td># Num</td></tr><tr><td>PHYS</td><td>28</td></tr><tr><td>GEN-AFF</td><td>12</td></tr><tr><td>PER-SOC</td><td>11</td></tr><tr><td>GEN-AFF</td><td>33</td></tr><tr><td>PART-WHOLE</td><td>13</td></tr><tr><td>ART</td><td>19</td></tr><tr><td>NULL</td><td>2329</td></tr></table>
|
| 311 |
+
|
| 312 |
+
# B Case Study
|
| 313 |
+
|
| 314 |
+
To verify the effectiveness of our task-aware demonstration retrieval, we provide more cases.
|
| 315 |
+
|
| 316 |
+
For Figure 10a, GPT-Sent retrieves a demonstration that shares the same semantic meaning of “design” with the test input. However, the entity pair is irrelevant to the concept “design” resulting in a noisy demonstration. Instead, GPT-RE_SimCSE retrieves a more relative demonstration with closer pair of entities sharing the same relation label. Furthermore, GPT-RE_FT retrieves the demonstration containing both the closing entity pair and the same linguistic structure between entities. This case emphasizes level-by-level improvement using our proposed methods. Figure 10b shows a similar phenomenon.
|
| 317 |
+
|
| 318 |
+
# C Subset
|
| 319 |
+
|
| 320 |
+
The number of sampled examples is not only related to the size of the training data itself. A more important factor is the proportion of NULL. We have to maintain the original label distribution in datasets with a high proportion of NULL. Thus, the rule to sample the subset is to keep the proportion of each relation label consistent with the original test set. Table 5 6 are label distributions of two subsets.
|
| 321 |
+
|
| 322 |
+
GPT-RE_FT on TACRED surpasses the supervised baseline in the current subset. As we show above, some labels in TACRED are indeed not well presented (only 1 example), since TACRED dataset contains some long-tail labels. We decided to add additional results of GPT-RE_FT by enlarging our sampled set to $\# 3 2 0 0$ (2 times the current version), and the performance of GPT-RE_FT $( { \bf k } = 1 5 )$ ) is 73.16 while the performance of PURE is 70.48.
|
| 323 |
+
|
| 324 |
+
Table 6: TACRED
|
| 325 |
+
|
| 326 |
+
<table><tr><td colspan="2">Label</td></tr><tr><td>Per:title</td><td>#Num 40</td></tr><tr><td>PER:city_of_death</td><td>1</td></tr><tr><td>Org:shareholders</td><td>2</td></tr><tr><td>Per:origin</td><td>12</td></tr><tr><td>Org:top_members/employees</td><td>36</td></tr><tr><td>Org:city_of_headquarters</td><td>11</td></tr><tr><td>Per:religion</td><td>4</td></tr><tr><td>Per:city_of_birth</td><td>1</td></tr><tr><td>Per:employee_of</td><td>27</td></tr><tr><td>Per:data_of_death</td><td>3</td></tr><tr><td>Per:other_family</td><td>5</td></tr><tr><td>Org:website</td><td>6</td></tr><tr><td>Per:cause_of_death</td><td>3</td></tr><tr><td>Org:subsidiaries</td><td>4</td></tr><tr><td>Org:stateorprovince_of_headquarters</td><td>5</td></tr><tr><td>Per:countries_of_residence</td><td>10</td></tr><tr><td>Per:siblings</td><td>5</td></tr><tr><td>Per:stateorprovinces_of_residence</td><td>11</td></tr><tr><td>Org:alternate_names</td><td>27</td></tr><tr><td>Per:spouse</td><td>4</td></tr><tr><td>Per:parents</td><td>7</td></tr><tr><td>Org:country_of_headquarters</td><td>9</td></tr><tr><td>Per:age</td><td>21</td></tr><tr><td>Per:date_of_birth</td><td></td></tr><tr><td>Per:country_of_death</td><td></td></tr><tr><td>Per:schools_attended</td><td>4</td></tr><tr><td>Org:member_of</td><td>3</td></tr><tr><td>Per:children</td><td>5</td></tr><tr><td>Org:parents</td><td>7</td></tr><tr><td>Per:cities_of_residence</td><td>24</td></tr><tr><td>Per:stateorprovince_of_brith</td><td>1</td></tr><tr><td>Per:charges</td><td>12</td></tr><tr><td>Org:founded</td><td>2</td></tr><tr><td>Org:country_founded_by</td><td>5</td></tr><tr><td>Per:stateorprovince_of_death</td><td></td></tr><tr><td>Org:members</td><td>4</td></tr><tr><td>Per:country_of_birth</td><td></td></tr><tr><td>Per:alternate_names</td><td></td></tr><tr><td>Org:number_of_employees/members</td><td>1</td></tr><tr><td>Org:dissolved</td><td></td></tr><tr><td>Org:political/religious_affiliation</td><td>1</td></tr><tr><td>NULL</td><td>1271</td></tr></table>
|
parse/dev/mTiHLHu3sP/mTiHLHu3sP_content_list.json
ADDED
|
@@ -0,0 +1,1891 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "GPT-RE: In-context Learning for Relation Extraction using Large Language Models ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
218,
|
| 8 |
+
79,
|
| 9 |
+
781,
|
| 10 |
+
118
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Zhen Wan 1 Fei Cheng Zhuoyuan Mao 1 \nQianying Liu1 Haiyue Song1 Jiwei $\\mathbf { L i } ^ { 2 }$ Sadao Kurohashi1 1 Kyoto University, Japan 2 Zhejiang University, China \n{zhenwan, zhuoyuanmao, ying, song}@nlp.ist.i.kyoto-u.ac.jp {feicheng, kuro}@i.kyoto-u.ac.jp {jiwei_li}@zju.edu.cn ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
210,
|
| 19 |
+
124,
|
| 20 |
+
793,
|
| 21 |
+
242
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "Abstract ",
|
| 28 |
+
"text_level": 1,
|
| 29 |
+
"bbox": [
|
| 30 |
+
263,
|
| 31 |
+
253,
|
| 32 |
+
339,
|
| 33 |
+
268
|
| 34 |
+
],
|
| 35 |
+
"page_idx": 0
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"type": "text",
|
| 39 |
+
"text": "In spite of the potential for ground-breaking achievements offered by large language models (LLMs) (e.g., GPT-3) via in-context learning (ICL), they still lag significantly behind fullysupervised baselines (e.g., fine-tuned BERT) in relation extraction (RE). This is due to the two major shortcomings of ICL for RE: (1) low relevance regarding entity and relation in existing sentence-level demonstration retrieval approaches for ICL; and (2) the lack of explaining input-label mappings of demonstrations leading to poor ICL effectiveness. ",
|
| 40 |
+
"bbox": [
|
| 41 |
+
144,
|
| 42 |
+
279,
|
| 43 |
+
458,
|
| 44 |
+
449
|
| 45 |
+
],
|
| 46 |
+
"page_idx": 0
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"type": "text",
|
| 50 |
+
"text": "In this paper, we propose GPT-RE to successfully address the aforementioned issues by (1) incorporating task-aware representations in demonstration retrieval; and (2) enriching the demonstrations with gold label-induced reasoning logic. We evaluate GPT-RE on four widely-used RE datasets and observe that GPTRE achieves improvements over not only existing GPT-3 baselines, but also fully-supervised baselines as in Figure 1. Specifically, GPT-RE achieves SOTA performances on the Semeval and SciERC datasets, and competitive performances on the TACRED and ACE05 datasets. ",
|
| 51 |
+
"bbox": [
|
| 52 |
+
144,
|
| 53 |
+
455,
|
| 54 |
+
457,
|
| 55 |
+
639
|
| 56 |
+
],
|
| 57 |
+
"page_idx": 0
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
"type": "text",
|
| 61 |
+
"text": "Additionally, a critical issue of LLMs revealed by previous work, the strong inclination to wrongly classify NULL examples into other predefined labels, is substantially alleviated by our method. We show an empirical analysis.1 ",
|
| 62 |
+
"bbox": [
|
| 63 |
+
146,
|
| 64 |
+
645,
|
| 65 |
+
458,
|
| 66 |
+
715
|
| 67 |
+
],
|
| 68 |
+
"page_idx": 0
|
| 69 |
+
},
|
| 70 |
+
{
|
| 71 |
+
"type": "text",
|
| 72 |
+
"text": "1 Introduction ",
|
| 73 |
+
"text_level": 1,
|
| 74 |
+
"bbox": [
|
| 75 |
+
117,
|
| 76 |
+
727,
|
| 77 |
+
258,
|
| 78 |
+
744
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "text",
|
| 84 |
+
"text": "The emergence of large language models (LLMs) such as GPT-3 (Brown et al., 2020; Thoppilan et al., 2022; Chowdhery et al., 2022; Rae et al., 2021; Hoffmann et al., 2022) represents a significant advancement in natural language processing (NLP). Instead of following a pretraining-and-finetuning pipeline (Devlin et al., 2019; Beltagy et al., 2019; Raffel et al., 2019; Lan et al., 2019; Zhuang et al., 2021), which finetunes a pre-trained model on a task-specific dataset in a fully-supervised manner, LLMs employ a new paradigm known as incontext learning (ICL) (Brown et al., 2020; Min et al., 2022a) which formulates an NLP task under the paradigm of language generation and makes predictions by learning from a few demonstrations. Under the framework of ICL, LLMs achieve remarkable performance rivaling previous fullysupervised methods even with only a limited number of demonstrations provided in various tasks such as solving math problems, commonsense reasoning, text classification, fact retrieval, natural language inference, and semantic parsing (Brown et al., 2020; Min et al., 2022b; Zhao et al., 2021; Liu et al., 2022b; Shin et al., 2021). ",
|
| 85 |
+
"bbox": [
|
| 86 |
+
115,
|
| 87 |
+
753,
|
| 88 |
+
487,
|
| 89 |
+
897
|
| 90 |
+
],
|
| 91 |
+
"page_idx": 0
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"type": "image",
|
| 95 |
+
"img_path": "images/737fc6fb9bbca490e9e7288108c8b62c87990a8c9541d2db9bd5b677b146c93a.jpg",
|
| 96 |
+
"image_caption": [
|
| 97 |
+
"Figure 1: Micro F1 performances on two RE datasets. Previous GPT baselines (GPT-Random: randomly selected demonstrations and $G P T – S e n t$ : sentence-level demonstration retrieval) largely underperform finetuning baseline PURE while our GPT-RE substantially outperforms all baselines. "
|
| 98 |
+
],
|
| 99 |
+
"image_footnote": [],
|
| 100 |
+
"bbox": [
|
| 101 |
+
510,
|
| 102 |
+
250,
|
| 103 |
+
880,
|
| 104 |
+
384
|
| 105 |
+
],
|
| 106 |
+
"page_idx": 0
|
| 107 |
+
},
|
| 108 |
+
{
|
| 109 |
+
"type": "text",
|
| 110 |
+
"text": "",
|
| 111 |
+
"bbox": [
|
| 112 |
+
512,
|
| 113 |
+
513,
|
| 114 |
+
882,
|
| 115 |
+
753
|
| 116 |
+
],
|
| 117 |
+
"page_idx": 0
|
| 118 |
+
},
|
| 119 |
+
{
|
| 120 |
+
"type": "text",
|
| 121 |
+
"text": "Despite the overall promising performance of LLMs, the utilization of ICL for relation extraction (RE) is still suboptimal. RE is the central task for knowledge retrieval requiring a deep understanding of natural language, which seeks to identify a predefined relation between a specific entity pair mentioned in the input sentence or NULL if no relation is found. Given a test input, ICL for RE prompts the input of LLMs with the task instruction, a few demonstrations retrieved from the training data, and the test input itself. Then LLMs generate the corresponding relation. Recent research (Gutiérrez et al., 2022) has sought to apply GPT-3 ICL to biomedical RE, but the results are relatively negative and suggest that GPT-3 ICL still significantly underperforms fine-tuned models. ",
|
| 122 |
+
"bbox": [
|
| 123 |
+
512,
|
| 124 |
+
759,
|
| 125 |
+
882,
|
| 126 |
+
919
|
| 127 |
+
],
|
| 128 |
+
"page_idx": 0
|
| 129 |
+
},
|
| 130 |
+
{
|
| 131 |
+
"type": "image",
|
| 132 |
+
"img_path": "images/6463ebaa683a9b9ecc457102139ebaafd3aab7ae9ab9c4804a3b33c9e9773771.jpg",
|
| 133 |
+
"image_caption": [
|
| 134 |
+
"Figure 2: Retrieval without considering the task-aware triplet results in noisy demonstrations. "
|
| 135 |
+
],
|
| 136 |
+
"image_footnote": [],
|
| 137 |
+
"bbox": [
|
| 138 |
+
117,
|
| 139 |
+
83,
|
| 140 |
+
484,
|
| 141 |
+
185
|
| 142 |
+
],
|
| 143 |
+
"page_idx": 1
|
| 144 |
+
},
|
| 145 |
+
{
|
| 146 |
+
"type": "text",
|
| 147 |
+
"text": "",
|
| 148 |
+
"bbox": [
|
| 149 |
+
117,
|
| 150 |
+
254,
|
| 151 |
+
487,
|
| 152 |
+
349
|
| 153 |
+
],
|
| 154 |
+
"page_idx": 1
|
| 155 |
+
},
|
| 156 |
+
{
|
| 157 |
+
"type": "text",
|
| 158 |
+
"text": "The reasons that cause the pitfall of GPT-3 ICL in RE are two folds: (1) The low relevance regarding entity and relation in the retrieved demonstrations for ICL. Demonstrations are selected randomly or via $k$ -nearest neighbor $( k \\mathbf { N N } )$ search based on sentence embedding (Liu et al., 2022b; Gutiérrez et al., 2022). Regrettably, $k \\mathbf { N N }$ -retrieval based on sentence embedding is more concerned with the relevance of the overall sentence semantics and not as much with the specific entities and relations it contains, which leads to low-quality demonstrations. As shown in Figure 2, the test input retrieves a semantically similar sentence but is not desired in terms of entities and relations. ",
|
| 159 |
+
"bbox": [
|
| 160 |
+
115,
|
| 161 |
+
353,
|
| 162 |
+
487,
|
| 163 |
+
576
|
| 164 |
+
],
|
| 165 |
+
"page_idx": 1
|
| 166 |
+
},
|
| 167 |
+
{
|
| 168 |
+
"type": "text",
|
| 169 |
+
"text": "(2) The lack of explaining input-label mappings in demonstrations leads to poor ICL effectiveness: A vanilla form of ICL lists all demonstrations as input-label pairs without any explanations. This may mislead LLMs to learn shallow clues from surface words, while a relation can be presented in diverse forms due to language complexity. Especially when ICL has a maximal input length, optimizing the learning efficiency of each single demonstration becomes extremely important. ",
|
| 170 |
+
"bbox": [
|
| 171 |
+
115,
|
| 172 |
+
580,
|
| 173 |
+
487,
|
| 174 |
+
740
|
| 175 |
+
],
|
| 176 |
+
"page_idx": 1
|
| 177 |
+
},
|
| 178 |
+
{
|
| 179 |
+
"type": "text",
|
| 180 |
+
"text": "To this end, we propose GPT-RE for the RE task. GPT-RE employs two strategies to resolve the issues above: (1) task-aware retrieval and (2) gold label-induced reasoning. For (1) task-aware retrieval, its core is to use representations that deliberately encode and emphasize entity and relation information rather than sentence embedding for $k \\mathbf { N N }$ search. We achieve this by two different retrieval approaches: (a) entity-prompted sentence embedding; (b) fine-tuned relation representation, which naturally places emphasis on entities and relations. Both methods contain more RE-specific information than sentence semantics, thus effectively addressing the problem of low relevance. ",
|
| 181 |
+
"bbox": [
|
| 182 |
+
117,
|
| 183 |
+
744,
|
| 184 |
+
485,
|
| 185 |
+
919
|
| 186 |
+
],
|
| 187 |
+
"page_idx": 1
|
| 188 |
+
},
|
| 189 |
+
{
|
| 190 |
+
"type": "image",
|
| 191 |
+
"img_path": "images/eaf7faea998bdc4f6a06a495cf548f187f44beb5843d72e46a910745879ddd82.jpg",
|
| 192 |
+
"image_caption": [
|
| 193 |
+
"Figure 3: Confusion matrix on Semeval dataset with three selected relation labels. The NULL examples are overpredicted to other relations by GPT-3. CE: CauseEffect, IA: Instrument-Agency, PP: Product-Producer. "
|
| 194 |
+
],
|
| 195 |
+
"image_footnote": [],
|
| 196 |
+
"bbox": [
|
| 197 |
+
512,
|
| 198 |
+
80,
|
| 199 |
+
880,
|
| 200 |
+
200
|
| 201 |
+
],
|
| 202 |
+
"page_idx": 1
|
| 203 |
+
},
|
| 204 |
+
{
|
| 205 |
+
"type": "text",
|
| 206 |
+
"text": "",
|
| 207 |
+
"bbox": [
|
| 208 |
+
512,
|
| 209 |
+
318,
|
| 210 |
+
882,
|
| 211 |
+
365
|
| 212 |
+
],
|
| 213 |
+
"page_idx": 1
|
| 214 |
+
},
|
| 215 |
+
{
|
| 216 |
+
"type": "text",
|
| 217 |
+
"text": "For (2) gold label-induced reasoning, we propose to inject the reasoning logic into the demonstration to provide more evidence to align an input and the label, a strategy akin to the Chain-ofThought (CoT) research (Wei et al., 2022; Wang et al., 2022b; Kojima et al., 2022). But different from previous work, we allow LLMs to elicit the reasoning process to explain not only why a given sentence should be classified under a particular label but also why a NULL example should not be assigned to any of the pre-defined categories. This process significantly improves the ability of LLMs to align the relations with diverse expression forms. ",
|
| 218 |
+
"bbox": [
|
| 219 |
+
512,
|
| 220 |
+
380,
|
| 221 |
+
882,
|
| 222 |
+
588
|
| 223 |
+
],
|
| 224 |
+
"page_idx": 1
|
| 225 |
+
},
|
| 226 |
+
{
|
| 227 |
+
"type": "text",
|
| 228 |
+
"text": "Recent work reveals another crucial problem named “overpredicting” as shown in Figure 3: we observe that LLMs have the strong inclination to wrongly classify NULL examples into other predefined labels . A similar phenomenon has also been observed in other tasks such as NER (Gutiérrez et al., 2022; Blevins et al., 2022). In this paper, we show that this issue can be alleviated if the representations for retrieval can be supervised with the whole set of NULL in the training data. ",
|
| 229 |
+
"bbox": [
|
| 230 |
+
512,
|
| 231 |
+
602,
|
| 232 |
+
882,
|
| 233 |
+
760
|
| 234 |
+
],
|
| 235 |
+
"page_idx": 1
|
| 236 |
+
},
|
| 237 |
+
{
|
| 238 |
+
"type": "text",
|
| 239 |
+
"text": "We evaluate our proposed method on three popular general domain RE datasets: Semeval 2010 task 8, TACRED and ACE05, and one scientific domain dataset SciERC. We observe that GPT-RE achieves improvements over not only existing GPT-3 baselines, but also fully-supervised baselines. Specifically, GPT-RE achieves SOTA performances on the Semeval and SciERC datasets, and competitive performances on the TACRED and ACE05 datasets. ",
|
| 240 |
+
"bbox": [
|
| 241 |
+
512,
|
| 242 |
+
776,
|
| 243 |
+
884,
|
| 244 |
+
919
|
| 245 |
+
],
|
| 246 |
+
"page_idx": 1
|
| 247 |
+
},
|
| 248 |
+
{
|
| 249 |
+
"type": "image",
|
| 250 |
+
"img_path": "images/94e18221ed21d4af84d47d0cce6ed74afe0a0d901fe81dccb8ec4fa846eebd25.jpg",
|
| 251 |
+
"image_caption": [
|
| 252 |
+
"Figure 4: An illustration of GPT-RE. Given a test input, we first leverage two different task-aware retrieval methods to search for highly relevant demonstrations from the training set, and then incorporate the gold label-induced reasoning for each demonstration. Above contents will then be included in the prompt construction to make the prediction. "
|
| 253 |
+
],
|
| 254 |
+
"image_footnote": [],
|
| 255 |
+
"bbox": [
|
| 256 |
+
121,
|
| 257 |
+
85,
|
| 258 |
+
878,
|
| 259 |
+
317
|
| 260 |
+
],
|
| 261 |
+
"page_idx": 2
|
| 262 |
+
},
|
| 263 |
+
{
|
| 264 |
+
"type": "text",
|
| 265 |
+
"text": "2 Methodology: GPT-RE ",
|
| 266 |
+
"text_level": 1,
|
| 267 |
+
"bbox": [
|
| 268 |
+
117,
|
| 269 |
+
411,
|
| 270 |
+
349,
|
| 271 |
+
428
|
| 272 |
+
],
|
| 273 |
+
"page_idx": 2
|
| 274 |
+
},
|
| 275 |
+
{
|
| 276 |
+
"type": "text",
|
| 277 |
+
"text": "2.1 Task Definition ",
|
| 278 |
+
"text_level": 1,
|
| 279 |
+
"bbox": [
|
| 280 |
+
117,
|
| 281 |
+
438,
|
| 282 |
+
280,
|
| 283 |
+
453
|
| 284 |
+
],
|
| 285 |
+
"page_idx": 2
|
| 286 |
+
},
|
| 287 |
+
{
|
| 288 |
+
"type": "text",
|
| 289 |
+
"text": "Let $\\mathcal { C }$ denote the input context and $e _ { \\mathrm { s u b } } ~ \\in ~ \\mathcal { C }$ $e _ { \\mathrm { o b j } } \\in { \\mathcal { C } }$ denote the pair of subject and object entity. Given a set of pre-defined relation classes $\\mathbb { R }$ , relation extraction aims to predict the relation $y \\in \\mathbb { R }$ between the pair of entities $( e _ { \\mathrm { s u b } } , e _ { \\mathrm { o b j } } )$ within the context $\\mathcal { C }$ , or if there is no pre-defined relation between them, predict $y = \\mathrm { N U L L }$ . ",
|
| 290 |
+
"bbox": [
|
| 291 |
+
115,
|
| 292 |
+
460,
|
| 293 |
+
487,
|
| 294 |
+
571
|
| 295 |
+
],
|
| 296 |
+
"page_idx": 2
|
| 297 |
+
},
|
| 298 |
+
{
|
| 299 |
+
"type": "text",
|
| 300 |
+
"text": "2.2 Overview ",
|
| 301 |
+
"text_level": 1,
|
| 302 |
+
"bbox": [
|
| 303 |
+
117,
|
| 304 |
+
583,
|
| 305 |
+
235,
|
| 306 |
+
598
|
| 307 |
+
],
|
| 308 |
+
"page_idx": 2
|
| 309 |
+
},
|
| 310 |
+
{
|
| 311 |
+
"type": "text",
|
| 312 |
+
"text": "We will first introduce the prompt construction to formalize RE as a language generation task in Sec. 2.3. Then to improve the ICL framework for RE, we will introduce two modules: (1) task-aware demonstration retrieval to select higherquality demonstrations (Sec. 2.4); (2) gold labelinduced reasoning to enrich each demonstration with explanations (Sec. 2.5). In Figure 4, we show the concrete workflow of processing a test input. ",
|
| 313 |
+
"bbox": [
|
| 314 |
+
115,
|
| 315 |
+
605,
|
| 316 |
+
487,
|
| 317 |
+
749
|
| 318 |
+
],
|
| 319 |
+
"page_idx": 2
|
| 320 |
+
},
|
| 321 |
+
{
|
| 322 |
+
"type": "text",
|
| 323 |
+
"text": "2.3 Prompt Construction ",
|
| 324 |
+
"text_level": 1,
|
| 325 |
+
"bbox": [
|
| 326 |
+
117,
|
| 327 |
+
760,
|
| 328 |
+
327,
|
| 329 |
+
776
|
| 330 |
+
],
|
| 331 |
+
"page_idx": 2
|
| 332 |
+
},
|
| 333 |
+
{
|
| 334 |
+
"type": "text",
|
| 335 |
+
"text": "We construct a prompt for each given test example, which is fed to the GPT-3 model. Each prompt consists of the following components: ",
|
| 336 |
+
"bbox": [
|
| 337 |
+
115,
|
| 338 |
+
782,
|
| 339 |
+
487,
|
| 340 |
+
829
|
| 341 |
+
],
|
| 342 |
+
"page_idx": 2
|
| 343 |
+
},
|
| 344 |
+
{
|
| 345 |
+
"type": "text",
|
| 346 |
+
"text": "Instructions $\\mathcal { T }$ We provide a succinct overview of the RE task description and the set of pre-defined classes $\\mathbb { R }$ . The model is explicitly asked to output the relation, which belongs to the pre-defined classes. Otherwise, the model will output NULL. ",
|
| 347 |
+
"bbox": [
|
| 348 |
+
115,
|
| 349 |
+
840,
|
| 350 |
+
487,
|
| 351 |
+
919
|
| 352 |
+
],
|
| 353 |
+
"page_idx": 2
|
| 354 |
+
},
|
| 355 |
+
{
|
| 356 |
+
"type": "text",
|
| 357 |
+
"text": "ICL Demonstrations $\\mathcal { D }$ We first leverage a taskaware retriever to acquire a $k$ -shot demonstration set, then enrich each demonstration $( x _ { i } , y _ { i } )$ with the gold label-induced reasoning $r _ { i }$ to build a new set of $( x _ { i } , y _ { i } , r _ { i } )$ as $\\mathcal { D }$ . ",
|
| 358 |
+
"bbox": [
|
| 359 |
+
510,
|
| 360 |
+
412,
|
| 361 |
+
882,
|
| 362 |
+
493
|
| 363 |
+
],
|
| 364 |
+
"page_idx": 2
|
| 365 |
+
},
|
| 366 |
+
{
|
| 367 |
+
"type": "text",
|
| 368 |
+
"text": "Test Input $x _ { t e s t }$ Similar to the demonstrations, we offer the test input $x _ { t e s t }$ , and GPT-3 is expected to generate the corresponding relation $y _ { t e s t }$ . ",
|
| 369 |
+
"bbox": [
|
| 370 |
+
510,
|
| 371 |
+
502,
|
| 372 |
+
882,
|
| 373 |
+
549
|
| 374 |
+
],
|
| 375 |
+
"page_idx": 2
|
| 376 |
+
},
|
| 377 |
+
{
|
| 378 |
+
"type": "text",
|
| 379 |
+
"text": "In summary, GPT-RE can be formulated as: ",
|
| 380 |
+
"bbox": [
|
| 381 |
+
529,
|
| 382 |
+
551,
|
| 383 |
+
855,
|
| 384 |
+
565
|
| 385 |
+
],
|
| 386 |
+
"page_idx": 2
|
| 387 |
+
},
|
| 388 |
+
{
|
| 389 |
+
"type": "equation",
|
| 390 |
+
"img_path": "images/dcb3018cd596f93a59323946046986b99f04c7434fff200161cc88d05d73492c.jpg",
|
| 391 |
+
"text": "$$\np \\left( y _ { t e s t } \\in \\mathbb { R } \\cup \\left\\{ \\mathrm { N U L L } \\right\\} \\vert \\mathbb { Z } , \\mathcal { D } , x _ { t e s t } \\right)\n$$",
|
| 392 |
+
"text_format": "latex",
|
| 393 |
+
"bbox": [
|
| 394 |
+
563,
|
| 395 |
+
579,
|
| 396 |
+
828,
|
| 397 |
+
596
|
| 398 |
+
],
|
| 399 |
+
"page_idx": 2
|
| 400 |
+
},
|
| 401 |
+
{
|
| 402 |
+
"type": "text",
|
| 403 |
+
"text": "2.4 Task-aware Demonstration Retrieval ",
|
| 404 |
+
"text_level": 1,
|
| 405 |
+
"bbox": [
|
| 406 |
+
512,
|
| 407 |
+
609,
|
| 408 |
+
845,
|
| 409 |
+
624
|
| 410 |
+
],
|
| 411 |
+
"page_idx": 2
|
| 412 |
+
},
|
| 413 |
+
{
|
| 414 |
+
"type": "text",
|
| 415 |
+
"text": "Since ICL demonstrations closer to the test sample in the embedding space result in more consistent and robust performance (Liu et al., 2022b). Recent work (Gutiérrez et al., 2022; Liu et al., 2022b) employs the $k \\mathbf { N N }$ to retrieve the most similar examples in the training set as the few-shot demonstrations for each test input. As $k \\mathbf { N N }$ relies on the choice of the embedding space to encode both test input and examples in the training set, they propose to obtain sentence embedding using pre-trained language models, or other improved sentence embedding. ",
|
| 416 |
+
"bbox": [
|
| 417 |
+
512,
|
| 418 |
+
631,
|
| 419 |
+
884,
|
| 420 |
+
822
|
| 421 |
+
],
|
| 422 |
+
"page_idx": 2
|
| 423 |
+
},
|
| 424 |
+
{
|
| 425 |
+
"type": "text",
|
| 426 |
+
"text": "However, using sentence embedding for $k \\mathbf { N N }$ retrieval has a severe drawback: relation extraction focuses on pair-wise entities, which diverge from the semantic meaning of the entire sentence, leading to an ambiguous retrieval using sentence embedding. In this study, we propose two novel methods to provide more robust representations for better retrieval quality: (1) a naive entity-prompted sentence embedding in Sec. 2.4.1; (2) an advanced fine-tuned relation representation in Sec. 2.4.2. ",
|
| 427 |
+
"bbox": [
|
| 428 |
+
512,
|
| 429 |
+
825,
|
| 430 |
+
884,
|
| 431 |
+
920
|
| 432 |
+
],
|
| 433 |
+
"page_idx": 2
|
| 434 |
+
},
|
| 435 |
+
{
|
| 436 |
+
"type": "text",
|
| 437 |
+
"text": "",
|
| 438 |
+
"bbox": [
|
| 439 |
+
115,
|
| 440 |
+
84,
|
| 441 |
+
487,
|
| 442 |
+
148
|
| 443 |
+
],
|
| 444 |
+
"page_idx": 3
|
| 445 |
+
},
|
| 446 |
+
{
|
| 447 |
+
"type": "text",
|
| 448 |
+
"text": "2.4.1 Entity-Prompted Sentence Embedding ",
|
| 449 |
+
"text_level": 1,
|
| 450 |
+
"bbox": [
|
| 451 |
+
115,
|
| 452 |
+
160,
|
| 453 |
+
478,
|
| 454 |
+
175
|
| 455 |
+
],
|
| 456 |
+
"page_idx": 3
|
| 457 |
+
},
|
| 458 |
+
{
|
| 459 |
+
"type": "text",
|
| 460 |
+
"text": "Given the discrepancy between sentence embedding and relation extraction, the original context is insufficient for demonstration retrieval. Considering the importance of entity information in RE, we propose reconstructing the context by incorporating entity pair information. For example, given the context $^ { \\circ \\circ } \\underline { { H } } e$ has a sister Lisa,” the reconstructed context with the entity prompted will be “The relation between ‘He’ and ‘Lisa’ in the context: He has a sister Lisa.” This approach preserves both the semantic meaning of the sentence and the entity pair-centered information during retrieval. In the paper, we employ the latest robust model SimCSE (Gao et al., 2021) for computing sentence embedding-based similarity. ",
|
| 461 |
+
"bbox": [
|
| 462 |
+
115,
|
| 463 |
+
180,
|
| 464 |
+
487,
|
| 465 |
+
419
|
| 466 |
+
],
|
| 467 |
+
"page_idx": 3
|
| 468 |
+
},
|
| 469 |
+
{
|
| 470 |
+
"type": "text",
|
| 471 |
+
"text": "2.4.2 Fine-tuned Relation Representation ",
|
| 472 |
+
"text_level": 1,
|
| 473 |
+
"bbox": [
|
| 474 |
+
117,
|
| 475 |
+
431,
|
| 476 |
+
453,
|
| 477 |
+
447
|
| 478 |
+
],
|
| 479 |
+
"page_idx": 3
|
| 480 |
+
},
|
| 481 |
+
{
|
| 482 |
+
"type": "text",
|
| 483 |
+
"text": "Compared to prompt entity information into context sentences, a more straightforward solution is to extract the relation representation from a fine-tuned RE model for retrieving demonstrations. ",
|
| 484 |
+
"bbox": [
|
| 485 |
+
115,
|
| 486 |
+
453,
|
| 487 |
+
487,
|
| 488 |
+
516
|
| 489 |
+
],
|
| 490 |
+
"page_idx": 3
|
| 491 |
+
},
|
| 492 |
+
{
|
| 493 |
+
"type": "text",
|
| 494 |
+
"text": "Current BERT-based fine-tuning methods for RE (Baldini Soares et al., 2019; Zhong and Chen, 2021; Wan et al., 2022) attempts to capture both the context information and the entity information by adding extra marker tokens to highlight the subject and object entities and their types. Specifically, given an example: $^ { \\circ \\circ } \\underline { { H } } e$ has a sister Lisa.”, the input tokens are “[CLS] [SUB_PER] He [/SUB_PER] has a sister [OBJ_PER] Lisa [/OBJ_PER]. [SEP]” where “PER” is the entity type if provided. Denote the $n$ -th hidden representation of the BERT encoder as $\\mathbf { h } _ { n }$ . Assuming $i$ and $j$ are the indices of two beginning entity markers [SUB_PER] and [OBJ_PER], we define the relation representation as $\\mathbf { R e l } = \\mathbf { h } _ { i } \\oplus \\mathbf { h } _ { j }$ where $\\bigoplus$ stands for concatenation of representations in the first dimension. Subsequently, this representation is fed into a feedforward network for predicting the relation probability $p ( y \\in \\mathbb { R } \\cup \\{ \\mathrm { N U L L } \\} \\mid \\mathbf { R e l } )$ . ",
|
| 495 |
+
"bbox": [
|
| 496 |
+
115,
|
| 497 |
+
517,
|
| 498 |
+
487,
|
| 499 |
+
822
|
| 500 |
+
],
|
| 501 |
+
"page_idx": 3
|
| 502 |
+
},
|
| 503 |
+
{
|
| 504 |
+
"type": "text",
|
| 505 |
+
"text": "The entity markers have explicitly encoded subject and object entities and the relation representation $\\mathbf { R e l }$ is naturally enriched with the entity information. We believe this approach can potentially compensate for the limitations of GPT-3 in RE. While GPT-3 ICL has a constraint of limited demonstrations, the fine-tuning process is unbundled and can be done on the whole train data. It has two subsequent merits. First, the relation representations are directly fine-tuned to fit the RE task, which could significantly boost the overall retrieval quality. Second, the overpredicting NULL issue will be substantially alleviated because the similar NULL demonstrated can be accurately recognized by the fine-tuned model. ",
|
| 506 |
+
"bbox": [
|
| 507 |
+
115,
|
| 508 |
+
825,
|
| 509 |
+
487,
|
| 510 |
+
919
|
| 511 |
+
],
|
| 512 |
+
"page_idx": 3
|
| 513 |
+
},
|
| 514 |
+
{
|
| 515 |
+
"type": "image",
|
| 516 |
+
"img_path": "images/15bf5c71d8095e1ae26ca660064161a9b6e1fddf906738cf200bcd237e2ed0fc.jpg",
|
| 517 |
+
"image_caption": [
|
| 518 |
+
"Figure 5: An illustration of adding reasoning. "
|
| 519 |
+
],
|
| 520 |
+
"image_footnote": [],
|
| 521 |
+
"bbox": [
|
| 522 |
+
512,
|
| 523 |
+
80,
|
| 524 |
+
880,
|
| 525 |
+
273
|
| 526 |
+
],
|
| 527 |
+
"page_idx": 3
|
| 528 |
+
},
|
| 529 |
+
{
|
| 530 |
+
"type": "table",
|
| 531 |
+
"img_path": "images/65d25f58fec7ebf0e1cbfb4aa1920ff6fd04d56a48edaa5687b01a45253b5f48.jpg",
|
| 532 |
+
"table_caption": [
|
| 533 |
+
"Table 1: Statistics of datasets. "
|
| 534 |
+
],
|
| 535 |
+
"table_footnote": [],
|
| 536 |
+
"table_body": "<table><tr><td>Dataset</td><td>#Relation</td><td># Train</td><td>#Dev</td><td># Test (# Subset)</td><td>NULL (%)</td></tr><tr><td>Semeval</td><td>9</td><td>6.507</td><td>1,493</td><td>2,717 (2,717)</td><td>17.40%</td></tr><tr><td>TACRED</td><td>41</td><td>68,124</td><td>22.631</td><td>15,509 (1,600)</td><td>79.40%</td></tr><tr><td>SciERC</td><td>7</td><td>16,872</td><td>2.033</td><td>4,088 (4.088)</td><td>90.16%</td></tr><tr><td>ACE05</td><td>6</td><td>121,368</td><td>27,597</td><td>24,420 (2,442)</td><td>95.60%</td></tr></table>",
|
| 537 |
+
"bbox": [
|
| 538 |
+
515,
|
| 539 |
+
313,
|
| 540 |
+
878,
|
| 541 |
+
370
|
| 542 |
+
],
|
| 543 |
+
"page_idx": 3
|
| 544 |
+
},
|
| 545 |
+
{
|
| 546 |
+
"type": "text",
|
| 547 |
+
"text": "",
|
| 548 |
+
"bbox": [
|
| 549 |
+
512,
|
| 550 |
+
420,
|
| 551 |
+
882,
|
| 552 |
+
565
|
| 553 |
+
],
|
| 554 |
+
"page_idx": 3
|
| 555 |
+
},
|
| 556 |
+
{
|
| 557 |
+
"type": "text",
|
| 558 |
+
"text": "2.5 Gold Label-induced Reasoning ",
|
| 559 |
+
"text_level": 1,
|
| 560 |
+
"bbox": [
|
| 561 |
+
514,
|
| 562 |
+
577,
|
| 563 |
+
798,
|
| 564 |
+
592
|
| 565 |
+
],
|
| 566 |
+
"page_idx": 3
|
| 567 |
+
},
|
| 568 |
+
{
|
| 569 |
+
"type": "text",
|
| 570 |
+
"text": "Recent CoT work has reported significant progress in the commonsense and numerical reasoning tasks by automatically eliciting the reasoning steps for solving a question. While in the RE task, two entities can possibly hold multiple relations, e.g., “Joe Biden” can be either the president of or lives in “U.S.”. The reasoning generation could be out of focus if it lacks interaction with the gold label. ",
|
| 571 |
+
"bbox": [
|
| 572 |
+
510,
|
| 573 |
+
599,
|
| 574 |
+
882,
|
| 575 |
+
725
|
| 576 |
+
],
|
| 577 |
+
"page_idx": 3
|
| 578 |
+
},
|
| 579 |
+
{
|
| 580 |
+
"type": "text",
|
| 581 |
+
"text": "In this section, we propose to let GPT-3 induce the reasoning logic for each demonstration by the corresponding gold relation label. As shown in Figure 5, given a selected demonstration, we first generate a query prompt “What are the clues that lead to the relation between [entity1] and [entity2] to be [relation] in the sentence [context]?” based on the demonstration and subsequently ask GPT-3 to generate clues “It is because: ...” on the labeled relation between the pair of entities in the context. Finally, we augment the demonstration by incorporating the generated clues induced by GPT-3. ",
|
| 582 |
+
"bbox": [
|
| 583 |
+
512,
|
| 584 |
+
727,
|
| 585 |
+
882,
|
| 586 |
+
920
|
| 587 |
+
],
|
| 588 |
+
"page_idx": 3
|
| 589 |
+
},
|
| 590 |
+
{
|
| 591 |
+
"type": "table",
|
| 592 |
+
"img_path": "images/6c128fecae0810cfbef4491920aa3ad02560f105fc63e51143ce8c83524c01b1.jpg",
|
| 593 |
+
"table_caption": [
|
| 594 |
+
"Table 2: Main Results on four RE datasets. All results are given by Micro-F1. \\* denotes the same $k$ -shot for the comparison with $^ +$ Reasoning. Due to the costly GPT-3 expense, we conducted Reasoning experiments on the two relatively smaller datasets Semeval and TACRED. $\\clubsuit$ denotes that this performance is not comparable as it evaluates on the entire test set. The underline denotes the results outperforming the fine-tuning baseline PURE. "
|
| 595 |
+
],
|
| 596 |
+
"table_footnote": [],
|
| 597 |
+
"table_body": "<table><tr><td>Methods</td><td>Retriever</td><td>Semeval</td><td>TACRED</td><td>SciERC</td><td>ACE05</td></tr><tr><td colspan=\"6\">GPT-3 Baselines (Best k-shot)</td></tr><tr><td>GPT-Random</td><td></td><td>70.04 (30)</td><td>32.49 (15)</td><td>17.92 (25)</td><td>9.04 (25)</td></tr><tr><td>GPT-Sent</td><td>SimCSE</td><td>79.94 (30)</td><td>33.45 (15)</td><td>20.96 (25)</td><td>6.31 (25)</td></tr><tr><td colspan=\"6\">Ours (Best k-shot)</td></tr><tr><td>GPT-RE_SimCSE</td><td>SimCSE</td><td>81.02 (30)</td><td>37.44 (15)</td><td>26.46 (25)</td><td>8.67 (25)</td></tr><tr><td>GPT-RE_SimCSE*</td><td>SimCSE</td><td>77.49 (15)</td><td>31.58 (10)</td><td>-</td><td>-</td></tr><tr><td>+ Reasoning</td><td>SimCSE</td><td>79.88 (15)</td><td>33.18 (10)</td><td>-</td><td>:</td></tr><tr><td>GPT-RE_FT</td><td>PURE</td><td>91.90 (25)</td><td>72.14 (15)</td><td>69.00 (30)</td><td>68.73 (25)</td></tr><tr><td>GPT-RE_FT*</td><td>PURE</td><td>91.11 (15)</td><td>70.38 (10)</td><td></td><td>-</td></tr><tr><td>+ Reasoning</td><td>PURE</td><td>91.82 (15)</td><td>70.97 (10)</td><td></td><td>■</td></tr><tr><td colspan=\"6\">Fine-tuned RE Baselines</td></tr><tr><td>Cohen et al. (2020)</td><td></td><td>91.90</td><td>1</td><td></td><td></td></tr><tr><td>Wang et al. (2022a)</td><td></td><td>1</td><td>$76.80</td><td></td><td></td></tr><tr><td>PURE (Zhong and Chen, 2021)</td><td></td><td>89.90</td><td>69.72</td><td>68.45</td><td>70.09</td></tr></table>",
|
| 598 |
+
"bbox": [
|
| 599 |
+
131,
|
| 600 |
+
82,
|
| 601 |
+
870,
|
| 602 |
+
349
|
| 603 |
+
],
|
| 604 |
+
"page_idx": 4
|
| 605 |
+
},
|
| 606 |
+
{
|
| 607 |
+
"type": "text",
|
| 608 |
+
"text": "3 Experiment Setup ",
|
| 609 |
+
"text_level": 1,
|
| 610 |
+
"bbox": [
|
| 611 |
+
117,
|
| 612 |
+
441,
|
| 613 |
+
304,
|
| 614 |
+
457
|
| 615 |
+
],
|
| 616 |
+
"page_idx": 4
|
| 617 |
+
},
|
| 618 |
+
{
|
| 619 |
+
"type": "text",
|
| 620 |
+
"text": "3.1 Datasets ",
|
| 621 |
+
"text_level": 1,
|
| 622 |
+
"bbox": [
|
| 623 |
+
117,
|
| 624 |
+
468,
|
| 625 |
+
226,
|
| 626 |
+
483
|
| 627 |
+
],
|
| 628 |
+
"page_idx": 4
|
| 629 |
+
},
|
| 630 |
+
{
|
| 631 |
+
"type": "text",
|
| 632 |
+
"text": "We evaluate on three popular general domain RE datasets and one scientific domain dataset. Due to the cost of running the model in the API with GPT-3, in our main results, we sample a subset (See Appendix C) from the original test set for two datasets: ACE05 and TACRED as shown in Table 1. ",
|
| 633 |
+
"bbox": [
|
| 634 |
+
115,
|
| 635 |
+
489,
|
| 636 |
+
485,
|
| 637 |
+
601
|
| 638 |
+
],
|
| 639 |
+
"page_idx": 4
|
| 640 |
+
},
|
| 641 |
+
{
|
| 642 |
+
"type": "text",
|
| 643 |
+
"text": "Semeval 2010 task 8 Hendrickx et al. (2010) focuses on semantic relations between pairs of nominals collected from general domain resources. ",
|
| 644 |
+
"bbox": [
|
| 645 |
+
115,
|
| 646 |
+
613,
|
| 647 |
+
487,
|
| 648 |
+
659
|
| 649 |
+
],
|
| 650 |
+
"page_idx": 4
|
| 651 |
+
},
|
| 652 |
+
{
|
| 653 |
+
"type": "text",
|
| 654 |
+
"text": "TACRED Zhang et al. (2017) is a large-scale relation extraction dataset with 106,264 examples built over newswire and web text. ",
|
| 655 |
+
"bbox": [
|
| 656 |
+
115,
|
| 657 |
+
671,
|
| 658 |
+
487,
|
| 659 |
+
719
|
| 660 |
+
],
|
| 661 |
+
"page_idx": 4
|
| 662 |
+
},
|
| 663 |
+
{
|
| 664 |
+
"type": "text",
|
| 665 |
+
"text": "prompt construction (Sec. 2.3) via OpenAI API. We implement two categories of GPT-3 baselines: ",
|
| 666 |
+
"bbox": [
|
| 667 |
+
512,
|
| 668 |
+
442,
|
| 669 |
+
882,
|
| 670 |
+
473
|
| 671 |
+
],
|
| 672 |
+
"page_idx": 4
|
| 673 |
+
},
|
| 674 |
+
{
|
| 675 |
+
"type": "text",
|
| 676 |
+
"text": "(1) GPT-Random Instead of randomly selecting few-shot demonstrations from the training data for each test input, we add extra constraints to make the label distribution of selected demonstrations more uniform. Our preliminary experiments suggest that this is a stronger baseline than the vanilla random. ",
|
| 677 |
+
"bbox": [
|
| 678 |
+
512,
|
| 679 |
+
487,
|
| 680 |
+
882,
|
| 681 |
+
582
|
| 682 |
+
],
|
| 683 |
+
"page_idx": 4
|
| 684 |
+
},
|
| 685 |
+
{
|
| 686 |
+
"type": "text",
|
| 687 |
+
"text": "(2) GPT-Sent Previous work attempts various sentence embedding in retrieval. In this work, our implementation adopted SimCSE (Gao et al., 2021), which has been demonstrated to be the state-of-theart method for sentence similarity tasks. ",
|
| 688 |
+
"bbox": [
|
| 689 |
+
510,
|
| 690 |
+
596,
|
| 691 |
+
884,
|
| 692 |
+
676
|
| 693 |
+
],
|
| 694 |
+
"page_idx": 4
|
| 695 |
+
},
|
| 696 |
+
{
|
| 697 |
+
"type": "text",
|
| 698 |
+
"text": "SciERC Luan et al. (2018) collects AI paper abstracts and annotated relations, especially for scientific knowledge graph construction. ",
|
| 699 |
+
"bbox": [
|
| 700 |
+
115,
|
| 701 |
+
731,
|
| 702 |
+
485,
|
| 703 |
+
778
|
| 704 |
+
],
|
| 705 |
+
"page_idx": 4
|
| 706 |
+
},
|
| 707 |
+
{
|
| 708 |
+
"type": "text",
|
| 709 |
+
"text": "ACE05 contains the entity, relation, and event annotations collected from domains including newswire, broadcast, discussion forums, etc. ",
|
| 710 |
+
"bbox": [
|
| 711 |
+
115,
|
| 712 |
+
789,
|
| 713 |
+
485,
|
| 714 |
+
837
|
| 715 |
+
],
|
| 716 |
+
"page_idx": 4
|
| 717 |
+
},
|
| 718 |
+
{
|
| 719 |
+
"type": "text",
|
| 720 |
+
"text": "3.2 Baseline Methods ",
|
| 721 |
+
"text_level": 1,
|
| 722 |
+
"bbox": [
|
| 723 |
+
117,
|
| 724 |
+
851,
|
| 725 |
+
299,
|
| 726 |
+
865
|
| 727 |
+
],
|
| 728 |
+
"page_idx": 4
|
| 729 |
+
},
|
| 730 |
+
{
|
| 731 |
+
"type": "text",
|
| 732 |
+
"text": "GPT-3 baselines For GPT-3 baselines and our methods, we select “text-davinci-003” with maximal 4,097 input tokens and use the identical ",
|
| 733 |
+
"bbox": [
|
| 734 |
+
115,
|
| 735 |
+
872,
|
| 736 |
+
487,
|
| 737 |
+
919
|
| 738 |
+
],
|
| 739 |
+
"page_idx": 4
|
| 740 |
+
},
|
| 741 |
+
{
|
| 742 |
+
"type": "text",
|
| 743 |
+
"text": "Fine-tuned RE Models In our experiment, we choose PURE (Zhong and Chen, 2021), an entity marker-based fine-tuned model mentioned in Sec. 2.4.2 to obtain the representations for retrieval. Meanwhile, PURE performs as a directly comparable baseline. We also compare with corresponding SOTA fine-tuned baselines on Semeval Cohen et al. (2020) (reformulate RE as the question answering task) and TACRED Wang et al. (2022a) (extra pretraining to capture RE structure) datasets. ",
|
| 744 |
+
"bbox": [
|
| 745 |
+
512,
|
| 746 |
+
731,
|
| 747 |
+
884,
|
| 748 |
+
890
|
| 749 |
+
],
|
| 750 |
+
"page_idx": 4
|
| 751 |
+
},
|
| 752 |
+
{
|
| 753 |
+
"type": "text",
|
| 754 |
+
"text": "All implementation details are in Appendix A. ",
|
| 755 |
+
"bbox": [
|
| 756 |
+
531,
|
| 757 |
+
904,
|
| 758 |
+
872,
|
| 759 |
+
920
|
| 760 |
+
],
|
| 761 |
+
"page_idx": 4
|
| 762 |
+
},
|
| 763 |
+
{
|
| 764 |
+
"type": "image",
|
| 765 |
+
"img_path": "images/9b1665e1c5d23a0cef93a9905ce0c6539a5b18c5209b4152ab1b3d98f67cb21a.jpg",
|
| 766 |
+
"image_caption": [
|
| 767 |
+
"Figure 6: Ablation study on the retrieval and reasoning components on Semeval. We sampled a subset from the test data with 300 examples. We show the ‘w/o reasoning’ results with $k = 3 0$ for comparison. "
|
| 768 |
+
],
|
| 769 |
+
"image_footnote": [],
|
| 770 |
+
"bbox": [
|
| 771 |
+
117,
|
| 772 |
+
83,
|
| 773 |
+
492,
|
| 774 |
+
472
|
| 775 |
+
],
|
| 776 |
+
"page_idx": 5
|
| 777 |
+
},
|
| 778 |
+
{
|
| 779 |
+
"type": "text",
|
| 780 |
+
"text": "4 Experimental Results ",
|
| 781 |
+
"text_level": 1,
|
| 782 |
+
"bbox": [
|
| 783 |
+
117,
|
| 784 |
+
565,
|
| 785 |
+
334,
|
| 786 |
+
582
|
| 787 |
+
],
|
| 788 |
+
"page_idx": 5
|
| 789 |
+
},
|
| 790 |
+
{
|
| 791 |
+
"type": "text",
|
| 792 |
+
"text": "4.1 Main Results ",
|
| 793 |
+
"text_level": 1,
|
| 794 |
+
"bbox": [
|
| 795 |
+
117,
|
| 796 |
+
593,
|
| 797 |
+
263,
|
| 798 |
+
607
|
| 799 |
+
],
|
| 800 |
+
"page_idx": 5
|
| 801 |
+
},
|
| 802 |
+
{
|
| 803 |
+
"type": "text",
|
| 804 |
+
"text": "We compare our main experiment results with previous methods in Table 2. GPT-RE_SimCSE denotes our entity-prompted sentence embedding for retrieval and GPT-RE_FT denotes our fine-tuned relation representation for retrieval. From the table, we can observe that: (1) both GPT-RE_SimCSE and $G P T – R E \\_ F T$ outperform the retrieval-based GPTSent, indicating that it is necessary to inject the taskspecific information into sentence embedding for selecting proper demonstrations; (2) GPT-RE_FT succeeds to outperform the fine-tuning baseline PURE on three datasets by $+ 2 . 0 0$ , $+ 2 . 4 2$ , $+ 0 . 5 5$ Micro-F1. It suggests that GPT-3 has the potential to beat fine-tuning when the retriever has prior task knowledge. GPT-RE_FT eventually achieves SOTA results on Semeval and SciERC. (3) reasoning module improves $G P T – R E \\_ S i m C S E$ by around $2 \\%$ Micro-F1, indicating that gold label-induced reasoning successfully enriches the knowledge of demonstrations. Meanwhile, the high-quality demonstrations obtained by $G P T – R E \\_ F T$ offset the effort of enriching reasoning into demonstrations, which shows relatively trivial improvements. Since reasoning aims at enriching demonstrations, this feature potentially works better with fewer demonstrations, as shown in Section 4.3. ",
|
| 805 |
+
"bbox": [
|
| 806 |
+
115,
|
| 807 |
+
614,
|
| 808 |
+
487,
|
| 809 |
+
920
|
| 810 |
+
],
|
| 811 |
+
"page_idx": 5
|
| 812 |
+
},
|
| 813 |
+
{
|
| 814 |
+
"type": "image",
|
| 815 |
+
"img_path": "images/aad727ba032ac6dfbbd59ecefbf9b2e72968c299d8c72a01efecffc5356e5085.jpg",
|
| 816 |
+
"image_caption": [
|
| 817 |
+
"Micro-F1 ",
|
| 818 |
+
"Figure 7: Low-resource Scenario on Semeval. We limit the percentage of training data for both fine-tuning and retrieval in GPT-RE. "
|
| 819 |
+
],
|
| 820 |
+
"image_footnote": [],
|
| 821 |
+
"bbox": [
|
| 822 |
+
515,
|
| 823 |
+
87,
|
| 824 |
+
877,
|
| 825 |
+
258
|
| 826 |
+
],
|
| 827 |
+
"page_idx": 5
|
| 828 |
+
},
|
| 829 |
+
{
|
| 830 |
+
"type": "text",
|
| 831 |
+
"text": "",
|
| 832 |
+
"bbox": [
|
| 833 |
+
512,
|
| 834 |
+
337,
|
| 835 |
+
882,
|
| 836 |
+
450
|
| 837 |
+
],
|
| 838 |
+
"page_idx": 5
|
| 839 |
+
},
|
| 840 |
+
{
|
| 841 |
+
"type": "text",
|
| 842 |
+
"text": "4.2 Ablation Study on Task-aware Retrieval ",
|
| 843 |
+
"text_level": 1,
|
| 844 |
+
"bbox": [
|
| 845 |
+
510,
|
| 846 |
+
462,
|
| 847 |
+
872,
|
| 848 |
+
478
|
| 849 |
+
],
|
| 850 |
+
"page_idx": 5
|
| 851 |
+
},
|
| 852 |
+
{
|
| 853 |
+
"type": "text",
|
| 854 |
+
"text": "We first implement the ablation experiments of the retrieval component with the setting of increasing $k$ -shot demonstrations (Figure 6a). We find that: (1) compared to GPT-Random, all the retrievalbased models have higher F1 scores and large gradients of the performance curves. It means that GPT-3 can learn from high-quality demonstrations more effectively; (2) after adding entity information to the SimCSE retrieval, $G P T – R E \\_ S i m C S E$ achieves better performance throughout all $K$ shots, indicating that task-aware sentence embedding can capture the feature of RE and provide more proper demonstrations; (3) finally, the fine-tuned relation representation retriever $G P T – R E \\_ F T$ significantly outperforms all retrieval-based methods and beats the fine-tuning baseline when $k > 1 5$ . Note that even with $k = 5$ demonstrations, $G P T – R E \\_ F T$ still works better than $G P T – R E \\_ S i m C S E$ with $k = 3 0$ $( 8 0 . 3 0 8 3 . 4 3 ( + 3 . 1 3 ) )$ , which indicates that the quality of demonstrations shows much more important than the number of demonstrations. ",
|
| 855 |
+
"bbox": [
|
| 856 |
+
512,
|
| 857 |
+
483,
|
| 858 |
+
882,
|
| 859 |
+
821
|
| 860 |
+
],
|
| 861 |
+
"page_idx": 5
|
| 862 |
+
},
|
| 863 |
+
{
|
| 864 |
+
"type": "text",
|
| 865 |
+
"text": "4.3 Ablation Study on Reasoning Enhancing ",
|
| 866 |
+
"text_level": 1,
|
| 867 |
+
"bbox": [
|
| 868 |
+
510,
|
| 869 |
+
834,
|
| 870 |
+
873,
|
| 871 |
+
850
|
| 872 |
+
],
|
| 873 |
+
"page_idx": 5
|
| 874 |
+
},
|
| 875 |
+
{
|
| 876 |
+
"type": "text",
|
| 877 |
+
"text": "We then check the influence of our proposed reasoning-enhanced demonstration, as shown in Figure 6b. Due to the limited amount of input tokens of GPT-3, we have to set the $k \\leq 1 5$ for the tokens of reasoning, leading to a trade-off between adding reasoning and adding more demonstrations. From the result, we find that: (1) with reasoningenhanced demonstrations, GPT-3 always achieves better scores across all the $k$ -shot settings of both $G P T – R E \\_ S i m C S E$ and $G P T – R E \\_ F T$ , indicating that the reasoning induced from ground truth relation labels can effectively unlock the reasoning ability of GPT-3 and improve the ICL with a deeper understanding of demonstrations. Specifically, for GPT$R E { \\_ } F T ,$ , the performance improvement becomes less significant when more demonstrations are provided, which is feasible as with more high-quality demonstrations available, GPT-3 can already learn the internal reasoning behind each demonstration; (2) since the reasoning enhancement works better with fewer demonstrations, we expect this method can be an effective solution to low-shot relation extraction (Han et al., 2018; Geng et al., 2020; Liu et al., 2022a), which aims at recognizing novel relations with very few or no examples, and we leave this for future work. ",
|
| 878 |
+
"bbox": [
|
| 879 |
+
510,
|
| 880 |
+
857,
|
| 881 |
+
882,
|
| 882 |
+
920
|
| 883 |
+
],
|
| 884 |
+
"page_idx": 5
|
| 885 |
+
},
|
| 886 |
+
{
|
| 887 |
+
"type": "image",
|
| 888 |
+
"img_path": "images/47654e139162fb1606f22c9b6bb00f1f5b8b911235e8f7cff619458a28a4b244.jpg",
|
| 889 |
+
"image_caption": [
|
| 890 |
+
"Figure 8: Analysis on the effects of NULL examples. w/o NULL refers to the classification setting that NULL examples are excluded from the train and test data. $\\mathsf { w } /$ NULL refers to the original extraction setting. We use the full test set for the evaluation. "
|
| 891 |
+
],
|
| 892 |
+
"image_footnote": [],
|
| 893 |
+
"bbox": [
|
| 894 |
+
121,
|
| 895 |
+
79,
|
| 896 |
+
878,
|
| 897 |
+
265
|
| 898 |
+
],
|
| 899 |
+
"page_idx": 6
|
| 900 |
+
},
|
| 901 |
+
{
|
| 902 |
+
"type": "text",
|
| 903 |
+
"text": "",
|
| 904 |
+
"bbox": [
|
| 905 |
+
115,
|
| 906 |
+
346,
|
| 907 |
+
487,
|
| 908 |
+
697
|
| 909 |
+
],
|
| 910 |
+
"page_idx": 6
|
| 911 |
+
},
|
| 912 |
+
{
|
| 913 |
+
"type": "text",
|
| 914 |
+
"text": "4.4 Low-resource Scenario ",
|
| 915 |
+
"text_level": 1,
|
| 916 |
+
"bbox": [
|
| 917 |
+
117,
|
| 918 |
+
718,
|
| 919 |
+
339,
|
| 920 |
+
732
|
| 921 |
+
],
|
| 922 |
+
"page_idx": 6
|
| 923 |
+
},
|
| 924 |
+
{
|
| 925 |
+
"type": "text",
|
| 926 |
+
"text": "We conduct the experiment for observing the lowresource performance in the general domain Semeval task. As shown in Figure 7, we observe that: (1) all the GPT-3 based results work better than fine-tuning in when the training examples are less than # 650 $( 1 0 \\% )$ . It indicates that in the general domain RE, GPT-3 benefits from its abundant prior knowledge to understand the relations; (2) GPT-RE_SimCSE starts to show a substantial difference to GPT-Sent after the training size surpasses $30 \\%$ . We believe fewer training candidates could limit the effects of retrieval; (3) GPT-RE_FT achieves an upper bound performance in all settings, even when the fine-tuned model shows poor performance with hundreds of training data (from #100 to $\\# 4 0 0$ ). This emphasizes the impressive effectiveness of fine-tuned relation representations for capturing higher-quality demonstrations. The observation in the low-resource setting is very different from Gutiérrez et al. (2022). We assume the difference could be caused by the domain and NULL proportion of the task. ",
|
| 927 |
+
"bbox": [
|
| 928 |
+
117,
|
| 929 |
+
744,
|
| 930 |
+
487,
|
| 931 |
+
919
|
| 932 |
+
],
|
| 933 |
+
"page_idx": 6
|
| 934 |
+
},
|
| 935 |
+
{
|
| 936 |
+
"type": "text",
|
| 937 |
+
"text": "",
|
| 938 |
+
"bbox": [
|
| 939 |
+
512,
|
| 940 |
+
344,
|
| 941 |
+
882,
|
| 942 |
+
520
|
| 943 |
+
],
|
| 944 |
+
"page_idx": 6
|
| 945 |
+
},
|
| 946 |
+
{
|
| 947 |
+
"type": "text",
|
| 948 |
+
"text": "5 Analysis ",
|
| 949 |
+
"text_level": 1,
|
| 950 |
+
"bbox": [
|
| 951 |
+
512,
|
| 952 |
+
535,
|
| 953 |
+
616,
|
| 954 |
+
550
|
| 955 |
+
],
|
| 956 |
+
"page_idx": 6
|
| 957 |
+
},
|
| 958 |
+
{
|
| 959 |
+
"type": "text",
|
| 960 |
+
"text": "5.1 The Issue of “Overpredicting” ",
|
| 961 |
+
"text_level": 1,
|
| 962 |
+
"bbox": [
|
| 963 |
+
514,
|
| 964 |
+
561,
|
| 965 |
+
791,
|
| 966 |
+
575
|
| 967 |
+
],
|
| 968 |
+
"page_idx": 6
|
| 969 |
+
},
|
| 970 |
+
{
|
| 971 |
+
"type": "text",
|
| 972 |
+
"text": "To analyze the influence of NULL class, we compare the effectiveness of each method for alleviating this issue on two datasets: general domain Semeval with $1 7 . 4 \\%$ NULL examples and scientific domain SciERC with $9 0 . 1 6 \\%$ NULL examples. As shown in Figure 8, (1) by comparing the performance on Semeval and SciERC, a larger percentage of NULL examples results in more significant performance drop showing the negative influence of overpredicting NULL examples; (2) by comparing w/o NULL and w/ NULL, our $G P T – R E \\_ F T$ shows the most robustness to the influence of NULL examples, indicating that the RE fine-tuned representations in retrieval can release the overpredicting issue of GPT-3 by providing higher-quality demonstrations; (3) however, even with task-aware representations, all GPT-3 methods still underperform the fine-tuning baseline on NULL examples, this is due to the confusing definition of NULL, in many cases, there is a certain relation between entities in the context, but out of the distribution of predefined classes. In these cases, GPT-3 tends to overpredict as the relation information may be covered in its prior knowledge. We think this ability of GPT-3 can be useful in more open fields, such as open RE (Banko and Etzioni, 2008) which has no pre-defined relation classes. ",
|
| 973 |
+
"bbox": [
|
| 974 |
+
512,
|
| 975 |
+
582,
|
| 976 |
+
882,
|
| 977 |
+
919
|
| 978 |
+
],
|
| 979 |
+
"page_idx": 6
|
| 980 |
+
},
|
| 981 |
+
{
|
| 982 |
+
"type": "image",
|
| 983 |
+
"img_path": "images/067791bcec887336d361f40521d579166b560ee7007caaad9d0544d81a96fc28.jpg",
|
| 984 |
+
"image_caption": [
|
| 985 |
+
"Figure 9: A case study of demonstration quality on Semeval. [NULL] is the gold label here. "
|
| 986 |
+
],
|
| 987 |
+
"image_footnote": [],
|
| 988 |
+
"bbox": [
|
| 989 |
+
114,
|
| 990 |
+
80,
|
| 991 |
+
484,
|
| 992 |
+
328
|
| 993 |
+
],
|
| 994 |
+
"page_idx": 7
|
| 995 |
+
},
|
| 996 |
+
{
|
| 997 |
+
"type": "text",
|
| 998 |
+
"text": "",
|
| 999 |
+
"bbox": [
|
| 1000 |
+
117,
|
| 1001 |
+
406,
|
| 1002 |
+
485,
|
| 1003 |
+
501
|
| 1004 |
+
],
|
| 1005 |
+
"page_idx": 7
|
| 1006 |
+
},
|
| 1007 |
+
{
|
| 1008 |
+
"type": "text",
|
| 1009 |
+
"text": "5.2 Case Study of Demonstration Quality ",
|
| 1010 |
+
"text_level": 1,
|
| 1011 |
+
"bbox": [
|
| 1012 |
+
117,
|
| 1013 |
+
533,
|
| 1014 |
+
452,
|
| 1015 |
+
549
|
| 1016 |
+
],
|
| 1017 |
+
"page_idx": 7
|
| 1018 |
+
},
|
| 1019 |
+
{
|
| 1020 |
+
"type": "text",
|
| 1021 |
+
"text": "We select one typical test example to better illustrate the amendment of our task-aware demonstration retrieval. As shown in Figure 9, given the NULL Example, we show the most similar demonstration in retrieval based on three methods. The GPT-Sent retrieved demonstration focuses on the semantic meaning of “CONTENT AND CONTAINER” which is shared in the test context, but not revealed in the target entity pair. This mismatch confirms the problem of lacking entity information in retrieval. Instead, GPT-RE_SimCSE retrieves a much more relevant demonstration that shows the same semantic relation between “catch” and “fish” but still faces a minor mismatch as the gold label is between “catch” and “scuttle.” Finally, GPT$R E \\_ F T$ demonstration shares a similar structure with the test input regarding the pair of entities, which is the key clue for predicting the relation between entities. This result shows a level-bylevel enhancement with more entity information provided in retrieval. We also show some other case examples in Appendix B. ",
|
| 1022 |
+
"bbox": [
|
| 1023 |
+
115,
|
| 1024 |
+
567,
|
| 1025 |
+
487,
|
| 1026 |
+
919
|
| 1027 |
+
],
|
| 1028 |
+
"page_idx": 7
|
| 1029 |
+
},
|
| 1030 |
+
{
|
| 1031 |
+
"type": "text",
|
| 1032 |
+
"text": "6 Related Work ",
|
| 1033 |
+
"text_level": 1,
|
| 1034 |
+
"bbox": [
|
| 1035 |
+
512,
|
| 1036 |
+
83,
|
| 1037 |
+
663,
|
| 1038 |
+
99
|
| 1039 |
+
],
|
| 1040 |
+
"page_idx": 7
|
| 1041 |
+
},
|
| 1042 |
+
{
|
| 1043 |
+
"type": "text",
|
| 1044 |
+
"text": "In-context Learning Recent work shows that ICL of GPT-3 (Brown et al., 2020) can perform numerous tasks when provided a few examples in a natural language prompt. Existing work focuses on various aspects to effectively utilize the advantages of GPT-3, from prompt design (Perez et al., 2021) for proper input to coherence calibration (Malkin et al., 2022) for tackling the diverse generated output. Another research path locates in the demonstration part, including ordered prompts (Lu et al., 2022) and retrieval-based demonstrations (Rubin et al., 2022; Liu et al., 2022b; Shin et al., 2021). ",
|
| 1045 |
+
"bbox": [
|
| 1046 |
+
512,
|
| 1047 |
+
111,
|
| 1048 |
+
882,
|
| 1049 |
+
303
|
| 1050 |
+
],
|
| 1051 |
+
"page_idx": 7
|
| 1052 |
+
},
|
| 1053 |
+
{
|
| 1054 |
+
"type": "text",
|
| 1055 |
+
"text": "To the best of our knowledge, there is no previous work exploring the potential of GPT-3 on general domain RE tasks. A recent work attempts to leverage GPT-3 in biomedical information extraction (NER and RE), and reveals issues of ICL that may be detrimental to IE tasks in general. Our work succeeds in overcoming these issues to some extent and confirms the potential of GPT-3 in both general and the scientific domain RE. ",
|
| 1056 |
+
"bbox": [
|
| 1057 |
+
512,
|
| 1058 |
+
305,
|
| 1059 |
+
882,
|
| 1060 |
+
449
|
| 1061 |
+
],
|
| 1062 |
+
"page_idx": 7
|
| 1063 |
+
},
|
| 1064 |
+
{
|
| 1065 |
+
"type": "text",
|
| 1066 |
+
"text": "Retrieval-based Demonstrations Several studies have demonstrated that dynamically selecting few-shot demonstrations for each test example, instead of utilizing a fixed set, leads to significant improvement in GPT-3 ICL (Liu et al., 2022b; Shin et al., 2021; Rubin et al., 2022). They also show that nearest neighbor in-context examples yield much better results than the farthest ones. This leads to the significance of better retrieval modules for demonstrations. Existing attempts rely on sentence embedding in retrieval, including the sentence encoders of PLMs such as BERT (Devlin et al., 2019), RoBERTa (Zhuang et al., 2021) KATE (Liu et al., 2022b) , SimCSE (Gao et al., 2021), Sentence-BERT (Reimers and Gurevych, 2019; Wolf et al., 2020). Unlike these sentence embeddings, we propose to fine-tune PLMs on our target RE tasks to produce more task-specific and robust representations for retrieval. ",
|
| 1067 |
+
"bbox": [
|
| 1068 |
+
512,
|
| 1069 |
+
461,
|
| 1070 |
+
882,
|
| 1071 |
+
765
|
| 1072 |
+
],
|
| 1073 |
+
"page_idx": 7
|
| 1074 |
+
},
|
| 1075 |
+
{
|
| 1076 |
+
"type": "text",
|
| 1077 |
+
"text": "7 Conclusions ",
|
| 1078 |
+
"text_level": 1,
|
| 1079 |
+
"bbox": [
|
| 1080 |
+
512,
|
| 1081 |
+
781,
|
| 1082 |
+
648,
|
| 1083 |
+
796
|
| 1084 |
+
],
|
| 1085 |
+
"page_idx": 7
|
| 1086 |
+
},
|
| 1087 |
+
{
|
| 1088 |
+
"type": "text",
|
| 1089 |
+
"text": "This work explores the potential of GPT-3 ICL on RE for bridging the performance gap to the fine-tuning baselines via two strategies: (1) taskaware demonstration retrieval emphasizes entity and relation information for improving the accuracy of searching demonstrations; (2) gold labelinduced reasoning enriches the reasoning evidence of each demonstration. To the best of our knowledge, GPT-RE is the first GPT-3 ICL research that significantly outperforms the fine-tuning baseline on three datasets and achieves SOTA on Semeval and SciERC. We implement detailed studies to explore how GPT-3 overcomes the difficulties such as NULL example influence. ",
|
| 1090 |
+
"bbox": [
|
| 1091 |
+
512,
|
| 1092 |
+
808,
|
| 1093 |
+
882,
|
| 1094 |
+
920
|
| 1095 |
+
],
|
| 1096 |
+
"page_idx": 7
|
| 1097 |
+
},
|
| 1098 |
+
{
|
| 1099 |
+
"type": "text",
|
| 1100 |
+
"text": "",
|
| 1101 |
+
"bbox": [
|
| 1102 |
+
117,
|
| 1103 |
+
85,
|
| 1104 |
+
487,
|
| 1105 |
+
196
|
| 1106 |
+
],
|
| 1107 |
+
"page_idx": 8
|
| 1108 |
+
},
|
| 1109 |
+
{
|
| 1110 |
+
"type": "text",
|
| 1111 |
+
"text": "Limitations ",
|
| 1112 |
+
"text_level": 1,
|
| 1113 |
+
"bbox": [
|
| 1114 |
+
117,
|
| 1115 |
+
210,
|
| 1116 |
+
216,
|
| 1117 |
+
225
|
| 1118 |
+
],
|
| 1119 |
+
"page_idx": 8
|
| 1120 |
+
},
|
| 1121 |
+
{
|
| 1122 |
+
"type": "text",
|
| 1123 |
+
"text": "Despite the overall positive results, GPT-RE still faces two shortcomings: (1) the issue of overpredicting has been significantly alleviated but not completely solved, and the NULL recall still lags behind full-supervised baselines, especially on the datasets containing a large proportion of NULL examples such as ACE05 $( ^ { 6 6 } 9 5 . 6 0 \\% ^ { 3 3 } )$ ; (2) Though the task-aware retriever optimizes the representations of PLMs such as SimCSE and BERT, it is widely considered that LLMs can generate more robust representations than small PLMs. Future work can replace representations generated by smaller PLMs with GPT-3 itself. However, due to the access limitation to the representations of GPT-3, we can nearly confirm this proposal up to now. ",
|
| 1124 |
+
"bbox": [
|
| 1125 |
+
117,
|
| 1126 |
+
237,
|
| 1127 |
+
487,
|
| 1128 |
+
478
|
| 1129 |
+
],
|
| 1130 |
+
"page_idx": 8
|
| 1131 |
+
},
|
| 1132 |
+
{
|
| 1133 |
+
"type": "text",
|
| 1134 |
+
"text": "References ",
|
| 1135 |
+
"text_level": 1,
|
| 1136 |
+
"bbox": [
|
| 1137 |
+
117,
|
| 1138 |
+
506,
|
| 1139 |
+
211,
|
| 1140 |
+
521
|
| 1141 |
+
],
|
| 1142 |
+
"page_idx": 8
|
| 1143 |
+
},
|
| 1144 |
+
{
|
| 1145 |
+
"type": "text",
|
| 1146 |
+
"text": "Livio Baldini Soares, Nicholas FitzGerald, Jeffrey Ling, and Tom Kwiatkowski. 2019. Matching the blanks: Distributional similarity for relation learning. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 2895– 2905, Florence, Italy. Association for Computational Linguistics. ",
|
| 1147 |
+
"bbox": [
|
| 1148 |
+
117,
|
| 1149 |
+
530,
|
| 1150 |
+
487,
|
| 1151 |
+
621
|
| 1152 |
+
],
|
| 1153 |
+
"page_idx": 8
|
| 1154 |
+
},
|
| 1155 |
+
{
|
| 1156 |
+
"type": "text",
|
| 1157 |
+
"text": "Michele Banko and Oren Etzioni. 2008. The tradeoffs between open and traditional relation extraction. In Proceedings of ACL-08: HLT, pages 28–36, Columbus, Ohio. Association for Computational Linguistics. ",
|
| 1158 |
+
"bbox": [
|
| 1159 |
+
115,
|
| 1160 |
+
634,
|
| 1161 |
+
485,
|
| 1162 |
+
699
|
| 1163 |
+
],
|
| 1164 |
+
"page_idx": 8
|
| 1165 |
+
},
|
| 1166 |
+
{
|
| 1167 |
+
"type": "text",
|
| 1168 |
+
"text": "Iz Beltagy, Kyle Lo, and Arman Cohan. 2019. SciBERT: A pretrained language model for scientific text. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 3615– 3620, Hong Kong, China. Association for Computational Linguistics. ",
|
| 1169 |
+
"bbox": [
|
| 1170 |
+
117,
|
| 1171 |
+
712,
|
| 1172 |
+
485,
|
| 1173 |
+
815
|
| 1174 |
+
],
|
| 1175 |
+
"page_idx": 8
|
| 1176 |
+
},
|
| 1177 |
+
{
|
| 1178 |
+
"type": "text",
|
| 1179 |
+
"text": "Terra Blevins, Hila Gonen, and Luke Zettlemoyer. 2022. Prompting language models for linguistic structure. CoRR, abs/2211.07830. ",
|
| 1180 |
+
"bbox": [
|
| 1181 |
+
115,
|
| 1182 |
+
828,
|
| 1183 |
+
487,
|
| 1184 |
+
868
|
| 1185 |
+
],
|
| 1186 |
+
"page_idx": 8
|
| 1187 |
+
},
|
| 1188 |
+
{
|
| 1189 |
+
"type": "text",
|
| 1190 |
+
"text": "Samuel R. Bowman, Gabor Angeli, Christopher Potts, and Christopher D. Manning. 2015. A large annotated corpus for learning natural language inference. ",
|
| 1191 |
+
"bbox": [
|
| 1192 |
+
115,
|
| 1193 |
+
879,
|
| 1194 |
+
487,
|
| 1195 |
+
919
|
| 1196 |
+
],
|
| 1197 |
+
"page_idx": 8
|
| 1198 |
+
},
|
| 1199 |
+
{
|
| 1200 |
+
"type": "text",
|
| 1201 |
+
"text": "In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pages 632–642, Lisbon, Portugal. Association for Computational Linguistics. ",
|
| 1202 |
+
"bbox": [
|
| 1203 |
+
531,
|
| 1204 |
+
86,
|
| 1205 |
+
882,
|
| 1206 |
+
139
|
| 1207 |
+
],
|
| 1208 |
+
"page_idx": 8
|
| 1209 |
+
},
|
| 1210 |
+
{
|
| 1211 |
+
"type": "text",
|
| 1212 |
+
"text": "Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel Ziegler, Jeffrey Wu, Clemens Winter, Chris Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. 2020. Language models are few-shot learners. In Advances in Neural Information Processing Systems, volume 33, pages 1877–1901. Curran Associates, Inc. ",
|
| 1213 |
+
"bbox": [
|
| 1214 |
+
510,
|
| 1215 |
+
149,
|
| 1216 |
+
882,
|
| 1217 |
+
329
|
| 1218 |
+
],
|
| 1219 |
+
"page_idx": 8
|
| 1220 |
+
},
|
| 1221 |
+
{
|
| 1222 |
+
"type": "text",
|
| 1223 |
+
"text": "akanksha Chowdhery, Sharan Narang, Jacob Devlin, Maarten Bosma, Gaurav Mishra, Adam Roberts, Paul Barham, Hyung Won Chung, Charles Sutton, Sebastian Gehrmann, Parker Schuh, Kensen Shi, Sasha Tsvyashchenko, Joshua Maynez, Abhishek Rao, Parker Barnes, Yi Tay, Noam Shazeer, Vinodkumar Prabhakaran, Emily Reif, Nan Du, Ben Hutchinson, Reiner Pope, James Bradbury, Jacob Austin, Michael Isard, Guy Gur-Ari, Pengcheng Yin, Toju Duke, Anselm Levskaya, Sanjay Ghemawat, Sunipa Dev, Henryk Michalewski, Xavier Garcia, Vedant Misra, Kevin Robinson, Liam Fedus, Denny Zhou, Daphne Ippolito, David Luan, Hyeontaek Lim, Barret Zoph, Alexander Spiridonov, Ryan Sepassi, David Dohan, Shivani Agrawal, Mark Omernick, Andrew M. Dai, Thanumalayan Sankaranarayana Pillai, Marie Pellat, Aitor Lewkowycz, Erica Moreira, Rewon Child, Oleksandr Polozov, Katherine Lee, Zongwei Zhou, Xuezhi Wang, Brennan Saeta, Mark Diaz, Orhan Firat, Michele Catasta, Jason Wei, Kathy Meier-Hellstern, Douglas Eck, Jeff Dean, Slav Petrov, and Noah Fiedel. 2022. Palm: Scaling language modeling with pathways. CoRR, abs/2204.02311. ",
|
| 1224 |
+
"bbox": [
|
| 1225 |
+
524,
|
| 1226 |
+
341,
|
| 1227 |
+
882,
|
| 1228 |
+
640
|
| 1229 |
+
],
|
| 1230 |
+
"page_idx": 8
|
| 1231 |
+
},
|
| 1232 |
+
{
|
| 1233 |
+
"type": "text",
|
| 1234 |
+
"text": "Amir D. N. Cohen, Shachar Rosenman, and Yoav Goldberg. 2020. Relation extraction as two-way spanprediction. CoRR, abs/2010.04829. ",
|
| 1235 |
+
"bbox": [
|
| 1236 |
+
512,
|
| 1237 |
+
651,
|
| 1238 |
+
882,
|
| 1239 |
+
690
|
| 1240 |
+
],
|
| 1241 |
+
"page_idx": 8
|
| 1242 |
+
},
|
| 1243 |
+
{
|
| 1244 |
+
"type": "text",
|
| 1245 |
+
"text": "Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 4171–4186, Minneapolis, Minnesota. Association for Computational Linguistics. ",
|
| 1246 |
+
"bbox": [
|
| 1247 |
+
510,
|
| 1248 |
+
700,
|
| 1249 |
+
882,
|
| 1250 |
+
816
|
| 1251 |
+
],
|
| 1252 |
+
"page_idx": 8
|
| 1253 |
+
},
|
| 1254 |
+
{
|
| 1255 |
+
"type": "text",
|
| 1256 |
+
"text": "Tianyu Gao, Xingcheng Yao, and Danqi Chen. 2021. SimCSE: Simple contrastive learning of sentence embeddings. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 6894–6910, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics. ",
|
| 1257 |
+
"bbox": [
|
| 1258 |
+
510,
|
| 1259 |
+
827,
|
| 1260 |
+
884,
|
| 1261 |
+
919
|
| 1262 |
+
],
|
| 1263 |
+
"page_idx": 8
|
| 1264 |
+
},
|
| 1265 |
+
{
|
| 1266 |
+
"type": "text",
|
| 1267 |
+
"text": "Xiaoqing Geng, Xiwen Chen, Kenny Q. Zhu, Libin Shen, and Yinggong Zhao. 2020. MICK: A metalearning framework for few-shot relation classification with small training data. In CIKM ’20: The 29th ACM International Conference on Information and Knowledge Management, Virtual Event, Ireland, October 19-23, 2020, pages 415–424. ACM. ",
|
| 1268 |
+
"bbox": [
|
| 1269 |
+
117,
|
| 1270 |
+
86,
|
| 1271 |
+
485,
|
| 1272 |
+
177
|
| 1273 |
+
],
|
| 1274 |
+
"page_idx": 9
|
| 1275 |
+
},
|
| 1276 |
+
{
|
| 1277 |
+
"type": "text",
|
| 1278 |
+
"text": "Bernal Jiménez Gutiérrez, Nikolas McNeal, Clay Washington, You Chen, Lang Li, Huan Sun, and Yu Su. 2022. Thinking about GPT-3 in-context learning for biomedical ie? think again. CoRR, abs/2203.08410. ",
|
| 1279 |
+
"bbox": [
|
| 1280 |
+
115,
|
| 1281 |
+
187,
|
| 1282 |
+
487,
|
| 1283 |
+
239
|
| 1284 |
+
],
|
| 1285 |
+
"page_idx": 9
|
| 1286 |
+
},
|
| 1287 |
+
{
|
| 1288 |
+
"type": "text",
|
| 1289 |
+
"text": "Xu Han, Hao Zhu, Pengfei Yu, Ziyun Wang, Yuan Yao, Zhiyuan Liu, and Maosong Sun. 2018. FewRel: A large-scale supervised few-shot relation classification dataset with state-of-the-art evaluation. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 4803–4809, Brussels, Belgium. Association for Computational Linguistics. ",
|
| 1290 |
+
"bbox": [
|
| 1291 |
+
117,
|
| 1292 |
+
248,
|
| 1293 |
+
485,
|
| 1294 |
+
353
|
| 1295 |
+
],
|
| 1296 |
+
"page_idx": 9
|
| 1297 |
+
},
|
| 1298 |
+
{
|
| 1299 |
+
"type": "text",
|
| 1300 |
+
"text": "Iris Hendrickx, Su Nam Kim, Zornitsa Kozareva, Preslav Nakov, Diarmuid Ó Séaghdha, Sebastian Padó, Marco Pennacchiotti, Lorenza Romano, and Stan Szpakowicz. 2010. SemEval-2010 task 8: Multiway classification of semantic relations between pairs of nominals. In Proceedings of the 5th International Workshop on Semantic Evaluation, pages 33–38, Uppsala, Sweden. Association for Computational Linguistics. ",
|
| 1301 |
+
"bbox": [
|
| 1302 |
+
117,
|
| 1303 |
+
362,
|
| 1304 |
+
485,
|
| 1305 |
+
480
|
| 1306 |
+
],
|
| 1307 |
+
"page_idx": 9
|
| 1308 |
+
},
|
| 1309 |
+
{
|
| 1310 |
+
"type": "text",
|
| 1311 |
+
"text": "Jordan Hoffmann, Sebastian Borgeaud, Arthur Mensch, Elena Buchatskaya, Trevor Cai, Eliza Rutherford, Diego de Las Casas, Lisa Anne Hendricks, Johannes Welbl, Aidan Clark, Tom Hennigan, Eric Noland, Katie Millican, George van den Driessche, Bogdan Damoc, Aurelia Guy, Simon Osindero, Karen Simonyan, Erich Elsen, Jack W. Rae, Oriol Vinyals, and Laurent Sifre. 2022. Training compute-optimal large language models. ",
|
| 1312 |
+
"bbox": [
|
| 1313 |
+
117,
|
| 1314 |
+
489,
|
| 1315 |
+
487,
|
| 1316 |
+
607
|
| 1317 |
+
],
|
| 1318 |
+
"page_idx": 9
|
| 1319 |
+
},
|
| 1320 |
+
{
|
| 1321 |
+
"type": "text",
|
| 1322 |
+
"text": "Takeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo, and Yusuke Iwasawa. 2022. Large language models are zero-shot reasoners. CoRR, abs/2205.11916. ",
|
| 1323 |
+
"bbox": [
|
| 1324 |
+
115,
|
| 1325 |
+
617,
|
| 1326 |
+
487,
|
| 1327 |
+
668
|
| 1328 |
+
],
|
| 1329 |
+
"page_idx": 9
|
| 1330 |
+
},
|
| 1331 |
+
{
|
| 1332 |
+
"type": "text",
|
| 1333 |
+
"text": "Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, and Radu Soricut. 2019. Albert: A lite bert for self-supervised learning of language representations. ",
|
| 1334 |
+
"bbox": [
|
| 1335 |
+
115,
|
| 1336 |
+
677,
|
| 1337 |
+
487,
|
| 1338 |
+
730
|
| 1339 |
+
],
|
| 1340 |
+
"page_idx": 9
|
| 1341 |
+
},
|
| 1342 |
+
{
|
| 1343 |
+
"type": "text",
|
| 1344 |
+
"text": "Fangchao Liu, Hongyu Lin, Xianpei Han, Boxi Cao, and Le Sun. 2022a. Pre-training to match for unified lowshot relation extraction. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 5785– 5795, Dublin, Ireland. Association for Computational Linguistics. ",
|
| 1345 |
+
"bbox": [
|
| 1346 |
+
117,
|
| 1347 |
+
739,
|
| 1348 |
+
485,
|
| 1349 |
+
831
|
| 1350 |
+
],
|
| 1351 |
+
"page_idx": 9
|
| 1352 |
+
},
|
| 1353 |
+
{
|
| 1354 |
+
"type": "text",
|
| 1355 |
+
"text": "Jiachang Liu, Dinghan Shen, Yizhe Zhang, Bill Dolan, Lawrence Carin, and Weizhu Chen. 2022b. What makes good in-context examples for GPT-3? In Proceedings of Deep Learning Inside Out (DeeLIO 2022): The 3rd Workshop on Knowledge Extraction and Integration for Deep Learning Architectures, pages 100–114, Dublin, Ireland and Online. Association for Computational Linguistics. ",
|
| 1356 |
+
"bbox": [
|
| 1357 |
+
115,
|
| 1358 |
+
840,
|
| 1359 |
+
487,
|
| 1360 |
+
919
|
| 1361 |
+
],
|
| 1362 |
+
"page_idx": 9
|
| 1363 |
+
},
|
| 1364 |
+
{
|
| 1365 |
+
"type": "text",
|
| 1366 |
+
"text": "",
|
| 1367 |
+
"bbox": [
|
| 1368 |
+
531,
|
| 1369 |
+
86,
|
| 1370 |
+
882,
|
| 1371 |
+
112
|
| 1372 |
+
],
|
| 1373 |
+
"page_idx": 9
|
| 1374 |
+
},
|
| 1375 |
+
{
|
| 1376 |
+
"type": "text",
|
| 1377 |
+
"text": "Yao Lu, Max Bartolo, Alastair Moore, Sebastian Riedel, and Pontus Stenetorp. 2022. Fantastically ordered prompts and where to find them: Overcoming fewshot prompt order sensitivity. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 8086–8098, Dublin, Ireland. Association for Computational Linguistics. ",
|
| 1378 |
+
"bbox": [
|
| 1379 |
+
512,
|
| 1380 |
+
123,
|
| 1381 |
+
882,
|
| 1382 |
+
227
|
| 1383 |
+
],
|
| 1384 |
+
"page_idx": 9
|
| 1385 |
+
},
|
| 1386 |
+
{
|
| 1387 |
+
"type": "text",
|
| 1388 |
+
"text": "Yi Luan, Luheng He, Mari Ostendorf, and Hannaneh Hajishirzi. 2018. Multi-task identification of entities, relations, and coreference for scientific knowledge graph construction. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 3219–3232, Brussels, Belgium. Association for Computational Linguistics. ",
|
| 1389 |
+
"bbox": [
|
| 1390 |
+
512,
|
| 1391 |
+
239,
|
| 1392 |
+
882,
|
| 1393 |
+
329
|
| 1394 |
+
],
|
| 1395 |
+
"page_idx": 9
|
| 1396 |
+
},
|
| 1397 |
+
{
|
| 1398 |
+
"type": "text",
|
| 1399 |
+
"text": "Nikolay Malkin, Zhen Wang, and Nebojsa Jojic. 2022. Coherence boosting: When your pretrained language model is not paying enough attention. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 8214–8236, Dublin, Ireland. Association for Computational Linguistics. ",
|
| 1400 |
+
"bbox": [
|
| 1401 |
+
510,
|
| 1402 |
+
341,
|
| 1403 |
+
882,
|
| 1404 |
+
431
|
| 1405 |
+
],
|
| 1406 |
+
"page_idx": 9
|
| 1407 |
+
},
|
| 1408 |
+
{
|
| 1409 |
+
"type": "text",
|
| 1410 |
+
"text": "Sewon Min, Xinxi Lyu, Ari Holtzman, Mikel Artetxe, Mike Lewis, Hannaneh Hajishirzi, and Luke Zettlemoyer. 2022a. Rethinking the role of demonstrations: What makes in-context learning work? ",
|
| 1411 |
+
"bbox": [
|
| 1412 |
+
510,
|
| 1413 |
+
443,
|
| 1414 |
+
882,
|
| 1415 |
+
494
|
| 1416 |
+
],
|
| 1417 |
+
"page_idx": 9
|
| 1418 |
+
},
|
| 1419 |
+
{
|
| 1420 |
+
"type": "text",
|
| 1421 |
+
"text": "Sewon Min, Xinxi Lyu, Ari Holtzman, Mikel Artetxe, Mike Lewis, Hannaneh Hajishirzi, and Luke Zettlemoyer. 2022b. Rethinking the role of demonstrations: What makes in-context learning work? CoRR, abs/2202.12837. ",
|
| 1422 |
+
"bbox": [
|
| 1423 |
+
510,
|
| 1424 |
+
506,
|
| 1425 |
+
882,
|
| 1426 |
+
570
|
| 1427 |
+
],
|
| 1428 |
+
"page_idx": 9
|
| 1429 |
+
},
|
| 1430 |
+
{
|
| 1431 |
+
"type": "text",
|
| 1432 |
+
"text": "Ethan Perez, Douwe Kiela, and Kyunghyun Cho. 2021. True few-shot learning with language models. In Advances in Neural Information Processing Systems 34: Annual Conference on Neural Information Processing Systems 2021, NeurIPS 2021, December 6-14, 2021, virtual, pages 11054–11070. ",
|
| 1433 |
+
"bbox": [
|
| 1434 |
+
510,
|
| 1435 |
+
582,
|
| 1436 |
+
882,
|
| 1437 |
+
659
|
| 1438 |
+
],
|
| 1439 |
+
"page_idx": 9
|
| 1440 |
+
},
|
| 1441 |
+
{
|
| 1442 |
+
"type": "text",
|
| 1443 |
+
"text": "Jack W. Rae, Sebastian Borgeaud, Trevor Cai, Katie Millican, Jordan Hoffmann, Francis Song, John Aslanides, Sarah Henderson, Roman Ring, Susannah Young, Eliza Rutherford, Tom Hennigan, Jacob Menick, Albin Cassirer, Richard Powell, George van den Driessche, Lisa Anne Hendricks, Maribeth Rauh, Po-Sen Huang, Amelia Glaese, Johannes Welbl, Sumanth Dathathri, Saffron Huang, Jonathan Uesato, John Mellor, Irina Higgins, Antonia Creswell, Nat McAleese, Amy Wu, Erich Elsen, Siddhant Jayakumar, Elena Buchatskaya, David Budden, Esme Sutherland, Karen Simonyan, Michela Paganini, Laurent Sifre, Lena Martens, Xiang Lorraine Li, Adhiguna Kuncoro, Aida Nematzadeh, Elena Gribovskaya, Domenic Donato, Angeliki Lazaridou, Arthur Mensch, Jean-Baptiste Lespiau, Maria Tsimpoukelli, Nikolai Grigorev, Doug Fritz, Thibault Sottiaux, Mantas Pajarskas, Toby Pohlen, Zhitao Gong, Daniel Toyama, Cyprien de Masson d’Autume, Yujia ",
|
| 1444 |
+
"bbox": [
|
| 1445 |
+
519,
|
| 1446 |
+
670,
|
| 1447 |
+
882,
|
| 1448 |
+
919
|
| 1449 |
+
],
|
| 1450 |
+
"page_idx": 9
|
| 1451 |
+
},
|
| 1452 |
+
{
|
| 1453 |
+
"type": "text",
|
| 1454 |
+
"text": "Li, Tayfun Terzi, Vladimir Mikulik, Igor Babuschkin, Aidan Clark, Diego de Las Casas, Aurelia Guy, Chris Jones, James Bradbury, Matthew Johnson, Blake Hechtman, Laura Weidinger, Iason Gabriel, William Isaac, Ed Lockhart, Simon Osindero, Laura Rimell, Chris Dyer, Oriol Vinyals, Kareem Ayoub, Jeff Stanway, Lorrayne Bennett, Demis Hassabis, Koray Kavukcuoglu, and Geoffrey Irving. 2021. Scaling language models: Methods, analysis & insights from training gopher. ",
|
| 1455 |
+
"bbox": [
|
| 1456 |
+
136,
|
| 1457 |
+
85,
|
| 1458 |
+
487,
|
| 1459 |
+
216
|
| 1460 |
+
],
|
| 1461 |
+
"page_idx": 10
|
| 1462 |
+
},
|
| 1463 |
+
{
|
| 1464 |
+
"type": "text",
|
| 1465 |
+
"text": "Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. 2019. Exploring the limits of transfer learning with a unified text-to-text transformer. ",
|
| 1466 |
+
"bbox": [
|
| 1467 |
+
115,
|
| 1468 |
+
227,
|
| 1469 |
+
487,
|
| 1470 |
+
291
|
| 1471 |
+
],
|
| 1472 |
+
"page_idx": 10
|
| 1473 |
+
},
|
| 1474 |
+
{
|
| 1475 |
+
"type": "text",
|
| 1476 |
+
"text": "Nils Reimers and Iryna Gurevych. 2019. SentenceBERT: Sentence embeddings using Siamese BERTnetworks. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 3982–3992, Hong Kong, China. Association for Computational Linguistics. ",
|
| 1477 |
+
"bbox": [
|
| 1478 |
+
115,
|
| 1479 |
+
302,
|
| 1480 |
+
487,
|
| 1481 |
+
406
|
| 1482 |
+
],
|
| 1483 |
+
"page_idx": 10
|
| 1484 |
+
},
|
| 1485 |
+
{
|
| 1486 |
+
"type": "text",
|
| 1487 |
+
"text": "Ohad Rubin, Jonathan Herzig, and Jonathan Berant. 2022. Learning to retrieve prompts for in-context learning. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 2655–2671, Seattle, United States. Association for Computational Linguistics. ",
|
| 1488 |
+
"bbox": [
|
| 1489 |
+
117,
|
| 1490 |
+
417,
|
| 1491 |
+
487,
|
| 1492 |
+
507
|
| 1493 |
+
],
|
| 1494 |
+
"page_idx": 10
|
| 1495 |
+
},
|
| 1496 |
+
{
|
| 1497 |
+
"type": "text",
|
| 1498 |
+
"text": "Richard Shin, Christopher Lin, Sam Thomson, Charles Chen, Subhro Roy, Emmanouil Antonios Platanios, Adam Pauls, Dan Klein, Jason Eisner, and Benjamin Van Durme. 2021. Constrained language models yield few-shot semantic parsers. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 7699–7715, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics. ",
|
| 1499 |
+
"bbox": [
|
| 1500 |
+
117,
|
| 1501 |
+
517,
|
| 1502 |
+
485,
|
| 1503 |
+
634
|
| 1504 |
+
],
|
| 1505 |
+
"page_idx": 10
|
| 1506 |
+
},
|
| 1507 |
+
{
|
| 1508 |
+
"type": "text",
|
| 1509 |
+
"text": "Romal Thoppilan, Daniel De Freitas, Jamie Hall, Noam Shazeer, Apoorv Kulshreshtha, Heng-Tze Cheng, Alicia Jin, Taylor Bos, Leslie Baker, Yu Du, YaGuang Li, Hongrae Lee, Huaixiu Steven Zheng, Amin Ghafouri, Marcelo Menegali, Yanping Huang, Maxim Krikun, Dmitry Lepikhin, James Qin, Dehao Chen, Yuanzhong Xu, Zhifeng Chen, Adam Roberts, Maarten Bosma, Vincent Zhao, Yanqi Zhou, ChungChing Chang, Igor Krivokon, Will Rusch, Marc Pickett, Pranesh Srinivasan, Laichee Man, Kathleen Meier-Hellstern, Meredith Ringel Morris, Tulsee Doshi, Renelito Delos Santos, Toju Duke, Johnny Soraker, Ben Zevenbergen, Vinodkumar Prabhakaran, Mark Diaz, Ben Hutchinson, Kristen Olson, Alejandra Molina, Erin Hoffman-John, Josh Lee, Lora Aroyo, Ravi Rajakumar, Alena Butryna, Matthew Lamm, Viktoriya Kuzmina, Joe Fenton, Aaron Cohen, Rachel Bernstein, Ray Kurzweil, Blaise AgueraArcas, Claire Cui, Marian Croak, Ed Chi, and Quoc Le. 2022. Lamda: Language models for dialog applications. ",
|
| 1510 |
+
"bbox": [
|
| 1511 |
+
122,
|
| 1512 |
+
644,
|
| 1513 |
+
487,
|
| 1514 |
+
917
|
| 1515 |
+
],
|
| 1516 |
+
"page_idx": 10
|
| 1517 |
+
},
|
| 1518 |
+
{
|
| 1519 |
+
"type": "text",
|
| 1520 |
+
"text": "Zhen Wan, Qianying Liu, Zhuoyuan Mao, Fei Cheng, Sadao Kurohashi, and Jiwei Li. 2022. Rescue implicit and long-tail cases: Nearest neighbor relation extraction. CoRR, abs/2210.11800. ",
|
| 1521 |
+
"bbox": [
|
| 1522 |
+
510,
|
| 1523 |
+
86,
|
| 1524 |
+
882,
|
| 1525 |
+
139
|
| 1526 |
+
],
|
| 1527 |
+
"page_idx": 10
|
| 1528 |
+
},
|
| 1529 |
+
{
|
| 1530 |
+
"type": "text",
|
| 1531 |
+
"text": "Chenguang Wang, Xiao Liu, Zui Chen, Haoyun Hong, Jie Tang, and Dawn Song. 2022a. DeepStruct: Pretraining of language models for structure prediction. In Findings of the Association for Computational Linguistics: ACL 2022, pages 803–823, Dublin, Ireland. Association for Computational Linguistics. ",
|
| 1532 |
+
"bbox": [
|
| 1533 |
+
512,
|
| 1534 |
+
147,
|
| 1535 |
+
882,
|
| 1536 |
+
225
|
| 1537 |
+
],
|
| 1538 |
+
"page_idx": 10
|
| 1539 |
+
},
|
| 1540 |
+
{
|
| 1541 |
+
"type": "text",
|
| 1542 |
+
"text": "Xuezhi Wang, Jason Wei, Dale Schuurmans, Quoc V. Le, Ed H. Chi, and Denny Zhou. 2022b. Selfconsistency improves chain of thought reasoning in language models. CoRR, abs/2203.11171. ",
|
| 1543 |
+
"bbox": [
|
| 1544 |
+
510,
|
| 1545 |
+
235,
|
| 1546 |
+
882,
|
| 1547 |
+
288
|
| 1548 |
+
],
|
| 1549 |
+
"page_idx": 10
|
| 1550 |
+
},
|
| 1551 |
+
{
|
| 1552 |
+
"type": "text",
|
| 1553 |
+
"text": "Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Ed H. Chi, Quoc Le, and Denny Zhou. 2022. Chain of thought prompting elicits reasoning in large language models. CoRR, abs/2201.11903. ",
|
| 1554 |
+
"bbox": [
|
| 1555 |
+
510,
|
| 1556 |
+
297,
|
| 1557 |
+
882,
|
| 1558 |
+
349
|
| 1559 |
+
],
|
| 1560 |
+
"page_idx": 10
|
| 1561 |
+
},
|
| 1562 |
+
{
|
| 1563 |
+
"type": "text",
|
| 1564 |
+
"text": "Adina Williams, Nikita Nangia, and Samuel Bowman. 2018. A broad-coverage challenge corpus for sentence understanding through inference. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), pages 1112–1122, New Orleans, Louisiana. Association for Computational Linguistics. ",
|
| 1565 |
+
"bbox": [
|
| 1566 |
+
512,
|
| 1567 |
+
359,
|
| 1568 |
+
882,
|
| 1569 |
+
476
|
| 1570 |
+
],
|
| 1571 |
+
"page_idx": 10
|
| 1572 |
+
},
|
| 1573 |
+
{
|
| 1574 |
+
"type": "text",
|
| 1575 |
+
"text": "Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Remi Louf, Morgan Funtowicz, Joe Davison, Sam Shleifer, Patrick von Platen, Clara Ma, Yacine Jernite, Julien Plu, Canwen Xu, Teven Le Scao, Sylvain Gugger, Mariama Drame, Quentin Lhoest, and Alexander Rush. 2020. Transformers: State-of-the-art natural language processing. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 38–45, Online. Association for Computational Linguistics. ",
|
| 1576 |
+
"bbox": [
|
| 1577 |
+
510,
|
| 1578 |
+
486,
|
| 1579 |
+
882,
|
| 1580 |
+
642
|
| 1581 |
+
],
|
| 1582 |
+
"page_idx": 10
|
| 1583 |
+
},
|
| 1584 |
+
{
|
| 1585 |
+
"type": "text",
|
| 1586 |
+
"text": "Yuhao Zhang, Victor Zhong, Danqi Chen, Gabor Angeli, and Christopher D. Manning. 2017. Position-aware attention and supervised data improve slot filling. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 35–45, Copenhagen, Denmark. Association for Computational Linguistics. ",
|
| 1587 |
+
"bbox": [
|
| 1588 |
+
512,
|
| 1589 |
+
652,
|
| 1590 |
+
882,
|
| 1591 |
+
743
|
| 1592 |
+
],
|
| 1593 |
+
"page_idx": 10
|
| 1594 |
+
},
|
| 1595 |
+
{
|
| 1596 |
+
"type": "text",
|
| 1597 |
+
"text": "Zihao Zhao, Eric Wallace, Shi Feng, Dan Klein, and Sameer Singh. 2021. Calibrate before use: Improving few-shot performance of language models. In Proceedings of the 38th International Conference on Machine Learning, ICML 2021, 18-24 July 2021, Virtual Event, volume 139 of Proceedings of Machine Learning Research, pages 12697–12706. PMLR. ",
|
| 1598 |
+
"bbox": [
|
| 1599 |
+
512,
|
| 1600 |
+
752,
|
| 1601 |
+
882,
|
| 1602 |
+
844
|
| 1603 |
+
],
|
| 1604 |
+
"page_idx": 10
|
| 1605 |
+
},
|
| 1606 |
+
{
|
| 1607 |
+
"type": "text",
|
| 1608 |
+
"text": "Zexuan Zhong and Danqi Chen. 2021. A frustratingly easy approach for entity and relation extraction. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 50–61, Online. Association for Computational Linguistics. ",
|
| 1609 |
+
"bbox": [
|
| 1610 |
+
510,
|
| 1611 |
+
853,
|
| 1612 |
+
882,
|
| 1613 |
+
919
|
| 1614 |
+
],
|
| 1615 |
+
"page_idx": 10
|
| 1616 |
+
},
|
| 1617 |
+
{
|
| 1618 |
+
"type": "text",
|
| 1619 |
+
"text": "",
|
| 1620 |
+
"bbox": [
|
| 1621 |
+
134,
|
| 1622 |
+
85,
|
| 1623 |
+
485,
|
| 1624 |
+
112
|
| 1625 |
+
],
|
| 1626 |
+
"page_idx": 11
|
| 1627 |
+
},
|
| 1628 |
+
{
|
| 1629 |
+
"type": "text",
|
| 1630 |
+
"text": "Liu Zhuang, Lin Wayne, Shi Ya, and Zhao Jun. 2021. A robustly optimized BERT pre-training approach with post-training. In Proceedings of the 20th Chinese National Conference on Computational Linguistics, pages 1218–1227, Huhhot, China. Chinese Information Processing Society of China. ",
|
| 1631 |
+
"bbox": [
|
| 1632 |
+
117,
|
| 1633 |
+
122,
|
| 1634 |
+
487,
|
| 1635 |
+
200
|
| 1636 |
+
],
|
| 1637 |
+
"page_idx": 11
|
| 1638 |
+
},
|
| 1639 |
+
{
|
| 1640 |
+
"type": "table",
|
| 1641 |
+
"img_path": "images/53449ab2538a1ff430f8c7d205a310e0e4e56b55185d06ca58b92c11f0115926.jpg",
|
| 1642 |
+
"table_caption": [
|
| 1643 |
+
"Table 3: GPT-3 Hyperparamters. "
|
| 1644 |
+
],
|
| 1645 |
+
"table_footnote": [],
|
| 1646 |
+
"table_body": "<table><tr><td>Hyperparameter</td><td>In Experiment</td></tr><tr><td>Engine</td><td>text-davinci-003</td></tr><tr><td>Temperature</td><td>0.0</td></tr><tr><td>Max_tokens</td><td>256</td></tr><tr><td>Top_p</td><td>1</td></tr><tr><td>Frequency_penalty</td><td>0.0</td></tr><tr><td>Presence_penalty</td><td>0.0</td></tr><tr><td>Best_of</td><td>1</td></tr><tr><td>Logprob</td><td>1</td></tr></table>",
|
| 1647 |
+
"bbox": [
|
| 1648 |
+
193,
|
| 1649 |
+
82,
|
| 1650 |
+
410,
|
| 1651 |
+
192
|
| 1652 |
+
],
|
| 1653 |
+
"page_idx": 12
|
| 1654 |
+
},
|
| 1655 |
+
{
|
| 1656 |
+
"type": "table",
|
| 1657 |
+
"img_path": "images/c543d88a898f2298b6307572c1a0a206642c3eb94aac19aa1d23bd46148b6a20.jpg",
|
| 1658 |
+
"table_caption": [
|
| 1659 |
+
"Table 4: Search range for each dataset. "
|
| 1660 |
+
],
|
| 1661 |
+
"table_footnote": [],
|
| 1662 |
+
"table_body": "<table><tr><td>Dataset</td><td>Lower bound</td><td>Upper bound</td></tr><tr><td>Semeval</td><td>5</td><td>30</td></tr><tr><td>TACRED</td><td>5</td><td>15</td></tr><tr><td>SciERC</td><td>5</td><td>30</td></tr><tr><td>ACE05</td><td>5</td><td>25</td></tr></table>",
|
| 1663 |
+
"bbox": [
|
| 1664 |
+
191,
|
| 1665 |
+
234,
|
| 1666 |
+
410,
|
| 1667 |
+
296
|
| 1668 |
+
],
|
| 1669 |
+
"page_idx": 12
|
| 1670 |
+
},
|
| 1671 |
+
{
|
| 1672 |
+
"type": "text",
|
| 1673 |
+
"text": "A Hyperparameters ",
|
| 1674 |
+
"text_level": 1,
|
| 1675 |
+
"bbox": [
|
| 1676 |
+
117,
|
| 1677 |
+
348,
|
| 1678 |
+
305,
|
| 1679 |
+
365
|
| 1680 |
+
],
|
| 1681 |
+
"page_idx": 12
|
| 1682 |
+
},
|
| 1683 |
+
{
|
| 1684 |
+
"type": "text",
|
| 1685 |
+
"text": "A.1 GPT-3 Hyperparameters ",
|
| 1686 |
+
"text_level": 1,
|
| 1687 |
+
"bbox": [
|
| 1688 |
+
117,
|
| 1689 |
+
378,
|
| 1690 |
+
359,
|
| 1691 |
+
394
|
| 1692 |
+
],
|
| 1693 |
+
"page_idx": 12
|
| 1694 |
+
},
|
| 1695 |
+
{
|
| 1696 |
+
"type": "text",
|
| 1697 |
+
"text": "We use the GPT-3 API during the experiments and set the hyperparameters as in Table 3. Since the “Temperature” is set to be 0.0, denoting the stable output of GPT-3, we report the result of the single run for all experiments. Due to the input length limitation of GPT-3 and the various average lengths of contexts from each dataset, we set different search ranges for the number of demonstrations of each dataset as shown in Table 4. ",
|
| 1698 |
+
"bbox": [
|
| 1699 |
+
115,
|
| 1700 |
+
403,
|
| 1701 |
+
487,
|
| 1702 |
+
546
|
| 1703 |
+
],
|
| 1704 |
+
"page_idx": 12
|
| 1705 |
+
},
|
| 1706 |
+
{
|
| 1707 |
+
"type": "text",
|
| 1708 |
+
"text": "A.2 Fine-tuning Baseline PURE ",
|
| 1709 |
+
"text_level": 1,
|
| 1710 |
+
"bbox": [
|
| 1711 |
+
117,
|
| 1712 |
+
564,
|
| 1713 |
+
379,
|
| 1714 |
+
580
|
| 1715 |
+
],
|
| 1716 |
+
"page_idx": 12
|
| 1717 |
+
},
|
| 1718 |
+
{
|
| 1719 |
+
"type": "text",
|
| 1720 |
+
"text": "We follow their single-sentence setup to keep consistency among datasets as Semeval and TACRED are both sentence-level RE datasets. For the PLMs, we also follow PURE by using scibert-scivocabuncased (Beltagy et al., 2019) as the base encoder for SciERC and bert-base-uncased (Devlin et al., 2019) for the remaining three general domain datasets. We follow hyperparameters in their paper. We used 2 NVIDIA RTX3090 for training. ",
|
| 1721 |
+
"bbox": [
|
| 1722 |
+
115,
|
| 1723 |
+
589,
|
| 1724 |
+
489,
|
| 1725 |
+
733
|
| 1726 |
+
],
|
| 1727 |
+
"page_idx": 12
|
| 1728 |
+
},
|
| 1729 |
+
{
|
| 1730 |
+
"type": "text",
|
| 1731 |
+
"text": "A.3 Sentence Embedding Methods ",
|
| 1732 |
+
"text_level": 1,
|
| 1733 |
+
"bbox": [
|
| 1734 |
+
117,
|
| 1735 |
+
751,
|
| 1736 |
+
401,
|
| 1737 |
+
766
|
| 1738 |
+
],
|
| 1739 |
+
"page_idx": 12
|
| 1740 |
+
},
|
| 1741 |
+
{
|
| 1742 |
+
"type": "text",
|
| 1743 |
+
"text": "Gutiérrez et al. (2022) uses the [CLS] of RoBERTalarge as the representation in retrieval, Liu et al. (2022b) fine-tunes RoBERTa-large on two natural language inference (NLI) datasets: SNLI (Bowman et al., 2015) and MultiNLI (Williams et al., 2018) to enhance the quality of sentence embedding. For the sentence embedding method SimCSE in our experiment, we utilize the version: sup-simcse-bert-base-uncased. ",
|
| 1744 |
+
"bbox": [
|
| 1745 |
+
117,
|
| 1746 |
+
775,
|
| 1747 |
+
489,
|
| 1748 |
+
919
|
| 1749 |
+
],
|
| 1750 |
+
"page_idx": 12
|
| 1751 |
+
},
|
| 1752 |
+
{
|
| 1753 |
+
"type": "image",
|
| 1754 |
+
"img_path": "images/25291259629ea16af8dc458ebfa6d23365d946c5c8fd17da32a882369f03778c.jpg",
|
| 1755 |
+
"image_caption": [],
|
| 1756 |
+
"image_footnote": [],
|
| 1757 |
+
"bbox": [
|
| 1758 |
+
521,
|
| 1759 |
+
197,
|
| 1760 |
+
882,
|
| 1761 |
+
466
|
| 1762 |
+
],
|
| 1763 |
+
"page_idx": 12
|
| 1764 |
+
},
|
| 1765 |
+
{
|
| 1766 |
+
"type": "image",
|
| 1767 |
+
"img_path": "images/9fb7f8a7228824b0f4e48bb4878bf4bcb25eb80eafd28f6ef1a5ccaac4e26f03.jpg",
|
| 1768 |
+
"image_caption": [
|
| 1769 |
+
"Figure 10: More casees. "
|
| 1770 |
+
],
|
| 1771 |
+
"image_footnote": [],
|
| 1772 |
+
"bbox": [
|
| 1773 |
+
515,
|
| 1774 |
+
473,
|
| 1775 |
+
882,
|
| 1776 |
+
757
|
| 1777 |
+
],
|
| 1778 |
+
"page_idx": 12
|
| 1779 |
+
},
|
| 1780 |
+
{
|
| 1781 |
+
"type": "text",
|
| 1782 |
+
"text": "(b) [ENTITY AND DESTINATION] denotes the gold label. ",
|
| 1783 |
+
"bbox": [
|
| 1784 |
+
512,
|
| 1785 |
+
762,
|
| 1786 |
+
887,
|
| 1787 |
+
776
|
| 1788 |
+
],
|
| 1789 |
+
"page_idx": 12
|
| 1790 |
+
},
|
| 1791 |
+
{
|
| 1792 |
+
"type": "table",
|
| 1793 |
+
"img_path": "images/78c7bf5da191fb390cb612285e3051db6dad71d9226b21023b3cda5c45b45570.jpg",
|
| 1794 |
+
"table_caption": [
|
| 1795 |
+
"Table 5: ACE05 "
|
| 1796 |
+
],
|
| 1797 |
+
"table_footnote": [],
|
| 1798 |
+
"table_body": "<table><tr><td>Label</td><td># Num</td></tr><tr><td>PHYS</td><td>28</td></tr><tr><td>GEN-AFF</td><td>12</td></tr><tr><td>PER-SOC</td><td>11</td></tr><tr><td>GEN-AFF</td><td>33</td></tr><tr><td>PART-WHOLE</td><td>13</td></tr><tr><td>ART</td><td>19</td></tr><tr><td>NULL</td><td>2329</td></tr></table>",
|
| 1799 |
+
"bbox": [
|
| 1800 |
+
193,
|
| 1801 |
+
82,
|
| 1802 |
+
408,
|
| 1803 |
+
225
|
| 1804 |
+
],
|
| 1805 |
+
"page_idx": 13
|
| 1806 |
+
},
|
| 1807 |
+
{
|
| 1808 |
+
"type": "text",
|
| 1809 |
+
"text": "B Case Study ",
|
| 1810 |
+
"text_level": 1,
|
| 1811 |
+
"bbox": [
|
| 1812 |
+
115,
|
| 1813 |
+
274,
|
| 1814 |
+
248,
|
| 1815 |
+
291
|
| 1816 |
+
],
|
| 1817 |
+
"page_idx": 13
|
| 1818 |
+
},
|
| 1819 |
+
{
|
| 1820 |
+
"type": "text",
|
| 1821 |
+
"text": "To verify the effectiveness of our task-aware demonstration retrieval, we provide more cases. ",
|
| 1822 |
+
"bbox": [
|
| 1823 |
+
115,
|
| 1824 |
+
300,
|
| 1825 |
+
485,
|
| 1826 |
+
331
|
| 1827 |
+
],
|
| 1828 |
+
"page_idx": 13
|
| 1829 |
+
},
|
| 1830 |
+
{
|
| 1831 |
+
"type": "text",
|
| 1832 |
+
"text": "For Figure 10a, GPT-Sent retrieves a demonstration that shares the same semantic meaning of “design” with the test input. However, the entity pair is irrelevant to the concept “design” resulting in a noisy demonstration. Instead, GPT-RE_SimCSE retrieves a more relative demonstration with closer pair of entities sharing the same relation label. Furthermore, GPT-RE_FT retrieves the demonstration containing both the closing entity pair and the same linguistic structure between entities. This case emphasizes level-by-level improvement using our proposed methods. Figure 10b shows a similar phenomenon. ",
|
| 1833 |
+
"bbox": [
|
| 1834 |
+
117,
|
| 1835 |
+
334,
|
| 1836 |
+
487,
|
| 1837 |
+
541
|
| 1838 |
+
],
|
| 1839 |
+
"page_idx": 13
|
| 1840 |
+
},
|
| 1841 |
+
{
|
| 1842 |
+
"type": "text",
|
| 1843 |
+
"text": "C Subset ",
|
| 1844 |
+
"text_level": 1,
|
| 1845 |
+
"bbox": [
|
| 1846 |
+
117,
|
| 1847 |
+
554,
|
| 1848 |
+
210,
|
| 1849 |
+
569
|
| 1850 |
+
],
|
| 1851 |
+
"page_idx": 13
|
| 1852 |
+
},
|
| 1853 |
+
{
|
| 1854 |
+
"type": "text",
|
| 1855 |
+
"text": "The number of sampled examples is not only related to the size of the training data itself. A more important factor is the proportion of NULL. We have to maintain the original label distribution in datasets with a high proportion of NULL. Thus, the rule to sample the subset is to keep the proportion of each relation label consistent with the original test set. Table 5 6 are label distributions of two subsets. ",
|
| 1856 |
+
"bbox": [
|
| 1857 |
+
115,
|
| 1858 |
+
580,
|
| 1859 |
+
487,
|
| 1860 |
+
722
|
| 1861 |
+
],
|
| 1862 |
+
"page_idx": 13
|
| 1863 |
+
},
|
| 1864 |
+
{
|
| 1865 |
+
"type": "text",
|
| 1866 |
+
"text": "GPT-RE_FT on TACRED surpasses the supervised baseline in the current subset. As we show above, some labels in TACRED are indeed not well presented (only 1 example), since TACRED dataset contains some long-tail labels. We decided to add additional results of GPT-RE_FT by enlarging our sampled set to $\\# 3 2 0 0$ (2 times the current version), and the performance of GPT-RE_FT $( { \\bf k } = 1 5 )$ ) is 73.16 while the performance of PURE is 70.48. ",
|
| 1867 |
+
"bbox": [
|
| 1868 |
+
115,
|
| 1869 |
+
725,
|
| 1870 |
+
487,
|
| 1871 |
+
869
|
| 1872 |
+
],
|
| 1873 |
+
"page_idx": 13
|
| 1874 |
+
},
|
| 1875 |
+
{
|
| 1876 |
+
"type": "table",
|
| 1877 |
+
"img_path": "images/8b7cb37c927024f092e8e34ab5a42ae228387ae9bda1f5d70022d2b9a445e859.jpg",
|
| 1878 |
+
"table_caption": [
|
| 1879 |
+
"Table 6: TACRED "
|
| 1880 |
+
],
|
| 1881 |
+
"table_footnote": [],
|
| 1882 |
+
"table_body": "<table><tr><td colspan=\"2\">Label</td></tr><tr><td>Per:title</td><td>#Num 40</td></tr><tr><td>PER:city_of_death</td><td>1</td></tr><tr><td>Org:shareholders</td><td>2</td></tr><tr><td>Per:origin</td><td>12</td></tr><tr><td>Org:top_members/employees</td><td>36</td></tr><tr><td>Org:city_of_headquarters</td><td>11</td></tr><tr><td>Per:religion</td><td>4</td></tr><tr><td>Per:city_of_birth</td><td>1</td></tr><tr><td>Per:employee_of</td><td>27</td></tr><tr><td>Per:data_of_death</td><td>3</td></tr><tr><td>Per:other_family</td><td>5</td></tr><tr><td>Org:website</td><td>6</td></tr><tr><td>Per:cause_of_death</td><td>3</td></tr><tr><td>Org:subsidiaries</td><td>4</td></tr><tr><td>Org:stateorprovince_of_headquarters</td><td>5</td></tr><tr><td>Per:countries_of_residence</td><td>10</td></tr><tr><td>Per:siblings</td><td>5</td></tr><tr><td>Per:stateorprovinces_of_residence</td><td>11</td></tr><tr><td>Org:alternate_names</td><td>27</td></tr><tr><td>Per:spouse</td><td>4</td></tr><tr><td>Per:parents</td><td>7</td></tr><tr><td>Org:country_of_headquarters</td><td>9</td></tr><tr><td>Per:age</td><td>21</td></tr><tr><td>Per:date_of_birth</td><td></td></tr><tr><td>Per:country_of_death</td><td></td></tr><tr><td>Per:schools_attended</td><td>4</td></tr><tr><td>Org:member_of</td><td>3</td></tr><tr><td>Per:children</td><td>5</td></tr><tr><td>Org:parents</td><td>7</td></tr><tr><td>Per:cities_of_residence</td><td>24</td></tr><tr><td>Per:stateorprovince_of_brith</td><td>1</td></tr><tr><td>Per:charges</td><td>12</td></tr><tr><td>Org:founded</td><td>2</td></tr><tr><td>Org:country_founded_by</td><td>5</td></tr><tr><td>Per:stateorprovince_of_death</td><td></td></tr><tr><td>Org:members</td><td>4</td></tr><tr><td>Per:country_of_birth</td><td></td></tr><tr><td>Per:alternate_names</td><td></td></tr><tr><td>Org:number_of_employees/members</td><td>1</td></tr><tr><td>Org:dissolved</td><td></td></tr><tr><td>Org:political/religious_affiliation</td><td>1</td></tr><tr><td>NULL</td><td>1271</td></tr></table>",
|
| 1883 |
+
"bbox": [
|
| 1884 |
+
541,
|
| 1885 |
+
167,
|
| 1886 |
+
855,
|
| 1887 |
+
802
|
| 1888 |
+
],
|
| 1889 |
+
"page_idx": 13
|
| 1890 |
+
}
|
| 1891 |
+
]
|
parse/dev/mTiHLHu3sP/mTiHLHu3sP_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/mTiHLHu3sP/mTiHLHu3sP_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|