Add Batch 19b03964-5039-4267-b6b3-d87303019e9c
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- ICLR/2025/Segment Any 3D Object with Language/433d7e24-a16c-4113-9609-65f6d182288b_content_list.json +3 -0
- ICLR/2025/Segment Any 3D Object with Language/433d7e24-a16c-4113-9609-65f6d182288b_model.json +3 -0
- ICLR/2025/Segment Any 3D Object with Language/433d7e24-a16c-4113-9609-65f6d182288b_origin.pdf +3 -0
- ICLR/2025/Segment Any 3D Object with Language/full.md +531 -0
- ICLR/2025/Segment Any 3D Object with Language/images.zip +3 -0
- ICLR/2025/Segment Any 3D Object with Language/layout.json +3 -0
- ICLR/2025/SelKD_ Selective Knowledge Distillation via Optimal Transport Perspective/3928d910-6231-4501-b281-9f80e70df3b0_content_list.json +3 -0
- ICLR/2025/SelKD_ Selective Knowledge Distillation via Optimal Transport Perspective/3928d910-6231-4501-b281-9f80e70df3b0_model.json +3 -0
- ICLR/2025/SelKD_ Selective Knowledge Distillation via Optimal Transport Perspective/3928d910-6231-4501-b281-9f80e70df3b0_origin.pdf +3 -0
- ICLR/2025/SelKD_ Selective Knowledge Distillation via Optimal Transport Perspective/full.md +367 -0
- ICLR/2025/SelKD_ Selective Knowledge Distillation via Optimal Transport Perspective/images.zip +3 -0
- ICLR/2025/SelKD_ Selective Knowledge Distillation via Optimal Transport Perspective/layout.json +3 -0
- ICLR/2025/SelectFormer in Data Markets_ Privacy-Preserving and Efficient Data Selection for Transformers with Multi-Party Computation/cf83c876-81f1-46fa-8ff1-14f2edc206c5_content_list.json +3 -0
- ICLR/2025/SelectFormer in Data Markets_ Privacy-Preserving and Efficient Data Selection for Transformers with Multi-Party Computation/cf83c876-81f1-46fa-8ff1-14f2edc206c5_model.json +3 -0
- ICLR/2025/SelectFormer in Data Markets_ Privacy-Preserving and Efficient Data Selection for Transformers with Multi-Party Computation/cf83c876-81f1-46fa-8ff1-14f2edc206c5_origin.pdf +3 -0
- ICLR/2025/SelectFormer in Data Markets_ Privacy-Preserving and Efficient Data Selection for Transformers with Multi-Party Computation/full.md +325 -0
- ICLR/2025/SelectFormer in Data Markets_ Privacy-Preserving and Efficient Data Selection for Transformers with Multi-Party Computation/images.zip +3 -0
- ICLR/2025/SelectFormer in Data Markets_ Privacy-Preserving and Efficient Data Selection for Transformers with Multi-Party Computation/layout.json +3 -0
- ICLR/2025/Selective Aggregation for Low-Rank Adaptation in Federated Learning/4aacdb1e-5b63-489a-bd6b-47295aea797c_content_list.json +3 -0
- ICLR/2025/Selective Aggregation for Low-Rank Adaptation in Federated Learning/4aacdb1e-5b63-489a-bd6b-47295aea797c_model.json +3 -0
- ICLR/2025/Selective Aggregation for Low-Rank Adaptation in Federated Learning/4aacdb1e-5b63-489a-bd6b-47295aea797c_origin.pdf +3 -0
- ICLR/2025/Selective Aggregation for Low-Rank Adaptation in Federated Learning/full.md +0 -0
- ICLR/2025/Selective Aggregation for Low-Rank Adaptation in Federated Learning/images.zip +3 -0
- ICLR/2025/Selective Aggregation for Low-Rank Adaptation in Federated Learning/layout.json +3 -0
- ICLR/2025/Selective Attention Improves Transformer/1874d18c-c191-4cef-9212-763683a4a6b1_content_list.json +3 -0
- ICLR/2025/Selective Attention Improves Transformer/1874d18c-c191-4cef-9212-763683a4a6b1_model.json +3 -0
- ICLR/2025/Selective Attention Improves Transformer/1874d18c-c191-4cef-9212-763683a4a6b1_origin.pdf +3 -0
- ICLR/2025/Selective Attention Improves Transformer/full.md +483 -0
- ICLR/2025/Selective Attention Improves Transformer/images.zip +3 -0
- ICLR/2025/Selective Attention Improves Transformer/layout.json +3 -0
- ICLR/2025/Selective Induction Heads_ How Transformers Select Causal Structures in Context/c66b6248-75f9-4d22-a583-04fa3b64edab_content_list.json +3 -0
- ICLR/2025/Selective Induction Heads_ How Transformers Select Causal Structures in Context/c66b6248-75f9-4d22-a583-04fa3b64edab_model.json +3 -0
- ICLR/2025/Selective Induction Heads_ How Transformers Select Causal Structures in Context/c66b6248-75f9-4d22-a583-04fa3b64edab_origin.pdf +3 -0
- ICLR/2025/Selective Induction Heads_ How Transformers Select Causal Structures in Context/full.md +0 -0
- ICLR/2025/Selective Induction Heads_ How Transformers Select Causal Structures in Context/images.zip +3 -0
- ICLR/2025/Selective Induction Heads_ How Transformers Select Causal Structures in Context/layout.json +3 -0
- ICLR/2025/Selective Label Enhancement Learning for Test-Time Adaptation/baeef0dd-a6b2-4471-befd-2fb3b48b023a_content_list.json +3 -0
- ICLR/2025/Selective Label Enhancement Learning for Test-Time Adaptation/baeef0dd-a6b2-4471-befd-2fb3b48b023a_model.json +3 -0
- ICLR/2025/Selective Label Enhancement Learning for Test-Time Adaptation/baeef0dd-a6b2-4471-befd-2fb3b48b023a_origin.pdf +3 -0
- ICLR/2025/Selective Label Enhancement Learning for Test-Time Adaptation/full.md +0 -0
- ICLR/2025/Selective Label Enhancement Learning for Test-Time Adaptation/images.zip +3 -0
- ICLR/2025/Selective Label Enhancement Learning for Test-Time Adaptation/layout.json +3 -0
- ICLR/2025/Selective Task Group Updates for Multi-Task Optimization/6e303ff4-738b-4014-87fd-6d6df18a6e54_content_list.json +3 -0
- ICLR/2025/Selective Task Group Updates for Multi-Task Optimization/6e303ff4-738b-4014-87fd-6d6df18a6e54_model.json +3 -0
- ICLR/2025/Selective Task Group Updates for Multi-Task Optimization/6e303ff4-738b-4014-87fd-6d6df18a6e54_origin.pdf +3 -0
- ICLR/2025/Selective Task Group Updates for Multi-Task Optimization/full.md +0 -0
- ICLR/2025/Selective Task Group Updates for Multi-Task Optimization/images.zip +3 -0
- ICLR/2025/Selective Task Group Updates for Multi-Task Optimization/layout.json +3 -0
- ICLR/2025/Selective Unlearning via Representation Erasure Using Domain Adversarial Training/8ce8aa33-2a96-422f-b575-479d4e72ae9f_content_list.json +3 -0
- ICLR/2025/Selective Unlearning via Representation Erasure Using Domain Adversarial Training/8ce8aa33-2a96-422f-b575-479d4e72ae9f_model.json +3 -0
ICLR/2025/Segment Any 3D Object with Language/433d7e24-a16c-4113-9609-65f6d182288b_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:347b752e95590932aee8740c06115c528fdeb7aa4f797c0ef0474b05716a04ce
|
| 3 |
+
size 137693
|
ICLR/2025/Segment Any 3D Object with Language/433d7e24-a16c-4113-9609-65f6d182288b_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:42de2bc42120825c9f29ce98885f913be2ed7ddd1deadd00dbddeb41b06db168
|
| 3 |
+
size 172937
|
ICLR/2025/Segment Any 3D Object with Language/433d7e24-a16c-4113-9609-65f6d182288b_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2e135a820aa290d04bb76aad86629994d82917305a1c09155e116869afd1ec90
|
| 3 |
+
size 41816908
|
ICLR/2025/Segment Any 3D Object with Language/full.md
ADDED
|
@@ -0,0 +1,531 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SEGMENT ANY 3D OBJECT WITH LANGUAGE
|
| 2 |
+
|
| 3 |
+
Seungjun Lee*, Yuyang Zhao, Gim Hee Lee
|
| 4 |
+
|
| 5 |
+
Department of Computer Science, National University of Singapore
|
| 6 |
+
{seungjun.lee, yuyang.zhao, gimhee.lee}@comp.nus.edu.sg
|
| 7 |
+
https://cvrp-sole.github.io
|
| 8 |
+
|
| 9 |
+

|
| 10 |
+
(a) "Can I wash my hands?"
|
| 11 |
+
|
| 12 |
+

|
| 13 |
+
(b) "Brown Furnitures."
|
| 14 |
+
Figure 1: Qualitative results of SOLE with various language instructions. SOLE is highly generalizable and can segment corresponding instances with various language instructions, including but not limited to (a) visual questions, (b) attributes description, and (c) functional description.
|
| 15 |
+
|
| 16 |
+

|
| 17 |
+
(c) "Device to play game."
|
| 18 |
+
|
| 19 |
+
# ABSTRACT
|
| 20 |
+
|
| 21 |
+
In this paper, we investigate Open-Vocabulary 3D Instance Segmentation (OV-3DIS) with free-form language instructions. Earlier works mainly rely on annotated base categories for training which leads to limited generalization to unseen novel categories. To mitigate the poor generalizability to novel categories, recent works generate class-agnostic masks or projecting generalized masks from 2D to 3D, subsequently classifying them with the assistance of 2D foundation model. However, these works often disregard semantic information in the mask generation, leading to sub-optimal performance. Instead, generating generalizable but semantic-aware masks directly from 3D point clouds would result in superior outcomes. To the end, we introduce Segment any 3D Object with LanguagE (SOLE), which is a semantic and geometric-aware visual-language learning framework with strong generalizability by generating semantic-related masks directly from 3D point clouds. Specifically, we propose a multimodal fusion network to incorporate multimodal semantics in both backbone and decoder. In addition, to align the 3D segmentation model with various language instructions and enhance the mask quality, we introduce three types of multimodal associations as supervision. Our SOLE outperforms previous methods by a large margin on ScanNetv2, ScanNet200, and Replica benchmarks, and the results are even closed to the fully-supervised counterpart despite the absence of class annotations in the training. Furthermore, extensive qualitative results demonstrate the versatility of our SOLE to language instructions.
|
| 22 |
+
|
| 23 |
+
# 1 INTRODUCTION
|
| 24 |
+
|
| 25 |
+
3D instance segmentation which aims at detecting, segmenting and recognizing object instances in 3D scenes is one of the crucial tasks for 3D scene understanding. Effective and generalizable 3D instance segmentation has great potential in real-world applications, including but not limited to autonomous driving, augmented reality (AR), and virtual reality (VR). Owing to its significance, 3D instance segmentation has achieved remarkable success in the computer vision community (Schult et al., 2022; Vu et al., 2022; He et al., 2022). Previous 3D instance segmentation models mainly focus on the closed-set setting, where the training and testing stages share the same categories. However, novel and unseen categories with various shapes and semantic meaning are inevitable in real-world applications. Failure to segment such instances drastically narrows the scope of application.
|
| 26 |
+
|
| 27 |
+

|
| 28 |
+
(a) Class agnostic 3D masks and classification
|
| 29 |
+
|
| 30 |
+

|
| 31 |
+
Figure 2: Left (a): Previous works train class-agnostic mask proposal module with only using mask annotations. In the inference time, generated 3D masks are projected to 2D images and subsequently classified with the help of 2D foundation model. Right (b): In contrast, we train semantic-aware mask proposal module with giving Multi-Modal Associations (MMA) and mask annotations as supervision. With regarding both geometry and semantic information in the mask generation, our SOLE can produce highly generalizable segments.
|
| 32 |
+
|
| 33 |
+

|
| 34 |
+
(b) Semantic-aware 3D masks (ours)
|
| 35 |
+
|
| 36 |
+

|
| 37 |
+
|
| 38 |
+
In view of the strong limitations of closed-set setting, open-set 3D instance segmentation (OS-3DIS) that aims at detecting and segmenting unseen classes based on instructions is introduced and investigated in the community. Most of the works (Huang et al., 2023b; Ding et al., 2022b; Nguyen et al., 2024) leverage category names or descriptions as segmentation instructions, which is also termed as open-vocabulary 3D instance segmentation (OV-3DIS). The early approaches (Ding et al., 2022b; Yang et al., 2023; Ding et al., 2023) split categories in each dataset into base and novel set. Only base categories are available in the training stage, but the model is expected to segment novel categories during inference. Due to the lack of novel classes during training, these methods easily overfit to the base categories and thus yielding sub-optimal performance on novel categories. In addition, they suffer from severe performance degradation when they are evaluated on the data with different distributions. In this regards, recent works (Takmaz et al., 2023; Huang et al., 2023b; Yan et al., 2024; Lu et al., 2023) explore more generalizable OV-3DIS with the help of 2D foundation models (Radford et al., 2021; Oquab et al., 2023; Zhou et al., 2022b). Specifically, Nguyen et al. (2024); Takmaz et al. (2023); Huang et al. (2023b) learn class-agnostic 3D masks from mask annotation and then project the point clouds to 2D images to obtain class labels from foundation models (Fig. 2a). Yan et al. (2024); Lu et al. (2023); Yin et al. (2024) predict 2D instances with 2D open-vocabulary instance segmentation model (Zhou et al., 2022b) and fuse them to obtain 3D predictions. However, class-agnostic masks and 2D projected masks ignore the semantic and geometry information in the mask generation, respectively, leading to the sub-optimal performance (details in Appendix. E.1). To this end, we investigate the OV-3DIS problem from the perspective of mask generator in this paper (Fig. 2b). We propose the semantic-aware mask generator to obtain semantic-related masks from 3D point clouds, yielding better and more generalizable 3D masks.
|
| 39 |
+
|
| 40 |
+
In this paper, we propose SOLE: Segment any 3D Object with Language to circumvent the above-mentioned issues for OV-3DIS. To realize generalizable open-set 3D instance segmentation, our SOLE requires two main attributes: generating and classifying 3D masks directly from 3D point clouds, and responsive to free-form language instructions. The 3D segmentation network is required to be aligned with language instructions to directly segment and classify instances from point clouds. To this end, we build a multimodal fusion network with two main techniques: 1) Point-wise CLIP features obtained from pre-trained multimodal 2D segmentation model (Ghiasi et al., 2022) are incorporated to the backbone to enhance the generality of the model; 2) Cross-modality decoder is introduced to integrate information from language-domain features, facilitating the effective fusion of multimodal knowledge. Furthermore, we improve the generalization ability across various scene and language instructions with a novel visual-language learning framework, training the 3D segmentation network with three types of multimodal associations: 1) Mask-visual association aligns the 3D visual information with 2D visual information in the foundation model; 2) mask-caption association aims at enabling the mask generation and classification from various language forms; and 3) mask-entity association introduces fine-grained textual information into the framework, enhancing the ability of instance segmentation. These associations improve the language instruction alignment and enhance the 3D mask prediction with more abundant semantic information.
|
| 41 |
+
|
| 42 |
+
Equipped with a multimodal fusion network and three types of multimodal associations, our visual-language learning framework (SOLE) outperforms previous works by a large margin on ScanNetv2 (Dai et al., 2017), ScanNet200 (Rozenberszki et al., 2022) and Replica (Straub et al., 2019) benchmarks. Furthermore, SOLE can respond to free-form queries, including but not limited to
|
| 43 |
+
|
| 44 |
+
questions, attributes description, and functional description (Fig. 1 and Fig. 7). In summary, our contributions are as follows:
|
| 45 |
+
|
| 46 |
+
- We propose a visual-language learning framework for OV-3DIS, SOLE. A multimodal fusion network is designed for SOLE, which can directly predict semantic-related masks from 3D point clouds with multimodal information, leading to high-quality and generalizable segments.
|
| 47 |
+
- We propose three types of multimodal associations to improve the alignment between 3D segmentation model with the language. The associations improve the mask quality and the response ability to language instructions.
|
| 48 |
+
- SOLE achieves state-of-the-art results on ScanNetv2, Scannet200 and Replica benchmarks, and the results are even close to the fully-supervised counterpart. In addition, extensive qualitative results demonstrate that SOLE can respond to various language questions and instructions.
|
| 49 |
+
|
| 50 |
+
# 2 RELATED WORK
|
| 51 |
+
|
| 52 |
+
Closed-Set 3D Instance Segmentation. 3D instance segmentation aims at detecting, segmenting and recognizing the object instances in 3D scenes. Previous works (He et al., 2021; 2022; Ngo et al., 2023; Schult et al., 2022; Sun et al., 2023; Vu et al., 2022; Yi et al., 2019; Zhang et al., 2021; Hou et al., 2019; Yang et al., 2019a; Chen et al., 2021; Dong et al., 2022; Jiang et al., 2020; Liu et al., 2022; Wu et al., 2022) mainly consider the closed-set setting, where the training and testing categories are the same. These methods vary in feature extraction and decoding process. With the development of transformer models, mask prediction becomes a more efficient and effective way than traditional box detection decoding approaches. Mask3D (Schult et al., 2022) samples a fixed number of points across the scene as queries, and then directly predicts the final masks with attention mechanism, achieving better results. However, closed-set methods lack the capability to handle the unseen categories and thus hindering their application in the real world.
|
| 53 |
+
|
| 54 |
+
Open-Vocabulary 2D Segmentation. Owing to the recent success of large-scale vision-language models (Alayrac et al., 2022; Cherti et al., 2023; Girdhar et al., 2023; Jia et al., 2021; Radford et al., 2021; Yu et al., 2022; Yuan et al., 2021), notable achievements have been made in open-vocabulary or zero-shot 2D segmentation (Ding et al., 2022a; Ghiasi et al., 2022; Gu et al., 2021; He et al., 2023; Kuo et al., 2022; Li et al., 2022; Liang et al., 2023; Ma et al., 2022; Rao et al., 2022; Xu et al., 2022; Zabari & Hoshen, 2021; Zhou et al., 2022a; Cho et al., 2023; Ma et al., 2023; Yuan et al., 2024). The common key idea is to leverage 2D multit-modal foundation models (Radford et al., 2021; Jia et al., 2021) for the transfer of image-level embeddings to the pixel-level downstream tasks. LSeg (Li et al., 2022), OpenSeg (Ghiasi et al., 2022), and OVSeg (Liang et al., 2023) align pixel-level or mask-level visual features to text features from foundation model for open-vocabulary semantic segmentation. Recently, Open-Vocabulary SAM (Yuan et al., 2024) integrates CLIP and SAM, further exploring interactive open-world tasks. Other works such as X-Decoder (Zou et al., 2023), FreeSeg (Qin et al., 2023) and SEEM (Zou et al., 2024) suggest more unified-framework for open-vocabulary segmentation, include instance, panoptic, and referring segmentation.
|
| 55 |
+
|
| 56 |
+
Open-Vocabulary 3D Scene Understanding. The remarkable success achieved in open-vocabulary 2D segmentation (OV-2DS) has spurred several endeavors in open-vocabulary 3D segmentation. However, the techniques in OV-2DS cannot be directly transferred to the 3D domain due to the lack of 3D multimodal foundation model. Consequently, researchers propose to align 2D images and 3D point clouds and thus lifting 2D foundation models to 3D. For open-vocabulary 3D semantic segmentation, (Chen et al., 2023; Ding et al., 2022b; Ha & Song, 2022; Huang et al., 2023a; Jatavallabhula et al., 2023; Peng et al., 2023; Shafiullah et al., 2022; Shah et al., 2023) construct task-agnostic point-wise feature representations from 2D foundation models (Radford et al., 2021), and then use these features to query the open-vocabulary concepts within 3D scene. These works focus purely on transferring semantic information from 2D to 3D, limiting the application for instance-level recognition tasks. In this regard, open-vocabulary 3D instance segmentation (OV-3DIS) (Ding et al., 2023; Huang et al., 2023b; Takmaz et al., 2023; Lu et al., 2023; Nguyen et al., 2024; Yan et al., 2024) is introduced to detect and segment instances of various categories in 3D scenes. PLA (Ding et al., 2022b) and its variants (Yang et al., 2023; Ding et al., 2023) split the training categories into base and novel classes, and train the model only with base class annotation. OpenMask3D (Takmaz et al., 2023) and OpenIns3D (Huang et al., 2023b) learn class-agnostic 3D masks from mask annotations and then use the corresponding 2D images to obtain class labels from foundation models. With
|
| 57 |
+
|
| 58 |
+

|
| 59 |
+
Figure 3: Overall framework of SOLE. SOLE is built on transformer-based instance segmentation model with multimodal adaptations. For model architecture, backbone features are integrated with per-point CLIP features and subsequently fed into the cross-modality decoder (CMD). CMD aggregates the point-wise features and textual features into the instance queries, finally segmenting the instances, which are supervised by multimodal associations. During inference, predicted mask features are combined with the per-point CLIP features, enhancing the open-vocabulary performance.
|
| 60 |
+
|
| 61 |
+

|
| 62 |
+
|
| 63 |
+
following similar paradigm, Open3DIS (Nguyen et al., 2024) further improves the quality of masks by fusing 3D segments and 2D masks. Recently, researchers also investigate direct lifting of 2D predictions from 2D instance segmentation model (Zhou et al., 2022b) to 3D without training (Yan et al., 2024; Lu et al., 2023; Yin et al., 2024). However, previous works often disregard semantic information in the mask generation, leading to the poor semantic generalization ability. Considering the limitations of previous works, we significantly improve OV-3DIS by designing a visual-language learning framework with a multimodal network and various multimodal associations.
|
| 64 |
+
|
| 65 |
+
# 3 METHOD
|
| 66 |
+
|
| 67 |
+
Objective. The goal of open-vocabulary 3D instance segmentation (OV-3DIS) with free-form language instructions is defined as follows: Given a 3D point cloud $\mathbf{P} \in \mathbb{R}^{M \times C}$ , the corresponding 2D images $I$ and the instance-level 3D masks $\mathbf{m}$ , we aim to train a 3D instance segmentation network without ground-truth class annotations. During inference, given a text prompt $q$ , the trained 3D instance segmentation network must detect and segment corresponding instances.
|
| 68 |
+
|
| 69 |
+
Mask-Prediction Baseline. We build our framework on the transformer-based 3D instance segmentation model Mask3D (Schult et al., 2022), which treats the instance segmentation task as the mask prediction paradigm. Specifically, the transformer decoders with mask queries are used to segment instances. Given $N_{q}$ queries selected from the scene, cross attention is used to aggregate information from the point clouds to instance queries. After several decoder layers, $N_{q}$ queries become $N_{q}$ masks with corresponding semantic prediction. During training, Hungarian matching (Kuhn, 1955) is adopted to match and train the model with ground truth labels and masks. At the inference stage, $N_{q}$ masks with correct semantic classification results are taken as the final outputs. Our SOLE leverages the mask prediction paradigm with transformer-based architecture, where the model is only trained with masks without ground truth labels to achieve generalizable OV-3DIS.
|
| 70 |
+
|
| 71 |
+
Overview. The overall architecture of SOLE is illustrated in Fig. 3. To realize open-vocabulary instance segmentation with free-form language instructions, we improve the transformer-based instance segmentation model with multimodal information: point-wise CLIP features in the backbone (Sec. 3.1) and textual information in the decoder (Sec. 3.2). Furthermore, to achieve better generalization ability without ground truth class labels, we construct three types of multimodal associations on target instances: mask-visual association, mask-caption association and mask-entity association
|
| 72 |
+
|
| 73 |
+

|
| 74 |
+
Figure 4: Three types of multimodal association instance. For each ground truth instance mask, we first pool the per-point CLIP features to obtain Mask-Visual Association $\mathbf{f}^{\mathrm{MVA}}$ . Subsequently, $\mathbf{f}^{\mathrm{MVA}}$ is fed into CLIP space captioning model to generate caption and corresponding textual feature $\mathbf{f}^{\mathrm{MCA}}$ for each mask, termed as Mask-Caption Association. Finally, noun phrases are extracted from mask caption and the embeddings of them are aggregated via multimodal attention to get Mask-Entity Association $\mathbf{f}^{\mathrm{MEA}}$ . The three multimodal associations are used for supervising SOLE to acquire the ability to segment 3D objects with free-form language instructions.
|
| 75 |
+
|
| 76 |
+
to train SOLE. Equipped with the multimodal framework and associations, our SOLE can effectively segment instances given various language prompts.
|
| 77 |
+
|
| 78 |
+
# 3.1 BACKBONE FEATURE ENSEMBLE
|
| 79 |
+
|
| 80 |
+
Initializing the backbone with pre-trained model (Jia et al., 2022; Zhao et al., 2023b;a) is an efficient and effective way to improve the performance on the downstream tasks, especially when the downstream data is not in abundance. For 3D open-set setting, leveraging 2D foundation model is crucial due to the limited 3D data. We thus follow (Peng et al., 2023) to project pre-trained visual features of 2D images to 3D point clouds based on the camera pose. To maintain the fine-grained and generalizable features, we leverage OpenSeg (Ghiasi et al., 2022) as the 2D backbone. These features contain visual information in the CLIP (Radford et al., 2021) feature space, which is aligned with textual information.
|
| 81 |
+
|
| 82 |
+
Since CLIP feature space mainly focuses on semantic information due to the image-level contrastive training, leveraging the projected features solely cannot achieve optimal performance on instance segmentation. To this end, we train a 3D instance segmentation backbone and combine its features $\mathbf{f}^b\in \mathbb{R}^{M\times D}$ with the projected 2D CLIP features $\mathbf{f}^p\in \mathbb{R}^{M\times C}$ :
|
| 83 |
+
|
| 84 |
+
$$
|
| 85 |
+
\tilde {\mathbf {f}} ^ {b} = \operatorname {c o n c a t} \left(\mathbf {f} ^ {p}, \mathbf {f} ^ {b}\right) \in \mathbb {R} ^ {M \times (C + D)}, \tag {1}
|
| 86 |
+
$$
|
| 87 |
+
|
| 88 |
+
where $M$ denotes the number of points while $D$ and $C$ denote the feature dimension of 3D instance segmentation backbone and the projected 2D features, respectively. Note that features of different resolutions are extracted from the 3D backbone and respectively incorporated with the 2D CLIP features. As illustrated in Fig. 3, the same pooling strategy with 3D backbone is adopted to CLIP features, aligning the resolution. Finally, incorporated point-wise features with multiple resolutions are fed into cross modality decoder.
|
| 89 |
+
|
| 90 |
+
# 3.2 CROSS MODALITY DECODER (CMD)
|
| 91 |
+
|
| 92 |
+
Projected 2D CLIP features provide generalizable visual information but the language information is not explicitly integrated, limiting the responsive ability to language instructions. To circumvent this issue, we introduce Cross Modality Decoder (CMD) to incorporate textual information in the decoding process of our framework. Specifically, each CMD module contains three attention layers. Instance queries first extract visual information from the CLIP-combined backbone features $\tilde{\mathbf{f}}^b$ .
|
| 93 |
+
|
| 94 |
+
CLIP textual features are then projected to key and value in the second attention layer, incorporating the text domain knowledge. During the training, CLIP textual features are obtained from the caption features of each target mask, $\mathbf{f}^{\mathrm{MCA}}\in \mathbb{R}^{N_c\times C}$ (See Sec. 3.3 for details), whereas, during the inference, it can be the description of the query instance or other form of language instructions, such as visual questions or functional attributes. Finally, self-attention is applied to the instance queries to further improve the representation. By fusing the multimodal knowledge from CLIP with multilevel CMD as the decoder, SOLE can respond to various language instructions with high-quality results.
|
| 95 |
+
|
| 96 |
+
# 3.3 VISION-LANGUAGE LEARNING
|
| 97 |
+
|
| 98 |
+
We do vision-language learning to enable our SOLE towards generalizable OV-3DIS. To respond effectively to various language instructions, we leverage multimodal information stemming from target mask annotations, to supervise the segmentation network. Specifically, three types of supervision in hierarchical granularity are proposed: 1) mask-visual association, 2) mask-caption association and 3) mask-entity association.
|
| 99 |
+
|
| 100 |
+
Mask-Visual Association (MVA). Using the correspondence between 2D images and 3D point clouds, we can get the instance-level CLIP visual features $\mathbf{f}^{\mathrm{MVA}} \in \mathbb{R}^{N_m \times C}$ by averaging the perpoint CLIP features within the $N_m$ target instance masks $\mathbf{m} = [m_1, m_2, \dots, m_{N_m}]$ . The instance-level CLIP visual features can serve as the supervision to indirectly align the 3D segmentation model to CLIP textual space. In addition, as the intermediate representation between 3D point cloud and language, the mask-visual association is also the basis for the following two fine-grained associations.
|
| 101 |
+
|
| 102 |
+
Mask-Caption Association (MCA). Despite being in the CLIP feature space, mask-visual association is not an accurate and precision language supervision. Instead, directly supervising the model with language instructions would yield better results. Due to the strong generalization ability of CLIP (Radford et al., 2021), text generation from CLIP space is widely investigated in the community (Tewel et al., 2022; Mokady et al., 2021; Li et al., 2023). Since the instance-level CLIP visual features $\mathbf{f}^{\mathrm{MVA}}$ in the mask-visual association is in CLIP visual space, we can feed them to the CLIP space caption generation model (DeCap (Li et al., 2023)) to obtain the mask captions $\mathbf{c} = [c_1, c_2, \dots, c_{N_m}]$ . The mask captions are then fed into CLIP textual model to extract the mask-caption association $\mathbf{f}^{\mathrm{MCA}}$ . This association represents the language information for the instance masks, used in CMD to fuse textual information during the training.
|
| 103 |
+
|
| 104 |
+
Mask-Entity Association (MEA). Although mask-caption association can provide detailed language descriptions for both semantics and geometry, it may be ambiguous for specific categories. As shown in the example of Fig. 4. The mask caption for a desk is "A wooden desk with a chair in a room". Such caption can lead to the confusion of the model between the chair and the desk, or misinterpretation of the two instances as a single one. It is therefore important to introduce a more fine-grained visual-language association for better semantic learning.
|
| 105 |
+
|
| 106 |
+
Since the objects are commonly the nouns in the caption, we can extract the entity-level descriptions for the nouns and match them with the instances. Specifically, as illustrated in Fig. 4, we first extract all the noun phrases $\mathbf{e}_i$ for each mask caption $c_i$ and obtain the text feature of each noun phrase from CLIP text encoder $\mathcal{T}$ as below:
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
\mathcal {E} \left(c _ {i}\right) = \mathbf {e} _ {i} = \left[ e _ {1}, e _ {2}, \dots , e _ {N _ {e} ^ {i}} \right], \quad \mathbf {f} _ {i} ^ {\mathbf {e}} = \mathcal {T} \left(\mathbf {e} _ {i}\right) \in \mathbb {R} ^ {N _ {e} ^ {i} \times C}, \tag {2}
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+
where $\mathcal{E}(\cdot)$ denotes the NLP tool to extract noun phrases and $N_{e}^{i}$ denotes the number of nouns obtained from mask caption $c_{i}$ . The entities can be matched to the mask in either a hard or soft manner. Intuitively, the most similar entity can be viewed as the mask label. However, there are two main issues with such a hard matching. First, the generated caption and the similarity results may not be accurate, leading to wrong supervision. Second, although the entity is correct, hard matching ignores the geometry information in the context and thus impairing the responsive ability to language instructions. To this end, we propose a soft matching to get mask-entity association by multimodal attention. Specifically, the aggregated entity feature for the $i$ -th mask $\mathbf{f}_{i}^{\mathrm{MEA}}$ is obtained based on the attention map $A_{c,e}$ constructed by cosine similarity $\cos (\cdot ,\cdot)$ between mask feature and
|
| 113 |
+
|
| 114 |
+
entity features:
|
| 115 |
+
|
| 116 |
+
$$
|
| 117 |
+
\mathbf {f} _ {i} ^ {\mathrm {M E A}} = A _ {c, e} \cdot \mathbf {f} _ {i} ^ {\mathrm {e}} = \sum_ {k} ^ {N _ {e} ^ {i}} \frac {\exp \left(\cos \left(\mathbf {f} _ {i} ^ {\mathrm {M V A}} , \mathbf {f} _ {i} ^ {e _ {k}}\right)\right)}{\sum_ {j} ^ {N _ {e} ^ {i}} \exp \left(\cos \left(\mathbf {f} _ {i} ^ {\mathrm {M V A}} , \mathbf {f} _ {i} ^ {e _ {j}}\right)\right)} \cdot \mathbf {f} _ {i} ^ {e _ {k}}, \tag {3}
|
| 118 |
+
$$
|
| 119 |
+
|
| 120 |
+
where $\mathbf{f}_i^{\mathrm{MVA}}$ denotes the mask-visual association feature for $i$ -th mask, and $\mathbf{f}_i^{e_k}$ is the CLIP textual feature for $k$ -th entity in the $i$ -th mask caption. With the aggregated entity feature, the 3D mask can be aligned with a specific instance category.
|
| 121 |
+
|
| 122 |
+
# 3.4 TRAINING AND INFERENCE
|
| 123 |
+
|
| 124 |
+
Training. The three types of multimodal associations are effective supervision to learn a generalizable 3D instance segmentation model. We follow the mask prediction paradigm to train the segmentation model, which matches the ground truth instances with the predicted masks via Hungarian matching (Kuhn, 1955). Specifically, the matching cost between $i$ -th predicted mask and $j$ -th ground truth instance is calculated as:
|
| 125 |
+
|
| 126 |
+
$$
|
| 127 |
+
\begin{array}{l} \mathcal {C} (i, j) = - \lambda_ {\mathrm {M M A}} \left(p \left(\cos \left(\mathbf {f} _ {i} ^ {\mathbf {m}}, \mathbf {f} _ {j} ^ {\mathrm {M V A}}\right)\right) + p \left(\cos \left(\mathbf {f} _ {i} ^ {\mathbf {r m}}, \mathbf {f} _ {j} ^ {\mathrm {M C A}}\right)\right) + p \left(\cos \left(\mathbf {f} _ {i} ^ {\mathbf {m}}, \mathbf {f} _ {j} ^ {\mathrm {M E A}}\right)\right)\right) \tag {4} \\ + \lambda_ {\text {d i c e}} \mathcal {L} _ {\text {d i c e}} (i, j) + \lambda_ {\text {B C E}} \mathcal {L} _ {\text {B C E}} (i, j), \\ \end{array}
|
| 128 |
+
$$
|
| 129 |
+
|
| 130 |
+
where $p(\cdot)$ denotes the softmax probability following the cosine similarity between the predicted instance and the ground truth. After matching the masks and ground truth instances, the model is trained with the combination of mask and semantic loss.
|
| 131 |
+
|
| 132 |
+
Specifically, all three types of associations are used to semantically supervise the model. For each association, we follow (Zhou et al., 2023) to use the combination of focal loss (Lin et al., 2017) and dice loss, which can ensure the segmentation result for each class is independently generated. The semantic multimodal association loss $\mathcal{L}_{\mathrm{MMA}}^j$ for $j$ -th ground truth mask is:
|
| 133 |
+
|
| 134 |
+
$$
|
| 135 |
+
\mathcal {L} _ {\mathrm {M M A}} ^ {j} = \sum_ {a} \left(\mathcal {L} _ {\text {f o c a l}} \left(\hat {p} _ {\sigma (j)} ^ {a}, y _ {j} ^ {a}\right) + \mathcal {L} _ {\text {d i c e}} \left(\hat {p} _ {\sigma (j)} ^ {a}, y _ {j} ^ {a}\right)\right), \tag {5}
|
| 136 |
+
$$
|
| 137 |
+
|
| 138 |
+
where $a \in \{\mathrm{MVA}, \mathrm{MCA}, \mathrm{MEA}\}$ denotes three types of associations and $y_{j}^{a}$ is the binary label for matching. $\hat{p}_{\sigma(j)}^{a} = \operatorname{sigmoid}(\mathbf{f}_{\sigma(j)}^{\mathbf{m}} \cdot \mathbf{f}_{j}^{a})$ is the semantic probability between the prediction with the association $a$ . The overall training loss is the combination of mask loss and semantic loss:
|
| 139 |
+
|
| 140 |
+
$$
|
| 141 |
+
\mathcal {L} = \frac {1}{N _ {m}} \sum_ {j} ^ {N _ {m}} \left(\lambda_ {\mathrm {M M A}} \mathcal {L} _ {\mathrm {M M A}} ^ {j} + \lambda_ {\mathrm {d i c e}} \mathcal {L} _ {\mathrm {d i c e}} (\hat {m} _ {\sigma (j)}, m _ {j}) + \lambda_ {\mathrm {B C E}} \mathcal {L} _ {\mathrm {B C E}} (\hat {m} _ {\sigma (j)}, m _ {j})\right), \tag {6}
|
| 142 |
+
$$
|
| 143 |
+
|
| 144 |
+
where $\hat{m}_{\sigma (j)}$ denotes matched predicted mask with $j$ -th target mask.
|
| 145 |
+
|
| 146 |
+
Inference. During inference, we combine the visual feature from CLIP with the predicted mask feature to achieve better generalization ability. Specifically, after obtaining the 3D masks, per-point CLIP features are pooled within the mask. The pooled CLIP feature and mask feature are then given to the text classifier $\mathbf{f}^t$ to obtain the respective classification probability $\mathbf{P}^m = p(\cos (\mathbf{f}^m,\mathbf{f}^t))$ and $\mathbf{P}^p = p(\cos (\mathbf{f}^p,\mathbf{f}^t))$ , and the final probability is yielded by soft geometric mean between them:
|
| 147 |
+
|
| 148 |
+
$$
|
| 149 |
+
\mathbf {P} = \max \left(\mathbf {P} ^ {m}, \mathbf {P} ^ {p}\right) ^ {\tau} \cdot \min \left(\mathbf {P} ^ {m}, \mathbf {P} ^ {p}\right) ^ {1 - \tau}, \tag {7}
|
| 150 |
+
$$
|
| 151 |
+
|
| 152 |
+
where $\tau$ is the exponent to increase confidence, which we set to 0.667 in this paper. For benchmark evaluation, we use CLIP textual features of all category names as the classifier. For responding to other language instructions, we use the CLIP textual feature of corresponding language instruction as binary classifier.
|
| 153 |
+
|
| 154 |
+
# 4 EXPERIMENTS
|
| 155 |
+
|
| 156 |
+
# 4.1 EXPERIMENTAL SETTING
|
| 157 |
+
|
| 158 |
+
Datasets. We evaluate SOLE on the popular scene understanding datasets: ScanNetv2 (Dai et al., 2017), ScanNet200 (Rozenberszki et al., 2022) and Replica (Straub et al., 2019) in both closed-set and open-set 3D instance segmentation tasks. ScanNetv2 (Dai et al., 2017) is a popular indoor
|
| 159 |
+
|
| 160 |
+
Table 1: The comparison of closed-set 3D instance segmentation setting on ScanNetv2. SOLE is compared with mask-training methods and the fully-supervised counterpart (upper bound). SOLE outperforms all the OV-3DIS methods and achieves competitive results with the fully-supervised model. The best results are in bold while the second best results are underscored.
|
| 161 |
+
|
| 162 |
+
<table><tr><td>Method</td><td>AP</td><td>\( AP_{50} \)</td><td>\( AP_{25} \)</td><td>voxel size</td></tr><tr><td>OpenIns3D (Huang et al., 2023b)</td><td>-</td><td>28.7</td><td>38.9</td><td>2cm</td></tr><tr><td>OpenMask3D (Takmaz et al., 2023)</td><td>31.0</td><td>39.5</td><td>44.0</td><td>2cm</td></tr><tr><td>Open3DIS (only 3D) (Nguyen et al., 2024)</td><td>31.3</td><td>42.4</td><td>47.8</td><td>2cm</td></tr><tr><td>SOLE w 4cm voxel size</td><td>30.8</td><td>52.5</td><td>70.9</td><td>4cm</td></tr><tr><td>SOLE w/o text sup</td><td>35.0</td><td>50.2</td><td>60.2</td><td>2cm</td></tr><tr><td>SOLE (ours)</td><td>44.4 (+13.1)</td><td>62.2 (+19.8)</td><td>71.4 (+23.6)</td><td>2cm</td></tr><tr><td>Mask3D (Schult et al., 2022) (fully sup)</td><td>55.2</td><td>73.7</td><td>83.5</td><td>2cm</td></tr></table>
|
| 163 |
+
|
| 164 |
+
Table 2: The comparison of closed-set 3D instance segmentation setting on ScanNet200. SOLE is compared with mask training methods on the overall segmentation performance and on each subset. SOLE significantly outperforms state-of-the-art methods on five out of the six evaluation metrics under the same conditions using only proposals from a 3D Network.
|
| 165 |
+
|
| 166 |
+
<table><tr><td>Method</td><td>AP</td><td>\( AP_{50} \)</td><td>\( AP_{25} \)</td><td>\( AP_{head} \)</td><td>\( AP_{com} \)</td><td>\( AP_{tail} \)</td></tr><tr><td>OpenIns3D (Huang et al., 2023b)</td><td>8.8</td><td>10.3</td><td>14.4</td><td>16.0</td><td>6.5</td><td>4.2</td></tr><tr><td>OpenMask3D (Takmaz et al., 2023)</td><td>15.4</td><td>19.9</td><td>23.1</td><td>17.1</td><td>14.1</td><td>14.9</td></tr><tr><td>Open3DIS (only 3D) (Nguyen et al., 2024)</td><td>18.6</td><td>23.1</td><td>27.3</td><td>24.7</td><td>16.9</td><td>13.3</td></tr><tr><td>SOLE (ours)</td><td>20.1(+1.5)</td><td>28.1(+5.0)</td><td>33.6(+6.3)</td><td>27.5(+2.8)</td><td>17.6(+0.7)</td><td>14.1(-0.8)</td></tr><tr><td>Mask3D (fully sup) (Schult et al., 2022)</td><td>26.9</td><td>36.2</td><td>41.4</td><td>39.8</td><td>21.7</td><td>17.9</td></tr></table>
|
| 167 |
+
|
| 168 |
+
point cloud dataset with 18 instance classes, where "other furniture" class is disregarded due to its ambiguity. ScanNet200 (Rozenberszki et al., 2022) is a fine-grained annotated version of ScanNetv2 that contains 200 classes of head (66 categories), common (68 categories) and tail (66 categories) subsets. For ScanNetv2 and ScanNet200, we evaluate the closed-set setting and the hierarchical open-set setting. Replica (Straub et al., 2019) is a high-quality synthetic dataset annotated with 48 instance categories. Following (Takmaz et al., 2023), we evaluate on eight scenes in Replica for open-set instance segmentation, including {office0, office1, office2, office3, office4, room0, room1 and room2}.
|
| 169 |
+
|
| 170 |
+
Implementation Details. Following the Mask3D (Schult et al., 2022), we adopt Minkowski-Unet (Choy et al., 2019) as backbone. The feature backbone extracts point features in 5 scales, while 4 layers of transformer decoder iteratively refine the instance queries. Our model is trained for 600 epochs with AdamW (Loshchilov & Hutter, 2017) optimizer. The learning rate is set to $1 \times 10^{-4}$ with cyclical decay. In training, we set $\lambda_{MMA} = 20.0$ , $\lambda_{dice} = 2.0$ and $\lambda_{BCE} = 5.0$ as the loss weight.
|
| 171 |
+
|
| 172 |
+
Baselines. We compare SOLE mainly with recent mask-training methods (Takmaz et al., 2023; Huang et al., 2023b; Nguyen et al., 2024). Mask-training methods (Takmaz et al., 2023; Huang et al., 2023b; Nguyen et al., 2024) train class-agnostic mask generator with mask annotations and get the semantic prediction with 2D foundation models. Evaluation is conducted under the same conditions using only proposals from a 3D Network on all the categories. The proposed semantic-aware mask generator can be combined with the classification techniques proposed by previous works, further improving the performance (Appendix. D.2).
|
| 173 |
+
|
| 174 |
+
Evaluation Metric. Average precision (AP) of different IoU thresholds is adopted as the evaluation metric, including AP under $25\%$ , $50\%$ IoU and the average AP from $50\%$ to $95\%$ IoU.
|
| 175 |
+
|
| 176 |
+
# 4.2 COMPARISON WITH PREVIOUS METHODS
|
| 177 |
+
|
| 178 |
+
Closed-Set 3D Instance Segmentation. We compare our SOLE with mask-training methods (Tak-maz et al., 2023; Huang et al., 2023b; Nguyen et al., 2024) on the closed-set 3D instance segmenta
|
| 179 |
+
|
| 180 |
+
Table 3: The comparison of hierarchical open-set 3D instance segmentation setting on ScanNetv2 (Dai et al., 2017) $\rightarrow$ ScanNet200 (Rozenberszki et al., 2022). SOLE is compared with OpenMask3D and Open3DIS on both base and novel classes and achieves the best results.
|
| 181 |
+
|
| 182 |
+
<table><tr><td rowspan="2">Method</td><td colspan="3">Novel Classes</td><td colspan="3">Base Classes</td><td colspan="2">All Classes</td></tr><tr><td>AP</td><td>\( AP_{50} \)</td><td>\( AP_{25} \)</td><td>AP</td><td>\( AP_{50} \)</td><td>\( AP_{25} \)</td><td>AP</td><td>\( AP_{tail} \)</td></tr><tr><td>OpenMask3D (Takmaz et al., 2023)</td><td>11.9</td><td>15.2</td><td>17.8</td><td>14.3</td><td>18.3</td><td>21.2</td><td>12.6</td><td>11.5</td></tr><tr><td>Open3DIS (only 3D) (Nguyen et al., 2024)</td><td>14.9</td><td>19.2</td><td>22.1</td><td>16.5</td><td>22.4</td><td>26.2</td><td>15.3</td><td>10.9</td></tr><tr><td>SOLE (ours)</td><td>19.1(+4.2)</td><td>26.2(+7.0)</td><td>30.7(+8.6)</td><td>17.4(+0.9)</td><td>26.2(+3.8)</td><td>32.1(+5.9)</td><td>18.7(+3.4)</td><td>12.5(+1.0)</td></tr></table>
|
| 183 |
+
|
| 184 |
+
Table 4: The comparison of open-set 3D instance segmentation setting on ScanNet200 (Rozen-berszki et al., 2022)→Replica (Straub et al., 2019). SOLE outperforms state-of-the-art methods (Takmaz et al., 2023; Nguyen et al., 2024) on all the evaluation metrics.
|
| 185 |
+
|
| 186 |
+
<table><tr><td>Method</td><td>Mask Training</td><td>AP</td><td>\( AP_{50} \)</td><td>\( AP_{25} \)</td></tr><tr><td>OpenIns3D (Huang et al., 2023b)</td><td>ScanNet200</td><td>13.6</td><td>18.0</td><td>19.7</td></tr><tr><td>OpenMask3D (Takmaz et al., 2023)</td><td>ScanNet200</td><td>13.1</td><td>18.4</td><td>24.2</td></tr><tr><td>Open3DIS (only 3D) (Nguyen et al., 2024)</td><td>ScanNet200</td><td>14.9</td><td>18.8</td><td>23.6</td></tr><tr><td>SOLE (ours)</td><td>ScanNet200</td><td>24.7 (+9.8)</td><td>31.8 (+13.0)</td><td>40.3 (+16.1)</td></tr></table>
|
| 187 |
+
|
| 188 |
+
tion setting. From the comparison results in Tab. 1, we can make the following observations. First, with the same mask supervision, SOLE significantly surpasses state-of-the-art method (Nguyen et al., 2024) by $13.1\%$ , $19.8\%$ , and $23.6\%$ on AP, $\mathrm{AP}_{50}$ and $\mathrm{AP}_{25}$ , respectively. Second, our SOLE can even achieve competitive performance with the fully-supervised counterpart ( $44.4\%$ v.s. $55.2\%$ in AP) despite not using the class labels. Finally, we provide two variants of SOLE to further verify our effectiveness. SOLE $w$ 4cm voxel size leverages 4cm voxel size instead of 2cm as in previous works. Larger voxel size can save the memory requirements and speed up the model with the loss of precision. Despite using a small voxel size, SOLE $w$ 4cm voxel size is still on par with OpenMask3D and Open3DIS in AP, and largely outperforms them in $\mathrm{AP}_{50}$ and $\mathrm{AP}_{25}$ . Furthermore, we verify that the effectiveness of our framework is not limited to the caption model and NLP tools by conducting experiments without any additional textual information, i.e. SOLE w/o text sup. In this experiment, mask-caption association and mask-entity association is removed since the caption is not available. The model can still achieve the state-of-the-art performance despite only trained with mask-visual association. Additionally, we compare SOLE with mask-training methods on ScanNet200 (Rozenberszki et al., 2022) in Tab. 2. All of the methods are evaluated on the overall segmentation performance and the performance on each of the three subsets. SOLE outperforms state-of-the-art methods (Nguyen et al., 2024; Takmaz et al., 2023) on five out of the six metrics and achieves comparable performance on the tail classes. The results on ScanNet200 (Rozenberszki et al., 2022) further demonstrate the effectiveness of our framework.
|
| 189 |
+
|
| 190 |
+
Hierarchical and Cross-Domain Open-Set 3DIS. To evaluate the generalization capability of our work, we compare our SOLE with mask training methods (Huang et al., 2023b; Takmaz et al., 2023; Nguyen et al., 2024) in open-set setting, using Scannet200 (Rozenberszki et al., 2022) and Replica (Straub et al., 2019) datasets. For ScanNet200, both models are trained with mask annotations in ScanNetv2 (Dai et al., 2017). Following (Takmaz et al., 2023), 53 classes that are semantically close to the ScanNet, are grouped as "Base". The remaining 147 classes are grouped as "Novel". Both in-distribution ("base") and out-of-distribution ("novel") classes are reported in Tab. 3. Our SOLE outperforms OpenMask3D (Takmaz et al., 2023) and Open3DIS (Nguyen et al., 2024) by a large margin on both base and novel classes. Furthermore, to verify the generalization ability of SOLE when both domain shift and category shift exist, we compare our framework with all of the mask training methods on the synthetic Replica benchmark (Straub et al., 2019). Models are trained on the annotated masks on ScanNet200. As shown in Tab. 4, our method further shows superior robustness on more out-of-distribution data from Replica, achieving $+9.8\%$ improvement in AP score compared to Open3DIS.
|
| 191 |
+
|
| 192 |
+
# 4.3 ABLATION STUDIES AND ANALYSIS
|
| 193 |
+
|
| 194 |
+
In this section, we conduct several ablation studies to validate our design choices. All of the studies are evaluated on ScanNetv2 (Dai et al., 2017) dataset.
|
| 195 |
+
|
| 196 |
+
Table 5: Multimodal fusion network.
|
| 197 |
+
|
| 198 |
+
<table><tr><td>No.</td><td>fP</td><td>fb</td><td>CMD</td><td>AP</td><td>AP50</td><td>AP25</td><td>voxel size</td></tr><tr><td>1</td><td>✓</td><td></td><td>✓</td><td>18.7</td><td>36.4</td><td>58.1</td><td>4cm</td></tr><tr><td>2</td><td></td><td>✓</td><td>✓</td><td>25.4</td><td>47.0</td><td>66.0</td><td>4cm</td></tr><tr><td>3</td><td>✓</td><td>✓</td><td>✓</td><td>30.8</td><td>52.5</td><td>70.9</td><td>4cm</td></tr><tr><td>4</td><td>✓</td><td>✓</td><td></td><td>42.8</td><td>60.5</td><td>68.9</td><td>2cm</td></tr><tr><td>5</td><td>✓</td><td>✓</td><td>✓</td><td>44.4</td><td>62.2</td><td>71.4</td><td>2cm</td></tr></table>
|
| 199 |
+
|
| 200 |
+
Table 6: Multimodal associations.
|
| 201 |
+
|
| 202 |
+
<table><tr><td>No.</td><td>fMVA</td><td>fMCA</td><td>fMEA</td><td>AP</td><td>AP50</td><td>AP25</td><td>voxel size</td></tr><tr><td>1</td><td>✓</td><td></td><td></td><td>24.5</td><td>42.0</td><td>56.0</td><td>4cm</td></tr><tr><td>2</td><td></td><td>✓</td><td></td><td>30.4</td><td>53.0</td><td>68.7</td><td>4cm</td></tr><tr><td>3</td><td></td><td></td><td>✓</td><td>32.1</td><td>53.8</td><td>70.0</td><td>4cm</td></tr><tr><td>4</td><td>✓</td><td>✓</td><td></td><td>29.1</td><td>50.9</td><td>66.8</td><td>4cm</td></tr><tr><td>5</td><td></td><td>✓</td><td>✓</td><td>30.3</td><td>53.7</td><td>70.4</td><td>4cm</td></tr><tr><td>6</td><td>✓</td><td>✓</td><td>✓</td><td>30.8</td><td>52.5</td><td>70.9</td><td>4cm</td></tr></table>
|
| 203 |
+
|
| 204 |
+

|
| 205 |
+
(a) $\mathbf{f}^{MEA}$
|
| 206 |
+
|
| 207 |
+

|
| 208 |
+
(b) $\mathbf{f}^{MVA},\mathbf{f}^{MCA}$
|
| 209 |
+
Figure 5: Qualitative analysis on multimodal associations. Given the free-form language instruction, "I wanna see outside". SOLE trained only with $\mathbf{f}^{\mathrm{MEA}}$ captures the wrong object ((a)), whereas it segments the related object when $\mathbf{f}^{\mathrm{MVA}}$ and $\mathbf{f}^{\mathrm{MCA}}$ are given as the supervision ((b) and (c)).
|
| 210 |
+
|
| 211 |
+

|
| 212 |
+
(c) $\mathbf{f}^{MVA}$ , $\mathbf{f}^{MCA}$ , $\mathbf{f}^{MEA}$
|
| 213 |
+
|
| 214 |
+
Multimodel Fusion Network. In Tab. 5, we conduct component analysis on multimodal fusion network, validating the effectiveness of backbone feature ensemble and Cross-Modality Decoder (CMD). As for the backbone feature ensemble, leveraging projected 2D CLIP features $\mathbf{f}^p$ (first row) as only backbone can have better semantic information but lack the 3D geometry detection ability, leading to poor semantic recognition ability. In contrast, solely using 3D instance backbone feature $\mathbf{f}^b$ (second row) cannot inherit the generalizable semantic information, resulting in sub-optimal performance. Combining the two features (third row) can make full use of generalized semantic information while learning good geometry detection ability from 3D masks, yielding optimal results. Additionally, Cross Modality Decoder (CMD) can further enhance the ability to understand language instructions, improving AP by $1.6\%$ .
|
| 215 |
+
|
| 216 |
+
Multimodal Associations. We analyze the components of multimodal associations $(\mathbf{f}^{\mathrm{MVA}},\mathbf{f}^{\mathrm{MCA}}$ and $\mathbf{f}^{\mathrm{MEA}})$ in Tab. 6, reporting the scores of various combinations on ScanNetv2 (Dai et al., 2017) with $4\mathrm{cm}$ voxel size. We have the following observations. First, using any of multimodal associations can already achieve significant performance, outperforming previous state-of-the-art method (Opens3D (Huang et al., 2023b)) with larger voxel size (lower resolution). Second, among the three types of associations, mask-entity association $\mathbf{f}^{\mathrm{MEA}}$ is the most effective one on evaluation metrics since it can align the masks with specific categories. Third, when combining $\mathbf{f}^{\mathrm{MEA}}$ with the other two associations, the model suffers from performance degradation on AP and $\mathrm{AP}_{50}$ while the performance improves on $\mathrm{AP}_{25}$ . This observation shows that mask-visual association and mask-caption association can help semantic learning but impair mask accuracy. To this end, we further illustrate qualitative results in Fig. 5. Given a free-form language instruction instead of category name, e.g., "I wanna see outside", the model only using mask-entity association cannot segment the correct instance (Fig. 5a) while the model incorporating the other associations (Fig. 5b and Fig. 5c) can. Therefore, despite slightly impairing the performance on benchmark, mask-visual association and mask-caption association are crucial to recognizing free-form language instructions, benefiting the applications in real-world scenarios.
|
| 217 |
+
|
| 218 |
+
# 5 CONCLUSION
|
| 219 |
+
|
| 220 |
+
In this paper, we propose a novel framework, SOLE, for open-vocabulary 3D instance segmentation with free-form language instructions. SOLE contains a multimodal fusion network and is supervised with three types of multimodal associations, aiming at aligning the model with various free-form language instructions. Our framework outperforms previous methods by a large margin on three benchmarks while achieving competitive performance with the fully-supervised counterpart. Moreover, extensive qualitative results demonstrate the versatility of our SOLE to language instructions.
|
| 221 |
+
|
| 222 |
+
# ACKNOWLEDGEMENTS
|
| 223 |
+
|
| 224 |
+
This research work is supported by the Agency for Science, Technology and Research (A*STAR) under its MTC Programmatic Funds (Grant No. M23L7b0021), and the Tier 2 grant MOET2EP20124-0015 from the Singapore Ministry of Education.
|
| 225 |
+
|
| 226 |
+
# ETHICS STATEMENT
|
| 227 |
+
|
| 228 |
+
This research adheres to the ethical guidelines outlined in the ICLR Code of Ethics. In this section, we take following aspects into account for the ethical considerations.
|
| 229 |
+
|
| 230 |
+
Data and Privacy : The datasets used in this research are either publicly available (Straub et al., 2019) or accessible under the agreement on term of use (Dai et al., 2017; Rozenberszki et al., 2022).
|
| 231 |
+
|
| 232 |
+
Potential Harmful Applications : The proposed method for open-vocabulary 3D instance segmentation could be used in sensitive domains such as surveillance. We encourage future users to apply the model responsibly, with appropriate safeguards to mitigate potential misuse.
|
| 233 |
+
|
| 234 |
+
Research Integrity : We confirm that all experiments were conducted in accordance with best practices in research ethics, and results were reported with complete transparency and accuracy.
|
| 235 |
+
|
| 236 |
+
# REPRODUCIBILITY STATEMENT
|
| 237 |
+
|
| 238 |
+
To ensure the reproducibility of our work, we state specific implementation details in Sec. 4.1 and Appendix. Sec. A. The code will be made publicly available.
|
| 239 |
+
|
| 240 |
+
# REFERENCES
|
| 241 |
+
|
| 242 |
+
Jean-Baptiste Alayrac, Jeff Donahue, Pauline Luc, Antoine Miech, Iain Barr, Yana Hasson, Karel Lenc, Arthur Mensch, Katherine Millican, Malcolm Reynolds, et al. Flamingo: a visual language model for few-shot learning. Advances in Neural Information Processing Systems, 35:23716-23736, 2022. 3
|
| 243 |
+
Boyuan Chen, Fei Xia, Brian Ichter, Kanishka Rao, Keerthana Gopalakrishnan, Michael S Ryoo, Austin Stone, and Daniel Kappler. Open-vocabulary queryable scene representations for real world planning. In 2023 IEEE International Conference on Robotics and Automation (ICRA), pp. 11509-11522. IEEE, 2023. 3
|
| 244 |
+
Dave Zhenyu Chen, Angel X Chang, and Matthias Nießner. Scanrefer: 3d object localization in rgb-d scans using natural language. In European conference on computer vision, pp. 202-221. Springer, 2020. 17, 18
|
| 245 |
+
Shaoyu Chen, Jiemin Fang, Qian Zhang, Wenyu Liu, and Xinggang Wang. Hierarchical aggregation for 3d instance segmentation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 15467-15476, 2021. 3
|
| 246 |
+
Mehdi Cherti, Romain Beaumont, Ross Wightman, Mitchell Wortsman, Gabriel Ilharco, Cade Gordon, Christoph Schuhmann, Ludwig Schmidt, and Jenia Jitsev. Reproducible scaling laws for contrastive language-image learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 2818-2829, 2023. 3
|
| 247 |
+
Seokju Cho, Heeseong Shin, Sunghwan Hong, Seungjun An, Seungjun Lee, Anurag Arnab, Paul Hongsuck Seo, and Seungryong Kim. Cat-seg: Cost aggregation for open-vocabulary semantic segmentation. arXiv preprint arXiv:2303.11797, 2023. 3
|
| 248 |
+
Christopher Choy, JunYoung Gwak, and Silvio Savarese. 4d spatio-temporal convnets: Minkowski convolutional neural networks. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 3075-3084, 2019. 8
|
| 249 |
+
|
| 250 |
+
Angela Dai, Angel X Chang, Manolis Savva, Maciej Halber, Thomas Funkhouser, and Matthias Nießner. Scannet: Richly-annotated 3d reconstructions of indoor scenes. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 5828-5839, 2017. 2, 7, 9, 10, 11, 18, 19
|
| 251 |
+
Jian Ding, Nan Xue, Gui-Song Xia, and Dengxin Dai. Decoupling zero-shot semantic segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 11583-11592, 2022a. 3
|
| 252 |
+
Runyu Ding, Jihan Yang, Chuhui Xue, Wenqing Zhang, Song Bai, and Xiaojuan Qi. Pla: Language-driven open-vocabulary 3d scene understanding. arXiv preprint arXiv:2211.16312, 2022b. 2, 3
|
| 253 |
+
Runyu Ding, Jihan Yang, Chuhui Xue, Wenqing Zhang, Song Bai, and Xiaojuan Qi. Lowis3d: Language-driven open-world instance-level 3d scene understanding. arXiv preprint arXiv:2308.00353, 2023. 2, 3
|
| 254 |
+
Shichao Dong, Guosheng Lin, and Tzu-Yi Hung. Learning regional purity for instance segmentation on 3d point clouds. In European Conference on Computer Vision, pp. 56-72. Springer, 2022. 3
|
| 255 |
+
Martin Ester, Hans-Peter Kriegel, Jörg Sander, Xiaowei Xu, et al. A density-based algorithm for discovering clusters in large spatial databases with noise. In KDD, 1996. 17
|
| 256 |
+
Golnaz Ghiasi, Xiuye Gu, Yin Cui, and Tsung-Yi Lin. Scaling open-vocabulary image segmentation with image-level labels. In European Conference on Computer Vision, pp. 540-557. Springer, 2022. 2, 3, 5
|
| 257 |
+
Rohit Girdhar, Alaaeldin El-Nouby, Zhuang Liu, Mannat Singh, Kalyan Vasudev Alwala, Armand Joulin, and Ishan Misra. Imagebind: One embedding space to bind them all. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 15180-15190, 2023. 3
|
| 258 |
+
Xiuye Gu, Tsung-Yi Lin, Weicheng Kuo, and Yin Cui. Open-vocabulary object detection via vision and language knowledge distillation. arXiv preprint arXiv:2104.13921, 2021. 3
|
| 259 |
+
Huy Ha and Shuran Song. Semantic abstraction: Open-world 3d scene understanding from 2d vision-language models. arXiv preprint arXiv:2207.11514, 2022. 3
|
| 260 |
+
Sunan He, Taian Guo, Tao Dai, Ruizhi Qiao, Xiujun Shu, Bo Ren, and Shu-Tao Xia. Open-vocabulary multi-label classification via multi-modal knowledge transfer. In Proceedings of the AAAI Conference on Artificial Intelligence, 2023. 3
|
| 261 |
+
Tong He, Chunhua Shen, and Anton Van Den Hengel. Dyco3d: Robust instance segmentation of 3d point clouds through dynamic convolution. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 354-363, 2021. 3
|
| 262 |
+
Tong He, Wei Yin, Chunhua Shen, and Anton van den Hengel. Pointinst3d: Segmenting 3d instances by points. In European Conference on Computer Vision, pp. 286-302. Springer, 2022. 1, 3
|
| 263 |
+
Yining Hong, Haoyu Zhen, Peihao Chen, Shuhong Zheng, Yilun Du, Zhenfang Chen, and Chuang Gan. 3d-llm: Injecting the 3d world into large language models. Advances in Neural Information Processing Systems, 36:20482-20494, 2023. 18
|
| 264 |
+
Matthew Honnibal and Ines Montani. spaCy 2: Natural language understanding with Bloom embeddings, convolutional neural networks and incremental parsing. To appear, 2017. 17
|
| 265 |
+
Ji Hou, Angela Dai, and Matthias Nießner. 3d-sis: 3d semantic instance segmentation of rgb-d scans. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 4421-4430, 2019. 3
|
| 266 |
+
Ronghang Hu, Huazhe Xu, Marcus Rohrbach, Jiashi Feng, Kate Saenko, and Trevor Darrell. Natural language object retrieval. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 4555-4564, 2016. 17, 18
|
| 267 |
+
|
| 268 |
+
Chenguang Huang, Oier Mees, Andy Zeng, and Wolfram Burgard. Visual language maps for robot navigation. In 2023 IEEE International Conference on Robotics and Automation (ICRA), pp. 10608-10615. IEEE, 2023a. 3
|
| 269 |
+
Zhening Huang, Xiaoyang Wu, Xi Chen, Hengshuang Zhao, Lei Zhu, and Joan Lasenby. Openins3d: Snap and lookup for 3d open-vocabulary instance segmentation. arXiv preprint arXiv:2309.00616, 2023b. 2, 3, 8, 9, 10, 19, 20
|
| 270 |
+
Krishna Murthy Jatavallabhula, Alihusein Kuwajerwala, Qiao Gu, Mohd Omama, Tao Chen, Alaa Maalouf, Shuang Li, Ganesh Iyer, Soroush Saryazdi, Nikhil Keetha, et al. Conceptfusion: Openset multimodal 3d mapping. arXiv preprint arXiv:2302.07241, 2023. 3
|
| 271 |
+
Baoxiong Jia, Yixin Chen, Huangyue Yu, Yan Wang, Xuesong Niu, Tengyu Liu, Qing Li, and Siyuan Huang. Sceneverse: Scaling 3d vision-language learning for grounded scene understanding. arXiv preprint arXiv:2401.09340, 2024. 21
|
| 272 |
+
Chao Jia, Yinfei Yang, Ye Xia, Yi-Ting Chen, Zarana Parekh, Hieu Pham, Quoc Le, Yun-Hsuan Sung, Zhen Li, and Tom Duerig. Scaling up visual and vision-language representation learning with noisy text supervision. In International conference on machine learning, pp. 4904-4916. PMLR, 2021. 3
|
| 273 |
+
Menglin Jia, Luming Tang, Bor-Chun Chen, Claire Cardie, Serge Belongie, Bharath Hariharan, and Ser-Nam Lim. Visual prompt tuning. In European Conference on Computer Vision, pp. 709-727. Springer, 2022. 5
|
| 274 |
+
Li Jiang, Hengshuang Zhao, Shaoshuai Shi, Shu Liu, Chi-Wing Fu, and Jiaya Jia. Pointgroup: Dual-set point grouping for 3d instance segmentation. In Proceedings of the IEEE/CVF conference on computer vision and Pattern recognition, pp. 4867-4876, 2020. 3
|
| 275 |
+
Harold W Kuhn. The hungarian method for the assignment problem. *Naval research logistics quarterly*, 2(1-2):83-97, 1955. 4, 7
|
| 276 |
+
Weicheng Kuo, Yin Cui, Xiuye Gu, AJ Piergiovanni, and Anelia Angelova. F-vlm: Open-vocabulary object detection upon frozen vision and language models. arXiv preprint arXiv:2209.15639, 2022. 3
|
| 277 |
+
Boyi Li, Kilian Q. Weinberger, Serge Belongie, Vladlen Koltun, and René Ranftl. Language-driven semantic segmentation, 2022. 3
|
| 278 |
+
Wei Li, Linchao Zhu, Longyin Wen, and Yi Yang. Decap: Decoding clip latents for zero-shot captioning via text-only training, 2023. 6, 17
|
| 279 |
+
Feng Liang, Bichen Wu, Xiaoliang Dai, Kunpeng Li, Yinan Zhao, Hang Zhang, Peizhao Zhang, Peter Vajda, and Diana Marculescu. Open-vocabulary semantic segmentation with mask-adapted clip. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 7061-7070, 2023. 3
|
| 280 |
+
Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dólar. Focal loss for dense object detection. In Proceedings of the IEEE international conference on computer vision, pp. 2980-2988, 2017. 7
|
| 281 |
+
Jiaheng Liu, Tong He, Honghui Yang, Rui Su, Jiayi Tian, Junran Wu, Hongcheng Guo, Ke Xu, and Wanli Ouyang. 3d-queryis: A query-based framework for 3d instance segmentation. arXiv preprint arXiv:2211.09375, 2022. 3
|
| 282 |
+
Steven Loria et al. textblob documentation. Release 0.15, 2(8):269, 2018. 17
|
| 283 |
+
Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. arXiv preprint arXiv:1711.05101, 2017. 8
|
| 284 |
+
Shiyang Lu, Haonan Chang, Eric Pu Jing, Abdeslam Boularias, and Kostas Bekris. Ovir-3d: Open-vocabulary 3d instance retrieval without training on 3d data. In Conference on Robot Learning, pp. 1610–1620. PMLR, 2023. 2, 3, 4
|
| 285 |
+
|
| 286 |
+
Chaofan Ma, Yuhuan Yang, Yanfeng Wang, Ya Zhang, and Weidi Xie. Open-vocabulary semantic segmentation with frozen vision-language models. arXiv preprint arXiv:2210.15138, 2022. 3
|
| 287 |
+
Chaofan Ma, Yuhuan Yang, Chen Ju, Fei Zhang, Ya Zhang, and Yanfeng Wang. Attrseg: open-vocabulary semantic segmentation via attribute decomposition-aggregation. In Thirty-seventh Conference on Neural Information Processing Systems, 2023. 3
|
| 288 |
+
Ron Mokady, Amir Hertz, and Amit H Bermano. Clipcap: Clip prefix for image captioning. arXiv preprint arXiv:2111.09734, 2021. 6
|
| 289 |
+
Tuan Duc Ngo, Binh-Son Hua, and Khoi Nguyen. Isbnet: a 3d point cloud instance segmentation network with instance-aware sampling and box-aware dynamic convolution. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 13550-13559, 2023. 3
|
| 290 |
+
Phuc Nguyen, Tuan Duc Ngo, Evangelos Kalogerakis, Chuang Gan, Anh Tran, Cuong Pham, and Khoi Nguyen. Open3dis: Open-vocabulary 3d instance segmentation with 2d mask guidance. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 4018-4028, 2024. 2, 3, 4, 8, 9, 19, 20
|
| 291 |
+
Maxime Oquab, Timothee Darcet, Théo Moutakanni, Huy Vo, Marc Szafraniec, Vasil Khalidov, Pierre Fernandez, Daniel Haziza, Francisco Massa, Alaaeldin El-Nouby, et al. Dinov2: Learning robust visual features without supervision. arXiv preprint arXiv:2304.07193, 2023. 2
|
| 292 |
+
Songyou Peng, Kyle Genova, Chiyu Jiang, Andrea Tagliasacchi, Marc Pollefeys, Thomas Funkhouser, et al. Openscene: 3d scene understanding with open vocabularies. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 815-824, 2023. 3, 5
|
| 293 |
+
Charles R Qi, Or Litany, Kaiming He, and Leonidas J Guibas. Deep hough voting for 3d object detection in point clouds. In proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 9277-9286, 2019. 17, 18
|
| 294 |
+
Charles Ruizhongtai Qi, Li Yi, Hao Su, and Leonidas J Guibas. Pointnet++: Deep hierarchical feature learning on point sets in a metric space. In NeurIPS, 2017. 17
|
| 295 |
+
Jie Qin, Jie Wu, Pengxiang Yan, Ming Li, Ren Yuxi, Xuefeng Xiao, Yitong Wang, Rui Wang, Shilei Wen, Xin Pan, et al. Freeseg: Unified, universal and open-vocabulary image segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 19446-19455, 2023. 3
|
| 296 |
+
Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. In International conference on machine learning, pp. 8748-8763. PMLR, 2021. 2, 3, 5, 6
|
| 297 |
+
Yongming Rao, Wenliang Zhao, Guangyi Chen, Yansong Tang, Zheng Zhu, Guan Huang, Jie Zhou, and Jiwen Lu. Denseclip: Language-guided dense prediction with context-aware prompting. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 18082-18091, 2022. 3
|
| 298 |
+
David Rozenberszki, Or Litany, and Angela Dai. Language-grounded indoor 3d semantic segmentation in the wild. In European Conference on Computer Vision, pp. 125-141. Springer, 2022. 2, 7, 8, 9, 11, 20
|
| 299 |
+
Jonas Schult, Francis Engelmann, Alexander Hermans, Or Litany, Siyu Tang, and Bastian Leibe. Mask3d for 3d semantic instance segmentation. arXiv preprint arXiv:2210.03105, 2022. 1, 3, 4, 8, 17, 20
|
| 300 |
+
Nur Muhammad Mahi Shafiullah, Chris Paxton, Lerrel Pinto, Soumith Chintala, and Arthur Szlam. Clip-fields: Weakly supervised semantic fields for robotic memory. arXiv preprint arXiv:2210.05663, 2022. 3
|
| 301 |
+
|
| 302 |
+
Dhruv Shah, Błajej Osiński, Sergey Levine, et al. Lm-nav: Robotic navigation with large pretrained models of language, vision, and action. In Conference on Robot Learning, pp. 492-504. PMLR, 2023. 3
|
| 303 |
+
Julian Straub, Thomas Whelan, Lingni Ma, Yufan Chen, Erik Wijmans, Simon Green, Jakob J Engel, Raul Mur-Artal, Carl Ren, Shobhit Verma, et al. The replica dataset: A digital replica of indoor spaces. arXiv preprint arXiv:1906.05797, 2019. 2, 7, 8, 9, 11
|
| 304 |
+
Jiahao Sun, Chunmei Qing, Junpeng Tan, and Xiangmin Xu. Superpoint transformer for 3d scene instance segmentation. In Proceedings of the AAAI Conference on Artificial Intelligence, 2023. 3
|
| 305 |
+
Ayca Takmaz, Elisabetta Fedele, Robert W Sumner, Marc Pollefeys, Federico Tombari, and Francis Engelmann. Openmask3d: Open-vocabulary 3d instance segmentation. arXiv preprint arXiv:2306.13631, 2023. 2, 3, 8, 9, 19, 20
|
| 306 |
+
Yoad Tewel, Yoav Shalev, Idan Schwartz, and Lior Wolf. Zerocap: Zero-shot image-to-text generation for visual-semantic arithmetic. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 17918-17928, 2022. 6
|
| 307 |
+
Thang Vu, Kookhoi Kim, Tung M Luu, Thanh Nguyen, and Chang D Yoo. Softgroup for 3d instance segmentation on point clouds. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 2708-2717, 2022. 1, 3
|
| 308 |
+
Yizheng Wu, Min Shi, Shuaiyuan Du, Hao Lu, Zhiguo Cao, and Weicai Zhong. 3d instances as 1d kernels. In European Conference on Computer Vision, pp. 235-252. Springer, 2022. 3
|
| 309 |
+
Jiarui Xu, Shalini De Mello, Sifei Liu, Wonmin Byeon, Thomas Breuel, Jan Kautz, and Xiaolong Wang. Groupvit: Semantic segmentation emerges from text supervision. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 18134-18144, 2022. 3
|
| 310 |
+
Jiarui Xu, Sifei Liu, Arash Vahdat, Wonmin Byeon, Xiaolong Wang, and Shalini De Mello. Open-vocabulary panoptic segmentation with text-to-image diffusion models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 2955-2966, 2023. 3
|
| 311 |
+
Mi Yan, Jiazhao Zhang, Yan Zhu, and He Wang. Maskclustering: View consensus based mask graph clustering for open-vocabulary 3d instance segmentation. arXiv preprint arXiv:2401.07745, 2024. 2, 3, 4
|
| 312 |
+
Bo Yang, Jianan Wang, Ronald Clark, Qingyong Hu, Sen Wang, Andrew Markham, and Niki Trigoni. Learning object bounding boxes for 3d instance segmentation on point clouds. Advances in neural information processing systems, 32, 2019a. 3
|
| 313 |
+
Jihan Yang, Runyu Ding, Zhe Wang, and Xiaojuan Qi. Regionplc: Regional point-language contrastive learning for open-world 3d scene understanding. arXiv preprint arXiv:2304.00962, 2023. 2, 3
|
| 314 |
+
Zhengyuan Yang, Boqing Gong, Liwei Wang, Wenbing Huang, Dong Yu, and Jiebo Luo. A fast and accurate one-stage approach to visual grounding. In Proceedings of the IEEE/CVF international conference on computer vision, pp. 4683-4693, 2019b. 17, 18
|
| 315 |
+
Li Yi, Wang Zhao, He Wang, Minhyuk Sung, and Leonidas J Guibas. Gspn: Generative shape proposal network for 3d instance segmentation in point cloud. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 3947-3956, 2019. 3
|
| 316 |
+
Yingda Yin, Yuzheng Liu, Yang Xiao, Daniel Cohen-Or, Jingwei Huang, and Baoquan Chen. Sai3d: Segment any instance in 3d scenes. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 3292–3302, 2024. 2, 4
|
| 317 |
+
Jiahui Yu, Zirui Wang, Vijay Vasudevan, Legg Yeung, Mojtaba Seyedhosseini, and Yonghui Wu. Coca: Contrastive captioners are image-text foundation models. arXiv preprint arXiv:2205.01917, 2022.3
|
| 318 |
+
|
| 319 |
+
Haobo Yuan, Xiangtai Li, Chong Zhou, Yining Li, Kai Chen, and Chen Change Loy. Open-vocabulary sam: Segment and recognize twenty-thousand classes interactively. arXiv preprint arXiv:2401.02955, 2024.3
|
| 320 |
+
Lu Yuan, Dongdong Chen, Yi-Ling Chen, Noel Codella, Xiyang Dai, Jianfeng Gao, Houdong Hu, Xuedong Huang, Boxin Li, Chunyuan Li, et al. Florence: A new foundation model for computer vision. arXiv preprint arXiv:2111.11432, 2021. 3
|
| 321 |
+
Nir Zabari and Yedid Hoshen. Semantic segmentation in-the-wild without seeing any segmentation examples. arXiv preprint arXiv:2112.03185, 2021. 3
|
| 322 |
+
C Zhang, H Wan, S Liu, X Shen, and Z Wu. Pvt: Point-voxel transformer for 3d deep learning. arxiv 2021. arXiv preprint arXiv:2108.06076, 2021. 3
|
| 323 |
+
Hengyuan Zhao, Hao Luo, Yuyang Zhao, Pichao Wang, Fan Wang, and Mike Zheng Shou. Revisit parameter-efficient transfer learning: A two-stage paradigm. arXiv preprint arXiv:2303.07910, 2023a. 5
|
| 324 |
+
Henry Hengyuan Zhao, Pichao Wang, Yuyang Zhao, Hao Luo, Fan Wang, and Mike Zheng Shou.
|
| 325 |
+
Sct: A simple baseline for parameter-efficient fine-tuning via salient channels. International Journal of Computer Vision, pp. 1-19, 2023b. 5
|
| 326 |
+
Chong Zhou, Chen Change Loy, and Bo Dai. Extract free dense labels from clip. In European Conference on Computer Vision, pp. 696-712. Springer, 2022a. 3
|
| 327 |
+
Xingyi Zhou, Rohit Girdhar, Armand Joulin, Philipp Krahenbuhl, and Ishan Misra. Detecting twenty-thousand classes using image-level supervision. In European Conference on Computer Vision, pp. 350-368. Springer, 2022b. 2, 4
|
| 328 |
+
Ziqin Zhou, Yinjie Lei, Bowen Zhang, Lingqiao Liu, and Yifan Liu. Zegclip: Towards adapting clip for zero-shot semantic segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 11175-11185, 2023. 7
|
| 329 |
+
Xueyan Zou, Zi-Yi Dou, Jianwei Yang, Zhe Gan, Linjie Li, Chunyuan Li, Xiyang Dai, Harkirat Behl, Jianfeng Wang, Lu Yuan, et al. Generalized decoding for pixel, image, and language. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 15116-15127, 2023. 3
|
| 330 |
+
Xueyan Zou, Jianwei Yang, Hao Zhang, Feng Li, Linjie Li, Jianfeng Wang, Lijuan Wang, Jianfeng Gao, and Yong Jae Lee. Segment everything everywhere all at once. Advances in Neural Information Processing Systems, 36, 2024. 3
|
| 331 |
+
|
| 332 |
+
# Segment Any 3D Object with language supplementary material
|
| 333 |
+
|
| 334 |
+
In this supplementary material, we provide more implementation details, introduce additional evaluation on free-form language instructions, and conduct more qualitative and quantitative analysis.
|
| 335 |
+
|
| 336 |
+
- More implementation details are provided in Sec. A.
|
| 337 |
+
- SOLE is evaluated on 3D visual grounding task to verify the responsive ability to free-form language instructions in Sec. B
|
| 338 |
+
- Analysis of CLIP visual features are provided in Sec. C.
|
| 339 |
+
- Variants of SOLE are introduced in terms of scalability and compatibility in Sec. D.
|
| 340 |
+
- Analysis of semantic-aware mask generator are provided in Sec. E.
|
| 341 |
+
- More qualitative results about the mask caption and segmentation results are shown in Sec. F.
|
| 342 |
+
|
| 343 |
+
# A IMPLEMENTATION DETAILS
|
| 344 |
+
|
| 345 |
+
Segmentation Network. Following Mask3D (Schult et al., 2022), we use the transformer-based mask-prediction paradigm to obtain instance mask and semantic features. The masks are initialized from object queries and regressed by attention layers. For each 3D point cloud scene, we use farthest point sampling (Qi et al., 2017) to get 150 points as object queries. After getting masks from the segmentation model, we use DBSCAN (Ester et al., 1996) to break down non-contiguous masks into smaller, spatially contiguous clusters to improve the mask quality. The maximum distance and neighborhood points number are set to 0.95 and 1, respectively.
|
| 346 |
+
|
| 347 |
+
Text Information Generation and Extraction. To effectively generate a caption for each mask, we use a caption model in CLIP space, i.e., DeCap (Li et al., 2023). DeCap is a lightweight transformer model to generate captions from CLIP image embedding. It contains a 4-layer Transformer with 4 attention heads as the language model and the visual embedding is obtained from the pre-trained ViT-L/32 CLIP model. We feed the mask features that are average pooled from the projected CLIP visual features into the DeCap model to obtain the mask caption. Then the caption is integrated into the text prompt "a {} in a scene." to better align with our data, e.g. "a blue chair in a scene". With the mask caption, noun phrases are extracted by the NLP library, TextBlob (Loria et al., 2018) and spaCy (Honnibal & Montani, 2017), to get the mask-entity association.
|
| 348 |
+
|
| 349 |
+
# B 3D VISUAL GROUNDING
|
| 350 |
+
|
| 351 |
+
To further verify the effectiveness of SOLE on various language instructions, we conduct experiments on 3D visual grounding benchmark ScanRefer (Chen et al., 2020). 3D visual grounding aims at localizing 3D objects with free-form text descriptions. Therefore, we query SOLE with each text prompt in the ScanRefer validation set to get the corresponding instance, and then 3D bounding box is obtained from the instance masks. The performance is evaluated on the matching accuracy with IoU over 0.25 (ACC@25) and 0.5 (ACC@50).
|
| 352 |
+
|
| 353 |
+
Baselines. We compare SOLE with five specialist baseline models and one generalist model. Specialist models mean that the models are designed and trained for 3D visual grounding only while generalist models are models that can address other tasks such as instance segmentation with class names. For the specialist models, OCRand (Chen et al., 2020) uses an oracle with ground truth bounding boxes of objects, and selects a random box that matches the object category. VoteRand (Qi et al., 2019; Chen et al., 2020) leverages the pre-trained VoteNet (Qi et al., 2019) to predict bounding boxes and randomly select a box of the correct semantic class. SCRC (Hu et al., 2016) and One-stage (Yang et al., 2019b) are 2D approaches with 3D extension using back-projection. Scan-Refer (Chen et al., 2020) uses a pre-trained VoteNet (Qi et al., 2019) with a trained GRU to select a matching bounding box. For the generalist model, 3D-LLM directly predicts the location of the bounding box corresponding to the text description via large language model. Note that except for
|
| 354 |
+
|
| 355 |
+
Table 7: Results on ScanRefer (Chen et al., 2020) for 3D visual grounding task. SOLE achieves the best performance on generalist models with weak supervision.
|
| 356 |
+
|
| 357 |
+
<table><tr><td>Method</td><td>Type</td><td>Supervision</td><td>ACC@25</td><td>ACC@50</td></tr><tr><td rowspan="5">OCRand (Chen et al., 2020)VoteRand (Qi et al., 2019; Chen et al., 2020)SCRC (Hu et al., 2016)One-stage (Yang et al., 2019b)ScanRefer (Chen et al., 2020)</td><td rowspan="5">Specialist</td><td>Full</td><td>30.0</td><td>29.8</td></tr><tr><td>Full</td><td>10.0</td><td>5.3</td></tr><tr><td>Full</td><td>18.7</td><td>6.5</td></tr><tr><td>Full</td><td>20.4</td><td>9.0</td></tr><tr><td>Full</td><td>41.2</td><td>27.4</td></tr><tr><td rowspan="2">3D-LLM (flamingo) (Hong et al., 2023)SOLE</td><td rowspan="2">Generalist</td><td>Full</td><td>21.2</td><td>—</td></tr><tr><td>Zero-Shot</td><td>25.2</td><td>22.6</td></tr></table>
|
| 358 |
+
|
| 359 |
+

|
| 360 |
+
(a) K-Means clustering of $\mathbf{f}^p$
|
| 361 |
+
|
| 362 |
+

|
| 363 |
+
(b) K-Means clustering of $\mathbf{f}^b$
|
| 364 |
+
Figure 6: K-means clustering of different backbone features. Different colors denote different clusters.
|
| 365 |
+
|
| 366 |
+

|
| 367 |
+
(c) K-Means clustering of $\tilde{\mathbf{f}}^b$
|
| 368 |
+
|
| 369 |
+
OCRand and VoteRand where training is not required, the other four baseline models are trained or fine-tuned on the ScanRefer training set. Differently, SOLE is only trained with instance segmentation masks of ScanNetv2 (Dai et al., 2017), without leveraging any labels in ScanRefer.
|
| 370 |
+
|
| 371 |
+
Results. As shown in Tab. 7, with instance mask annotation, SOLE outperforms the generalist model 3D-LLM by $4\%$ on ACC@25. In addition, SOLE can achieve competitive performance with the fully-supervised specialist counterpart on ACC@50 (22.6% v.s. 27.4%). Such results demonstrate the strong generalization ability and the effectiveness in responding to free-form language instructions of our framework.
|
| 372 |
+
|
| 373 |
+
# C ANALYSIS OF CLIP VISUAL FEATURE
|
| 374 |
+
|
| 375 |
+
CLIP visual features play an important role in the generalization ability of SOLE. In this section, we further analyze the effectiveness of CLIP visual features in the backbone feature ensemble and inference ensemble.
|
| 376 |
+
|
| 377 |
+
# C.1 BACKBONE FEATURE ENSEMBLE
|
| 378 |
+
|
| 379 |
+
As shown in Tab. 5, solely using 3D instance backbone feature $\mathbf{f}^b$ or projected CLIP visual feature $\mathbf{f}^p$ cannot achieve the best performance. 3D backbone features lack the generalized semantic information while projected CLIP visual features lack the location and geometry information. To further verify the effectiveness of the backbone feature ensemble, we visualize the clustering results of different features in Fig. 6. In Fig. 6a, all chairs are clustered together (the green cluster), showing that the projected CLIP features contain good semantic information but cannot detect the instances. In Fig. 6b, different instances within one category can be identified, e.g., chairs are in three clusters. However, the semantic generalization ability is degraded. As in the highlighted red circle, the trash can is detected by projected CLIP visual features (Fig. 6a) but misclassified to a chair cluster when only using 3D backbone (Fig. 6b). Compared with using the two features separately, SOLE combines the two features and thus achieves better semantic generalization ability (segmentation of the trash can) and segmentation performance (chairs are clustered into six clusters). The visualization results further demonstrate the effectiveness of the backbone feature ensemble.
|
| 380 |
+
|
| 381 |
+
Table 8: Analysis on classification probability ensemble. Results are reported on the ScanNetv2 (Dai et al., 2017) dataset in 2cm voxel size.
|
| 382 |
+
|
| 383 |
+
<table><tr><td>Component</td><td>AP</td><td>AP50</td><td>AP25</td></tr><tr><td>w.o. Ensemble</td><td>42.2</td><td>58.6</td><td>66.9</td></tr><tr><td>hard geometric mean</td><td>43.7</td><td>61.1</td><td>70.1</td></tr><tr><td>soft geometric mean (ours)</td><td>44.4</td><td>62.2</td><td>71.4</td></tr></table>
|
| 384 |
+
|
| 385 |
+
Table 9: Analysis on $\tau$ . Results are reported on the ScanNetv2 (Dai et al., 2017) dataset in 2cm voxel size.
|
| 386 |
+
|
| 387 |
+
<table><tr><td>τ</td><td>AP</td></tr><tr><td>0.1</td><td>44.1</td></tr><tr><td>0.334</td><td>44.2</td></tr><tr><td>0.667 (ours)</td><td>44.4</td></tr><tr><td>0.9</td><td>42.4</td></tr></table>
|
| 388 |
+
|
| 389 |
+
Table 10: Analysis of the light version of SOLE on ScanNetv2 (Dai et al., 2017). Despite of performance drop, SOLE-light still outperforms mask-training methods with the fastest inference time. The best results are in bold while the second best results are underscored.
|
| 390 |
+
|
| 391 |
+
<table><tr><td>Method</td><td>AP</td><td>\( AP_{50} \)</td><td>\( AP_{25} \)</td><td>Inference Time (s)</td><td>voxel size</td></tr><tr><td>OpenIns3D (Huang et al., 2023b)</td><td>-</td><td>28.7</td><td>38.9</td><td>16.3</td><td>2cm</td></tr><tr><td>OpenMask3D (Takmaz et al., 2023)</td><td>31.0</td><td>39.5</td><td>44.0</td><td>553.7</td><td>2cm</td></tr><tr><td>Open3DIS (only 3D) (Nguyen et al., 2024)</td><td>31.3</td><td>42.4</td><td>47.8</td><td>56.6</td><td>2cm</td></tr><tr><td>SOLE (ours)</td><td>44.4</td><td>62.2</td><td>71.4</td><td>454.2</td><td>2cm</td></tr><tr><td>SOLE-light</td><td>37.1</td><td>50.8</td><td>59.0</td><td>13.1</td><td>2cm</td></tr></table>
|
| 392 |
+
|
| 393 |
+
# C.2 INFERENCE ENSEMBLE
|
| 394 |
+
|
| 395 |
+
During inference, we combine the CLIP visual features with the predicted mask feature to achieve better generalization ability. Specifically, after obtaining the 3D masks, per-point CLIP features are pooled within the mask. The pooled CLIP feature and mask feature are then fed into the classifier to obtain the respective classification probability $p(\mathbf{f}^m)$ and $p(\mathbf{f}^p)$ , and the final probability is yielded by the ensemble of them. In Tab. 8, we compare three options to ensemble the class probabilities of 3D segmentation model and CLIP model. "w.o. Ensemble" denotes only using the prediction of 3D segmentation model, and "hard geometric mean" refers to the standard geometric mean, formulated as $p(\mathbf{f}^m)^{\tau} \cdot p(\mathbf{f}^p)^{1 - \tau}$ . Our method, "soft geometric mean" (Eq. 7), shows the best results among the ensemble methods, demonstrating the effectiveness of dynamically fusing the prediction from two models. However, as shown in the first row, SOLE already achieves competitive performance even without utilizing the CLIP prediction, further demonstrating the strong generalization ability of our multimodal fusion network. We also analyze the parameter $\tau$ on soft geometric mean in Tab. 9. SOLE is robust to $\tau$ while achieving the best result when it is 0.667.
|
| 396 |
+
|
| 397 |
+
# D SOLE ++
|
| 398 |
+
|
| 399 |
+
As shown in Fig. 2, SOLE focuses more on the 3D semantic-aware mask generation than the semantic classification. Therefore, SOLE itself can be used for fast segmentation and it can also be combined with generalizable semantic classification and 2D mask refinement techniques proposed by previous and concurrent works (Takmaz et al., 2023; Nguyen et al., 2024). By default, we use the soft geometric mean to combine the CLIP visual feature with predicted mask feature for better generalization ability. In this section, we investigate two variants of SOLE: the light version without using any additional information for segmentation and the advanced version leveraging the semantic classification techniques from other methods.
|
| 400 |
+
|
| 401 |
+
# D.1 SOLE-LIGHT
|
| 402 |
+
|
| 403 |
+
SOLE-light introduces a light inference technique to exclude 2D foundation model (CLIP) used in backbone feature ensemble and soft geometric mean. In Tab. 10, we compare performance and inference time of SOLE-light to previous mask training methods (Takmaz et al., 2023; Huang et al., 2023b; Nguyen et al., 2024) on ScanNetv2 (Dai et al., 2017) dataset. Removing the CLIP model significantly improves the inference time by 30 times (454s v.s. 13s) with the performance drop to some degree. However, SOLE-light still outperforms previous mask training methods by a large margin, further demonstrating the strong generalization ability and good mask quality of our semantic-aware mask generator.
|
| 404 |
+
|
| 405 |
+
Table 11: Analysis of compatibility with previous works on ScanNet200 (Rozenberszki et al., 2022). SOLE shows high compatibility with previous mask training methods, achieving state-of-the-art performance when it is incorporated into Open3DIS framework.
|
| 406 |
+
|
| 407 |
+
<table><tr><td>Method</td><td>2D masks</td><td>Classification</td><td>AP</td><td>\( AP_{50} \)</td><td>\( AP_{25} \)</td></tr><tr><td>OpenMask3D (Takmaz et al., 2023)</td><td>✘</td><td>OpenMask3D</td><td>15.4</td><td>19.9</td><td>23.1</td></tr><tr><td>Open3DIS (Nguyen et al., 2024)</td><td>✓</td><td>Open3DIS</td><td>23.7</td><td>29.4</td><td>32.8</td></tr><tr><td>SOLE (ours)</td><td>✘</td><td>SOLE</td><td>20.1</td><td>28.1</td><td>33.6</td></tr><tr><td>SOLE + OpenMask3D</td><td>✘</td><td>SOLE + OpenMask3D</td><td>20.2</td><td>28.5</td><td>33.2</td></tr><tr><td>SOLE + Open3DIS</td><td>✓</td><td>SOLE + Open3DIS</td><td>24.5</td><td>30.1</td><td>34.1</td></tr></table>
|
| 408 |
+
|
| 409 |
+
Table 12: Mask quality evaluation on ScanNet200 (Rozenberszki et al., 2022). SOLE significantly outperforms Mask3D-CA in terms of mask quality and the performance is even comparable to original Mask3D despite the absence of filtering step.
|
| 410 |
+
|
| 411 |
+
<table><tr><td>Method</td><td>Semantic Guidance</td><td>filtering</td><td>AP</td><td>\( AP_{50} \)</td><td>\( AP_{25} \)</td></tr><tr><td>Mask3D-CA</td><td>None</td><td>✘</td><td>23.1</td><td>29.9</td><td>33.4</td></tr><tr><td>SOLE (ours)</td><td>MMA</td><td>✘</td><td>43.5</td><td>56.2</td><td>62.5</td></tr><tr><td>Mask3D (Schult et al., 2022)</td><td>GT labels</td><td>✓</td><td>53.0</td><td>72.5</td><td>82.4</td></tr><tr><td>SOLE (ours)</td><td>MMA</td><td>✓</td><td>43.6</td><td>59.3</td><td>70.2</td></tr></table>
|
| 412 |
+
|
| 413 |
+
# D.2 SOLE-ADVANCED
|
| 414 |
+
|
| 415 |
+
Previous works (Huang et al., 2023b; Takmaz et al., 2023; Nguyen et al., 2024) commonly use the 3D masks generated by a pre-trained class-agnostic mask generator and propose techniques to refine and classify the masks with the help 2D vision large model (VLM). Since SOLE focuses more on the semantic-aware 3D mask prediction, we introduce several variants of SOLE in Tab. 11 by incorporating the previous techniques into our framework and evaluate on ScanNet200 (Rozenberszki et al., 2022). Specifically, "SOLE + OpenMask3D" further leverages the frame selection and mask feature aggregation in OpenMask3D to improve the masks classification on top of SOLE. Similarly, "SOLE + Open3DIS" uses 2D mask guidance and pointwise feature extraction in Open3DIS to improve the masks and classification. As shown in Tab. 11, our model exhibits the high compatibility with previous work and achieves the state-of-the-art performance (24.5%AP) on ScanNet200 when it is combined with Open3DIS framework.
|
| 416 |
+
|
| 417 |
+
# E SEMANTIC-AWARE MASK GENERATOR
|
| 418 |
+
|
| 419 |
+
One of the main contributions of SOLE is that we improve the mask generator with multimodal associations and multimodal fusion network. In this section, we evaluate and analyze how semantic information improves the mask quality.
|
| 420 |
+
|
| 421 |
+
# E.1 QUALITY OF SEMANTIC-AWARE MASKS
|
| 422 |
+
|
| 423 |
+
In contrast to previous works (Huang et al., 2023b; Takmaz et al., 2023; Nguyen et al., 2024) that disregard semantic information in the mask generation, our SOLE generates semantic-aware masks with showing superior quality and generalizability. To investigate the impact of semantic information to mask quality, Tab. 12 further examines the mask evaluation in the class-agnostic setting. We first adjust Mask3D (Schult et al., 2022) to remove semantic-related parts by discarding classification head and training it on only mask annotations. This Mask3D variant, denoted as Mask3D-CA, is compared to SOLE in class agnostic 3DIS on ScanNet200 (Rozenberszki et al., 2022). During the evaluation, we use all of the mask proposals without filtering the low quality masks. As shown in Tab. 12, SOLE significantly outperforms Mask3D-CA on the mask quality, demonstrating the effectiveness of semantic information in mask generation. We also show the performance of full-supervised counterpart in Tab. 12, taking the class information into account but only evaluating the mask quality. The fully-supervised Mask3D (Schult et al., 2022) leverages classification logits to filter low-quality segments, which is their way to use semantic information to support mask generation. SOLE shows close performance to original Mask3D despite not filtering the low-quality
|
| 424 |
+
|
| 425 |
+
Table 13: Analysis on caption influence for multimodal associations. SceneVerse generates captions based on ground truth class labels, which can further improves the performance of SOLE.
|
| 426 |
+
|
| 427 |
+
<table><tr><td>Method</td><td>Caption</td><td>GT Labels</td><td>AP</td><td>AP50</td><td>AP25</td></tr><tr><td>SOLE</td><td>DeCap</td><td>×</td><td>20.1</td><td>28.1</td><td>33.6</td></tr><tr><td>SOLE</td><td>SceneVerse</td><td>✓</td><td>26.1</td><td>37.3</td><td>44.2</td></tr></table>
|
| 428 |
+
|
| 429 |
+
masks. When filtering the low-quality segments, the performance of SOLE can be further improved. Comparing the second and fourth row in Tab. 12, our SOLE shows robust performance regardless of whether filtering step is present or not. Since SOLE is aware of rich semantic information, it can already generate high quality of masks without the requirements of post processing.
|
| 430 |
+
|
| 431 |
+
# E.2 QUALITY OF SEMANTIC GUIDANCE
|
| 432 |
+
|
| 433 |
+
SOLE leverages DeCap to generate mask captions without any class labels. However, although the generated captions contain rich semantic information, they are still not perfect due to the lack of class label. In Tab. 13, we replace the generated caption with captions in SceneVerse (Jia et al., 2024). SceneVerse (Jia et al., 2024) leverages LLM to generate mask captions given the mask and class labels. With the better captions, SOLE can be further improved by $6\%$ in AP on ScanNet200 dataset. These results demonstrate that better semantic information indeed help to learn a better mask proposal modules and the label-free caption generator can still be improved, deserving investigation in the future work.
|
| 434 |
+
|
| 435 |
+
# F QUALITATIVE RESULTS
|
| 436 |
+
|
| 437 |
+
Visualization for Segmentation Results. In Fig. 1 and Fig. 7, we present qualitative results, demonstrating that SOLE is capable of processing free-form language queries, including but not limited to visual questions, attributes description, and functional description. More qualitative results are presented by the video in supplementary material.
|
| 438 |
+
|
| 439 |
+
Visualization for Mask Captions. We provide the visualization for different masks and corresponding generated captions in Fig. 8. The generated caption contains the semantic information of the 3D object as well as the location for better 3D segmentation. As shown in the examples, more than one nouns exist in the caption and thus we aggregate all the noun phrases with attention mechanism in mask-entity association.
|
| 440 |
+
|
| 441 |
+

|
| 442 |
+
"leather texture."
|
| 443 |
+
|
| 444 |
+

|
| 445 |
+
|
| 446 |
+

|
| 447 |
+
"Green tree."
|
| 448 |
+
|
| 449 |
+

|
| 450 |
+
|
| 451 |
+

|
| 452 |
+
"sofa with flower pattern."
|
| 453 |
+
|
| 454 |
+

|
| 455 |
+
|
| 456 |
+

|
| 457 |
+
"What time is it?"
|
| 458 |
+
|
| 459 |
+

|
| 460 |
+
"Art work."
|
| 461 |
+
|
| 462 |
+

|
| 463 |
+
"Turn on the light."
|
| 464 |
+
|
| 465 |
+

|
| 466 |
+
"I want to watch movie."
|
| 467 |
+
|
| 468 |
+

|
| 469 |
+
"Chairs near by the window."
|
| 470 |
+
|
| 471 |
+

|
| 472 |
+
"I'm hungry."
|
| 473 |
+
|
| 474 |
+

|
| 475 |
+
"Throwing away the garbage."
|
| 476 |
+
|
| 477 |
+

|
| 478 |
+
"I wanna see outside."
|
| 479 |
+
|
| 480 |
+

|
| 481 |
+
"Place I can pee."
|
| 482 |
+
|
| 483 |
+

|
| 484 |
+
"I'm sleepy."
|
| 485 |
+
"bathroom."
|
| 486 |
+
Figure 7: Qualitative results from SOLE. Our SOLE demonstrates open-vocabulary capability by effectively responding to free-form language queries, including visual questions, attributes description and functional description.
|
| 487 |
+
|
| 488 |
+

|
| 489 |
+
"I want to take a shower."
|
| 490 |
+
"kitchen."
|
| 491 |
+
|
| 492 |
+

|
| 493 |
+
"Where can I sit?"
|
| 494 |
+
"Cooking the food."
|
| 495 |
+
|
| 496 |
+

|
| 497 |
+
a microwave oven sitting inside of a small kitchen
|
| 498 |
+
|
| 499 |
+

|
| 500 |
+
a trash can with a microwave on top of it
|
| 501 |
+
|
| 502 |
+

|
| 503 |
+
a black refrigerator freezer sitting inside of a kitchen
|
| 504 |
+
|
| 505 |
+

|
| 506 |
+
a bed with white pillows and a large white comforter on top
|
| 507 |
+
|
| 508 |
+

|
| 509 |
+
a black suitcase with a piece of luggage sitting on a floor
|
| 510 |
+
|
| 511 |
+

|
| 512 |
+
a brown chair sitting in front of a desk with a black table
|
| 513 |
+
|
| 514 |
+

|
| 515 |
+
a box of various items sitting on a cluttered place
|
| 516 |
+
|
| 517 |
+

|
| 518 |
+
a painting hanging on the wall of a living room
|
| 519 |
+
|
| 520 |
+

|
| 521 |
+
|
| 522 |
+

|
| 523 |
+
a computer monitor sitting on a desk in front of two computers
|
| 524 |
+
Figure 8: Qualitative examples for mask captions. Generated captions contain the semantic, appearance, and geometric relationship of the corresponding object.
|
| 525 |
+
|
| 526 |
+

|
| 527 |
+
a desk with a laptop, computer, papers and other items
|
| 528 |
+
|
| 529 |
+

|
| 530 |
+
a kitchen area with a sink and counter top near cabinets
|
| 531 |
+
a plant with a white pot sitting on a table
|
ICLR/2025/Segment Any 3D Object with Language/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e5b8b2c2cb68fd718df6b62974c97e397010454dad59acd61e43cc747c0024d2
|
| 3 |
+
size 1276851
|
ICLR/2025/Segment Any 3D Object with Language/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:574200b084f7539c27c268affccaff564bab890345855e2e02bb43f51ffc9677
|
| 3 |
+
size 688788
|
ICLR/2025/SelKD_ Selective Knowledge Distillation via Optimal Transport Perspective/3928d910-6231-4501-b281-9f80e70df3b0_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:978fdeff5752b01a7e8d545ae1dc6a98e6c47180a7df3b961e66a881345023f3
|
| 3 |
+
size 94306
|
ICLR/2025/SelKD_ Selective Knowledge Distillation via Optimal Transport Perspective/3928d910-6231-4501-b281-9f80e70df3b0_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e7b7db0c1e76bea579ce54a1884841e87f8e1afef606db10e9377d7a8f4ac544
|
| 3 |
+
size 112278
|
ICLR/2025/SelKD_ Selective Knowledge Distillation via Optimal Transport Perspective/3928d910-6231-4501-b281-9f80e70df3b0_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:070ef06e810c99e0f4fb623a23845f7a75f4b7416972dea9c57ac41a56f18367
|
| 3 |
+
size 1245440
|
ICLR/2025/SelKD_ Selective Knowledge Distillation via Optimal Transport Perspective/full.md
ADDED
|
@@ -0,0 +1,367 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SELKD: SELECTIVE KNOWLEDGE DISTILLATION VIA OPTIMAL TRANSPORT PERSPECTIVE
|
| 2 |
+
|
| 3 |
+
Liangliang $\mathbf{Shi}^{1\dagger}$ , Zhengyan $\mathbf{Shi}^{1\dagger}$ , Junchi Yan $^{12*}$
|
| 4 |
+
|
| 5 |
+
$^{1}$ Sch. of Computer Science & Sch. of Artificial Intelligence, Shanghai Jiao Tong University
|
| 6 |
+
|
| 7 |
+
$^{2}$ Shanghai Artificial Intelligence Laboratory
|
| 8 |
+
|
| 9 |
+
† Equal Contributions * Correspondence Author
|
| 10 |
+
|
| 11 |
+
{shiliangliang,macho2021,yanjunchi}@sjtu.edu.cn
|
| 12 |
+
|
| 13 |
+
# ABSTRACT
|
| 14 |
+
|
| 15 |
+
Knowledge Distillation (KD) has been a popular paradigm for training a (smaller) student model from its teacher model. However, little research has been done on the practical scenario where only a subset of the teacher's knowledge needs to be distilled, which we term selective KD (SelKD). This demand is especially pronounced in the era of foundation models, where the teacher model can be significantly larger than the student model. To address this issue, we propose to rethink the knowledge distillation problem from the perspective of Inverse Optimal Transport (IOT). Previous Bayesian frameworks mapped each sample to the probabilities of corresponding labels in an end-to-end manner, which fixed the number of classification categories and hindered effective partial knowledge transfer. In contrast, IOT calculates from the standpoint of transportation or matching, allowing for the flexible selection of samples and their quantities for matching. Traditional logit-based KD can be viewed as a special case within the IOT framework. Building on this IOT foundation, we formalize this setting in the context of classification, where only selected categories from the teacher's category space are required to be recognized by the student in the context of closed-set recognition, which we call closed-set SelKD, enhancing the student's performance on specific subtasks. Furthermore, we extend the closed-set SelKD, introducing an open-set version of SelKD, where the student model is required to provide a "not selected" response for categories outside its assigned task. Experimental results on standard benchmarks demonstrate the superiority of our approach. The source code is available at: https://github.com/machoshi/SelKD.
|
| 16 |
+
|
| 17 |
+
# 1 INTRODUCTION
|
| 18 |
+
|
| 19 |
+
Knowledge Distillation (KD) (Hinton et al., 2015) has been a popular paradigm to transfer the knowledge from large models (teachers) to small ones (students), which has been widely used in different fields from visual recognition (Kong et al., 2019), speech recognition (Shen et al., 2020), natural language processing (Jiao et al., 2019), to recommendation systems (Pan et al., 2019). Many approaches have been proposed including matching the intermediate features (Romero et al., 2014), learning the relationships (Lee et al., 2018) and adopting the multiple teachers (Liu et al., 2020).
|
| 20 |
+
|
| 21 |
+
Existing KD methods typically transfer the entire knowledge from one (Sun et al., 2024) or multiple (Yuan et al., 2021) teacher models to a student model. However, in many real-world applications, it is often preferable for the student model to learn only a subset of the teacher's knowledge. This scenario becomes particularly relevant when the teacher is a large foundation model, while the student model is deployed in resource-constrained environments such as edge computing. Despite its practical significance, this setting has received little attention in prior work.
|
| 22 |
+
|
| 23 |
+
To address this gap, we formalize the described setting as selective knowledge distillation (SelKD) within the context of classification. Unlike traditional KD, SelKD requires the specification of
|
| 24 |
+
|
| 25 |
+
categories (i.e., subsets of knowledge)<sup>1</sup> as a side input, allowing the student model to focus exclusively on learning this selected knowledge. This targeted approach makes SelKD particularly applicable to real-world scenarios, where efficiency and task-specific learning are crucial.
|
| 26 |
+
|
| 27 |
+
SelKD has practical applications in real-world scenarios. Typically, we tend to implement more complex functionalities in relatively larger networks, which often run on high-performance servers. However, for smaller devices such as smartphones and tablets with limited computational power, it is often unnecessary to replicate the full functionality of models running on large servers. Instead, they may only need to perform specific tasks that are tailored to the device's capabilities. To improve the model performance on different devices, traditional knowledge distillation methods require training multiple teacher models for specific tasks to ensure consistency between teachers and students. However, the advantage of the SelKD framework lies in the fact that we only need to train a single strong teacher classifier capable of recognizing a wide range of categories. This teacher model can then be utilized to selectively transfer the relevant knowledge to different students with their respective subtasks. As a result, there is no need to retrain a teacher for each specific task, leading to reduced computational costs and simplified training process.
|
| 28 |
+
|
| 29 |
+
In this paper, we adopt the inverse optimal transport (IOT) perspective to address the classification problem. We define labels as a set of features, such as one-hot vectors or features extracted by a text encoder. Our goal is to establish a matching or transportation (i.e., coupling) between the features of images and texts. In this context, the learning process can be seen as the inverse of Entropic Optimal Transport, while the testing inference can be viewed as the optimization of Optimal Transport. From this perspective, we can naturally define the student categories as a subset of the categories of the teacher, enabling the knowledge transfer in the SelKD setting.
|
| 30 |
+
|
| 31 |
+
We propose two distinct settings within our SelKD framework. The first, referred to as (closed-set) SelKD, focuses on the teacher transferring knowledge related only to a specific subtask. The student model is trained exclusively on the data relevant to the assigned subtask and is not required to recognize categories beyond this scope. The second setting introduces open-set SelKD, which extends the framework to handle the recognition of unselected classes. Specifically, in resource-constrained devices, if a sample falls outside the subtask's recognition domain, open-set SelKD enables the student to provide a "not selected" or "reject due to unknown" response. To tackle this challenge, we employ a modified inverse optimal transport approach that relaxes the Softmax constraint, allowing the row-sum to be less than 1. The contributions of this paper can be summarized as follows:
|
| 32 |
+
|
| 33 |
+
1) We revisit the Knowledge Distillation (KD) problem through the lens of Inverse Optimal Transport (IOT), reformulating the vanilla KD problem as a bi-level optimization task. In the inner optimization, the goal is to learn the coupling (i.e., the matching probability) of the student model, which is then supervised by both the ground truth and the teacher's coupling to update the model parameters.
|
| 34 |
+
|
| 35 |
+
2) Building on this IOT-based formulation, we introduce Selective Knowledge Distillation (SelKD), where the student model is trained to learn only specific subtasks from the teacher model. Additionally, by adjusting the constraints of the original closed-set SelKD for open-set setting, we propose an open-set version of SelKD. The open-set SelKD requires the model to recognize "not selected" knowledge, allowing for a more flexible and robust response to unassigned tasks.
|
| 36 |
+
|
| 37 |
+
3) Our proposed method demonstrates superior performance compared to state-of-the-art techniques in both closed-set and open-set SelKD tasks, achieving notable improvements in accuracy and robustness. This highlights the effectiveness of the IOT-based KD approach and its potential for diverse real-world applications.
|
| 38 |
+
|
| 39 |
+
# 2 RELATED WORKS
|
| 40 |
+
|
| 41 |
+
# 2.1 KNOWLEDGE DISTILLATION
|
| 42 |
+
|
| 43 |
+
Logit-based KD. The idea of training smaller, cheaper models (students) to mimic larger ones (teachers) can be dated back to (Bucila et al., 2006) and it has been applied to neural networks among various tasks including classification (Hinton et al., 2015), speech recognition (Shen et al.,
|
| 44 |
+
|
| 45 |
+

|
| 46 |
+
Figure 1: Illustrative comparison between vanilla knowledge distillation and our selective knowledge distillation with regard to classification tasks. In the vanilla KD framework, the student model learns knowledge from all categories in the teacher model. In contrast, within the selective KD framework, each student independently learns only a subset of categories from the teacher model, with the collective knowledge acquired by the students encompassing the entirety of the teacher's knowledge.
|
| 47 |
+
|
| 48 |
+

|
| 49 |
+
|
| 50 |
+
2020), natural language processing (Jiao et al., 2019), Large-scale language-image pretraining (Wu et al., 2023) etc. From a broader perspective, KD can be categorized into three types based on how the students learn knowledge from the teachers: logit-based, feature-based and relation-based KD. In particular, the logit-based KD methods distill the knowledge by aligning the logits between the teacher and student, which can be formulated as a loss as follows (Hinton et al., 2015):
|
| 51 |
+
|
| 52 |
+
$$
|
| 53 |
+
\mathcal {L} _ {\text {l o g i t}} = C E \left(y \mid \sigma \left(f _ {s} (\mathbf {x}); \tau\right)\right) + \lambda \cdot K L \left(\sigma \left(f _ {t} (\mathbf {x}); \tau\right) \| \sigma \left(f _ {s} (\mathbf {x}); \tau\right)\right), \tag {1}
|
| 54 |
+
$$
|
| 55 |
+
|
| 56 |
+
where $f_{s}(\cdot)$ and $f_{t}(\cdot)$ are the sample encoders of the student and teacher models, respectively, and $y$ denotes the ground truth (i.e., label) of the sample. $\sigma(\cdot)$ is the softmax function mapping the logits to the category probabilities and $\tau$ is the temperature to control the smoothness of predictive distribution. $CE$ and $KL$ denotes the cross entropy loss and KL divergence, respectively. The parameter $\lambda$ controls the weight between the two items. The concept of logit-based knowledge distillation is straightforward and becomes particularly intuitive when viewed as a process of knowledge transfer. From another perspective, the effectiveness of soft targets can be compared to techniques such as label smoothing (Kim & Kim, 2017) or regularization methods (Müller et al., 2019; Ding et al., 2019). However, traditional logit-based distillation typically relies on the output of the final layer, like soft targets, which overlooks intermediate-level supervision from the teacher model—an essential component for effective representation learning in very deep neural networks (Romero et al., 2014). Additionally, since soft logits reflect class probability distributions, logit-based distillation is inherently limited to supervised learning scenarios.
|
| 57 |
+
|
| 58 |
+
Feature-based KD. In addition to logit-based KD methods, feature-based KD methods (Yang et al., 2023) primarily focus on aligning the intermediate features between the teacher and student models. This alignment can be expressed as:
|
| 59 |
+
|
| 60 |
+
$$
|
| 61 |
+
\mathcal {L} _ {\text {f e a t u r e}} = C E \left(y \mid \sigma \left(\mathbf {F} ^ {s}; \tau\right)\right) + \lambda \cdot \mathcal {D} _ {\text {f e a t u r e}} \left(T _ {t} \left(\mathbf {F} ^ {t}\right) \| T _ {s} \left(\mathbf {F} ^ {s}\right)\right), \tag {2}
|
| 62 |
+
$$
|
| 63 |
+
|
| 64 |
+
where $\mathbf{F}^t$ and $\mathbf{F}^s$ represent the intermediate features from the teacher and student models, respectively. $T_{t}$ and $T_{s}$ are feature transformation mappings for the teacher and student models, used to align the dimensions of $\mathbf{F}^t$ and $\mathbf{F}^s$ . The term $\mathcal{D}_{\mathrm{feature}}$ measures the divergence to quantify the feature difference between the two models, and the parameter $\lambda$ controls the weight between the two items.
|
| 65 |
+
|
| 66 |
+
Self KD. In self KD, the student model itself plays the role of the teacher. Inspired by the analysis of label smoothing regularization, a teacher-free KD method is proposed in (Yuan et al., 2019), whose core idea involves the model generating soft labels from its own knowledge and using these labels for training. (Yang et al., 2022) suggests integrating self KD with image mixture and aggregating multi-stage features to generate soft labels. In the paper (Li, 2022), channel features and layer features are utilized to transfer knowledge without the need for an additional model. To conclude, the main advantage of self KD is that it allows training a student model with a smaller teacher model size, while achieving performance comparable to the student model trained using a larger teacher model. Compared to SelKD, the teacher model in self KD shares the same task to the students.
|
| 67 |
+
|
| 68 |
+
# 2.2 OPTIMAL TRANSPORT AND INVERSE OPTIMAL TRANSPORT
|
| 69 |
+
|
| 70 |
+
As originally introduced by (Kantorovich, 1942), Optimal Transport (OT) (Raghvendra et al., 2024) involves solving a linear program (Lahn et al., 2023; Phatak et al., 2023), and has become a widely used tool across various research fields, including visual matching (Wang et al., 2013), long-tailed learning (Shi et al., 2024b;c), time series analysis (Zhang et al., 2020; Shi et al., 2020), multi-modal learning (Shi et al., 2024a; Wang et al., 2024), and more. Specifically, given the cost matrix $\mathbf{C}$ and two histograms (i.e., probability vectors) $\mathbf{a} \in \mathbb{R}^n$ , $\mathbf{b} \in \mathbb{R}^m$ , Kantorovich's OT involves solving the coupling $\mathbf{P}$ (i.e., the joint probability matrix) by
|
| 71 |
+
|
| 72 |
+
$$
|
| 73 |
+
\min _ {\mathbf {P} \in U (\mathbf {a}, \mathbf {b})} \langle \mathbf {C}, \mathbf {P} \rangle = \sum_ {i = 1} ^ {n} \sum_ {j = 1} ^ {m} \mathbf {C} _ {i j} \mathbf {P} _ {i j}, \tag {3}
|
| 74 |
+
$$
|
| 75 |
+
|
| 76 |
+
where $U(\mathbf{a},\mathbf{b})$ is the set of the couplings:
|
| 77 |
+
|
| 78 |
+
$$
|
| 79 |
+
U (\mathbf {a}, \mathbf {b}) = \left\{\mathbf {P} \in \mathbb {R} _ {+} ^ {n \times m} \mid \mathbf {P} \mathbf {1} _ {m} = \mathbf {a}, \mathbf {P} ^ {\top} \mathbf {1} _ {n} = \mathbf {b} \right\}. \tag {4}
|
| 80 |
+
$$
|
| 81 |
+
|
| 82 |
+
which is bounded and defined by $n + m$ equality constraints.
|
| 83 |
+
|
| 84 |
+
A lot of methods (Bertsimas & Tsitsiklis, 1997; Benamou & Brenier, 2000) are proposed to solve the Kantorovitch OT problem and relaxing with the entropic regularization (Wilson, 1969) is one of the simple but efficient methods, whose objective reads:
|
| 85 |
+
|
| 86 |
+
$$
|
| 87 |
+
\min _ {\mathbf {P} \in U (\mathbf {a}, \mathbf {b})} \left\langle \mathbf {C}, \mathbf {P} \right\rangle - \epsilon H (\mathbf {P}), \tag {5}
|
| 88 |
+
$$
|
| 89 |
+
|
| 90 |
+
where $\epsilon > 0$ is the coefficient for entropic regularization $H(\mathbf{P})$ and the $H(\mathbf{P})$ can be specified as
|
| 91 |
+
|
| 92 |
+
$$
|
| 93 |
+
H (\mathbf {P}) = - \sum_ {i, j} \mathbf {P} _ {i j} (\log (\mathbf {P} _ {i j} - 1)). \tag {6}
|
| 94 |
+
$$
|
| 95 |
+
|
| 96 |
+
The objective in Eq. 5 is an $\epsilon$ -strongly convex function, and thus the optimization has a unique solution, which can be solved with iterative methods (e.g. the Sinkorn method (Sinkhorn, 1967)). If we use this entropic regularized OT to solve the matching problem, the hard matching problem may convert to soft matching.
|
| 97 |
+
|
| 98 |
+
Inverse Optimal Transport (IOT) has been explored in several studies (Dupuy et al., 2016; Li et al., 2019; Stuart & Wolfram, 2020), aiming to infer the unknown cost matrix $\mathbf{C}$ that generates the observed coupling. The work by (Stuart & Wolfram, 2020) presents a systematic approach for inferring these unknown costs, while (Chiu et al., 2022) develops the mathematical theory underpinning IOT. In addition, (Shi et al., 2023) demonstrates a brand new series of contrastive losses with set matching based on IOT. The IOT problem can be formulated as a bi-level optimization problem:
|
| 99 |
+
|
| 100 |
+
$$
|
| 101 |
+
\min _ {\theta} K L (\tilde {\mathbf {P}} \mid \mathbf {P} ^ {\theta}) \quad \text {w h e r e} \quad \mathbf {P} ^ {\theta} = \arg \min _ {\mathbf {P} \in U (\mathbf {a}, \mathbf {b})} \left\langle \mathbf {C} ^ {\theta}, \mathbf {P} \right\rangle - \epsilon H (\mathbf {P}). \tag {7}
|
| 102 |
+
$$
|
| 103 |
+
|
| 104 |
+
where $\tilde{\mathbf{P}}$ is the ground truth for supervision. IOT facilitates the capture of fine-grained relationships between sample features, thereby enhancing the transfer of structured knowledge from the teacher model to the student model during the knowledge distillation process.
|
| 105 |
+
|
| 106 |
+
# 3 METHODOLOGY AND FORMULATIONS
|
| 107 |
+
|
| 108 |
+
In contrast to vanilla KD where the student learns all the information from the teacher, we propose the setting of Selective KD (SelKD) that transfers only selective knowledge to the student. Without loss of generality, in this paper we view the classification task with optimal transport, in which labels are defined as a set of features (e.g. one-hot vectors or features extracted by a text encoder) and images are also represented with features extracted by an image encoder. Our goal is to establish a match or transportation between the features of images and texts with the formulation of OT. In this case, variants of optimal transport with specific properties could be introduced to solve the KD problem.
|
| 109 |
+
|
| 110 |
+
# 3.1 OPTIMAL TRANSPORT FORMULATED (LOGIT-BASED) KNOWLEDGE DISTILLATION
|
| 111 |
+
|
| 112 |
+
Teacher Training via IOT perspective. Given the batch data $\{(\mathbf{x}_i,\mathbf{y}_i)_{i = 1}^N\}$ , where $\mathbf{y}_i$ is the one-hot vector corresponding to sample $\mathbf{x}_i$ and $N$ is the batch size, the features of the samples and labels can
|
| 113 |
+
|
| 114 |
+

|
| 115 |
+
Figure 2: The overview of our approach for both closed-set and open-set SelKD tasks. We first compute cost matrices with features extracted from image samples and labels with encoders (CNN) respectively. The regularized OT is used to analyze and estimate the coupling of the student, which is supervised with ground truth and the coupling of the teacher for representation learning.
|
| 116 |
+
|
| 117 |
+
be represented by two sets: $\{f_{\theta}(\mathbf{x}_i)\}_{i = 1}^N,\{g_{\theta}(\mathbf{y}_j)\}_{j = 1}^M$ . The label matrix is denoted as $\mathbf{Y} = \{\mathbf{y}_j\}_{j = 1}^M$ The training process of the teacher model can then be reformulated as a bi-level optimization:
|
| 118 |
+
|
| 119 |
+
$$
|
| 120 |
+
\min _ {\theta} K L (\mathbf {Y} \mid \mathbf {P} ^ {\theta}) \quad \text {w h e r e} \quad \mathbf {P} ^ {\theta} = \arg \min _ {\mathbf {P} \mathbf {1} = \mathbf {1}} \left\langle \mathbf {C} ^ {\theta}, \mathbf {P} \right\rangle - \epsilon H (\mathbf {P}). \tag {8}
|
| 121 |
+
$$
|
| 122 |
+
|
| 123 |
+
Here the cost matrix $\mathbf{C}^{\theta}\in \mathbb{R}_{+}^{n\times m}$ is designed with features $\{f_{\theta}(\mathbf{x}_i)\}_{i = 1}^N,\{g_{\theta}(\mathbf{y}_j)\}_{j = 1}^M$ with parameters $\theta$ from the networks $f_{\theta}$ and $g_{\theta}$ . This bi-level optimization consists of an outer and an inner optimization. As proved in (Shi et al., 2023), the outer optimization can be regarded as minimization of the cross-entropy loss, while the inner optimization, resembling an optimal transport (OT) problem, operates like a Softmax function, with the constraint $\mathbf{P1} = \mathbf{1}$ ensuring that the probabilities across each category sum to 1. A detailed explanation can be found in Appendix B. These constraints can be interpreted as simplified versions of the row and column sum constraints $U(\mathbf{a},\mathbf{b})$ in OT. From this perspective, the teacher's learning process can be viewed as a bi-level optimization within the framework of entropic regularized OT. Compared to the Bayesian approach, this method offers greater flexibility in selecting desired categories, making it well-suited for implementing SelKD framework.
|
| 124 |
+
|
| 125 |
+
(Logit-based) KD via IOT perspective. Inspired by the Inverse Optimal Transport (IOT) framework, as described in Eq. 7, we propose a novel approach to integrate IOT constraints into the knowledge distillation (KD) process. Using logit-based KD as an example, we reformulate the knowledge distillation process as a bi-level optimization problem:
|
| 126 |
+
|
| 127 |
+
$$
|
| 128 |
+
\begin{array}{r l} & {\underset {\theta} {\min } C E (\mathbf {Y} \mid \mathbf {P} _ {s} ^ {\theta}) + \lambda \cdot K L (\mathbf {P} _ {t} \| \mathbf {P} _ {s} ^ {\theta}),} \\ {\text {w h e r e}} & {\mathbf {P} _ {t} = \arg \underset {\mathbf {P 1} = \mathbf {1}} {\min } \langle \mathbf {C} _ {t}, \mathbf {P} \rangle - \epsilon H (\mathbf {P}) \quad \mathbf {P} _ {s} ^ {\theta} = \arg \underset {\mathbf {P 1} = \mathbf {1}} {\min } \langle \mathbf {C} _ {s} ^ {\theta}, \mathbf {P} \rangle - \epsilon H (\mathbf {P}).} \end{array} \tag {9}
|
| 129 |
+
$$
|
| 130 |
+
|
| 131 |
+
Here $H(\mathbf{P})$ is the entropic regularization as defined in Eq. 6, and $\mathbf{Y}$ denotes the label matrix. In this optimization, the cost matrix $\mathbf{C}_t \in \mathbb{R}_+^{n \times m}$ is designed with features from the pre-trained teacher
|
| 132 |
+
|
| 133 |
+
networks $f_{t}$ and $g_{t}$ , while $\mathbf{C}_s^\theta \in \mathbb{R}_+^{n\times m}$ is computed with features $\{f_{s,\theta}(\mathbf{x}_i)\}_{i = 1}^N$ , $\{g_{s,\theta}(\mathbf{y}_j)\}_{j = 1}^M$ with parameters $\theta$ from the networks $f_{s,\theta}$ and $g_{s,\theta}$ . Different from previous works setting $U = \{\mathbf{P}:\mathbf{P}\mathbf{1} = \mathbf{1}\}$ , we think the constraint $U$ can be designed according to the specific circumstances of the problem, especially in the case of open-set tasks. We will discuss it in detail in the next subsection. In the outer minimization, the coupling $\mathbf{P}_s^\theta$ is calculated by OT's inner minimization and $\mathbf{Y}$ is the ground truth for supervision.
|
| 134 |
+
|
| 135 |
+
The aim of outer minimization is to supervise the student coupling with the ground truth and the teacher coupling, in order to learn the feature extractor (i.e. $f_{s,\theta}(\cdot)$ and $g_{s,\theta}(\cdot)$ ). Simultaneously, the inner minimization formulates the distillation problem as an entropic regularized optimal transport task. Our overarching goal is to derive the student coupling $\mathbf{P}_s^\theta$ that aligns with the teacher coupling $\mathbf{P}_t$ , utilizing the respective cost matrices $\mathbf{C}_s^\theta$ and $\mathbf{C}_t$ .
|
| 136 |
+
|
| 137 |
+
To summarize, this innovative perspective on logit-based knowledge distillation (KD) through the lens of Inverse Optimal Transport (IOT) reformulates the distillation process as a bi-level optimization problem. By incorporating IOT constraints, it allows for a more structured approach to aligning the teacher's and student's knowledge. In addition, the IOT-based view leads to the introduction of Selective Knowledge Distillation (SelKD), which focuses on targeted and efficient knowledge transfer and allows the student model to selectively learn relevant knowledge for specific subtasks.
|
| 138 |
+
|
| 139 |
+
# 3.2 SELECTIVE KNOWLEDGE DISTILLATION VIA INVERSE OPTIMAL TRANSPORT
|
| 140 |
+
|
| 141 |
+
In traditional knowledge distillation, the primary objective is to transfer the entire knowledge of the teacher model to the student model in a straightforward end-to-end manner. However, this approach can be inefficient and overly complex, especially in real-world applications where a student model may only need to perform a subset of tasks. Our proposed method, Selective Knowledge Distillation (SelKD), addresses this limitation by enabling the student model to learn only the relevant knowledge from the teacher model for specific subtasks, with evaluations focused solely on those areas during testing. Figure 1 illustrates the difference between vanilla KD and our proposed SelKD.
|
| 142 |
+
|
| 143 |
+
Leveraging the perspective of Inverse Optimal Transport (IOT) in Eq. 9, we can formalize a general bi-level optimization framework for SelKD, expressed as follows:
|
| 144 |
+
|
| 145 |
+
$$
|
| 146 |
+
\min _ {\theta} C E (\mathbf {Y} \mid \mathbf {P} _ {s} ^ {\theta}) + \lambda \cdot K L (\mathbf {P} _ {t} \| \mathbf {P} _ {s} ^ {\theta}),
|
| 147 |
+
$$
|
| 148 |
+
|
| 149 |
+
$$
|
| 150 |
+
\text {w h e r e} \quad \mathbf {P} _ {t} = \arg \min _ {U} \langle \mathbf {C} _ {t}, \mathbf {P} \rangle - \epsilon H (\mathbf {P}) \quad \mathbf {P} _ {s} ^ {\theta} = \arg \min _ {U} \langle \mathbf {C} _ {s} ^ {\theta}, \mathbf {P} \rangle - \epsilon H (\mathbf {P}). \tag {10}
|
| 151 |
+
$$
|
| 152 |
+
|
| 153 |
+
In this formulation, $U$ represents the general constraints for the coupling. A key advantage of this approach is that it allows us to tailor the cost matrices $\mathbf{C}_s^\theta$ and $\mathbf{C}_t$ according to the specific categories we select for distillation. This flexibility enables a more nuanced and effective knowledge transfer, as the constraints can be adjusted based on the particularities of the tasks at hand.
|
| 154 |
+
|
| 155 |
+
In the following sections, we will detail how to specify the constraints $U$ and select feasible categories to formalize the optimization process, whether in closed-set or open-set scenarios.
|
| 156 |
+
|
| 157 |
+
# 3.2.1 (CLOSED-SET) SELECTIVE KNOWLEDGE DISTILLATION
|
| 158 |
+
|
| 159 |
+
We begin by analyzing Eq. 10 under the constraint $U = \{\mathbf{P} : \mathbf{P1} = \mathbf{1}\}$ . In this context, we partition the training set based on the selected categories. Specifically, we define the complete category set as $\mathcal{C} = \{1,2,\dots ,N\}$ where $N$ represents the total number of categories. We set the entire dataset $S = \{(\mathbf{x}_i,\mathbf{y}_i)_i = 1^M\}$ where $M$ is the size of dataset and $\mathbf{y}_i$ is the one-hot vector corresponding to sample $\mathbf{x}_i$ . Without loss of generality, denoting the selected categories set $\mathcal{C}_{\mathrm{closed - set}} = \{1,2,\dots ,n\} \subset \mathcal{C}$ with $n < N$ , we denote $S_{\mathrm{closed - set}} = \{(\mathbf{x}_i,\mathbf{y}_i)\mid \mathbf{y}_i\in \mathrm{one - hot}(\mathcal{C}_{\mathrm{closed - set}})\}$ . Here one-hot(·) is a mapping function that converts all elements in the set to their one-hot representations.
|
| 160 |
+
|
| 161 |
+
For the batch data $\{(\mathbf{x}_i,\mathbf{y}_i)_{i = 1}^m\} \subset S_{\mathrm{closed - set}}$ where $m$ is the batch size, the features of samples and labels can be represented by two sets $\{\{f_{s,\theta}(\mathbf{x}_i)\}_{i = 1}^m,\{g_{s,\theta}(\mathbf{y}_j)\}_{j = 1}^n\}$ and $\{\{f_t(\mathbf{x}_i)\}_{i = 1}^m,\{g_t(\mathbf{y}_j)\}_{j = 1}^n\}$ regarding student and teacher extracted features. Denoting $S_{\mathrm{image}} = \{(\mathbf{x}_i)_{i = 1}^m\}$ , without loss of generality, we set $\mathbf{C}_s$ and $\mathbf{C}_t$ as follows:
|
| 162 |
+
|
| 163 |
+
$$
|
| 164 |
+
\left(\mathbf {C} _ {s} ^ {\theta}\right) _ {i j} = - f _ {s, \theta} \left(\mathbf {x} _ {i}\right) \cdot g _ {s, \theta} (\mathbf {y} _ {j}) \quad \left(\mathbf {C} _ {t}\right) _ {i j} = - f _ {t} \left(\mathbf {x} _ {i}\right) \cdot g _ {t} (\mathbf {y} _ {j}) \quad \text {f o r} \quad i \in S _ {\text {i m a g e}}, j \in \mathcal {C} _ {\text {c l o s e d - s e t}} \tag {11}
|
| 165 |
+
$$
|
| 166 |
+
|
| 167 |
+
For traditional classifiers, $f(\cdot)$ represents the image encoder and $g(\cdot)$ represents the label encoder (e.g., one-hot encoding). For multimodal classifiers based on CLIP (Radford et al., 2021), $f(\cdot)$ represents the image encoder while $g(\cdot)$ represents the text encoder. Our formulation generalizes this approach, making it more adaptable to a wider range of methods.
|
| 168 |
+
|
| 169 |
+
Figure 2 illustrates the pipeline of our method. Initially, we compute the cost matrices using features extracted from image samples and labels via encoders (CNN). These cost matrices are then incorporated into Eq. 11, forming the optimization formula for SelKD. To facilitate understanding, the cost matrices can be interpreted as the negative of similarity matrices (ignoring constant factors in the optimization problem).
|
| 170 |
+
|
| 171 |
+
# 3.2.2 OPEN-SET VERSION FOR SELECTIVE KNOWLEDGE DISTILLATION
|
| 172 |
+
|
| 173 |
+
We propose open-set SelKD, an extension of the SelKD framework mentioned above, designed to address the recognition of classes that were not included in the student's training subset. Specifically, in smaller or resource-constrained devices, SelKD tasks does not allow the student model to be trained on the full set of classes from the teacher model. Open-set SelKD requires student models to handle cases where an input sample falls outside the scope of the subtask that the student has been trained to recognize. In such situations, rather than attempting to force a classification, the student model is equipped to produce a "not selected" or "reject due to unknown" response, effectively acknowledging that the sample does not belong to any of the known classes. This ability to reject unknown inputs enhances the robustness and applicability of SelKD, especially in open-set or dynamic environments where new or unseen classes may emerge.
|
| 174 |
+
|
| 175 |
+
Algorithm 1: Computing the KL divergence between student and teacher couplings under Open-set SelKD
|
| 176 |
+
|
| 177 |
+
Input : features $\mathbf{F}_{\mathrm{image},t}$ and $\mathbf{F}_{\mathrm{image},s}$ extracted from image samples, $\mathbf{F}_{\mathrm{label},t}$ and $\mathbf{F}_{\mathrm{label},s}$ extracted from labels, (footnotes $s$ or $t$ represents student and teacher models, respectively), temperature $\tau$ and parameter $\gamma$
|
| 178 |
+
|
| 179 |
+
Output:Loss function $\mathcal{L}$
|
| 180 |
+
|
| 181 |
+
Initialize $\mathbf{C}_s = \mathbf{F}_{\mathrm{image},s}\mathbf{F}_{\mathrm{label},s}^\top$ and $\mathbf{C}_t = \mathbf{F}_{\mathrm{image},t}\mathbf{F}_{\mathrm{label},t}^\top$
|
| 182 |
+
|
| 183 |
+
Compute $\mathbf{P}_s^{(0)} = e^{-\mathbf{C}_s / \tau}$ and $\mathbf{P}_t^{(0)} = e^{-\mathbf{C}_t / \tau}$
|
| 184 |
+
|
| 185 |
+
for $l = 1,2,\dots ,L$ do
|
| 186 |
+
|
| 187 |
+
$$
|
| 188 |
+
\mathbf {P} _ {s} ^ {(l)} = \frac {\mathbf {P} _ {s} ^ {(l)}}{\max (\mathbf {P} _ {s} ^ {(l)} \mathbf {1} , \mathbf {1})}
|
| 189 |
+
$$
|
| 190 |
+
|
| 191 |
+
$$
|
| 192 |
+
\mathbf {P} _ {s} ^ {(l + 1)} = \mathbf {P} _ {s} ^ {(l)} \cdot \frac {\gamma}{\mathbf {1} ^ {\top} \mathbf {P} _ {s} ^ {(l)} \mathbf {1}}
|
| 193 |
+
$$
|
| 194 |
+
|
| 195 |
+
$$
|
| 196 |
+
\mathbf {P} _ {t} ^ {(l)} = \frac {\mathbf {P} _ {t} ^ {(l)}}{\max (\mathbf {P} _ {t} ^ {(l)} \mathbf {1} , \mathbf {1})}
|
| 197 |
+
$$
|
| 198 |
+
|
| 199 |
+
$$
|
| 200 |
+
\mathbf {P} _ {t} ^ {(l + 1)} = \mathbf {P} _ {t} ^ {(l)} \cdot \frac {\gamma}{\mathbf {1} ^ {\top} \mathbf {P} _ {t} ^ {(l)} \mathbf {1}}
|
| 201 |
+
$$
|
| 202 |
+
|
| 203 |
+
end
|
| 204 |
+
|
| 205 |
+
return $\mathcal{L} = -\mathbf{1}^{\top}(\mathbf{P}_t\cdot \log (\mathbf{P}_s))\mathbf{1}$
|
| 206 |
+
|
| 207 |
+
To formulate open-set SelKD with an optimization based on the closed-set version, we first relax the constraints by setting $\mathbf{P1} = \mathbf{1}$ to a new one motivated by Partial Optimal Transport given as
|
| 208 |
+
|
| 209 |
+
$$
|
| 210 |
+
U _ {\mathrm {M} - \mathrm {P O T}} = \left\{\mathbf {P} \mathbf {1} \leq \mathbf {1}, \mathbf {1} ^ {\top} \mathbf {P} \mathbf {1} = \gamma \right\} \tag {12}
|
| 211 |
+
$$
|
| 212 |
+
|
| 213 |
+
where $\gamma$ is the number of batch sample classified to the categories of the subtask.
|
| 214 |
+
|
| 215 |
+
Similarly, we define the complete category set as $\mathcal{C} = \{1,2,\dots ,N\}$ where $N$ represents the total number of categories. We set the entire dataset $\mathcal{S} = \{\left(\mathbf{x}_i,\mathbf{y}_i\right)_{i = 1}^M\}$ where $M$ is the size of dataset and $\mathbf{y}_i$ is the one-hot vector corresponding to sample $\mathbf{x}_i$ . Without loss of generality, denoting the selected categories set $\mathcal{C}_{\mathrm{closed - set}} = \{1,2,\dots ,n\} \subset \mathcal{C}$ with $n < N$ , we denote $\mathcal{C}_{\mathrm{open - set}} = \mathcal{C}_{\mathrm{closed - set}}\cup \{n + 1\}$ where $n + 1$ represents the union of "not selected" categories in the student model.
|
| 216 |
+
|
| 217 |
+
For the batch data $\{(\mathbf{x}_i,\mathbf{y}_i)_{i = 1}^m\} \subset S$ , the features of samples and labels can be represented by two sets $\{\{f_{s,\theta}(\mathbf{x}_i)\}_{i = 1}^m,\{g_{s,\theta}(\mathbf{y}_j)\}_{j = 1}^{n + 1}\}$ and $\{\{f_t(\mathbf{x}_i)\}_{i = 1}^m,\{g_t(\mathbf{y}_j)\}_{j = 1}^N\}$ with footnotes. Denoting $S_{\mathrm{image}} = \{(x_i)_i = 1\}$ , without loss of generality, we set $\mathbf{C}_s$ and $\mathbf{C}_t$ as follows:
|
| 218 |
+
|
| 219 |
+
$$
|
| 220 |
+
\left(\mathbf {C} _ {s} ^ {\theta}\right) _ {i j} = - f _ {s, \theta} \left(\mathbf {x} _ {i}\right) \cdot g _ {s, \theta} \left(\mathbf {y} _ {j}\right) \quad \left(\mathbf {C} _ {t}\right) _ {i j} = - f _ {t} \left(\mathbf {x} _ {i}\right) \cdot g _ {t} \left(\mathbf {y} _ {j}\right) \quad \text {f o r} \quad i \in S _ {\text {i m a g e}}, j \in C _ {\text {o p e n - s e t}} \tag {13}
|
| 221 |
+
$$
|
| 222 |
+
|
| 223 |
+
Table 1: Top-1 accuracy (\%) on CIFAR-100 for closed-set SelKD. We compare the performance of vanilla knowledge distillation (KD), self-knowledge distillation (SKD) and our selective knowledge distillation (SelKD) in the closed-set SelKD classification tasks. All the comparisons are conducted based on feature-based distillation (FitNet Romero et al. (2014), FT Kim et al. (2018) and AT Zagoruyko & Komodakis (2016)).
|
| 224 |
+
|
| 225 |
+
<table><tr><td>Student Networks</td><td>Methods</td><td>SubTask 0</td><td>SubTask 1</td><td>SubTask 2</td><td>SubTask 3</td><td>SubTask 4</td><td>Mean of SubTasks</td><td>#Param of Teachers + Students</td></tr><tr><td rowspan="10">ResNet-8</td><td>Without KD</td><td>81.00</td><td>82.45</td><td>80.85</td><td>76.90</td><td>83.30</td><td>80.90</td><td>0 + 0.4M</td></tr><tr><td>FitNet-KD</td><td>81.50</td><td>83.55</td><td>82.20</td><td>78.50</td><td>85.65</td><td>82.28</td><td>117.7M + 0.4M</td></tr><tr><td>FitNet-SKD</td><td>81.70</td><td>83.25</td><td>81.55</td><td>77.75</td><td>85.05</td><td>81.86</td><td>0.4M + 0.4M</td></tr><tr><td>FitNet-SelKD</td><td>82.95</td><td>84.45</td><td>82.25</td><td>78.85</td><td>85.90</td><td>82.88</td><td>23.7M + 0.4M</td></tr><tr><td>FT-KD</td><td>81.50</td><td>83.50</td><td>82.95</td><td>78.50</td><td>86.15</td><td>82.52</td><td>117.7M + 0.4M</td></tr><tr><td>FT-SKD</td><td>81.20</td><td>82.80</td><td>80.70</td><td>77.80</td><td>83.70</td><td>81.24</td><td>0.4M + 0.4M</td></tr><tr><td>FT-SelKD</td><td>82.75</td><td>84.20</td><td>82.85</td><td>80.35</td><td>86.35</td><td>83.30</td><td>23.7M + 0.4M</td></tr><tr><td>AT-KD</td><td>81.05</td><td>84.35</td><td>81.60</td><td>78.10</td><td>85.05</td><td>82.03</td><td>117.7M + 0.4M</td></tr><tr><td>AT-SKD</td><td>80.15</td><td>82.80</td><td>81.25</td><td>77.40</td><td>83.50</td><td>81.02</td><td>0.4M + 0.4M</td></tr><tr><td>AT-SelKD</td><td>82.45</td><td>84.70</td><td>82.20</td><td>78.50</td><td>85.30</td><td>82.63</td><td>23.7M + 0.4M</td></tr><tr><td rowspan="10">ResNet-14</td><td>Without KD</td><td>83.60</td><td>85.40</td><td>84.10</td><td>81.20</td><td>86.55</td><td>84.17</td><td>0 + 0.9M</td></tr><tr><td>FitNet-KD</td><td>83.60</td><td>86.00</td><td>84.85</td><td>81.55</td><td>88.00</td><td>84.80</td><td>117.7M + 0.9M</td></tr><tr><td>FitNet-SKD</td><td>83.00</td><td>84.05</td><td>81.80</td><td>79.10</td><td>85.00</td><td>82.59</td><td>0.9M + 0.9M</td></tr><tr><td>FitNet-SelKD</td><td>84.30</td><td>86.20</td><td>84.90</td><td>81.85</td><td>88.30</td><td>85.11</td><td>23.7M + 0.9M</td></tr><tr><td>FT-KD</td><td>83.90</td><td>85.90</td><td>84.85</td><td>81.65</td><td>87.85</td><td>84.83</td><td>117.7M + 0.9M</td></tr><tr><td>FT-SKD</td><td>83.05</td><td>85.90</td><td>82.55</td><td>79.75</td><td>86.80</td><td>83.61</td><td>0.9M + 0.9M</td></tr><tr><td>FT-SelKD</td><td>85.30</td><td>87.55</td><td>84.75</td><td>82.80</td><td>87.90</td><td>85.66</td><td>23.7M + 0.9M</td></tr><tr><td>AT-KD</td><td>84.05</td><td>86.75</td><td>84.60</td><td>81.45</td><td>87.00</td><td>84.77</td><td>117.7M + 0.9M</td></tr><tr><td>AT-SKD</td><td>83.05</td><td>83.95</td><td>82.00</td><td>79.35</td><td>85.20</td><td>82.71</td><td>0.9M + 0.9M</td></tr><tr><td>AT-SelKD</td><td>85.00</td><td>87.05</td><td>85.75</td><td>82.95</td><td>87.25</td><td>85.60</td><td>23.7M + 0.9M</td></tr></table>
|
| 226 |
+
|
| 227 |
+
Then the optimization can be modified as
|
| 228 |
+
|
| 229 |
+
$$
|
| 230 |
+
\min _ {\boldsymbol {\theta}} C E (\mathbf {Y} \mid \mathbf {P} _ {s} ^ {\boldsymbol {\theta}}) + \lambda \cdot K L (\mathbf {P} _ {t} \parallel \mathbf {P} _ {s} ^ {\boldsymbol {\theta}}),
|
| 231 |
+
$$
|
| 232 |
+
|
| 233 |
+
where $\mathbf{P}_t = \arg \min_{\mathbf{P1}\leq \mathbf{1},\mathbf{1}^\top \mathbf{P1} = \gamma}\langle \mathbf{C}_t,\mathbf{P}\rangle -\epsilon H(\mathbf{P})$ (14)
|
| 234 |
+
|
| 235 |
+
$$
|
| 236 |
+
\mathbf {P} _ {s} ^ {\theta} = \arg \min _ {\mathbf {P} \mathbf {1} \leq \mathbf {1}, \mathbf {1} ^ {\top} \mathbf {P} \mathbf {1} = \gamma} \langle \mathbf {C} _ {s} ^ {\theta}, \mathbf {P} \rangle - \epsilon H (\mathbf {P})
|
| 237 |
+
$$
|
| 238 |
+
|
| 239 |
+
The entire process can be summarized by Algorithm 1. For the prediction in the inference process, we calculate Eq. 14 given the batch testing data. Then for the prediction of sample $i$ , we do the arg max operation $(\mathbf{P}_s)_{i,j}$ on every $j$ and $1 - \sum_{j}(\mathbf{P}_s)_{i,j}$ as the result.
|
| 240 |
+
|
| 241 |
+
# 4 EXPERIMENTS
|
| 242 |
+
|
| 243 |
+
# 4.1 BASIC SETTINGS
|
| 244 |
+
|
| 245 |
+
Our experiments are performed using PyTorch 1.4.0 and run on Intel Core i7-7820X CPU @ 3.60GHz with Nvidia GeForce RTX 3080. We take single GPU for classification on CIFAR-10, CIFAR-100 (Krizhevsky et al., 2009) and Tiny ImageNet (Le & Yang, 2015), and evaluate on testing data by top-1 accuracy.
|
| 246 |
+
|
| 247 |
+
Experimental Setting Details. For CIFAR-10 and CIFAR-100, we adopt ResNet50 (He et al., 2016) as the backbone teacher model, while for Tiny ImageNet, we use ResNet32 for training. The settings for students also vary depending on datasets. For CIFAR-10 and CIFAR-100, the experiments of image classification tasks are based on ResNet8 and ResNet14 as the backbone of students. For Tiny ImageNet dataset, we adopt only ResNet8 for training. As for the learning rate, we set 0.05 for all tasks with regard to CIFAR-10 and CIFAR-100 datasets. For Tiny ImageNet, learning rate is 0.2.
|
| 248 |
+
|
| 249 |
+
As the primary focus of this paper is to pose the problem of selective knowledge distillation, and to find feasible ways to work on the problem, we do not adopt additional specialized techniques to
|
| 250 |
+
|
| 251 |
+
Table 2: Top-1 accuracy (%) on Tiny ImageNet for closed-set SelKD with ResNet-8 as backbone. We compare the performance of vanilla knowledge distillation (KD) and our selective knowledge distillation (SelKD) in the closed-set SelKD classification tasks.
|
| 252 |
+
|
| 253 |
+
<table><tr><td>Methods</td><td>SubTask 0</td><td>SubTask 1</td><td>SubTask 2</td><td>SubTask 3</td><td>SubTask 4</td><td>Mean of SubTasks</td></tr><tr><td>Without KD</td><td>52.05</td><td>53.40</td><td>53.00</td><td>50.15</td><td>54.85</td><td>52.69</td></tr><tr><td>FitNet-KD</td><td>52.55</td><td>54.00</td><td>54.10</td><td>51.25</td><td>55.60</td><td>53.50</td></tr><tr><td>FitNet-SelKD</td><td>53.20</td><td>54.95</td><td>54.80</td><td>52.05</td><td>56.40</td><td>54.28</td></tr><tr><td>FT-KD</td><td>52.45</td><td>53.95</td><td>54.15</td><td>52.00</td><td>55.60</td><td>53.63</td></tr><tr><td>FT-SelKD</td><td>53.15</td><td>55.05</td><td>54.70</td><td>52.10</td><td>56.55</td><td>54.31</td></tr><tr><td>AT-KD</td><td>52.95</td><td>54.60</td><td>54.45</td><td>51.05</td><td>55.25</td><td>53.66</td></tr><tr><td>AT-SelKD</td><td>52.90</td><td>54.70</td><td>55.20</td><td>51.90</td><td>55.90</td><td>54.12</td></tr></table>
|
| 254 |
+
|
| 255 |
+
improve performance, such as resampling. This is to control variables and thus all the baselines used in this study represent only the method of knowledge distillation proposed by them.
|
| 256 |
+
|
| 257 |
+
# 4.2 EXPERIMENTS ON (CLOSED-SET) SELKD
|
| 258 |
+
|
| 259 |
+
For SelKD, we decompose the overall classification task into various subtasks, with scales varying by dataset. Specifically, for the CIFAR-10 dataset, which consists of 10 classes, we split the task into 2 subtasks, each containing 5 classes. In contrast, CIFAR-100 and Tiny ImageNet, with 100 classes each, are divided into 5 subtasks, each containing 20 classes. We combine feature-based KD methods with different KD frameworks, including vanilla KD, self KD and our SelKD, for a comprehensive comparison to highlight the advantages of our SelKD framework. For feature-based KD, we select typical methods including FitNet (Romero et al., 2014), FT (Kim et al., 2018), and AT (Zagoruyko & Komodakis, 2016). Notably, in both vanilla KD (KD) and self-KD (SKD), we train separate teachers for each subtask, while in SelKD approach, a single teacher is trained to cover all subtasks.
|
| 260 |
+
|
| 261 |
+
The results of SelKD tasks on the CIFAR-100 and Tiny ImageNet dataset are presented in Table 1 and Table 2, with results for CIFAR-10 is shown in the Appendix A. Our findings clearly indicate that, regardless of the feature-based distillation method employed, SelKD outperforms both KD and SKD in terms of top-1 accuracy. Furthermore, our SelKD method requires fewer parameters compared to KD, which necessitates training an additional teacher for each subtask. Experimental results suggest that a teacher with comprehensive knowledge enhances the performance of subtask students more effectively than multiple teachers with knowledge limited to specific areas. This is because the additional knowledge from the comprehensive teacher aids students in mastering the selected knowledge.
|
| 262 |
+
|
| 263 |
+
# 4.3 EXPERIMENTS ON OPEN-SET SELKD
|
| 264 |
+
|
| 265 |
+
We further examine the application of our SelKD method on open-set SelKD tasks. We first apply Algorithm 1 on all the tasks similar to those of closed-set SelKD, but we add an extra class for "not selected" knowledge in each subtask student model. Specifically, for CIFAR-10 dataset, the whole task is separated into 2 subtasks with 6 classes each (5 for selected classes and 1 for all "not selected" classes), while both CIFAR-100 and Tiny ImageNet classification tasks are separated into 5 subtasks with 21 classes each (20 for selected classes and 1 for all "not selected" classes). Table 3 demonstrates the results of open-set SelKD experiments on CIFAR-100.
|
| 266 |
+
|
| 267 |
+
We have observed that, in line with the results in closed-set SelKD tasks, the experiments conducted on the open-set SelKD tasks reveal that training a group of students with different disjoint tasks is more advantageous when facilitated by a teacher possessing comprehensive knowledge, as opposed to assigning separate teachers who are only well-versed in selected knowledge for each task. This finding also highlights the notable advantage of employing our selective knowledge distillation method in predicting samples that belong to "not selected" knowledge.
|
| 268 |
+
|
| 269 |
+
Table 3: Top-1 accuracy (%) on CIFAR-100 for open-set SelKD. We compare the performance of vanilla knowledge distillation (KD), self-knowledge distillation (SKD) and our selective knowledge distillation (SelKD) in the open-set SelKD classification tasks. All the comparisons are conducted based on feature-based distillation (FitNet Romero et al. (2014), FT Kim et al. (2018) and AT Zagoruyko & Komodakis (2016)).
|
| 270 |
+
|
| 271 |
+
<table><tr><td>Student Networks</td><td>Methods</td><td>SubTask 0</td><td>SubTask 1</td><td>SubTask 2</td><td>SubTask 3</td><td>SubTask 4</td><td>Mean of SubTasks</td><td>#Param of Teachers + Students</td></tr><tr><td rowspan="10">ResNet-8</td><td>Without KD</td><td>82.19</td><td>82.82</td><td>82.62</td><td>82.44</td><td>81.42</td><td>82.30</td><td>0 + 0.4M</td></tr><tr><td>FitNet-KD</td><td>84.65</td><td>85.20</td><td>85.69</td><td>85.72</td><td>84.20</td><td>85.10</td><td>117.7M + 0.4M</td></tr><tr><td>FitNet-SKD</td><td>84.77</td><td>85.41</td><td>85.60</td><td>85.54</td><td>84.62</td><td>85.19</td><td>0.4M + 0.4M</td></tr><tr><td>FitNet-SelKD</td><td>85.63</td><td>86.46</td><td>86.69</td><td>86.61</td><td>85.65</td><td>86.21</td><td>23.7M + 0.4M</td></tr><tr><td>FT-KD</td><td>84.83</td><td>85.32</td><td>86.03</td><td>86.05</td><td>84.82</td><td>85.41</td><td>117.7M + 0.4M</td></tr><tr><td>FT-SKD</td><td>84.79</td><td>85.06</td><td>85.48</td><td>85.47</td><td>84.86</td><td>85.13</td><td>0.4M + 0.4M</td></tr><tr><td>FT-SelKD</td><td>86.17</td><td>86.62</td><td>87.28</td><td>86.99</td><td>86.35</td><td>86.69</td><td>23.7M + 0.4M</td></tr><tr><td>AT-KD</td><td>84.46</td><td>85.32</td><td>85.85</td><td>86.16</td><td>84.31</td><td>85.22</td><td>117.7M + 0.4M</td></tr><tr><td>AT-SKD</td><td>84.62</td><td>85.21</td><td>85.56</td><td>85.69</td><td>84.73</td><td>85.16</td><td>0.4M + 0.4M</td></tr><tr><td>AT-SelKD</td><td>85.81</td><td>86.57</td><td>87.20</td><td>86.59</td><td>85.76</td><td>86.39</td><td>23.7M + 0.4M</td></tr><tr><td rowspan="10">ResNet-14</td><td>Without KD</td><td>84.15</td><td>83.68</td><td>83.15</td><td>84.22</td><td>82.93</td><td>83.63</td><td>0 + 0.9M</td></tr><tr><td>FitNet-KD</td><td>86.92</td><td>87.21</td><td>87.64</td><td>87.75</td><td>87.26</td><td>87.36</td><td>117.7M + 0.9M</td></tr><tr><td>FitNet-SKD</td><td>87.52</td><td>87.54</td><td>87.54</td><td>87.76</td><td>87.95</td><td>87.54</td><td>0.9M + 0.9M</td></tr><tr><td>FitNet-SelKD</td><td>87.27</td><td>87.70</td><td>87.81</td><td>87.85</td><td>87.68</td><td>87.66</td><td>23.7M + 0.9M</td></tr><tr><td>FT-KD</td><td>87.46</td><td>88.04</td><td>88.24</td><td>88.44</td><td>88.02</td><td>88.04</td><td>117.7M + 0.9M</td></tr><tr><td>FT-SKD</td><td>87.33</td><td>87.99</td><td>88.04</td><td>87.96</td><td>87.92</td><td>87.86</td><td>0.9M + 0.9M</td></tr><tr><td>FT-SelKD</td><td>87.60</td><td>88.46</td><td>88.24</td><td>88.82</td><td>88.64</td><td>88.35</td><td>23.7M + 0.9M</td></tr><tr><td>AT-KD</td><td>86.93</td><td>87.58</td><td>87.96</td><td>88.04</td><td>87.29</td><td>87.56</td><td>117.7M + 0.9M</td></tr><tr><td>AT-SKD</td><td>86.54</td><td>87.13</td><td>87.15</td><td>86.61</td><td>85.90</td><td>86.67</td><td>0.9M + 0.9M</td></tr><tr><td>AT-SelKD</td><td>87.03</td><td>87.67</td><td>88.04</td><td>88.01</td><td>87.47</td><td>87.64</td><td>23.7M + 0.9M</td></tr></table>
|
| 272 |
+
|
| 273 |
+
Table 4: Ablation Study of SelKD on CIFAR-100.
|
| 274 |
+
|
| 275 |
+
<table><tr><td>Loss Settings</td><td>SubTask 0</td><td>SubTask 1</td><td>SubTask 2</td><td>SubTask 3</td><td>SubTask 4</td><td>Mean of SubTasks</td></tr><tr><td>Without Distillation</td><td>83.50</td><td>85.85</td><td>83.20</td><td>80.95</td><td>87.45</td><td>84.19</td></tr><tr><td>Without Logit-based Loss</td><td>83.60</td><td>86.05</td><td>83.80</td><td>80.60</td><td>85.85</td><td>83.98</td></tr><tr><td>Without Feature-based Loss</td><td>83.95</td><td>86.15</td><td>84.70</td><td>81.80</td><td>88.15</td><td>84.95</td></tr><tr><td>Ours</td><td>84.30</td><td>86.20</td><td>84.90</td><td>81.85</td><td>88.30</td><td>85.11</td></tr></table>
|
| 276 |
+
|
| 277 |
+
# 4.4 ABLATION STUDY
|
| 278 |
+
|
| 279 |
+
Regarding the previously presented experiments, the loss function can be divided into three parts, namely from cross-entropy loss with dataset labels, KL divergence with teacher coupling and the divergence with features from the teacher. Here we further explore how the accuracy of the student model is influenced when certain components are absent from the three aforementioned parts. To be more precise, we conduct separate tests to evaluate the impact of each component's absence and compare the obtained results with the original outcome. The results of these tests are summarized and presented in the Table 4.
|
| 280 |
+
|
| 281 |
+
Based on the analysis of the table data, it is apparent that the removal of any component from the loss function results in a reduction in the accuracy of the student model. Hence, it is imperative to include all parts of losses in the final settings when seeking a more suitable training method for handling Selective KD tasks. Each module plays a crucial role and is indispensable for best performance.
|
| 282 |
+
|
| 283 |
+
# 5 CONCLUSION
|
| 284 |
+
|
| 285 |
+
We have proposed a new and practical setting for Knowledge Distillation, called Selective Knowledge Distillation (SelKD), which transfers the partial knowledge to student instead of the whole knowledge in vanilla KD. OT is applied for the SelKD, to help the student learn the subtask. Our current work is focused on classification (including open-set setting).
|
| 286 |
+
|
| 287 |
+
# REFERENCES
|
| 288 |
+
|
| 289 |
+
Jean-David Benamou and Yann Brenier. A computational fluid mechanics solution to the mongekantorovich mass transfer problem. Numerische Mathematik, 84(3):375-393, 2000.
|
| 290 |
+
Jean-David Benamou, Guillaume Carlier, Marco Cuturi, Luca Nenna, and Gabriel Peyré. Iterative bregman projections for regularized transportation problems. SIAM Journal on Scientific Computing, 37(2):A1111-A1138, 2015.
|
| 291 |
+
Dimitris Bertsimas and John N Tsitsiklis. Introduction to linear optimization, volume 6. Athena Scientific Belmont, MA, 1997.
|
| 292 |
+
Cristian Bucila, Rich Caruana, and Alexandru Niculescu-Mizil. Model compression. In Knowledge Discovery and Data Mining, 2006. URL https://api-semanticscholar.org/CorpusID:11253972.
|
| 293 |
+
Wei-Ting Chiu, Pei Wang, and Patrick Shafto. Discrete probabilistic inverse optimal transport. In International Conference on Machine Learning, pp. 3925-3946. PMLR, 2022.
|
| 294 |
+
Qianggang Ding, Sifan Wu, Hao Sun, Jiadong Guo, and Shu-Tao Xia. Adaptive regularization of labels. arXiv preprint arXiv:1908.05474, 2019.
|
| 295 |
+
Arnaud Dupuy, Alfred Galichon, and Yifei Sun. Estimating matching affinity matrix under low-rank constraints. arXiv preprint arXiv:1612.09585, 2016.
|
| 296 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770-778, 2016.
|
| 297 |
+
Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015.
|
| 298 |
+
Xiaoqi Jiao, Yichun Yin, Lifeng Shang, Xin Jiang, Xiao Chen, Linlin Li, Fang Wang, and Qun Liu. Tinybert: Distilling bert for natural language understanding. arXiv preprint arXiv:1909.10351, 2019.
|
| 299 |
+
L Kantorovich. On the transfer of masses (in russian). In Doklady Akademii Nauk, volume 37, pp. 227, 1942.
|
| 300 |
+
Jangho Kim, Seong Uk Park, and Nojun Kwak. Paraphrasing complex network: Network compression via factor transfer. Advances in neural information processing systems, 31, 2018.
|
| 301 |
+
Seung Wook Kim and Hyo-Eun Kim. Transferring knowledge to smaller network with class-distance loss. 2017.
|
| 302 |
+
Ru Kong, Jingwei Li, Csaba Orban, Mert R Sabuncu, Hesheng Liu, Alexander Schaefer, Nanbo Sun, Xi-Nian Zuo, Avram J Holmes, Simon B Eickhoff, et al. Spatial topography of individual-specific cortical networks predicts human cognition, personality, and emotion. Cerebral cortex, 29(6): 2533-2551, 2019.
|
| 303 |
+
Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. 2009.
|
| 304 |
+
Nathaniel Lahn, Sharath Raghvendra, and Kaiyi Zhang. A combinatorial algorithm for approximating the optimal transport in the parallel and MPC settings. Advances in Neural Information Processing Systems, 36:21675-21686, 2023.
|
| 305 |
+
Ya Le and Xuan Yang. Tiny imagenet visual recognition challenge. CS 231N, 7(7):3, 2015.
|
| 306 |
+
Seung Hyun Lee, Dae Ha Kim, and Byung Cheol Song. Self-supervised knowledge distillation using singular value decomposition. In Proceedings of the European conference on computer vision (ECCV), pp. 335-350, 2018.
|
| 307 |
+
Lujun Li. Self-regulated feature learning via teacher-free feature distillation. In European Conference on Computer Vision, pp. 347-363. Springer, 2022.
|
| 308 |
+
|
| 309 |
+
Ruilin Li, Xiaojing Ye, Haomin Zhou, and Hongyuan Zha. Learning to match via inverse optimal transport. Journal of machine learning research, 20(80):1-37, 2019.
|
| 310 |
+
Yuang Liu, Wei Zhang, and Jun Wang. Adaptive multi-teacher multi-level knowledge distillation. Neurocomputing, 415:106-113, 2020.
|
| 311 |
+
Rafael Müller, Simon Kornblith, and Geoffrey E Hinton. When does label smoothing help? Advances in neural information processing systems, 32, 2019.
|
| 312 |
+
Yiteng Pan, Fazhi He, and Haiping Yu. A novel enhanced collaborative autoencoder with knowledge distillation for top-n recommender systems. Neurocomputing, 332:137-148, 2019.
|
| 313 |
+
Abhijeet Phatak, Sharath Raghvendra, Chittaranjan Tripathy, and Kaiyi Zhang. Computing all optimal partial transports. In International Conference on Learning Representations, 2023.
|
| 314 |
+
Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. In International conference on machine learning, pp. 8748-8763. PMLR, 2021.
|
| 315 |
+
Sharath Raghvendra, Pouyan Shirzadian, and Kaiyi Zhang. A new robust partial $p$ -wasserstein-based metric for comparing distributions. In International Conference on Machine Learning, 2024.
|
| 316 |
+
Adriana Romero, Nicolas Ballas, Samira Ebrahimi Kahou, Antoine Chassang, Carlo Gatta, and Yoshua Bengio. Fitnets: Hints for thin deep nets. arXiv preprint arXiv:1412.6550, 2014.
|
| 317 |
+
Peng Shen, Xugang Lu, Sheng Li, and Hisashi Kawai. Knowledge distillation-based representation learning for short-utterance spoken language identification. IEEE/ACM Transactions on Audio, Speech, and Language Processing, 28:2674–2683, 2020.
|
| 318 |
+
Liangliang Shi, Peili Lu, and Junchi Yan. Causality learning from time series data for the industrial finance analysis via the multi-dimensional point process. Intelligent Automation & Soft Computing, 26(5), 2020.
|
| 319 |
+
Liangliang Shi, Gu Zhang, Haoyu Zhen, Jintao Fan, and Junchi Yan. Understanding and generalizing contrastive learning from the inverse optimal transport perspective. In International conference on machine learning, pp. 31408-31421. PMLR, 2023.
|
| 320 |
+
Liangliang Shi, Jack Fan, and Junchi Yan. Ot-clip: Understanding and generalizing clip via optimal transport. In *Forty-first International Conference on Machine Learning*, 2024a.
|
| 321 |
+
Liangliang Shi, Zhaoqi Shen, and Junchi Yan. Double-bounded optimal transport for advanced clustering and classification. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 38, pp. 14982-14990, 2024b.
|
| 322 |
+
Liangliang Shi, Haoyu Zhen, Gu Zhang, and Junchi Yan. Relative entropic optimal transport: a (prior-aware) matching perspective to (unbalanced) classification. Advances in Neural Information Processing Systems, 36, 2024c.
|
| 323 |
+
Richard Sinkhorn. Diagonal equivalence to matrices with prescribed row and column sums. The American Mathematical Monthly, 74(4):402-405, 1967.
|
| 324 |
+
Andrew M Stuart and Marie-Therese Wolfram. Inverse optimal transport. SIAM Journal on Applied Mathematics, 80(1):599-619, 2020.
|
| 325 |
+
Shangquan Sun, Wenqi Ren, Jingzhi Li, Rui Wang, and Xiaochun Cao. Logit standardization in knowledge distillation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 15731-15740, 2024.
|
| 326 |
+
Guolong Wang, Xun Wu, Zheng Qin, and Liangliang Shi. Routing evidence for unseen actions in video moment retrieval. In Proceedings of the 30th ACM SIGKDD conference on knowledge discovery and data mining, pp. 3024-3035, 2024.
|
| 327 |
+
|
| 328 |
+
Wei Wang, Dejan Slepčev, Saurav Basu, John A Ozolek, and Gustavo K Rohde. A linear optimal transportation framework for quantifying and visualizing variations in sets of images. International journal of computer vision, 101:254-269, 2013.
|
| 329 |
+
Alan Geoffrey Wilson. The use of entropy maximising models, in the theory of trip distribution, mode split and route split. Journal of transport economics and policy, pp. 108-126, 1969.
|
| 330 |
+
Kan Wu, Houwen Peng, Zhenghong Zhou, Bin Xiao, Mengchen Liu, Lu Yuan, Hong Xuan, Michael Valenzuela, Xi Stephen Chen, Xinggang Wang, et al. Tinyclip: Clip distillation via affinity mimicking and weight inheritance. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 21970-21980, 2023.
|
| 331 |
+
Chuanguang Yang, Zhulin An, Helong Zhou, Linhang Cai, Xiang Zhi, Jiwen Wu, Yongjun Xu, and Qian Zhang. Mixskd: Self-knowledge distillation from mixup for image recognition. In European Conference on Computer Vision, pp. 534-551. Springer, 2022.
|
| 332 |
+
Chuanguang Yang, Xinqiang Yu, Zhulin An, and Yongjun Xu. Categories of response-based, feature-based, and relation-based knowledge distillation. In Advancements in knowledge distillation: towards new horizons of intelligent systems, pp. 1-32. Springer, 2023.
|
| 333 |
+
Fei Yuan, Linjun Shou, Jian Pei, Wutao Lin, Ming Gong, Yan Fu, and Daxin Jiang. Reinforced multi-teacher selection for knowledge distillation. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 35, pp. 14284–14291, 2021.
|
| 334 |
+
Li Yuan, Francis EH Tay, Guilin Li, Tao Wang, and Jiashi Feng. Revisit knowledge distillation: a teacher-free framework. 2019.
|
| 335 |
+
Sergey Zagoruyko. Wide residual networks. arXiv preprint arXiv:1605.07146, 2016.
|
| 336 |
+
Sergey Zagoruyko and Nikos Komodakis. Paying more attention to attention: Improving the performance of convolutional neural networks via attention transfer. arXiv preprint arXiv:1612.03928, 2016.
|
| 337 |
+
Zheng Zhang, Ping Tang, and Thomas Corpetti. Time adaptive optimal transport: A framework of time series similarity measure. IEEE Access, 8:149764-149774, 2020.
|
| 338 |
+
|
| 339 |
+
# A MORE EXPERIMENT RESULT
|
| 340 |
+
|
| 341 |
+
The result of closed-set SelKD tasks on the CIFAR-10 dataset are presented in Table 5, and it is obvious that SelKD outperforms both KD and SKD in terms of top-1 accuracy.
|
| 342 |
+
|
| 343 |
+
We further add more experiments for closed-set SelKD on CIFAR-100 with WideResNet-40-2 (Zagoruyko, 2016) as the teacher model and WideResNet-16-2 as the student model. The results are shown in Table 6.
|
| 344 |
+
|
| 345 |
+
# B A DETAILED EXPLANATION OF THE BI-LEVEL OPTIMIZATION
|
| 346 |
+
|
| 347 |
+
We mainly follow (Shi et al., 2023) that understanding or designing the loss via bi-level optimization:
|
| 348 |
+
|
| 349 |
+
$$
|
| 350 |
+
\min _ {\theta} K L (\mathbf {Y} \mid \mathbf {P} ^ {\theta}) \quad \mathrm {s . t .} \quad P ^ {\theta} = \arg \min _ {\mathbf {P 1} = \mathbf {1}} \langle \mathbf {C} ^ {\theta}, \mathbf {P} \rangle - \epsilon H (\mathbf {P})
|
| 351 |
+
$$
|
| 352 |
+
|
| 353 |
+
where $\mathbf{C}^{\theta}$ represents the cosine distance for image feature and text/label feature, with parameters $\theta$ , and $\mathbf{Y}$ is the known supervision for learning. As proven in (Shi et al., 2023), $H(\mathbf{P}) = -\langle \mathbf{P}, \log \mathbf{P} - \mathbf{1} \rangle$ is the entropic regularization with coefficient $\epsilon$ . The inner optimization is exactly equivalent to the softmax activation, while the outer optimization corresponds to cross-entropy. Thus we can find the above bi-level optimization equals to InfoNCE loss:
|
| 354 |
+
|
| 355 |
+
$$
|
| 356 |
+
\min _ {\theta} \mathcal {L} = \sum_ {i, j} Y _ {i j} \log (\frac {e ^ {- C _ {i j} ^ {\theta} / \epsilon}}{\sum_ {k} e ^ {- C _ {i k} ^ {\theta} / \epsilon}})
|
| 357 |
+
$$
|
| 358 |
+
|
| 359 |
+
Table 5: Top-1 accuracy (\%) on CIFAR-10 for closed-set SelKD. We compare the performance of vanilla knowledge distillation (KD), self-knowledge distillation (SKD) and our selective knowledge distillation (SelKD) in the closed-set SelKD classification tasks.
|
| 360 |
+
|
| 361 |
+
<table><tr><td>Student Networks</td><td>Methods</td><td>SubTask 0</td><td>SubTask 1</td><td>Mean of SubTasks</td></tr><tr><td rowspan="10">ResNet-8</td><td>Without KD</td><td>91.28</td><td>94.76</td><td>93.02</td></tr><tr><td>FitNet-KD</td><td>91.56</td><td>95.72</td><td>93.64</td></tr><tr><td>FitNet-SKD</td><td>91.42</td><td>95.34</td><td>93.12</td></tr><tr><td>FitNet-SelKD</td><td>91.88</td><td>95.88</td><td>93.88</td></tr><tr><td>FT-KD</td><td>91.98</td><td>96.22</td><td>94.10</td></tr><tr><td>FT-SKD</td><td>91.53</td><td>95.99</td><td>93.25</td></tr><tr><td>FT-SelKD</td><td>93.68</td><td>96.50</td><td>95.09</td></tr><tr><td>AT-KD</td><td>91.66</td><td>95.60</td><td>93.63</td></tr><tr><td>AT-SKD</td><td>91.68</td><td>95.09</td><td>93.65</td></tr><tr><td>AT-SelKD</td><td>92.90</td><td>96.12</td><td>94.51</td></tr><tr><td rowspan="10">ResNet-14</td><td>Without KD</td><td>94.42</td><td>96.54</td><td>95.48</td></tr><tr><td>FitNet-KD</td><td>94.86</td><td>96.40</td><td>95.63</td></tr><tr><td>FitNet-SKD</td><td>91.56</td><td>95.72</td><td>93.64</td></tr><tr><td>FitNet-SelKD</td><td>95.04</td><td>97.72</td><td>96.38</td></tr><tr><td>FT-KD</td><td>94.56</td><td>97.04</td><td>95.80</td></tr><tr><td>FT-SKD</td><td>91.56</td><td>95.72</td><td>93.64</td></tr><tr><td>FT-SelKD</td><td>95.66</td><td>97.92</td><td>96.79</td></tr><tr><td>AT-KD</td><td>94.02</td><td>96.76</td><td>95.39</td></tr><tr><td>AT-SKD</td><td>91.56</td><td>95.72</td><td>93.64</td></tr><tr><td>AT-SelKD</td><td>94.84</td><td>97.64</td><td>96.24</td></tr></table>
|
| 362 |
+
|
| 363 |
+
Table 6: Results for closed-set SelKD on CIFAR-100 with WideResNet-40-2 as the teacher model and WideResNet-16-2 as the student model.
|
| 364 |
+
|
| 365 |
+
<table><tr><td>Methods</td><td>SubTask 0</td><td>SubTask 1</td><td>SubTask 2</td><td>SubTask 3</td><td>SubTask 4</td><td>Mean</td></tr><tr><td>FitNet-KD</td><td>85.67</td><td>86.52</td><td>85.14</td><td>81.97</td><td>87.72</td><td>85.40</td></tr><tr><td>FitNet-SelKD</td><td>86.15</td><td>87.68</td><td>85.83</td><td>82.76</td><td>88.04</td><td>86.09</td></tr><tr><td>FT-KD</td><td>85.42</td><td>85.56</td><td>86.08</td><td>82.13</td><td>88.45</td><td>85.53</td></tr><tr><td>FT-SelKD</td><td>85.92</td><td>87.23</td><td>86.17</td><td>82.56</td><td>88.73</td><td>86.12</td></tr><tr><td>AT-KD</td><td>85.17</td><td>85.49</td><td>85.43</td><td>81.87</td><td>87.71</td><td>85.13</td></tr><tr><td>AT-SelKD</td><td>85.55</td><td>87.25</td><td>86.38</td><td>82.41</td><td>88.52</td><td>86.02</td></tr></table>
|
| 366 |
+
|
| 367 |
+
Thus, bi-level optimization is fundamentally a method for designing activation layers or loss functions. In (Shi et al., 2023), modifications to the inner optimization improve the loss. Our work follows this learning framework, but we modify the inner optimization with new constraints to adapt to open-set scenarios, solving it with iterative algorithm (Benamou et al., 2015) to obtain the predicted probability matching matrix. The outer optimization is adjusted to use the original KL Divergence in KD as the loss, resulting in an application in KD problems.
|
ICLR/2025/SelKD_ Selective Knowledge Distillation via Optimal Transport Perspective/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:26196dd4284049b27da41eccee2af92680fa07730bd5df84ddb5df5ad17e0608
|
| 3 |
+
size 739704
|
ICLR/2025/SelKD_ Selective Knowledge Distillation via Optimal Transport Perspective/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d6cd19c419cbcdc76ad6da2575c9a285182bcbcd7d4791473a4056cf3195fc24
|
| 3 |
+
size 449182
|
ICLR/2025/SelectFormer in Data Markets_ Privacy-Preserving and Efficient Data Selection for Transformers with Multi-Party Computation/cf83c876-81f1-46fa-8ff1-14f2edc206c5_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dcb44e1683b3b1246026c03761f0036ebed7aaf6d71bc111e46de6eb637b71dd
|
| 3 |
+
size 95979
|
ICLR/2025/SelectFormer in Data Markets_ Privacy-Preserving and Efficient Data Selection for Transformers with Multi-Party Computation/cf83c876-81f1-46fa-8ff1-14f2edc206c5_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0c198d375d47a687dea051c0e011260e20d3f9c76efb6bb5924c3542647191ca
|
| 3 |
+
size 113338
|
ICLR/2025/SelectFormer in Data Markets_ Privacy-Preserving and Efficient Data Selection for Transformers with Multi-Party Computation/cf83c876-81f1-46fa-8ff1-14f2edc206c5_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0aaf677379d0f6139d02c0d122b2acbf1efdf30d9808f980d5070c51be9cf1b9
|
| 3 |
+
size 1084995
|
ICLR/2025/SelectFormer in Data Markets_ Privacy-Preserving and Efficient Data Selection for Transformers with Multi-Party Computation/full.md
ADDED
|
@@ -0,0 +1,325 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SELECTFORMER IN DATA MARKETS: PRIVACY-PRESERVING AND EFFICIENT DATA SELECTION FOR TRANSFORMERS WITH MULTI-PARTY COMPUTATION
|
| 2 |
+
|
| 3 |
+
Xu Ouyang, Felix Xiaozhu Lin, Yangfeng Ji
|
| 4 |
+
|
| 5 |
+
Department of Computer Science
|
| 6 |
+
|
| 7 |
+
University of Virginia
|
| 8 |
+
|
| 9 |
+
{ftp8nr, felixlin, yangfeng}@virginia.edu
|
| 10 |
+
|
| 11 |
+
# ABSTRACT
|
| 12 |
+
|
| 13 |
+
Critical to a free data market is private data selection, i.e. the model owner selects and then appraises training data from the data owner before both parties commit to a transaction. To keep the data and model private, this process shall evaluate the target model to be trained over Multi-Party Computation (MPC). While prior work suggests that evaluating Transformer-based models over MPC is prohibitively expensive, this paper makes it practical for the purpose of data selection. Our contributions are three: (1) a new pipeline for private data selection over MPC; (2) emulating high-dimensional nonlinear operators with low-dimension MLPs, which are trained on a small sample of the data of interest; (3) scheduling MPC in a parallel, multiphase fashion. We evaluate our method on diverse Transformer models and NLP/CV benchmarks. Compared to directly evaluating the target model over MPC, our method reduces the delay from thousands of hours to tens of hours, while only seeing around $0.20\%$ accuracy degradation from training with the selected data.
|
| 14 |
+
|
| 15 |
+
# 1 INTRODUCTION
|
| 16 |
+
|
| 17 |
+
Data selection & appraisal In today's ML ecosystem, data and models are often owned by separate parties. Examples include mobile users versus app providers, and small businesses versus marketing firms. As model owners are interested in acquiring data to train their models from data owners, data becomes a commodity to be valued and traded.
|
| 18 |
+
|
| 19 |
+

|
| 20 |
+
Figure 1: Three stages of our data selection workflow in chronological order.
|
| 21 |
+
|
| 22 |
+
In a free data market, no purchase commitment should be required unless both parties reach an agreement, for which pre-purchase assessment is vital. It contains two steps: select the most valuable data; (optionally) appraise the selected data. To model owners, pre-purchase selection is key to cost-effectiveness. Extensive work already showed that datasets are often redundant and noisy (Settles, 2012; Katharopoulos & Fleuret, 2018; Mirzasoleiman et al., 2020; Ouyang et al., 2022); purchase budgets should be spent on data points that are most likely to maximize model accuracy. To data owners, selection allows them to reveal less data in exchange for the same monetary reward, which
|
| 23 |
+
|
| 24 |
+
retains their data ownership and reduces privacy exposure. The need for judicious data selection is further highlighted by that data candidates are often unlabeled (Hoi et al., 2006; Smith et al., 2018) and have skewed label distributions (Kaur et al., 2019). This paper targets this issue.
|
| 25 |
+
|
| 26 |
+
Challenge: private selection Data selection and appraisal should be private: they should not leak any data and model parameters; if a purchase agreement is eventually reached, the model owner should learn no more beyond the data she is paying for. To select and appraise data, a common algorithm is to run a model's forward passes over data candidates and select based on the outcome (see Section 2 for details). It can be made private by building atop Multi-Party Computation (MPC) (Goldreich et al., 1987; Shamir, 1979; Yao, 1986): both parties (owners) jointly evaluate over the candidate data, learning only the indices of selected data and the quality measurement.
|
| 27 |
+
|
| 28 |
+
However, evaluating Transformer models on MPC is expensive. A forward pass of BERT on a batch of 4 requires 3252 communication rounds and over 245 GB data exchanged, taking around 0.76 hours across commodity servers with GPUs. Most of the cost comes from executing nonlinear arithmetics such as softmax, which is pervasive in Transformers. Some efficient Transformers works can improve inference speed (Fu et al., 2021; You et al., 2022; Fu et al., 2022). But to support Transformer inference over MPC, recent work approximates nonlinearity with cheaper linear operations (Li et al., 2022; Dong et al., 2023; Chen et al., 2021). For data selection, they are not only too slow (hundreds of GPU hours to select from tens of K data points) but also have poor results as this paper will show.
|
| 29 |
+
|
| 30 |
+
Goal & techniques Our goal is to accelerate private data selection for transformer-based models, e.g. BERT and ViT, while retaining the training performance. Our key insight is that the nonlinearity in Transformers can be fused and evaluated at low dimensions; fortunately, the resultant model evaluation outcomes will be acceptable for the purpose of data selection, which only depends on how the outcomes for individual data candidates compare to each other. We present a holistic selection pipeline with three key techniques.
|
| 31 |
+
|
| 32 |
+
Nonlinearity emulated by multi-layer perceptron (MLPs). While existing MPC frameworks treat individual nonlinear operations in isolation (e.g. Newton-Raphson iterations for reciprocal), we fuse adjacent non-linear operators and emulate them altogether with a small MLP. The benefits are twofold. (1) MLPs significantly reduce MPC costs because they not only serve as approximators (converting nonlinear to linear operations) but also dimension reducers, e.g. substituting a 512-dimensional softmax with 2-dimensional MLP. This sets us apart from prior work that approximates a single nonlinear operation (e.g. reciprocal) with an MLP (Chen et al., 2022), which does not reduce dimensions and therefore executes much slower. (2) MLPs are data-driven. They are trained atop the distributions of the actual model activations, tailored to the datasets of interest. They only require a small amount of training data, as few as several hundred on average in our experiment.
|
| 33 |
+
|
| 34 |
+
Multi-phase selection. For efficiency, the data/model owners jointly select data in multiple phases. While early phases evaluate cheap selection models to filter most of the data, later phases run more expensive selection models to select from the data that survived from earlier phases. This reduces the total selection delay without compromising accuracy.
|
| 35 |
+
|
| 36 |
+
Parallel MPC executions. To further reduce the selection delay, the data/model owners batch network latency-bound MPC operations and execute them in parallel to network bandwidth-bound MPC operations; they further overlap the MPC communication and computation across different batches. No prior MPC systems exploit such parallelism, to the best of our knowledge.
|
| 37 |
+
|
| 38 |
+
Workflow There are three stages in our proposed workflow: two in the clear and one over MPC. As shown in Figure 1, in the beginning, the model owner and the data owner exchange some basic information in the clear. For instance, the total amount of data and the amount of data that the model owner plans to purchase. Next is the private multi-phase selection which is over MPC. Two parties secretly share encrypted proxy model parameters and data to do a forward pass and get the entropy value. We then rank them and select the top candidates based on their rank. The remaining data points' indices will be reused in the next phase. The comparison outcomes will be revealed and the data indices are in the clear. Data will not be transferred among phases. The final transaction is in the clear. After private data selection, the model owner pays for the data it wants and the data owner sends out the data to seal the deal. More details in Section 4.
|
| 39 |
+
|
| 40 |
+
Results We test SelectFormer with four target models, seven NLP/CV benchmarks, and a variety of purchase budgets (20%–40%). We show that with commodity GPUs and typical Internet, our pipeline can select from 10K–100K data points within tens of hours, one order of magnitude faster than prior work. Using unmodified MPC protocol and framework, we provide a strong privacy guarantee. Our selected data only results in just 0.20% lower accuracy compared to directly evaluating the target model over MPC for selection, a gold method which is however 204×slower.
|
| 41 |
+
|
| 42 |
+
Contributions This work proposes a novel application of MPC - private data selection, and makes it practical on large Transformer models. It achieves so via three new techniques:
|
| 43 |
+
|
| 44 |
+
- A data-driven MLP approximation that is uniquely tailored for data selection, instead of generic inference.
|
| 45 |
+
- Multi-phase selection that progressively increases the selection models' capability and reduces the amount of data candidates.
|
| 46 |
+
- Parallel MPC executions that hide the delays of computation and communication rounds behind that of communication data exchange.
|
| 47 |
+
|
| 48 |
+
# 2 BACKGROUND
|
| 49 |
+
|
| 50 |
+
# 2.1 ASSUMPTIONS ON SYSTEMS
|
| 51 |
+
|
| 52 |
+
Two parties The model owner possesses a pretrained Transformer model $M_{target}$ and wants to finetune it. The data owner owns the dataset $D$ for selection. The model owner plans to buy $B$ datapoints $(B < |D|)$ from dataset $D$ which will be used to finetune the target model $M_{target}$ . The model owner has a private, small validation set, on which she wants to maximize the validation accuracy. The two parties agree on $B$ and that they will use MPC for selection.
|
| 53 |
+
|
| 54 |
+
Datapoints We follow a common premise in prior work on data selection: (Coleman et al., 2019; Mahmood et al., 2022), the dataset $D$ is unlabeled and might have an imbalanced class distribution, which warrants careful selection before training. This premise is motivated by real-world situations where data labels are scarce and data owners often lack the motivation, expertise, and authority to label their data (Hoi et al., 2006; Smith et al., 2018).
|
| 55 |
+
|
| 56 |
+
Threat model Without alternation, we follow a semi-honest model widely used in prior security research (Knott et al., 2021; Dong et al., 2023; Mohassel & Zhang, 2017): both parties faithfully follow the MPC protocol but nevertheless attempt to learn each other's private information (model weights and datapoints) through their interactions. Notably, we do not deviate from protocols implemented by well-known frameworks such as Crypten (Knott et al., 2021). As such, our privacy guarantee is as strong as the underlying framework.
|
| 57 |
+
|
| 58 |
+
# 2.2 ALGORITHM FOUNDATIONS
|
| 59 |
+
|
| 60 |
+
(1) Maximum entropy selection Active learning (AL) (Settles, 2012) selects from unlabeled data to maximize training performance. To appraise an example $x$ for training model $M$ , AL runs a forward pass of $M$ over $x$ (or query $x$ with $M$ ) and computes the prediction entropy: higher entropy implies lower model confidence, hence a higher learning value of $x$ . (2) Proxy models Querying all examples in $D$ with $M_{target}$ can be slow. To this end, prior work uses a lightweight model $M_p$ called "proxy" for selection before training $M_{target}$ with the selected data (Coleman et al., 2019). To select valuable data, $M_p$ 's prediction should resemble that of $M_{target}$ ; hence $M_p$ is often created as a miniature version of $M_{target}$ : examples include
|
| 61 |
+
|
| 62 |
+

|
| 63 |
+
Figure 2: Transformers over MPC incurs high communication and computation overhead. Showing one forward pass of one layer (12 heads) over a batch of 5 (maximum allowable on our GPU). Hardware: Quadro RTX 4000. MPC framework: Crypten (Knott et al., 2021).
|
| 64 |
+
|
| 65 |
+
ResNet-18 as proxy for ResNet-50 (Coleman et al., 2019). We use simplified Transformers as proxy models with fewer layers and attention heads.
|
| 66 |
+
|
| 67 |
+
# 2.3 TRANSFORMERS, MPC, AND OVERHEAD ANALYSIS
|
| 68 |
+
|
| 69 |
+
# Transformers
|
| 70 |
+
|
| 71 |
+
We focus on transformer-based models (Vaswani et al., 2017). Each layer of these models features a Multihead Attention paired with FeedForward. Both are succeeded by layer normalization and a residual connection. Within the Multihead Attention, operations proceed sequentially from QKV linear operation to the attention mechanism, and finally to an attention output.
|
| 72 |
+
|
| 73 |
+
MPC setting: 2PC We assume the most common MPC setting: secret sharing under two-party computation (2PC) (Yang et al., 2019). The model owner randomly decomposes $x$ into two shares, $x_{1}$ and $x_{2}$ (such that $x_{1} + x_{2} = x$ ), retains $x_{1}$ , and convey $x_{2}$ to the data owner. Analogously, the data owner fragments $y$ into $y_{1}$ and $y_{2}$ and transfers $y_{2}$ to the model owner. These shares individually disclose no information about the original numbers, $x$ and $y$ . Reconstruction of a number is possible when both parties exchange their shares and sum them up.
|
| 74 |
+
|
| 75 |
+
To compute $z = x + y$ , each party adds their shares of $x$ and $y$ , yielding $z_{1} = x_{1} + y_{1}$ and $z_{2} = x_{2} + y_{2}$ . Both parties can retrieve $z$ by adding $z_{1}$ and $z_{2}$ . For multiplication, The parties can offline generate a random triple called Beaver triples (Beaver, 1992), $a, b$ , and $c$ (such that $ab = c$ ). The elements of this triple are then partitioned and disseminated amongst the parties, akin to $x$ and $y$ . The model owner calculates $\epsilon_{1} = x_{1} - a_{1}, \delta_{1} = y_{1} - b_{1}$ while the data owner computes $\epsilon_{2} = x_{2} - a_{2}, \delta_{2} = y_{2} - b_{2}$ . The parties jointly reconstruct $\epsilon$ and $\delta$ . Subsequently, the model owner computes $p_{1} = c_{1} + \epsilon y_{1} + \delta x_{1} + \epsilon \delta$ and the data owner calculates $p_{2} = c_{2} + \epsilon y_{2} + \delta x_{2}$ , enabling the retrieval of $p = xy$ . Throughout this procedure, all intermediate computations, including $\epsilon_{1}, \epsilon_{2}, \delta_{1}$ and $\delta_{2}$ maintain the confidentiality of $x, y$ and $p$ , precluding any information leakage.
|
| 76 |
+
|
| 77 |
+
Major overheads comes from that MPC lacks native support for nonlinear operations, such as softmax, logarithmic, and exponential, which are pervasive in Transformers. In response, MPC frameworks provide corresponding linear approximations. Unfortunately, the overhead is still high. Figure 2 shows the cost of the operations for one transformer block. As shown in the table, the cost of nonlinear arithmetic dominates. Notably, softmax contributes $81.9\%$ communication data and 142 communication rounds. The overheads become prohibitive for data selection, which needs to evaluate Transformers on tens of thousands of data points over MPC. We show this in Section 5.
|
| 78 |
+
|
| 79 |
+
# 3 RELATED WORKS
|
| 80 |
+
|
| 81 |
+
Data selection and appraisal Our work builds on the idea of using a miniature version (proxy) of the target model as the selector (Coleman et al., 2019). Yet, proxies alone are still too expensive for MPC as we will show in Section 5. Xu et al. (2022) investigates data appraisal over MPC. Contrasting to us, they assume labeled data (a strong assumption in practice), which allows them to appraise data via forward influence functions. Unlike us focusing on Transformer models, they only demonstrated logistic regression tasks. Mindermann et al. (2022) introduces RHO loss that quantifies by how much data candidates would reduce the loss on a small holdout set if the model were to train the candidates. They then select data based on RHO loss. Their methods inspire our bootstrap dataset. However, they rely on labeled data, whereas we focus on a more challenging setting – selecting unlabeled data.
|
| 82 |
+
|
| 83 |
+
MPC inference of neural networks Existing research has developed discretized DNN training with a customized two-party protocol (Agrawal et al., 2019) and MPC-friendly approximations to speed up CNN. Chou et al. (2018) develop an optimization framework that minimizes the approximation error of order two polynomial to ReLU. Mishra et al. (2020) alleviates this problem by using a set of heuristics along with Neural Architecture Search (NAS). Mohassel & Zhang (2017) proposes a costly approximation of softmax by replacing exponential with ReLU functions on high-dimension inputs.
|
| 84 |
+
|
| 85 |
+
MPCFORMER (Li et al., 2022) and PUMA (Dong et al., 2023) directly address efficient Transformer inference over MPC. MPCFORMER is implemented based on Crypten (Knott et al., 2021) framework and its key idea is that approximate nonlinear operations in the student model and then distill it;
|
| 86 |
+
|
| 87 |
+
PUMA proposes new approximations for faster secure inference in a three-party setting. Bolt (Pang et al., 2024) proposes a new Transformer inference framework. Compared to us, they miss the key opportunities of reducing nonlinearity dimensions and using learned approximators (MLPs). Furthermore, MPCFORMER's model distillation approach is ill-suited to data selection, where labeled data for distillation is lacking. As Section 5 will show, they perform poorly in data selection.
|
| 88 |
+
|
| 89 |
+
# 4 METHOD
|
| 90 |
+
|
| 91 |
+
# 4.1 HIGH-LEVEL WORKFLOW
|
| 92 |
+
|
| 93 |
+
Pre-selection bootstrap: Prior to the selection, the two parties exchange meta-information in the clear: the purchase budget $B$ , the secure computation framework, the target model architecture type, pre-processing methods, and the metadata about the $S$ , which includes the number of data points.
|
| 94 |
+
|
| 95 |
+
The model owner purchases bootstrap data $S_{boot}$ which constitutes a small fraction of the purchase budget $B$ . The data owner randomly samples $S_{boot}$ from $S$ ; the purchase requires no selection and incurs no MPC overhead. The model owner will use $S_{boot}$ to generate proxy models $\hat{M}_{1..N}$ , as will be described below.
|
| 96 |
+
|
| 97 |
+
Multipass selection For efficiency, the selection process is a progressive sieve: earlier phases run smaller selector models for quickly filtering a majority of redundancy, whereas later phases run larger selector models for slower, more precise selection. Concretely, both parties jointly execute $N$ selection phases over MPC. A phase $i$ downselects dataset $S_{i-1}$ to the set $S_i$ with a selectivity $\alpha_i = |S_i| / |S_{i-1}|, \alpha_i < 1$ .
|
| 98 |
+
|
| 99 |
+
In phase $i$ , the model owner queries the dataset $S_{i-1}$ with a proxy model $\hat{M}_i$ . The query is executed as a forward pass of $\hat{M}_i$ on $S_{i-1}$ on MPC. The forward pass computes the prediction entropy values, which are encrypted. Next, both parties jointly find the indices of $|S_i|$ highest entropy values: execute the QuickSelect algorithm with $O(|S_{i-1}|)$ pairwise comparisons between entropy values; the comparison is over MPC, each taking 8 communication rounds and transferring 432 bytes. A comparison does not reveal its inputs (entropy values) but only the binary outcome. Finally, the indices of data points with the highest prediction entropy constitute the input $S_i$ for the next phase.
|
| 100 |
+
|
| 101 |
+

|
| 102 |
+
Figure 3: Our high-level workflow. Left: proxy model generation. Right: multi-phase selection. $\mathbf{M}_g$ is the base model for the proxy models $\hat{M}_{1..N}$ . More details in subsection 4.2.
|
| 103 |
+
|
| 104 |
+
$N$ phases result in the final dataset $S_{N}$ . The model owner may offer to buy $S_{N}$ , or request an appraisal of $S_{N}$ before buying. For appraisal, both parties jointly compute an average entropy over $S_{N}$ and reveal the average entropy. If the average entropy is sensitive, both parties can jointly compute if the (encrypted) average exceeds a pre-defined threshold and only reveals the one-bit outcome.
|
| 105 |
+
|
| 106 |
+
Privacy guarantees The following information is kept private: dataset $S$ ; parameters of $M_{\text{target}}$ and $\hat{M}_{1..N}$ ; the prediction outcome and entropy. The following is revealed: the rank of prediction entropy; the architecture (operations) of $\hat{M}_{1..N}$ ; the number of data points and budget.
|
| 107 |
+
|
| 108 |
+
<table><tr><td rowspan="2"></td><td colspan="5">DistilBERT</td><td colspan="5">BERT</td><td colspan="2">ViT-small</td><td colspan="2">ViT-base</td></tr><tr><td>SST2</td><td>QNLI</td><td>QQP</td><td>AGNEWS</td><td>YELP</td><td>SST2</td><td>QNLI</td><td>QQP</td><td>AGNEWS</td><td>YELP</td><td>Cifar10</td><td>Cifar100</td><td>Cifar10</td><td>Cifar100</td></tr><tr><td>Ours</td><td>82.34</td><td>71.46</td><td>71.53</td><td>88.49</td><td>60.18</td><td>84.59</td><td>73.68</td><td>72.73</td><td>89.04</td><td>61.33</td><td>96.46</td><td>69.11</td><td>96.61</td><td>68.42</td></tr><tr><td rowspan="2">Random (vs. Ours)</td><td>79.08</td><td>70.34</td><td>66.18</td><td>86.43</td><td>58.09</td><td>79.58</td><td>73.56</td><td>68.84</td><td>87.85</td><td>59.16</td><td>94.69</td><td>43.99</td><td>95.63</td><td>63.21</td></tr><tr><td>-3.26</td><td>-1.12</td><td>-5.35</td><td>-2.06</td><td>-2.09</td><td>-5.01</td><td>-0.12</td><td>-3.89</td><td>-1.19</td><td>-2.17</td><td>-1.71</td><td>-25.12</td><td>-0.98</td><td>-5.21</td></tr><tr><td rowspan="2">Oracle (vs. Ours)</td><td>82.32</td><td>71.44</td><td>71.51</td><td>89.19</td><td>59.93</td><td>86.06</td><td>74.62</td><td>73.08</td><td>89.74</td><td>60.8</td><td>96.87</td><td>68.4</td><td>96.94</td><td>67.85</td></tr><tr><td>-0.02</td><td>-0.02</td><td>-0.02</td><td>0.70</td><td>-0.25</td><td>1.47</td><td>0.94</td><td>0.35</td><td>0.70</td><td>-0.53</td><td>0.41</td><td>-0.71</td><td>0.33</td><td>-0.57</td></tr></table>
|
| 109 |
+
|
| 110 |
+
Table 1: Ours are consistently higher than Random across all models and benchmarks and are close to Oracle (gold accuracy).
|
| 111 |
+
|
| 112 |
+
# 4.2 GENERATING PROXY MODELS IN DETAIL
|
| 113 |
+
|
| 114 |
+
A proxy model $\hat{M}_i$ is characterized by $< l_i, w_i, d_i >$ : $L_i$ transformer layers with $A_i$ attention heads each (width), in which the nonlinear modules are substituted by MLPs with hidden dimension $d_i$ and the GeLU functions are substituted by ReLU functions. FFN is also removed from proxy models. As shown in Figure 3, the model owner generates proxy models $\hat{M}_{1..N}$ as follows:
|
| 115 |
+
|
| 116 |
+
- Extract a sub-model $M_g$ from $M_{target}$ . $M_g$ comprises $L$ bottom layers from $M_{target}$ where $L = \max(l_{1..N})$ , with all the weights copied over. $M_g$ serves as the backbone for $\hat{M}_{1..N}$ .
|
| 117 |
+
- Finetune $M_g$ on the bootstrap data $S_{boot}$ . This serves two purposes: (1) collecting sample input/output of $M_g$ 's nonlinear modules, which will be used to train the MLPs that substitute these nonlinear modules; (2) roughly adapting $M_g$ to a sample from the dataset $S$ . Initialize $\hat{M}_{1..N}$ by pruning the width and depth of $M_g$ .
|
| 118 |
+
- Ex vivo MLP training. For each transformer block in a proxy model, randomly initialize three MLPs. Train them separately on the input/output of nonlinear modules collected from the previous step. More training data following the same distribution as the input/output will be randomly generated as data augmentations. See subsection 4.3 for details.
|
| 119 |
+
- In vivo MLP training. Substitute the nonlinear modules in $\hat{M}_i$ with the MLPs trained in the previous step. Further finetune the resultant model $\hat{M}_i$ on $S_{boot}$ end-to-end. This co-tunes MLPs (the approximate portion of $\hat{M}_i$ ) and the remaining exact portion.
|
| 120 |
+
|
| 121 |
+
The model owner schedules the selection by setting $\{< l_i, w_i, d_i >\}_{i=1..N}$ for $N$ phases. As described above, the principle of schedule is progressive: increasingly higher $l/w/d$ for later phases. Given a budget $B$ , SelectFormer determines the schedule via offline grid search. See Section 5.
|
| 122 |
+
|
| 123 |
+

|
| 124 |
+
Figure 4: Training MLPs for substituting the non-linearity in Transformer models
|
| 125 |
+
|
| 126 |
+
# 4.3 APPROXIMATION MLPS FOR NON-LINEAR OPERATIONS
|
| 127 |
+
|
| 128 |
+
Our theoretical foundation is Hornik et al. (1989): MLPs are able to approximate any function at any desired degree of accuracy, as long as the function is continuous on a closed and bounded subset of $R^n$ . A transformer's nonlinear modules satisfy this condition (Goodfellow et al., 2016). We use standard MLPs, each comprising one ReLU layer sandwiched between two linear layers. Of a proxy model, MLPs substitute the following nonlinear modules as shown in Figure 4:
|
| 129 |
+
|
| 130 |
+
- Softmax in the attention module. At each transformer layer, a substitute MLP maps along the last dimension of the input and has the same input/output shape as the original softmax operation.
|
| 131 |
+
|
| 132 |
+

|
| 133 |
+
Figure 5: Across a variety of budgets, Ours consistently outperforms Random and are comparable with Oracle (gold accuracy). Target model: DistilBERT.
|
| 134 |
+
|
| 135 |
+
- LayerNorm in the attention module. At each transformer layer, a substitute MLP emulates the reciprocal operation in LayerNorm. Of the LayerNorm, its learnable weights and bias in the affine functions are loaded from the original LayerNorm layers in $M_g$ . Its numerator is computed directly on MPC because the total number is a constant and it needs just cheap summation and multiplication.
|
| 136 |
+
- Softmax over logits and the subsequent entropy computation. At the top of the model, a substitute MLP emulates the two modules combined. The MLP input shape is the same as that of softmax. The output will be the entropy itself.
|
| 137 |
+
|
| 138 |
+
A proxy model of layer $l$ comprises $2l + 1$ MLPs in total; they have the identical hidden dimension albeit different weights. Different proxy models may have MLPs of different hidden dimensions, set as part of the schedule as described above.
|
| 139 |
+
|
| 140 |
+
Training MLPs MLPs need to be trained on the sample input/output of the nonlinear modules being substituted. While we can use such input/output observed in finetuning $M_g$ over bootstrap data ( $S_{boot}$ ), the data amount is inadequate: randomly sampled $S_{boot}$ must be small (3521 datapoints on average in our experiments) in order to save the budget for private selection.
|
| 141 |
+
|
| 142 |
+
We address the problem with the empirical observation that inputs to a nonlinear module largely follow a parametric Gaussian distribution (Chen et al., 2022). As such, from the actually observed inputs, the model owner estimates the Gaussian distribution parameters $\langle \mu, \sigma \rangle$ and uses such parameters to synthesize training inputs and outputs.
|
| 143 |
+
|
| 144 |
+
For a given nonlinear module in $M_g$ , an instance of $\langle \mu, \sigma \rangle$ is estimated and one dataset (5.12 million data points) is synthesized once, which is used to train the MLPs that substitute this particular nonlinear module in all proxy models $\hat{M}_{1..N}$ . There are three synthesized datasets: $S_{sm}$ , $S_{ln}$ , and $S_{se}$ . This is shown in Figure 4. Note that $\hat{M}_{1..N}$ with MLPs inserted will be further finetuned as described above. The MLP training is very cheap compared with the selection over MPC, which can be measured in minutes.
|
| 145 |
+
|
| 146 |
+
# 4.4 IO SCHEDULING
|
| 147 |
+
|
| 148 |
+
Our proxy models perform a sequence of matrix multiplication and ReLU. Operating on high-dimensional inputs are bound by the network bandwidth; after being projected into lower dimensions, the operations succeeding the activation functions are bound by network latency. To this end, (1) SelectFormer stacks and coalesces the latency-bound modules from multiple batches, reducing the number of communication rounds and improving the computation throughput. (2) Furthermore, SelectFormer exploits computation and communication parallelism across batches, executing a module whenever its needed resources become available. For instance, while data exchange is occurring for one batch, computations for the subsequent batches can be performed concurrently. Such co-execution is only limited by data dependencies and the available memory of a party to hold operation inputs.
|
| 149 |
+
|
| 150 |
+
# 5 EVALUATION
|
| 151 |
+
|
| 152 |
+
# 5.1 EXPERIMENT SETUP
|
| 153 |
+
|
| 154 |
+
Models & datasets For NLP, we choose target models as BERT (12 layers) and DistilBERT (6 layers), with 12 attention heads and a hidden dimension of 768. For vision, we chose the target model as ViT, with the same architecture as BERT. We chose benchmarks with at least tens of thousands
|
| 155 |
+
|
| 156 |
+
<table><tr><td rowspan="2"></td><td colspan="3">Emulated w/ MLP?</td><td colspan="3">DistillBERT Accuracy</td><td colspan="3">BERT Accuracy</td></tr><tr><td>MLPum</td><td>MLPse</td><td>MLPn</td><td>SST2</td><td>QQP</td><td>AGNEWS</td><td>SST2</td><td>QQP</td><td>AGNEWS</td></tr><tr><td>Ours</td><td>✓</td><td>✓</td><td>✓</td><td>82.80±0.98</td><td>71.63±0.91</td><td>87.75±1.00</td><td>84.33±1.30</td><td>72.31±1.21</td><td>88.37±1.58</td></tr><tr><td>NoAttnSM</td><td></td><td>✓</td><td>✓</td><td>82.48±1.27 (-0.32)</td><td>71.85±1.11 (+0.22)</td><td>89.58±0.43 (+1.83)</td><td>85.14±0.46 (+0.81)</td><td>74.15±0.56 (+1.84)</td><td>89.55±0.66 (+1.18)</td></tr><tr><td>NoAttnLN</td><td>✓</td><td>✓</td><td></td><td>81.83±0.78 (-0.97)</td><td>71.68±0.44 (+0.05)</td><td>87.20±1.49 (-0.55)</td><td>83.95±0.73 (-0.38)</td><td>72.76±0.94 (+0.45)</td><td>89.08±0.47 (+0.71)</td></tr><tr><td>NoApprox</td><td></td><td></td><td></td><td>82.02±0.80 (-0.78)</td><td>70.42±1.00 (-1.21)</td><td>88.99±0.50 (+1.24)</td><td>84.79±1.00 (+0.46)</td><td>72.26±0.91 (-0.06)</td><td>89.30±0.45 (+0.93)</td></tr></table>
|
| 157 |
+
|
| 158 |
+
Table 2: Using MLPs to emulate Transformer nonlinearity results in minor accuracy degradation
|
| 159 |
+
|
| 160 |
+

|
| 161 |
+
Figure 6: Our method reduces the end-to-end delays by two orders of magnitude. As in Section 4, 1 phase selection selects data using a proxy model with a hidden dimension of 16.
|
| 162 |
+
|
| 163 |
+
of data points which warrant selection. Following prior work (Xu et al., 2022) to construct the training set with imbalanced labels, we remove some data points from the original benchmarks. Our imbalanced NLP benchmarks include binary classification from GLUE (Wang et al., 2018): SST2 (42K), QNLI (58K), and QQP (149K); and multilabel classification (Zhang et al., 2015): AG news (40K) and Yelp review full (188K). Our vision benchmarks are two multilabel benchmarks CAFAR-10 (10K) and CIFAR-100 (6K). Note that we do not change the test set.
|
| 164 |
+
|
| 165 |
+
We implement our scheme based on Crypten (Knott et al., 2021), a popular MPC framework. We run data/model owners on separate GPUs (Nvidia Quadro RTX 4000) with Intel(R) Xeon(R) Silver 4210 CPU; we control the network bandwidth (100 MB/sec) and latency (100 ms) between them to emulate a wide-area network condition. We report: (1) the test accuracy of the target model, after being trained with the selected data; (2) the delay of the data selection process over MPC.
|
| 166 |
+
|
| 167 |
+
These results are derived using two-phase data selection unless specified otherwise. In the first phase, for NLP tasks, we employ a proxy model with a single layer and a dimensionality of 2, while for CV tasks, a proxy model with three layers and the same dimensionality is utilized. In the second phase, a proxy model with three layers and a dimensionality of 16 is applied for these two tasks.
|
| 168 |
+
|
| 169 |
+
Baselines We evaluate our method against the following baselines.
|
| 170 |
+
|
| 171 |
+
1. Random selects data randomly from the data owner. It incurs zero MPC overhead.
|
| 172 |
+
2. Oracle queries data using the target model. Under our framework (Section 2), we consider that it leads to gold test accuracy. Yet, it incurs prohibitive MPC overhead as will be shown.
|
| 173 |
+
3. MPCFORMER (Li et al., 2022) is a closely related project that minimizes the cost of evaluating transformers over MPC. We implement this baseline to adopt MPCFORMER's key optimizations for evaluating proxy models: linear operators for approximating nonlinearity and model distillation for recovering accuracy. For a fair comparison, MPCFORMER uses the same proxy model architecture as ours, and initializes the proxy models in the same way; runs distillation on the same amount of bootstrap data. Note that we cannot directly compare to PUMA (Dong et al., 2023), which is designed under 3 compute parties.
|
| 174 |
+
4. Bolt (Pang et al., 2024)'s MPC framework contains linear approximations for nonlinear operations.
|
| 175 |
+
|
| 176 |
+
# 5.2 END-TO-END RESULTS
|
| 177 |
+
|
| 178 |
+
Selection delays Our method significantly reduces the delays. Compared to Oracle, our method's delay is lower by two orders of magnitude as shown in Figure 6. For instance, to select $20\%$ from 42K data points (SST2 benchmark, DistilBERT model), our experiment takes around 20 hours whereas Oracle would take 3740 hours.
|
| 179 |
+
|
| 180 |
+
Selection efficacy Our method effectively selects training data that best boosts the test accuracy. Table 1 zooms in on a typical purchase budget (20%). Compared to Random, our test accuracy
|
| 181 |
+
|
| 182 |
+

|
| 183 |
+
Figure 7: Delay reduction by our techniques. The results also show that using proxy models alone (variant "P" in the figure,) is not enough.
|
| 184 |
+
|
| 185 |
+

|
| 186 |
+
|
| 187 |
+

|
| 188 |
+
|
| 189 |
+

|
| 190 |
+
|
| 191 |
+

|
| 192 |
+
|
| 193 |
+
is consistently higher across all NLP and CV benchmarks. The benefit is particularly pronounced on challenging tasks such as CIFAR-100, on which our accuracy is higher by $25.11\% / 5.21\%$ on ViT-small/base. Compared to Oracle, our test accuracy is comparable: only $0.08\% - 0.58\%$ lower for DistillBERT and BERT, and even $0.13\%$ and $0.15\%$ higher for ViT-base and ViT-small.
|
| 194 |
+
|
| 195 |
+
Across different purchase budgets of $25\%$ , $30\%$ , and $40\%$ , our method also leads to strong accuracy. Compared to Random, our accuracy is $2.23\%$ higher on average, and up to $5.14\%$ . Compared to Oracle, our average accuracy is only $0.91\%$ lower on average, and as low as $0.01\%$ . See the Appendix for detailed results.
|
| 196 |
+
|
| 197 |
+
From a different angle to view our efficacy: to reach a given accuracy, our method demands a much lower budget. As shown in Figure 5, to be on par with our test accuracy on a budget of $20\%$ , Random would need a budget of $70\%$ (BERT on QNLI), a budget of $90\%$ (DistilBERT on SST2), and a budget of $100\%$ (DistilBERT on YELP and BERT on YELP/SST2).
|
| 198 |
+
|
| 199 |
+
# 5.3 COMPARISON WITH MPCFORMER AND BOLT
|
| 200 |
+
|
| 201 |
+
As shown in Table 3, our method simultaneously delivers much higher test accuracy (by $23\% - 36\%$ ) and much shorter (by $7\times$ ) selection delays. The reasons are twofold. (1) MPCFORMER's longer delays come from that it approximates individual nonlinear operators with linear counterparts; it does not reduce model dimension as we do. (2) MPCFORMER's lower accuracy comes from that its proxy models come from the distillation of the target model, a process requiring ample, representative training data. This is at
|
| 202 |
+
|
| 203 |
+
<table><tr><td rowspan="2"></td><td colspan="3">BERT Accuracies/%</td><td colspan="3">Delay/hrs</td></tr><tr><td>SST2</td><td>QNLI</td><td>QQP</td><td>SST2</td><td>QNLI</td><td>QQP</td></tr><tr><td>MPCFORMER</td><td>50.92</td><td>50.54</td><td>36.82</td><td>279</td><td>388</td><td>998</td></tr><tr><td>Ours</td><td>84.59 (+33.67)</td><td>73.68 (+23.14)</td><td>72.73 (+35.91)</td><td>37 (-242)</td><td>51 (-337)</td><td>131 (-867)</td></tr></table>
|
| 204 |
+
|
| 205 |
+
Table 3: Compared to MPCFORMER, our method results in much higher test accuracy and much lower delays. On GLUE benchmarks which were also evaluated and reported by MPCFORMER. Target model: BERT. Proxy model: 1 transformer layer with 1 head + 3 transformer layers with 12 heads.
|
| 206 |
+
|
| 207 |
+
odds with data selection: $S_{boot}$ is the only data available for distillation; it has a small size and skewed labels. The skewness propagates from $S_{boot}$ to proxy models, to selected data, and to the target model. As a result, the trained target model is biased towards predicting the majority class in the training set. This results in poor accuracy if the test and train sets have different majority classes, sometimes even worse than random guess (e.g. QQP in Table 3). See subsection 7.2 for the comparison with Bolt.
|
| 208 |
+
|
| 209 |
+
# 5.4 ABLATION STUDY
|
| 210 |
+
|
| 211 |
+
Crypten incurs minor accuracy loss We validate that our choice of the Crypten framework (Knott et al., 2021), which executes ML on a finite ring, introduces minor accuracy loss. On SST2 with the default budget (5% for $S_{boot}$ ; 20% total), private selection fully executed on Crypten results in test accuracy of 83.37%, which is even slightly (0.5%) higher than executing on PyTorch.
|
| 212 |
+
|
| 213 |
+
MLP for non-linearity (1) Delay. Our use of MLP reduces the selection delay by two orders of magnitude, e.g. from 3740 hours to around 20 hours for DistilBERT on SST2. This is shown in Figure 7, by the difference between $P$ and $PM$ . (2) Accuracy. The use of MLP incurs minor degradation in the test accuracy. The results are shown in Table 2, by the difference between Ours to NoApprox. On SST2, ours is $0.78\%$ higher with DistilBERT and only $0.46\%$ lower with BERT. On AGNEWS, ours are just $1.24\%$ lower with DistilBERT and $0.93\%$ lower with BERT. On QQP, it's $1.21\%$ and $0.05\%$ higher respectively. Among the three MLPs, softmax in the attention module shows a higher
|
| 214 |
+
|
| 215 |
+
<table><tr><td rowspan="2">Totl
|
| 216 |
+
Phs</td><td rowspan="2">MLP
|
| 217 |
+
dims</td><td colspan="2"># proxy layers</td><td rowspan="2">Selectivity</td><td colspan="2">DistilBERT Accuracy</td><td colspan="2">BERT Accuracy</td></tr><tr><td>DistilBT</td><td>BERT</td><td>SST2</td><td>QQP</td><td>SST2</td><td>QQP</td></tr><tr><td>1</td><td>16</td><td>1</td><td>1</td><td>100%*→20%</td><td>82.91</td><td>71.28</td><td>83.49</td><td>64.48</td></tr><tr><td>2</td><td>2→16</td><td>1→1</td><td>1→3</td><td>100%*→30%→20%</td><td>82.00 (-0.91)</td><td>71.62 (+0.34)</td><td>85.21 (+1.72)</td><td>73.07 (+8.59)</td></tr><tr><td>3</td><td>2→8→16</td><td>1→1→1</td><td>1→3→3</td><td>100%*→50%→30%→20%</td><td>83.37 (+0.46)</td><td>72.90 (+1.62)</td><td>84.52 (+1.03)</td><td>73.48 (+9.00)</td></tr></table>
|
| 218 |
+
|
| 219 |
+
*: include bootstrap data
|
| 220 |
+
|
| 221 |
+
Table 4: Our multi-phase selection improves accuracy in general. Three example schedules (with 1, 2, and 3 total phases, respectively) and their test accuracies are shown.
|
| 222 |
+
|
| 223 |
+
impact on accuracy than the other two. As shown in Table 2 and across all the datasets, by the difference between Ours to NoAttnSM. Using softmax approximation MLP is just $0.75\%$ lower with DistillBERT and $0.99\%$ lower with BERT on average; by the difference between Ours to NoAttnLN, our approximations of LayerNorm only decreases the performance by $0.76\%$ with DistillBERT and $0.16\%$ higher with BERT on average. This is justified by the higher cost that our AttentionSM reduces data communication by $42\times$ , while AttentionLN only reduces $8.25\times$ .
|
| 224 |
+
|
| 225 |
+
Efficacy of multi-phase selection (MPS) We compare MPS to single-phase selection (SPS), in which the proxy model is the same as the one used in the last phase of MPS; it has all our other optimizations. (1) MPS reduces delays significantly. Compared to SPS, the two-phase selection reduces the total delay by $33\% - 61\%$ across all the benchmarks. Because MPS runs a much smaller proxy model in phase 1 to filter most datapoints. The advantage is more pronounced for large models such as BERT, where the efficiency gap between the proxy models in phase 1 is even larger. (2) MPS improves accuracy moderately. We focus on two representative benchmarks SST2 and QQP (binary and multi-label classification). The results are in Table 4. Going from one phase to two/three phases results in tangible accuracy gain (around $1\%$ ); notably BERT sees accuracy gain as high as $1.72\%$ (SST2) and $8.59\%$ (QQP). We attribute the gain to MPS being more selective for the finally selected datapoints, which have been sieved through multiple proxy models, small and big.
|
| 226 |
+
|
| 227 |
+
Sizes of proxy models Multi-layer proxy models increase the selection delay while may improve the test accuracy. Our experiments show that: for small target models on challenging benchmarks (e.g. ViT-small on CIFAR-100), the test accuracy from a three-layer proxy outperforms a one-layer proxy significantly (by $17.33\%$ ); on other benchmarks, $1+$ layers only result in a minor increase in the test accuracy. On CIFAR-100, a three-layer ViT-base proxy model is $11.32\%$ higher than a one-layer with $66.6\%$ lower efficiency. Their accuracies are $0.26\%$ higher than Oracle's on average, but with $4\times$ higher efficiency. It is worth trading some extent of efficiency for much higher accuracy by a multi-layer proxy model, especially on difficult datasets like CIFAR-100.
|
| 228 |
+
|
| 229 |
+
MLP hidden dimensions To decide $d_{i}$ , we conduct a grid search to find the best values, which are included in our selection schedules shown in Table 4. We mainly do this grid search on SST2, validate the hyperparameters on QQP before applying the same settings to other datasets. A higher dimension like 16 has good accuracy on different datasets while not incurring much more latency. Multi-phase selection can reduce lots of latency, hence, we pick hidden dimension combinations that can bring more accuracy gain. For the 2 Phase, we choose (2, 16) which has the highest accuracy on larger datasets and target models, such as BERT on QQP. For the 3 Phase, we choose (2, 8, 16). It has the highest accuracy with DisitilBERT on SST2, with BERT on QQP, and suboptimal accuracy on other experiments.
|
| 230 |
+
|
| 231 |
+
IO scheduling This optimization reduces the end-to-end selection delays by $1.3 - 1.4 \times$ , as shown in Figure 7, the difference between Ours and PMT. The reduction comes from overlapping the MPC computation and the communication rounds. their communication latency is hidden. The reduction depends on hardware: device computation bandwidth and the network latencies.
|
| 232 |
+
|
| 233 |
+
# 6 CONCLUDING REMARKS
|
| 234 |
+
|
| 235 |
+
This paper addresses the private selection of imbalanced, unlabelled data. We propose data selection on MPC, preserving privacy while evaluating data. Overcoming computational challenges, we introduce a data-aware MLP approximation for non-linear modules, tailored to different datasets for reduced latency. Our multi-phase selection mechanism enhances proxy models' efficiency across diverse benchmarks.
|
| 236 |
+
|
| 237 |
+
# ACKNOWLEDGMENT
|
| 238 |
+
|
| 239 |
+
The authors were supported in part by NSF awards #2128725, #1919197, and #2106893; as well as NSF awards #2124538 and #2007492. The authors thank the anonymous reviewers for their insightful feedback.
|
| 240 |
+
|
| 241 |
+
# REFERENCES
|
| 242 |
+
|
| 243 |
+
Nitin Agrawal, Ali Shahin Shamsabadi, Matt J Kusner, and Adrià Gascon. Quotient: two-party secure neural network training and prediction. In Proceedings of the 2019 ACM SIGSAC Conference on Computer and Communications Security, pp. 1231-1247, 2019.
|
| 244 |
+
Donald Beaver. Efficient multiparty protocols using circuit randomization. In Joan Feigenbaum (ed.), Advances in Cryptology — CRYPTO '91, pp. 420–432, Berlin, Heidelberg, 1992. Springer Berlin Heidelberg. ISBN 978-3-540-46766-3.
|
| 245 |
+
Tianlong Chen, Zhenyu Zhang, Xu Ouyang, Zechun Liu, Zhiqiang Shen, and Zhangyang Wang. "bnn - bn = ?": Training binary neural networks without batch normalization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops, pp. 4619-4629, June 2021.
|
| 246 |
+
Tianyu Chen, Hangbo Bao, Shaohan Huang, Li Dong, Binxing Jiao, Daxin Jiang, Haoyi Zhou, Jianxin Li, and Furu Wei. THE-X: Privacy-preserving transformer inference with homomorphic encryption. In Findings of the Association for Computational Linguistics: ACL 2022, pp. 3510-3520, Dublin, Ireland, May 2022. Association for Computational Linguistics. doi: 10.18653/v1/2022.findings-acl.277. URL https://aclanthology.org/2022-findings-acl.277.
|
| 247 |
+
Edward Chou, Josh Beal, Daniel Levy, Serena Yeung, Albert Haque, and Li Fei-Fei. Faster cryptonets: Leveraging sparsity for real-world encrypted inference. arXiv preprint arXiv:1811.09953, 2018.
|
| 248 |
+
Cody Coleman, Christopher Yeh, Stephen Mussmann, Baharan Mirzasoleiman, Peter Bailis, Percy Liang, Jure Leskovec, and Matei Zaharia. Selection via proxy: Efficient data selection for deep learning. arXiv preprint arXiv:1906.11829, 2019.
|
| 249 |
+
Ye Dong, Wen-jie Lu, Yancheng Zheng, Haoqi Wu, Derun Zhao, Jin Tan, Zhicong Huang, Cheng Hong, Tao Wei, and Wenguang Cheng. Puma: Secure inference of llama-7b in five minutes. arXiv preprint arXiv:2307.12533, 2023.
|
| 250 |
+
Yonggan Fu, Qixuan Yu, Yang Zhang, Shang Wu, Xu Ouyang, David Cox, and Yingyan Lin. Drawing robust scratch tickets: Subnetworks with inborn robustness are found within randomly initialized networks. In M. Ranzato, A. Beygelzimer, Y. Dauphin, P.S. Liang, and J. Wortman Vaughan (eds.), Advances in Neural Information Processing Systems, volume 34, pp. 13059-13072. Curran Associates, Inc., 2021. URL https://proceedings.neurips.cc/paper_files/paper/2021/file/6ce8d8f3b038f737cefcdafcf3752452-Paper.pdf.
|
| 251 |
+
Yonggan Fu, Qixuan Yu, Meng Li, Xu Ouyang, Vikas Chandra, and Yingyan Lin. Contrastive quant: quantization makes stronger contrastive learning. In Proceedings of the 59th ACM/IEEE Design Automation Conference, pp. 205-210, 2022.
|
| 252 |
+
O. Goldreich, S. Micali, and A. Wigderson. How to play any mental game. In Proceedings of the Nineteenth Annual ACM Symposium on Theory of Computing, STOC '87, pp. 218-229, New York, NY, USA, 1987. Association for Computing Machinery. ISBN 0897912217. doi: 10.1145/28395.28420. URL https://doi.org/10.1145/28395.28420.
|
| 253 |
+
Ian Goodfellow, Yoshua Bengio, and Aaron Courville. Deep Learning. MIT Press, 2016. http://www.deeplearningbook.org.
|
| 254 |
+
Steven C. H. Hoi, Rong Jin, Jianke Zhu, and Michael R. Lyu. Batch mode active learning and its application to medical image classification. In Proceedings of the 23rd International Conference on Machine Learning, ICML '06, pp. 417-424, New York, NY, USA, 2006. Association for Computing Machinery. ISBN 1595933832. doi: 10.1145/1143844.1143897. URL https://doi.org/10.1145/1143844.1143897.
|
| 255 |
+
|
| 256 |
+
Kurt Hornik, Maxwell Stinchcombe, and Halbert White. Multilayer feedforward networks are universal approximators. Neural networks, 2(5):359-366, 1989.
|
| 257 |
+
Angelos Katharopoulos and François Fleuret. Not all samples are created equal: Deep learning with importance sampling. In International conference on machine learning, pp. 2525-2534. PMLR, 2018.
|
| 258 |
+
Harsurinder Kaur, Husanbir Singh Pannu, and Avleen Kaur Malhi. A systematic review on imbalanced data challenges in machine learning: Applications and solutions. ACM Computing Surveys (CSUR), 52(4):1-36, 2019.
|
| 259 |
+
Brian Knott, Shobha Venkataraman, Awni Hannun, Shubho Sengupta, Mark Ibrahim, and Laurens van der Maaten. Crypten: Secure multi-party computation meets machine learning. Advances in Neural Information Processing Systems, 34:4961-4973, 2021.
|
| 260 |
+
Dacheng Li, Rulin Shao, Hongyi Wang, Han Guo, Eric P Xing, and Hao Zhang. Mpcformer: fast, performant and private transformer inference with mpc. arXiv preprint arXiv:2211.01452, 2022.
|
| 261 |
+
Rafid Mahmood, James Lucas, Jose M. Alvarez, Sanja Fidler, and Marc Law. Optimizing data collection for machine learning. In S. Koyejo, S. Mohamed, A. Agarwal, D. Belgrave, K. Cho, and A. Oh (eds.), Advances in Neural Information Processing Systems, volume 35, pp. 29915-29928. Curran Associates, Inc., 2022. URL https://proceedings.neurips.cc/paper_files/paper/2022/file/c1449acc2e64050d79c2830964f8515f-Paper-Conference.pdf.
|
| 262 |
+
Sören Mindermann, Jan M Brauner, Muhammed T Razzak, Mrinank Sharma, Andreas Kirsch, Winnie Xu, Benedikt Höltgen, Aidan N Gomez, Adrien Morisot, Sebastian Farquhar, et al. Prioritized training on points that are learnable, worth learning, and not yet learnt. In International Conference on Machine Learning, pp. 15630-15649. PMLR, 2022.
|
| 263 |
+
Baharan Mirzasoleiman, Jeff Bilmes, and Jure Leskovec. Coresets for data-efficient training of machine learning models. In International Conference on Machine Learning, pp. 6950-6960. PMLR, 2020.
|
| 264 |
+
Pratyush Mishra, Ryan Lehmkuhl, Akshayaram Srinivasan, Wenting Zheng, and Raluca Ada Popa. Delphi: A cryptographic inference service for neural networks. In 29th USENIX Security Symposium (USENIX Security 20), pp. 2505-2522. USENIX Association, August 2020. ISBN 978-1-939133-17-5. URL https://www.usenix.org/conference/usenixsecurity20/presentation/mishra.
|
| 265 |
+
Payman Mohassel and Yupeng Zhang. Secureml: A system for scalable privacy-preserving machine learning. In 2017 IEEE symposium on security and privacy (SP), pp. 19-38. IEEE, 2017.
|
| 266 |
+
Xu Ouyang, Shahina Mohd Azam Ansari, Felix Xiaozhu Lin, and Yangfeng Ji. Efficient nlp model finetuning via multistage data filtering. arXiv preprint arXiv:2207.14386, 2022.
|
| 267 |
+
Qi Pang, Jinhao Zhu, Helen Möllering, Wenting Zheng, and Thomas Schneider. Bolt: Privacy-preserving, accurate and efficient inference for transformers. In 2024 IEEE Symposium on Security and Privacy (SP), pp. 4753-4771. IEEE, 2024.
|
| 268 |
+
Burr Settles. Active Learning. Synthesis Lectures on Artificial Intelligence and Machine Learning. Morgan & Claypool Publishers, 2012.
|
| 269 |
+
Adi Shamir. How to share a secret. Communications of the ACM, 22(11):612-613, 1979.
|
| 270 |
+
Justin S. Smith, Ben Nebgen, Nicholas Lubbers, Alexandr Isayev, and Adrian E. Roitberg. Less is more: Sampling chemical space with active learning. The Journal of Chemical Physics, 148 (24):241733, 05 2018. ISSN 0021-9606. doi: 10.1063/1.5023802. URL https://doi.org/10.1063/1.5023802.
|
| 271 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. CoRR, abs/1706.03762, 2017. URL http://arxiv.org/abs/1706.03762.
|
| 272 |
+
|
| 273 |
+
Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel R Bowman. Glue: A multi-task benchmark and analysis platform for natural language understanding. arXiv preprint arXiv:1804.07461, 2018.
|
| 274 |
+
Xinlei Xu, Awni Hannun, and Laurens Van Der Maaten. Data appraisal without data sharing. In International Conference on Artificial Intelligence and Statistics, pp. 11422-11437. PMLR, 2022.
|
| 275 |
+
Qiang Yang, Yang Liu, Tianjian Chen, and Yongxin Tong. Federated machine learning: Concept and applications. CoRR, abs/1902.04885, 2019. URL http://arxiv.org/abs/1902.04885.
|
| 276 |
+
Andrew Chi-Chih Yao. How to generate and exchange secrets. In 27th annual symposium on foundations of computer science (Sfcs 1986), pp. 162-167. IEEE, 1986.
|
| 277 |
+
Haoran You, Baopu Li, Zhanyi Sun, Xu Ouyang, and Yingyan Lin. Supertickets: Drawing task-agnostic lottery tickets from supernets via jointly architecture searching and parameter pruning. In European Conference on Computer Vision, pp. 674-690. Springer, 2022.
|
| 278 |
+
Xiang Zhang, Junbo Jake Zhao, and Yann LeCun. Character-level convolutional networks for text classification. In NIPS, 2015.
|
| 279 |
+
|
| 280 |
+
# 7 APPENDIX
|
| 281 |
+
|
| 282 |
+
# 7.1 MLP APPROXIMATION IS TIED TO DATA SELECTION
|
| 283 |
+
|
| 284 |
+
Inspired by the outstanding performance of our MLP approximations for nonlinear modules, one question was raised: is the good performance of MLP approximations because of its inference capability? Our further experiments show that our MLP approximation is tied to data selection, instead of general model inference.
|
| 285 |
+
|
| 286 |
+
Following Li et al. (2022), we replace three nonlinear modules in a BERT-base model with our approximations: Attention Softmax, Attention LayerNorm, and Feedforward Network Layernorm. There are $3^{*}12 = 36$ MLPs in the BERT model. In the experiments, two LayerNorm approximations are always data-aware, while there are both data-aware and fixed approximations of Softmax because of varying attention masks. The BERT with MLP approximation will be fine-tuned on the benchmark before inference.
|
| 287 |
+
|
| 288 |
+
Three versions of attention softmax approximations achieve no better than random guess performances: (1) Using fixed MLP for attention softmax and changing the mask value to -3 instead of a very negative value for simpler distribution. Our BERT with approximation achieves only $52.92\%$ accuracy. (2) Using data-aware attention softmax approximation, which zeros out masked values on MLP outputs, has $49.08\%$ accuracy. If we normalize the remaining values to [0, 1], the accuracy remains $49.08\%$ . To better understand the influence of each nonlinear approximation, we did an ablation study that keeps just one kind of MLPs (12 of them) in BERT. However, none of them achieve better than $50.92\%$ accuracies. We further notice that adding just one attention softmax MLP to the model has no impact on the inference accuracy. But adding one layernorm MLP will degrade the accuracy by $0.85\%$ on average. These results show that having just one MLP will hurt the inference performance a lot; having 12 or even 36 MLPs will degrade model performance drastically. (3) Removing the attention mask to make MLP data-aware. It always has $50.92\%$ accuracies, no matter with all three approximations or just one approximation.
|
| 289 |
+
|
| 290 |
+
The poor inference performance and good data selection performance show that the MLP approximation is specifically suitable for data selection while impractical for model inference directly.
|
| 291 |
+
|
| 292 |
+
# 7.2 COMPARISON WITH BOLT
|
| 293 |
+
|
| 294 |
+
We compare with Bolt (Pang et al., 2024)'s polynomial softmax approximation by replacing MLPs in our 2-phase proxy models while keeping other nonlinear layers intact. This approach ensures the highest softmax accuracy but the largest delay. Bolt achieves an accuracy of $69.04\% \pm 11.86\%$ , ours achieves $84.59\% \pm 0.95\%$ , and MPCFORMER achieves $50.92\%$ . With proxy models trained on $S_{boot}$ , Bolt outperforms MPCFORMER. However, our method surpasses Bolt by $15.55\%$ in accuracy and had a lower standard deviation, demonstrating better robustness against the biased $S_{boot}$ . Notably, if full
|
| 295 |
+
|
| 296 |
+
approximations (e.g., reciprocal and layer normalization) are applied, Bolt's accuracy is expected to decrease further, reducing its effectiveness compared to our methods.
|
| 297 |
+
|
| 298 |
+
# 7.3 ADDITIONAL EXPERIMENTS RESULTS
|
| 299 |
+
|
| 300 |
+

|
| 301 |
+
Figure 8: Multi-phase selection achieves a better trade-off between accuracy and delay in data selection. 2-phase proxy model: 1 layer with 1 attention head and a dimension of 2, 3 layers with 12 attention heads and a dimension of 16; 1-phase proxy model: 3 layers with 12 attention heads and a dimension of 16.
|
| 302 |
+
|
| 303 |
+

|
| 304 |
+
|
| 305 |
+

|
| 306 |
+
|
| 307 |
+

|
| 308 |
+
|
| 309 |
+

|
| 310 |
+
|
| 311 |
+
<table><tr><td rowspan="2"># phases</td><td rowspan="2">#MLP dims</td><td colspan="2">DistilBERT</td><td colspan="2">BERT</td></tr><tr><td>SST2</td><td>QQP</td><td>SST2</td><td>QQP</td></tr><tr><td rowspan="5">1</td><td>2</td><td>83.94</td><td>71.90</td><td>84.52</td><td>64.06</td></tr><tr><td>4</td><td>85.32</td><td>70.06</td><td>83.94</td><td>63.13</td></tr><tr><td>8</td><td>82.11</td><td>73.43</td><td>86.58</td><td>64.20</td></tr><tr><td>16</td><td>82.91</td><td>71.28</td><td>83.49</td><td>64.48</td></tr><tr><td>Average</td><td>83.57</td><td>71.67</td><td>84.63</td><td>63.97</td></tr><tr><td rowspan="5">2</td><td>(2, 2)</td><td>82.91</td><td>72.30</td><td>84.86</td><td>72.79</td></tr><tr><td>(2, 8)</td><td>82.45</td><td>69.84</td><td>81.88</td><td>69.30</td></tr><tr><td>(2, 16)</td><td>82.00</td><td>71.62</td><td>85.21</td><td>73.07</td></tr><tr><td>(4, 16)</td><td>82.57</td><td>72.19</td><td>83.49</td><td>72.56</td></tr><tr><td>Average</td><td>82.48</td><td>71.49</td><td>83.86</td><td>71.93</td></tr><tr><td rowspan="7">3</td><td>(2, 2, 2)</td><td>81.77</td><td>70.92</td><td>83.37</td><td>71.67</td></tr><tr><td>(2, 2, 8)</td><td>80.62</td><td>71.85</td><td>85.55</td><td>71.31</td></tr><tr><td>(2, 2, 16)</td><td>82.11</td><td>72.35</td><td>84.75</td><td>73.08</td></tr><tr><td>(2, 8, 8)</td><td>82.57</td><td>70.79</td><td>85.21</td><td>72.77</td></tr><tr><td>(2, 8, 16)</td><td>83.37</td><td>72.90</td><td>84.52</td><td>73.48</td></tr><tr><td>(2, 16, 16)</td><td>81.65</td><td>71.46</td><td>86.01</td><td>71.75</td></tr><tr><td>Average</td><td>82.01</td><td>71.71</td><td>84.90</td><td>73.47</td></tr></table>
|
| 312 |
+
|
| 313 |
+
Table 5: Multi-phase selection is able to significantly reduce runtime and maintain comparable accuracy. On QQP, three-phase selection achieves $9.5\%$ higher accuracy than using one phase. Main results: 16, (2,16), (2,8,16).
|
| 314 |
+
|
| 315 |
+
<table><tr><td>Benchmarks</td><td colspan="3">SST2</td><td colspan="3">QNLI</td><td colspan="3">QQP</td><td colspan="3">AGNEWS</td><td colspan="3">YELP</td></tr><tr><td>DistillBERT</td><td>Ours</td><td>SelectviaFull</td><td>Random</td><td>Ours</td><td>SelectviaFull</td><td>Random</td><td>Ours</td><td>SelectviaFull</td><td>Random</td><td>Ours</td><td>SelectviaFull</td><td>Random</td><td>Ours</td><td>SelectviaFull</td><td>Random</td></tr><tr><td>20%</td><td>82.80±0.98</td><td>82.32±0.68</td><td>79.08±1.65</td><td>71.12±1.52</td><td>71.44±1.35</td><td>70.34±1.74</td><td>71.63±0.91</td><td>71.51±1.51</td><td>66.18±3.54</td><td>87.75±1.00</td><td>89.19±0.27</td><td>86.43±0.66</td><td>60.04±0.16</td><td>59.93±0.16</td><td>58.09±0.60</td></tr><tr><td>25%</td><td>82.75±1.41</td><td>83.97±1.01</td><td>77.61±0.82</td><td>71.04±1.56</td><td>72.72±1.09</td><td>69.95±0.93</td><td>72.04±0.56</td><td>73.18±1.29</td><td>68.67±1.11</td><td>88.06±1.56</td><td>89.35±0.38</td><td>87.67±0.46</td><td>60.38±0.13</td><td>60.63±0.20</td><td>58.43±0.20</td></tr><tr><td>30%</td><td>83.35±0.59</td><td>83.97±0.77</td><td>78.67±0.23</td><td>71.10±1.05</td><td>72.87±0.92</td><td>70.72±0.94</td><td>72.10±0.73</td><td>74.04±0.52</td><td>69.46±0.58</td><td>88.28±1.71</td><td>89.50±0.32</td><td>88.02±0.72</td><td>60.86±0.21</td><td>61.14±0.21</td><td>58.90±0.27</td></tr><tr><td>40%</td><td>83.30±1.06</td><td>83.88±1.32</td><td>80.21±0.81</td><td>72.03±1.32</td><td>72.92±1.06</td><td>70.92±0.19</td><td>73.43±1.23</td><td>73.97±0.61</td><td>69.76±0.54</td><td>89.72±0.28</td><td>89.73±0.26</td><td>87.81±0.66</td><td>60.92±0.27</td><td>61.15±0.24</td><td>59.13±0.49</td></tr></table>
|
| 316 |
+
|
| 317 |
+
Table 6: Our methods are robust against the increase in purchase budget. We have consistently better accuracy than Random by a large margin and achieve comparable performance with Oracle, up to $40\%$ budget. Ours: 2-phase selection. 1 layer with 1 attention head and a dimension of 2 in phase 1, 3 layers with 12 attention heads and a dimension of 16 in phase 2.
|
| 318 |
+
|
| 319 |
+
<table><tr><td rowspan="2"></td><td colspan="5">DistilBERT</td><td colspan="5">BERT</td></tr><tr><td>SST2</td><td>QNLI</td><td>QQP</td><td>AGNEWS</td><td>YELP</td><td>SST2</td><td>QNLI</td><td>QQP</td><td>AGNEWS</td><td>YELP</td></tr><tr><td>40%</td><td>80.21%±0.81</td><td>70.92%±0.19</td><td>69.76%±0.54</td><td>87.81%±0.66</td><td>59.13%±0.49</td><td>80.99%±1.74</td><td>73.15%±0.99</td><td>71.07%±0.85</td><td>88.36%±0.67</td><td>59.85%±0.55</td></tr><tr><td>50%</td><td>79.79%±1.22</td><td>70.34%±0.70</td><td>71.07%±0.27</td><td>88.48%±0.44</td><td>59.59%±0.23</td><td>80.85%±0.73</td><td>72.98%±1.58</td><td>71.59%±1.20</td><td>88.92%±0.35</td><td>60.06%±0.30</td></tr><tr><td>60%</td><td>80.41%±0.80</td><td>71.47%±1.06</td><td>71.76%±1.08</td><td>88.84%±0.63</td><td>59.73%±0.18</td><td>82.39%±0.95</td><td>73.01%±0.98</td><td>72.28%±0.75</td><td>88.80%±0.86</td><td>59.73%±0.88</td></tr><tr><td>70%</td><td>80.53%±1.68</td><td>71.63%±0.58</td><td>72.92%±0.47</td><td>89.02%±0.20</td><td>59.74%±0.32</td><td>82.78%±0.41</td><td>74.02%±1.35</td><td>72.47%±0.65</td><td>88.73%±0.37</td><td>60.46%±0.33</td></tr><tr><td>80%</td><td>81.08%±0.94</td><td>71.40%±0.79</td><td>72.69%±1.03</td><td>89.42%±0.44</td><td>59.98%±0.24</td><td>83.00%±1.04</td><td>75.29%±0.76</td><td>72.90%±0.44</td><td>89.42%±0.29</td><td>60.56%±0.51</td></tr><tr><td>90%</td><td>82.50%±1.00</td><td>72.39%±0.67</td><td>73.73%±1.08</td><td>89.45%±0.35</td><td>59.96%±0.50</td><td>82.73%±1.40</td><td>74.37%±1.33</td><td>73.22%±1.05</td><td>89.21%±0.23</td><td>60.28%±0.26</td></tr><tr><td>100%</td><td>83.60%±0.92</td><td>73.20%±0.57</td><td>73.85%±0.94</td><td>89.67%±0.23</td><td>60.36%±0.11</td><td>82.78%±1.91</td><td>74.83%±1.84</td><td>73.66%±0.62</td><td>89.58%±0.52</td><td>60.39%±0.60</td></tr></table>
|
| 320 |
+
|
| 321 |
+
Table 7: Accuracies of randomly selecting more data to train the target model. Compared with our selection accuracies in the main body, Random needs much more data. $100\%$ YELP and $90\%$ QQP data is necessary for our $20\%$ selection with DistilBERT; $100\%$ YELP and SST2, $80\%$ QQP and AGNEWS are necessary to match our $20\%$ budget performance of BERT.
|
| 322 |
+
|
| 323 |
+
<table><tr><td rowspan="2"></td><td colspan="5">DistillBERT</td><td colspan="5">BERT</td><td colspan="2">ViT-small</td><td colspan="2">ViT-base</td></tr><tr><td>SST2</td><td>QNLI</td><td>QQP</td><td>AGNEWS</td><td>YELP</td><td>SST2</td><td>QNLI</td><td>QQP</td><td>AGNEWS</td><td>YELP</td><td>Cifar10</td><td>Cifar100</td><td>Cifar10</td><td>Cifar100</td></tr><tr><td>Ours</td><td>82.34±1.01</td><td>71.46±1.06</td><td>71.53±0.77</td><td>88.49±0.55</td><td>60.18±0.20</td><td>84.59±0.95</td><td>73.68±1.64</td><td>72.73±0.60</td><td>89.04±0.43</td><td>61.33±0.40</td><td>96.46±0.25</td><td>69.11±1.16</td><td>96.61±0.17</td><td>68.42±1.44</td></tr><tr><td>Random</td><td>79.08±1.65</td><td>70.34±1.74</td><td>66.18±3.54</td><td>86.43±0.66</td><td>58.09±0.60</td><td>79.58±1.83</td><td>73.56±1.35</td><td>68.84±0.74</td><td>87.85±0.54</td><td>59.16±0.43</td><td>94.69±0.37</td><td>43.99±0.93</td><td>95.63±0.50</td><td>63.21±1.78</td></tr><tr><td>(vs. Ours)</td><td>-3.26</td><td>-1.12</td><td>-5.35</td><td>-2.06</td><td>-2.09</td><td>-5.01</td><td>-0.12</td><td>-3.89</td><td>-1.19</td><td>-2.17</td><td>-1.71</td><td>-25.12</td><td>-0.98</td><td>-5.21</td></tr><tr><td>Oracle</td><td>82.32±0.68</td><td>71.44±1.35</td><td>71.51±1.51</td><td>89.19±0.27</td><td>59.93±0.16</td><td>86.06±0.79</td><td>74.62±1.39</td><td>73.08±1.86</td><td>89.74±0.38</td><td>60.80±1.33</td><td>96.87±0.17</td><td>68.40±1.71</td><td>96.94±0.23</td><td>67.85±1.35</td></tr><tr><td>(vs. Ours)</td><td>-0.02</td><td>-0.02</td><td>-0.02</td><td>+0.70</td><td>-0.25</td><td>+1.47</td><td>+0.94</td><td>+0.35</td><td>+0.70</td><td>-0.53</td><td>+0.41</td><td>-0.71</td><td>+0.33</td><td>-0.57</td></tr></table>
|
| 324 |
+
|
| 325 |
+
Table 8: Ours are consistently higher than Random across all models and benchmarks and are close to Oracle (gold accuracy). Compared with Table 1, standard deviations of 5 runs are added.
|
ICLR/2025/SelectFormer in Data Markets_ Privacy-Preserving and Efficient Data Selection for Transformers with Multi-Party Computation/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c7c540fd2acb0bc43a6ffb5c4797451551277be47c849136569350f5410ae85b
|
| 3 |
+
size 507609
|
ICLR/2025/SelectFormer in Data Markets_ Privacy-Preserving and Efficient Data Selection for Transformers with Multi-Party Computation/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:235619371bb298b78cd385857d29d801f8a460e5d7992a703c1fc6c191a622aa
|
| 3 |
+
size 527638
|
ICLR/2025/Selective Aggregation for Low-Rank Adaptation in Federated Learning/4aacdb1e-5b63-489a-bd6b-47295aea797c_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c977af232579e920d611687df1013fea1c1b17b3624ad6ff67407dbc8c597e0e
|
| 3 |
+
size 167329
|
ICLR/2025/Selective Aggregation for Low-Rank Adaptation in Federated Learning/4aacdb1e-5b63-489a-bd6b-47295aea797c_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ff8aa30d495bb413a624f17c8dcb696f9d99fdc074261fddd3ebe9a02683597b
|
| 3 |
+
size 202243
|
ICLR/2025/Selective Aggregation for Low-Rank Adaptation in Federated Learning/4aacdb1e-5b63-489a-bd6b-47295aea797c_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d0cc1d50db884c936a27ec09d4f48164c18bc2bba1931d4432bd5422302d101c
|
| 3 |
+
size 848435
|
ICLR/2025/Selective Aggregation for Low-Rank Adaptation in Federated Learning/full.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
ICLR/2025/Selective Aggregation for Low-Rank Adaptation in Federated Learning/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e54205c9b5c202b01d929b46836ab6b522533dc2ab9282b7ea53ae4d21835696
|
| 3 |
+
size 1670551
|
ICLR/2025/Selective Aggregation for Low-Rank Adaptation in Federated Learning/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b05c92383128e77b2d666128fd4559e552ceb6ad62423c9143a9dc82e35ed41d
|
| 3 |
+
size 985001
|
ICLR/2025/Selective Attention Improves Transformer/1874d18c-c191-4cef-9212-763683a4a6b1_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1a3d9c6bc0bbb04765d3b05f5458f6218165d7bb930321d0720c6e82541ac16c
|
| 3 |
+
size 129181
|
ICLR/2025/Selective Attention Improves Transformer/1874d18c-c191-4cef-9212-763683a4a6b1_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c38e3ea5ea87f1ba0254281dab0aff16346a958671cd1ab123161715e62f8586
|
| 3 |
+
size 153286
|
ICLR/2025/Selective Attention Improves Transformer/1874d18c-c191-4cef-9212-763683a4a6b1_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1bbb172f670c14069b26a1e83f29c7dc46f87c64431e64c55857bea540905cd7
|
| 3 |
+
size 2425518
|
ICLR/2025/Selective Attention Improves Transformer/full.md
ADDED
|
@@ -0,0 +1,483 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SELECTIVE ATTENTION IMPROVES TRANSFORMER
|
| 2 |
+
|
| 3 |
+
Yaniv Leviathan
|
| 4 |
+
|
| 5 |
+
Google Research
|
| 6 |
+
|
| 7 |
+
leviathan@google.com
|
| 8 |
+
|
| 9 |
+
Matan Kalman
|
| 10 |
+
|
| 11 |
+
Google Research
|
| 12 |
+
|
| 13 |
+
matank@google.com
|
| 14 |
+
|
| 15 |
+
Yossi Matias
|
| 16 |
+
|
| 17 |
+
Google Research
|
| 18 |
+
|
| 19 |
+
yossi@google.com
|
| 20 |
+
|
| 21 |
+
# ABSTRACT
|
| 22 |
+
|
| 23 |
+
Unneeded elements in the attention's context degrade performance. We introduce Selective Attention, a simple parameter-free change to the standard attention mechanism which reduces attention to unneeded elements. Selective attention consistently improves language modeling and downstream task performance in a variety of model sizes and context lengths. For example, transformers trained with the language modeling objective on C4 with selective attention perform language modeling equivalently to standard transformers with $\sim 2\mathbf{X}$ more heads and parameters in their attention modules. Selective attention also allows decreasing the size of the attention's context buffer, leading to meaningful reductions in the memory and compute requirements during inference. For example, transformers trained on C4 with context sizes of 512, 1,024, and 2,048 need 16X, 25X, and 47X less memory for their attention module, respectively, when equipped with selective attention, as those without selective attention, with the same validation perplexity.
|
| 24 |
+
|
| 25 |
+
# 1 INTRODUCTION
|
| 26 |
+
|
| 27 |
+
Different tasks have different memory requirements. On one extreme, copying an arbitrary sequence requires retaining all sequence elements in memory. On the other extreme, determining whether a specific element appeared at least once, only requires persisting a constant amount of memory.
|
| 28 |
+
|
| 29 |
+
Transformers (Vaswani et al., 2017) keep the entire history in their context buffers, allowing them to solve tasks such as copying, while famously leading to their squared attention cost. RNNs (Rumelhart et al., 1986) and their modern structured state space variants (Gu et al., 2022; Gu & Dao, 2024) keep only a constant-sized sketch of the history, making inference cost linear, but rendering them incapable of solving tasks such as arbitrary string copying.
|
| 30 |
+
|
| 31 |
+
Can we design a model that persists just the right amount of context?
|
| 32 |
+
|
| 33 |
+
Several works (see Section 8) aim to improve costs by compressing or otherwise reducing the context size with minimal impact to quality. We take a different approach, focusing instead on quality improvement, and treating cost reductions as a side benefit. Specifically, it has been demonstrated (Leviathan, 2022) that for some tasks removing unneeded elements from the context buffer enables more efficient transformer programs. Indeed, in the attention's differentiable memory, all memory cells contribute to the data read, and circuitry is needed to filter out the noise generated by irrelevant memories. Reducing the amount of circuitry needed should improve performance.
|
| 34 |
+
|
| 35 |
+
In this work we propose Selective Attention, a simple extension to the standard attention mechanism which allows a token to decide that another token is no longer needed, reducing the attention that future tokens will pay to it. Selective attention adds no new parameters and only a negligible amount of computation, yet yields meaningful improvements in synthetic tasks and natural language modeling for a range of model and context sizes. Additionally, we show that elements that are selected to be forgotten by selective attention can be safely removed from the attention's context, leading to substantial reductions in the memory and computation requirements during inference, without penalizing quality. We name our method after the related neuroscience concept of selective attention. Quoting Plebanek & Sloutsky (2017): "Selective attention allows adults to focus on task-relevant information, while ignoring task-irrelevant information. This in turn leads to superior processing of task-relevant information."
|
| 36 |
+
|
| 37 |
+

|
| 38 |
+
|
| 39 |
+

|
| 40 |
+
|
| 41 |
+

|
| 42 |
+
|
| 43 |
+

|
| 44 |
+
Figure 1: A visualization of the masking by selective attention (red strike-through) and attention strength (averaged across heads, blue highlight) for different tasks (see Section 2).
|
| 45 |
+
|
| 46 |
+
# 2 MOTIVATING EXAMPLES
|
| 47 |
+
|
| 48 |
+
Consider a transformer processing an input sequence with three tokens: a, b, c. In a given layer with the standard attention module, token b can decide how much to read from token a, and token c can decide how much to read from token a, but token b cannot affect how much token c reads from token a. Specifically, if token b has determined that token a is irrelevant or even misleading to future tokens such as c, there is nothing it can do in the given layer to correct for this. Even in subsequent layers, masking token a is not trivial. Selective attention enables exactly such masking. To illustrate its usefulness, let's consider the Variable Assignment problem, as well as natural language modeling.
|
| 49 |
+
|
| 50 |
+
In Variable Assignment the input consists of a set of repeated assignments to named variables, followed by a query for the latest value for one of the variables which the model needs to output. For example, for the input: $y = 7$ ; $x = 1$ ; $x = 3$ ; $z = 5$ ; $x = ?$ the output is 3. Note that Variable Assignment can be seen as a generalization of the Search problem (Leviathan, 2022), where repeated occurrences of the query pattern are allowed, and we are tasked with finding the most recent occurrence. It is well known that the Search problem is easily solvable by standard transformers, via induction heads (Olsson et al., 2022). Selective attention facilitates a simple reduction from Variable Assignment to Search, whereby every assignment to a variable masks out all previous assignments to the same variable. In Figure 1 (top) we see that this is indeed the case for a transformer trained with selective attention. In Appendix A.1 we show that a transformer with selective attention easily learns a general solution to Variable Assignment while a standard transformer does not.
|
| 51 |
+
|
| 52 |
+
To motivate selective attention for natural language modeling, we first note that Variable Assignment is a common sub-task, e.g. when persisting a state. For further motivation, consider the common case where a part of the input is ambiguous, and the ambiguity is only resolved at a later token. For example, in the sequence: Bar, #ack, Obama, the first token Bar encodes several competing meanings, but the later tokens #ack and Obama resolve it to the entity for the ex-president. For many tasks that are mostly concerned with the semantic meaning, later tokens might not want to read the ambiguous meaning from the earlier tokens, so masking them, as with selective attention, might be useful. In Figure 1 (bottom) we see that this is indeed the case for a transformer trained with selective attention. In the visualized layer, the last token in multi-token expressions masks out the earlier tokens. For example, #ack masks out bar; Obama masks out both bar and #ack; #bm masks out i; and #la masks out both u and #c. We also observe additional masking, e.g. the token after masks out the tokens a and day, perhaps because the token after absorbed the meaning from the tokens a and day, or perhaps because the model deems the extra detail is not helpful at this point.
|
| 53 |
+
|
| 54 |
+
Figure 1 also shows that for the trivial task of Parity*, where intermediate results are stored every other token, so that the model's output is only a function of the last two tokens, everything but the last two tokens is masked. For the Copy task, selective attention persists the entirety of the string to be copied until copying starts, and then masks out every element as it is copied. See Appendix A.2.
|
| 55 |
+
|
| 56 |
+
# 3 SELECTIVE ATTENTION
|
| 57 |
+
|
| 58 |
+
Selective attention is a simple modification on top of standard attention. The key idea is that tokens can mask previous tokens, i.e. the amount of attention a token $\mathbb{C}$ pays a previous token $\mathbb{a}$ can be reduced by the tokens located between $\mathbb{a}$ and $\mathbb{c}$ . For context size $N$ , we produce a real-valued $N \times N$ masking matrix $S$ where $S_{i,j}$ denotes how much token $x_{i}$ masks token $x_{j}$ (see Section 3.1). We then constrain $S$ , e.g. to be causal and non-negative (see Section 3.2). We finally accumulate the information in matrix $S$ into a new matrix $F$ , taking into account masking by all previous tokens (see Section 3.3). The matrix $F = \mathrm{Accumulate}(\mathrm{Constrain}(S))$ is then simply subtracted from the attention logits before applying the softmax:
|
| 59 |
+
|
| 60 |
+
$$
|
| 61 |
+
\operatorname {S e l e c t i v e A t t e n t i o n} (Q, K, V) = \operatorname {s o f t m a x} \left(\frac {Q K ^ {T}}{\sqrt {d _ {k}}} - F\right) V \tag {1}
|
| 62 |
+
$$
|
| 63 |
+
|
| 64 |
+
Figure 2 illustrates a sketch implementation.
|
| 65 |
+
|
| 66 |
+
# 3.1 SELECTION FUNCTION
|
| 67 |
+
|
| 68 |
+
Computing the selection matrix $S$ is akin to computing a compatibility score, and many functions can be used, for example, a separate bilinear form. Following an observation from Leviathan (2022) that a common case for a token wanting to mask another is after absorbing its contents (i.e. after attending to it), we instead simply reuse the result of one of the existing heads of the attention module. This means that the selection function adds no new parameters or computation. Note that the head still contributes to attention as usual. We also experimented with a separate bilinear form, and in spite of adding additional parameters and computation, this resulted in the same or slightly worse results (see Appendix A.3).
|
| 69 |
+
|
| 70 |
+
# 3.2 CONSTRAINTS
|
| 71 |
+
|
| 72 |
+
Following observations from Leviathan (2022), we apply the following constraints to $S$ :
|
| 73 |
+
|
| 74 |
+
1. Zero out negative values (i.e. applying ReLU), only reducing attention, never boosting it.
|
| 75 |
+
2. Zero out the first column, so as not to mask the $<\text{BOS}>$ token.
|
| 76 |
+
3. Zero out the diagonal, so as not to let a token mask itself.
|
| 77 |
+
|
| 78 |
+
We observe that all three constraints improve performance (see Appendix A.5).
|
| 79 |
+
|
| 80 |
+
# 3.3 ACCUMULATION
|
| 81 |
+
|
| 82 |
+
In this work we focus on transformer decoders, so selective attention cannot influence the attention operation by past tokens. We chose cumulative summation as our accumulation function. We observe some improvement by only applying the masking for future tokens (i.e. the masking by a token would not affect its own attention operation), so $F_{i,j} = \sum_{k\leq i - 1}S_{k,j}$ (see ablation in Appendix A.4).
|
| 83 |
+
|
| 84 |
+
```txt
|
| 85 |
+
...
|
| 86 |
+
attn_logits $=$ einsum("bhnd,bhmd->bhnm",Q,K)/sqrt(dk)
|
| 87 |
+
attn_logits $=$ where(causal_mask,attn_logits,float(-inf"))
|
| 88 |
+
S $=$ attn_logits[:0] #Selecthead0.
|
| 89 |
+
S $=$ relu(S) #Onlypositiveselection.
|
| 90 |
+
$\mathrm{S}[\dots ,0] = 0$ #Do not mask<BOS>.
|
| 91 |
+
$\mathrm{S} = (1 - \mathrm{eye}(\mathrm{n}))\star \mathrm{S}$ #Do not mask self.
|
| 92 |
+
$\mathrm{S} = \mathrm{roll}(\mathrm{S},1, - 2);\mathrm{S}[\dots ,0,:] = 0$ #Mask strictly in the future.
|
| 93 |
+
F $=$ np.cumsum(S, axis=-2) #Accumulate.
|
| 94 |
+
attn_logits $= = F[:$ None]
|
| 95 |
+
attnweights $=$ softmax(attn_logits)
|
| 96 |
+
...
|
| 97 |
+
```
|
| 98 |
+
|
| 99 |
+
Figure 2: A sketch implementation of selective attention. The colored lines are the additions to standard attention.
|
| 100 |
+
|
| 101 |
+
# 4 CONTEXT PRUNING
|
| 102 |
+
|
| 103 |
+
As presented in Section 3, while beneficial to model quality, selective attention has negligible impact on inference efficiency<sup>1</sup>. However, an additional modification can improve inference efficiency substantially. Specifically, selective attention can reduce the memory and computation requirements of the attention module, via pruning elements from the context buffer.
|
| 104 |
+
|
| 105 |
+
To see how, note that once a token is sufficiently masked by selective attention, it will not contribute meaningfully to any future attention operations. Such tokens can be safely evicted from the context buffer. We could pick a fixed threshold, and prune all elements whose soft masking is higher than the threshold (i.e. $F_{i,j} > \tau$ ), but that would make the memory savings hard to take advantage of (e.g.
|
| 106 |
+
|
| 107 |
+
due to fragmentation and a variable number of dropped tokens each iteration). Instead, we observe that the sparsity (i.e. the magnitude of the masking) per layer is stable across samples (see Section 7). To that effect we set a fixed memory budget for each layer, which directly translates to memory and compute savings. Since when a token is dropped it remains dropped for all future tokens, given a memory budget of $K = K_{1}, \ldots, K_{L}$ tokens for each layer, when processing the first $K_{l}$ tokens in layer $l$ we drop nothing, and for each following token we drop the single not-yet-dropped past token with the highest $F$ value. This maintains no more than $K_{l}$ tokens in layer $l$ . Given an overall memory budget, we allocate it between the layers, using a greedy iterative approach. For context size $N$ , we initialize $K_{1}^{0} = N, \ldots, K_{L}^{0} = N$ . In each iteration $t$ , we set $K_{n}^{t} = K_{n}^{t-1}$ for all $n \neq m$ , and $K_{m}^{t} = K_{m}^{t-1} - C$ for a constant $C$ (we use 8 in our experiments), where $m = \operatorname{argmin}_{i} \mathcal{L}\left(\cdot | K^{t-1}_{i} - C_{i}\right)$ , where $C_{i} = (0, \ldots, 0, C, 0, \ldots, 0)$ contains $C$ at the $i$ th position. In other words, we iteratively reduce the memory budget of the layer that impacts model performance the least. We stop when model performance reaches a predefined threshold, in our experiments, the performance of a standard transformer without selective attention.
|
| 108 |
+
|
| 109 |
+
Note that with a low memory budget there might be some discrepancy between training and inference. Fine tuning the model after the budgets have been set (or even better, in each iteration) might be advantageous and lead to larger reductions in memory budgets, but we haven't experimented with this setup yet.
|
| 110 |
+
|
| 111 |
+
As selective attention's masking is beneficial for the model, we observe significant reductions in context sizes without any auxiliary losses (see Section 6.2). Nevertheless, we can further encourage the model to mask out more elements by adding an explicit term to the loss, like so:
|
| 112 |
+
|
| 113 |
+
$$
|
| 114 |
+
\mathcal {L} _ {m e m} = \mathcal {L} + \epsilon \cdot \frac {\sum_ {l = 1} ^ {L} \max _ {i} M _ {i} ^ {l}}{L \cdot n _ {\neq p a d}} \tag {2}
|
| 115 |
+
$$
|
| 116 |
+
|
| 117 |
+
Where $\mathcal{L}$ is the standard loss (log-perplexity in the case of language modeling), $\epsilon$ is a small weight factor (in our experiments we set $\epsilon = 0.1$ without further tuning), $L$ is the number of layers, $n_{\neq pad}$ is the number of non-pad tokens, and $M_i^l = i - \sum_{k=1}^{i} \min(F_{i,k}^l, \tau) / \tau$ is our approximation for the memory requirements at the $i$ th token for layer $l$ ( $0 \leq M_i^l \leq i$ ). We clamp $F_{i,k}^l$ from above by $\tau$ so as not to reward increasing it indefinitely ( $F$ is already clamped from below to 0). We set $\tau = 1$ without further tuning. Since the memory required for a given layer is the maximum memory required for each of the tokens, the loss only considers the maximum among the $M_i^l$ s. We observe further reduction in context sizes with this explicit loss term (see Section 6.2).
|
| 118 |
+
|
| 119 |
+
# 5 EXPERIMENTAL SETUP
|
| 120 |
+
|
| 121 |
+
In all of our experiments we use a decoder-only transformer with multi-head attention, as in Vaswani et al. (2017), with the following modifications: we use Pre-LN instead of Post-LN (Xiong et al., 2020), learned position encoding, SwiGLU gates instead of MLPs (Shazeer, 2020), normalize the Q and K projections (Dehghani et al., 2023) $^{2}$ , remove the biases (Raffel et al., 2023), and replace the LayerNorms with RMSNorm (Zhang & Sennrich, 2019). Note that we tested other variants, including a vanilla decoder-only transformer exactly as in (Radford et al., 2019) and observed similar results. We trained our models with the AdamW optimizer with $\beta_{1} = 0.9$ and $\beta_{2} = 0.999$ for a total of 524,288 steps. We used cosine decay and 1,000 linear warmup steps and a learning rate of 0.005. We repeated some of the experiments with different learning rates and obtained similar results. We used a batch size of 256 and a fixed context size of 512 for all training runs except for the context size experiments (Figure 3 left) where we used a batch of 128. We follow Esser et al. (2024), and parameterize a model size by a parameter $d$ such that $d_{model} = 64d$ and $n_{heads} = n_{layers} = d$ (see Table 8 in Appendix A.13). We trained all of our models on TPUv4s. For the language modeling experiments, we used the C4 (Raffel et al., 2023) dataset with a vocabulary of size 8K tokens built with the SentencePiece tokenizer (Kudo & Richardson, 2018). We repeated some of the experiments with a vocabulary of size 32K and observed similar results. We also ran experiments with WikiText (Merit et al., 2016), and lm1b (Chelba et al., 2014) and observed similar results.
|
| 122 |
+
|
| 123 |
+
# 6 RESULTS
|
| 124 |
+
|
| 125 |
+
# 6.1 GENERATION QUALITY
|
| 126 |
+
|
| 127 |
+
Transformers with selective attention perform consistently better, as measured by perplexity on the validation set, across model and context sizes. We also observe consistent improvements on a set of downstream tasks.
|
| 128 |
+
|
| 129 |
+
Figure 3 (left) compares the validation perplexity for causal language modeling on the C4 dataset of decoder-only $d = 12$ transformer models with and without selective attention, for varying context sizes. Likewise Figure 3 (right) compares validation perplexity with and without selective attention, for varying model sizes with a context length of 512. We observe improvements across model sizes, and that the improvements grow with the size of the context.
|
| 130 |
+
|
| 131 |
+

|
| 132 |
+
Figure 3: (Left) The validation perplexity of a $d = 12$ transformer, with (blue) and without (orange) selective attention, for varying context sizes. (Right) The validation perplexity of transformers of various sizes, with (blue) and without (orange) selective attention, for a context size of 512.
|
| 133 |
+
|
| 134 |
+

|
| 135 |
+
|
| 136 |
+
Figure 4 shows that even when equipped with additional attention heads (and increasing the parameters of the attention module proportionally, so that the size of each head remains constant), transformers with standard attention only become comparable to those with selective attention, when they have about double the number of heads (and parameters) as their selective attention counterparts.
|
| 137 |
+
|
| 138 |
+

|
| 139 |
+
Figure 4: Perplexity of transformers of various sizes with and without selective attention. For the cases without selective attention we add additional attention heads with their respective parameters (i.e. increase the sizes of all projection matrices). Transformers with selective attention perform equivalently to those with standard attention with $\sim 2\mathrm{X}$ as many heads and parameters.
|
| 140 |
+
|
| 141 |
+
In addition to perplexity on the validation set, we also measure model accuracy on the ARC (Clark et al., 2018), HellaSwag (Zellers et al., 2019), PiQA (Bisk et al., 2019), CommonSenseQA (Talmor et al., 2019), and OpenBookQA (Mihaylov et al., 2018) benchmarks, with and without selective attention, for models of various sizes (see Table 1). We observe consistent improvements across all model sizes with selective attention.
|
| 142 |
+
|
| 143 |
+
Table 1: Accuracy numbers for baseline transformers with standard attention and transformers with selective attention for various model sizes and downstream tasks.
|
| 144 |
+
|
| 145 |
+
<table><tr><td></td><td colspan="2">ARC (Easy)</td><td colspan="2">ARC (Challenge)</td><td colspan="2">HellaSwag</td></tr><tr><td></td><td>Base</td><td>Selective</td><td>Base</td><td>Selective</td><td>Base</td><td>Selective</td></tr><tr><td>d = 16</td><td>38.46%</td><td>39.33%</td><td>23.24%</td><td>23.24%</td><td>38.83%</td><td>40.01%</td></tr><tr><td>d = 18</td><td>40.48%</td><td>41.10%</td><td>24.67%</td><td>24.86%</td><td>41.77%</td><td>42.60%</td></tr><tr><td>d = 20</td><td>41.33%</td><td>41.85%</td><td>25.14%</td><td>25.52%</td><td>43.97%</td><td>45.08%</td></tr><tr><td>d = 22</td><td>42.43%</td><td>42.70%</td><td>25.83%</td><td>26.41%</td><td>46.04%</td><td>47.71%</td></tr><tr><td>d = 24</td><td>43.83%</td><td>44.47%</td><td>26.64%</td><td>26.76%</td><td>48.70%</td><td>50.32%</td></tr><tr><td>d = 26</td><td>44.70%</td><td>45.58%</td><td>26.37%</td><td>26.95%</td><td>51.02%</td><td>52.25%</td></tr><tr><td>d = 28</td><td>45.64%</td><td>46.95%</td><td>26.76%</td><td>27.37%</td><td>53.50%</td><td>53.76%</td></tr><tr><td></td><td colspan="2">CommonSenseQA</td><td colspan="2">OpenBookQA</td><td colspan="2">PiQA</td></tr><tr><td></td><td>Base</td><td>Selective</td><td>Base</td><td>Selective</td><td>Base</td><td>Selective</td></tr><tr><td>d = 16</td><td>25.44%</td><td>25.82%</td><td>34.26%</td><td>34.33%</td><td>68.07%</td><td>68.49%</td></tr><tr><td>d = 18</td><td>26.45%</td><td>26.69%</td><td>35.32%</td><td>35.42%</td><td>69.05%</td><td>69.88%</td></tr><tr><td>d = 20</td><td>26.30%</td><td>26.63%</td><td>35.42%</td><td>35.27%</td><td>69.82%</td><td>70.49%</td></tr><tr><td>d = 22</td><td>26.56%</td><td>27.10%</td><td>35.96%</td><td>36.88%</td><td>70.55%</td><td>71.43%</td></tr><tr><td>d = 24</td><td>27.49%</td><td>27.49%</td><td>36.36%</td><td>37.13%</td><td>71.34%</td><td>71.95%</td></tr><tr><td>d = 26</td><td>27.70%</td><td>27.78%</td><td>37.64%</td><td>37.52%</td><td>71.89%</td><td>72.47%</td></tr><tr><td>d = 28</td><td>27.86%</td><td>28.51%</td><td>37.33%</td><td>37.54%</td><td>72.32%</td><td>72.85%</td></tr></table>
|
| 146 |
+
|
| 147 |
+
# 6.2 INFERENCE EFFICIENCY
|
| 148 |
+
|
| 149 |
+
Efficiency improvements via selective attention stem from a reduction in the attention module's context size when using pruning as in Section 4. Specifically, a smaller context translates directly to more efficient inference in common scenarios. Indeed, note that during inference with a large context and batch size $(bn >> d)$ , loading the KV-cache (linear in the size of the context) dominates the memory bandwidth (Pope et al., 2022), which is often the bottleneck for generation (Shazeer, 2019). In addition, for very large context sizes $(n >> d)$ , taking the dot product of the query and the keys in the cache and calculating the weighted average of the values in the cache both dominate compute, i.e., in this setup, a smaller context directly translates to similar gains in FLOPs.
|
| 150 |
+
|
| 151 |
+
When pruning the context with selective attention, we measure substantial improvements in the memory requirements for the attention module, at the same or better perplexity than the baseline without selective attention. Figure 6 in Appendix A.6 illustrates the trade-off between perplexity and efficiency.
|
| 152 |
+
|
| 153 |
+
For example, for $d = 12$ transformers with context sizes of 512, 1,024, and 2,048, we see that with selective attention we can maintain the baseline's perplexity while reducing the memory requirements of the attention module by factors of 5X, 7X, and 8X respectively, without any explicit losses (i.e. using only the standard language modeling objective). When training with the $\mathcal{L}_{mem}$ loss (Equation 2) and an $\epsilon$ value of 0.1, the improvements grow to 16X, 25X, and 47X respectively. We also measure the memory savings when considering only very long examples by filtering C4 to only include examples that are at least $90\%$ the size of the context buffer. In that settings we get memory savings of 12X, 18X, and 24X, while maintaining the perplexity of the baseline without selective attention. To maintain the perplexity gains of selective attention, instead of matching the perplexity of the baseline (i.e. the rightmost point on the flat part of the blue graphs of Figure 6), we need 3X, 4X and 4X less memory, for the context sizes above, respectively.
|
| 154 |
+
|
| 155 |
+
In all cases above, we optimized the per-layer budgets on a training set and reported results on a separate unseen test set.
|
| 156 |
+
|
| 157 |
+
Finally, we compare selective attention to other attention variants and pruning methods and observe that it achieves a substantially better quality-cost trade-off than all baselines (see Appendix A.10).
|
| 158 |
+
|
| 159 |
+
# 7 SELECTION PATTERNS
|
| 160 |
+
|
| 161 |
+
It is interesting to question which elements from the context are being masked by selective attention for language modeling. Figure 5 illustrates the values of the $F$ matrix for a specific example (see Appendix A.7 for the full example text). We observe that some layers (e.g. 6) are mostly dense (i.e. low $F$ values), while other layers (e.g. 2) are sparse (i.e. high $F$ values). As expected, all layers persist some of the most recent elements, but several of the sparse layers (e.g. layers 1, 4, and 9) also persist elements for long time periods, as can be seen by the vertical lines. This suggests that simply limiting the attention module to a local window would not result in the same quality gains as those achieved by selective attention, which we confirm in Appendix A.8.
|
| 162 |
+
|
| 163 |
+

|
| 164 |
+
Figure 5: Visualization of the $F$ matrix (greener is lower, i.e. less masking) for a $d = 12$ transformer for the text in Appendix A.7.
|
| 165 |
+
|
| 166 |
+
Figure 9 in Appendix A.12 illustrates the values of the $F$ matrix averaged over 1,000 examples, and demonstrates that the sparsity patterns are stable across examples. Interestingly, we observe that these sparsity patterns are sometimes stable across different training runs, hinting at some general properties of language modeling (see Figure 10 in Appendix A.12).
|
| 167 |
+
|
| 168 |
+
Figure 11 in Appendix A.12 depicts the items remaining in the context buffer after pruning (see Section 4), with a budget set to match the perplexity of a standard transformer. We observe that the per-layer budgets correspond well to the values of the $F$ matrix as seen in Figures 5 and 9. For example, layer 6 which gets the highest budget also has the lowest $F$ values. This might indicate that the scales of the $F$ values are consistent across layers.
|
| 169 |
+
|
| 170 |
+
Figure 12 in Appendix A.12 illustrates the value of the last row of $F$ (i.e. the masking for the 512th token) for each of the layers. We observe some interesting patterns, for example, layer 4 persists the end-of-sentence periods ('').
|
| 171 |
+
|
| 172 |
+
# 8 RELATED WORKS
|
| 173 |
+
|
| 174 |
+
Transformer Improvements. Our work aims at improving the transformer architecture. Since its introduction in Vaswani et al. (2017), a large volume of research proposed architecture modifications towards an improved model. Some notable works here include Pre-LN instead of Post-LN (Xiong et al., 2020), gated units instead of MLPs (Shazeer, 2020), removing the biases (Raffel et al., 2023), using RMSNorm instead of LayerNorm (Zhang & Senrich, 2019), normalizing the Q and K projections (Dehghani et al., 2023), and multi-query and group-query attention (Shazeer, 2019; Ainslie et al., 2023).
|
| 175 |
+
|
| 176 |
+
Attention Modifications. Our work focuses on modifying the attention module. Most of the existing research work around modifying attention focuses on a different goal than ours, specifically on devising more efficient attention variants. Some such variants are based on approximations to the attention operations and include sparse attention approximations (Child et al., 2019; Ding et al., 2023), and linear attention approximations (Shen et al., 2024; Katharopoulos et al., 2020; Schlag et al., 2021). Some works focus on hardware-aware optimizations instead, such as FlashAttention (Dao et al., 2022) and Ring Attention (Liu et al., 2023a).
|
| 177 |
+
|
| 178 |
+
Context Pruning. A part of our work (Section 4) consists of removing elements from the context buffer. Several works employ this mechanism in order to increase inference efficiency. Among those are compression methods, that aim to learn a compressed representation for tokens in the context buffer, with or without auxiliary losses, in order to replace several tokens with their compressed form (Munkhdalai et al., 2024; Ren et al., 2023; Yun et al., 2023; Mu et al., 2024; Rae et al., 2019). Another line of work tries to simply remove elements from the context buffer without replacing them with new compressed forms, with minimal negative impact to model quality. The simplest and most widely adopted of these is using local attention windows in some of the layers (Wang et al., 2019; Beltagy et al., 2020; Zaheer et al., 2021). More sophisticated variants employ heuristics to evict less useful tokens from the context buffer instead of just the earliest ones (Oren et al., 2024; Zhang et al., 2023; Liu et al., 2023b; Berchansky et al., 2023; Ge et al., 2024). Anagnostidis et al. (2024) fine tunes existing models to learn to prune tokens from the context buffer with similarities to selective attention, but is more involved (e.g. needs root solving for evaluating the $\alpha$ -sigmoid), produces binary prune decisions, and notably doesn't improve quality.
|
| 179 |
+
|
| 180 |
+
Inference Efficiency. A part of our work (Section 4) consists of making inference from transformers more efficient. Many approaches aim to speed up inference from transformers, including distillation (Hinton et al., 2015), sparsification (Jaszczur et al., 2021), quantization (Hubara et al., 2016), architecture modification (So et al., 2022; Shazeer, 2019), and algorithmic optimization (Dao et al., 2022; Leviathan et al., 2022).
|
| 181 |
+
|
| 182 |
+
Finally, we note that the importance of learning to forget has been shown repeatedly in many works, more generally beyond transformers. One of many notable examples are the forget-gates in LSTMs (Hochreiter & Schmidhuber, 1997).
|
| 183 |
+
|
| 184 |
+
# 9 DISCUSSION
|
| 185 |
+
|
| 186 |
+
In this work we introduced Selective Attention, a simple parameter-free change to the standard attention mechanism which consistently improves language modeling performance across model sizes and context lengths, and can lead to substantial inference efficiency improvements. Given that it adds no new parameters, only a negligible amount of compute, and provides consistent improvements, selective attention might be a good default for transformer decoders.
|
| 187 |
+
|
| 188 |
+
Future directions. We applied selective attention to decoder-only transformers. It could be interesting to investigate its applicability to encoders as well (see Appendix A.9 for initial results in an encoder-decoder setup); Reducing the size of the context as in Section 4 improves inference efficiency but not training efficiency. It might be interesting to explore iteratively reducing the size of the context buffer during training; We did not further train the models after removing elements as per Section 4. It seems conceivable that further improvements could be achieved with some additional training after context reduction; We only experimented with pre-training models with selective attention. It is interesting to investigate how it could be applied in a fine-tuning step to existing models; While we observed similar results with selective attention in several setups (Section 5), there are
|
| 189 |
+
|
| 190 |
+
still important variants we did not test, notably transformers with multi-query (Shazeer, 2019) and grouped-query (Ainslie et al., 2023) attention, as well as models much larger than 1B parameters; Finally, selective attention can be implemented in a GPU-aware way, similar to Flash Attention (Dao et al., 2022).
|
| 191 |
+
|
| 192 |
+
# 10 IMPROVING NEURAL ARCHITECTURES
|
| 193 |
+
|
| 194 |
+
In The Art of Transformer Programming, Leviathan (2022) selected a set of foundational problems (sorting, searching, addition, etc.) and manually implemented transformers to solve them (i.e. by manually setting the model's weights). They showed that several programs become much easier, especially for small transformers, when equipped with a mechanism allowing to selectively mask items in the context buffer, similar to selective attention. They further hypothesized that such a mechanism will have similar positive effects on language modeling, which motivated our work.
|
| 195 |
+
|
| 196 |
+
Zhou et al. (2023) proposed the RASP-Generalization Conjecture, that "Transformers tend to length generalize on a task if the task can be solved by a short RASP program which works for all input lengths", i.e. that problems that are easily solved by transformers are those that are easily solved by human programmers using RASP. It follows that problems that are not easily solved by humans using RASP are hard for transformers as well, and if we made those easier, by changing the transformer architecture (and respectively the capabilities of RASP) we could meaningfully improve transformers. Similarly, when constructing transformer programs by hand, Leviathan (2022) notes that "...the most interesting cases are those that are hard for us humans and are hard for the optimizer or the architecture, and understanding these better might be key to creating better AI systems."
|
| 197 |
+
|
| 198 |
+
We are strong advocates of this method, and believe that finding basic problems for which we cannot program a general solution by hand on a neural model, is a fertile approach for architecture improvements.
|
| 199 |
+
|
| 200 |
+
# ACKNOWLEDGMENTS
|
| 201 |
+
|
| 202 |
+
We'd like to extend a huge thank you to Raya Leviathan, Blake Hechtman, Asaf Aharoni, Uri Mendlovic, Danny Lumen, Avinatan Hassidim, Dani Valevski, Eyal Segalis, Molad Eyal, the Theta Labs and Google Research teams, and our families for insightful feedback, ideas, suggestions, and support.
|
| 203 |
+
|
| 204 |
+
# REFERENCES
|
| 205 |
+
|
| 206 |
+
Joshua Ainslie, James Lee-Thorp, Michiel de Jong, Yury Zemlyanskiy, Federico Lebrón, and Sumit Sanghai. Gqa: Training generalized multi-query transformer models from multi-head checkpoints, 2023. URL https://arxiv.org/abs/2305.13245.
|
| 207 |
+
Sotiris Anagnostidis, Dario Pavllo, Luca Biggio, Lorenzo Noci, Aurelien Lucchi, and Thomas Hofmann. Dynamic context pruning for efficient and interpretable autoregressive transformers, 2024. URL https://arxiv.org/abs/2305.15805.
|
| 208 |
+
Iz Beltagy, Matthew E. Peters, and Arman Cohan. Longformer: The long-document transformer, 2020. URL https://arxiv.org/abs/2004.05150.
|
| 209 |
+
Moshe Berchansky, Peter Izsak, Avi Caciularu, Ido Dagan, and Moshe Wasserblat. Optimizing retrieval-augmented reader models via token elimination, 2023. URL https://arxiv.org/abs/2310.13682.
|
| 210 |
+
Yonatan Bisk, Rowan Zellers, Ronan Le Bras, Jianfeng Gao, and Yejin Choi. Piaq: Reasoning about physical commonsense in natural language, 2019. URL https://arxiv.org/abs/1911.11641.
|
| 211 |
+
Ciprian Chelba, Tomas Mikolov, Mike Schuster, Qi Ge, Thorsten Brants, Phillip Koehn, and Tony Robinson. One billion word benchmark for measuring progress in statistical language modeling, 2014. URL https://arxiv.org/abs/1312.3005.
|
| 212 |
+
Rewon Child, Scott Gray, Alec Radford, and Ilya Sutskever. Generating long sequences with sparse transformers, 2019. URL https://arxiv.org/abs/1904.10509.
|
| 213 |
+
Peter Clark, Isaac Cowhey, Oren Etzioni, Tushar Khot, Ashish Sabharwal, Carissa Schoenick, and Oyvind Tafjord. Think you have solved question answering? try arc, the ai2 reasoning challenge, 2018. URL https://arxiv.org/abs/1803.05457.
|
| 214 |
+
Tri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra, and Christopher Ré. Flashattention: Fast and memory-efficient exact attention with io-awareness, 2022. URL https://arxiv.org/abs/2205.14135.
|
| 215 |
+
Mostafa Dehghani, Josip Djolonga, Basil Mustafa, Piotr Padlewski, Jonathan Heek, Justin Gilmer, Andreas Steiner, Mathilde Caron, Robert Geirhos, Ibrahim Alabdulmohsin, Rodolphe Jenatton, Lucas Beyer, Michael Tschannen, Anurag Arnab, Xiao Wang, Carlos Riquelme, Matthias Minderer, Joan Puigcerver, Utku Evci, Manoj Kumar, Sjoerd van Steenkiste, Gamaeldin F. Elsayed, Aravindh Mahendran, Fisher Yu, Avital Oliver, Fantine Huot, Jasmijn Bastings, Mark Patrick Collier, Alexey Gritsenko, Vighnesh Birodkar, Cristina Vasconcelos, Yi Tay, Thomas Mensink, Alexander Kolesnikov, Filip Pavetic, Dustin Tran, Thomas Kipf, Mario Lucic, Xiaohua Zhai, Daniel Keysers, Jeremiah Harmsen, and Neil Houlsby. Scaling vision transformers to 22 billion parameters, 2023. URL https://arxiv.org/abs/2302.05442.
|
| 216 |
+
Jiayu Ding, Shuming Ma, Li Dong, Xingxing Zhang, Shaohan Huang, Wenhui Wang, Nanning Zheng, and Furu Wei. Longnet: Scaling transformers to 1,000,000,000 tokens, 2023. URL https://arxiv.org/abs/2307.02486.
|
| 217 |
+
Patrick Esser, Sumith Kulal, Andreas Blattmann, Rahim Entezari, Jonas Müller, Harry Saini, Yam Levi, Dominik Lorenz, Axel Sauer, Frederic Boesel, Dustin Podell, Tim Dockhorn, Zion English, Kyle Lacey, Alex Goodwin, Yannik Marek, and Robin Rombach. Scaling rectified flow transformers for high-resolution image synthesis, 2024. URL https://arxiv.org/abs/2403.03206.
|
| 218 |
+
Suyu Ge, Yunan Zhang, Liyuan Liu, Minjia Zhang, Jiawei Han, and Jianfeng Gao. Model tells you what to discard: Adaptive kv cache compression for llms, 2024. URL https://arxiv.org/abs/2310.01801.
|
| 219 |
+
Albert Gu and Tri Dao. Mamba: Linear-time sequence modeling with selective state spaces, 2024.
|
| 220 |
+
Albert Gu, Karan Goel, and Christopher Ré. Efficiently modeling long sequences with structured state spaces, 2022.
|
| 221 |
+
|
| 222 |
+
Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network, 2015. URL https://arxiv.org/abs/1503.02531.
|
| 223 |
+
Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8): 1735-1780, 1997.
|
| 224 |
+
Itay Hubara, Matthieu Courbariaux, Daniel Soudry, Ran El-Yaniv, and Yoshua Bengio. Quantized neural networks: Training neural networks with low precision weights and activations, 2016. URL https://arxiv.org/abs/1609.07061.
|
| 225 |
+
Sebastian Jaszczur, Aankanksha Chowdhery, Afroz Mohiuddin, Lukasz Kaiser, Wojciech Gajewski, Henryk Michalewski, and Jonni Kanerva. Sparse is enough in scaling transformers, 2021. URL https://arxiv.org/abs/2111.12763.
|
| 226 |
+
Angelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, and François Fleuret. Transformers are rnns: Fast autoregressive transformers with linear attention, 2020. URL https://arxiv.org/abs/2006.16236.
|
| 227 |
+
Taku Kudo and John Richardson. Sentencepiece: A simple and language independent subword tokenizer and tokenizer for neural text processing, 2018. URL https://arxiv.org/abs/1808.06226.
|
| 228 |
+
Yaniv Leviathan. The art of transformer programming, 2022. URL https://yanivle.github.io/taotp.html.
|
| 229 |
+
Yaniv Leviathan, Matan Kalman, and Yossi Matias. Fast inference from transformers via speculative decoding, 2022. URL https://arxiv.org/abs/2211.17192.
|
| 230 |
+
Hao Liu, Matei Zaharia, and Pieter Abbeel. Ring attention with blockwise transformers for near-infinite context, 2023a. URL https://arxiv.org/abs/2310.01889.
|
| 231 |
+
Zichang Liu, Aditya Desai, Fangshuo Liao, Weitao Wang, Victor Xie, Zhaozhuo Xu, Anastasios Kyrillidis, and Anshumali Shrivastava. Scissorhands: Exploiting the persistence of importance hypothesis for llm kv cache compression at test time, 2023b. URL https://arxiv.org/abs/2305.17118.
|
| 232 |
+
Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. Pointer sentinel mixture models, 2016. URL https://arxiv.org/abs/1609.07843.
|
| 233 |
+
Todor Mihaylov, Peter Clark, Tushar Khot, and Ashish Sabharwal. Can a suit of armor conduct electricity? a new dataset for open book question answering, 2018. URL https://arxiv.org/abs/1809.02789.
|
| 234 |
+
Jesse Mu, Xiang Lisa Li, and Noah Goodman. Learning to compress prompts with gist tokens, 2024. URL https://arxiv.org/abs/2304.08467.
|
| 235 |
+
Tsendsuren Munkhdalai, Manaal Faruqui, and Siddharth Gopal. Leave no context behind: Efficient infinite context transformers with infini-attention, 2024. URL https://arxiv.org/abs/2404.07143.
|
| 236 |
+
Catherine Olsson, Nelson Elhage, Neel Nanda, Nicholas Joseph, Nova DasSarma, Tom Henighan, Ben Mann, Amanda Askell, Yuntao Bai, Anna Chen, Tom Conerly, Dawn Drain, Deep Ganguli, Zac Hatfield-Dodds, Danny Hernandez, Scott Johnston, Andy Jones, Jackson Kernion, Liane Lovitt, Kamal Ndousse, Dario Amodei, Tom Brown, Jack Clark, Jared Kaplan, Sam McCandlish, and Chris Olah. In-context learning and induction heads, 2022. URL https://arxiv.org/abs/2209.11895.
|
| 237 |
+
Matanel Oren, Michael Hassid, Nir Yarden, Yossi Adi, and Roy Schwartz. Transformers are multi-state rnns, 2024. URL https://arxiv.org/abs/2401.06104.
|
| 238 |
+
Daniel J. Plebanek and Vladimir M. Sloutsky. Costs of selective attention: When children notice what adults miss. Psychological Science, 28:723 - 732, 2017. URL https://apisemantic scholar.org/CorpusID:30610756.
|
| 239 |
+
|
| 240 |
+
Reiner Pope, Sholto Douglas, Aakanksha Chowdhery, Jacob Devlin, James Bradbury, Anselm Levskaya, Jonathan Heek, Kefan Xiao, Shivani Agrawal, and Jeff Dean. Efficiently scaling transformer inference, 2022. URL https://arxiv.org/abs/2211.05102.
|
| 241 |
+
Alec Radford, Jeff Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners, 2019. URL https://cdn.openai.com/better-language-models/language_models—are_unsupervisedMULTITASK_Learners.pdf.
|
| 242 |
+
Jack W. Rae, Anna Potapenko, Siddhant M. Jayakumar, and Timothy P. Lillicrap. Compressive transformers for long-range sequence modelling, 2019. URL https://arxiv.org/abs/1911.05507.
|
| 243 |
+
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, 2023. URL https://arxiv.org/abs/1910.10683.
|
| 244 |
+
Siyu Ren, Qi Jia, and Kenny Q. Zhu. Context compression for auto-regressive transformers with sentinel tokens, 2023. URL https://arxiv.org/abs/2310.08152.
|
| 245 |
+
Adam Roberts, Hyung Won Chung, Anselm Levskaya, Gaurav Mishra, James Bradbury, Daniel Andor, Sharan Narang, Brian Lester, Colin Gaffney, Afroz Mohiuddin, Curtis Hawthorne, Aitor Lewkowycz, Alex Salcianu, Marc van Zee, Jacob Austin, Sebastian Goodman, Livio Baldini Soares, Haitang Hu, Sasha Tsvyashchenko, Aakanksha Chowdhery, Jasmijn Bastings, Jannis Bulian, Xavier Garcia, Jianmo Ni, Andrew Chen, Kathleen Kenealy, Jonathan H. Clark, Stephan Lee, Dan Garrette, James Lee-Thorp, Colin Raffel, Noam Shazeer, Marvin Ritter, Maarten Bosma, Alexandre Passos, Jeremy Maitin-Shepard, Noah Fiedel, Mark Omernick, Brennan Saeta, Ryan Sepassi, Alexander Spiridonov, Joshua Newlan, and Andrea Gesmundo. Scaling up models and data with t5x and seqio, 2022. URL https://arxiv.org/abs/2203.17189.
|
| 246 |
+
David E. Rumelhart, Geoffrey E. Hinton, and Ronald J. Williams. Learning internal representations by error propagation, 1986. URL https://api_semanticscholar.org/CorpusID: 62245742.
|
| 247 |
+
Imanol Schlag, Kazuki Irie, and Jürgen Schmidhuber. Linear transformers are secretly fast weight programmers, 2021. URL https://arxiv.org/abs/2102.11174.
|
| 248 |
+
Noam Shazeer. Fast transformer decoding: One write-head is all you need, 2019. URL https://arxiv.org/abs/1911.02150.
|
| 249 |
+
Noam Shazeer. Glu variants improve transformer, 2020. URL https://arxiv.org/abs/2002.05202.
|
| 250 |
+
Zhuoran Shen, Mingyuan Zhang, Haiyu Zhao, Shuai Yi, and Hongsheng Li. Efficient attention: Attention with linear complexities, 2024. URL https://arxiv.org/abs/1812.01243.
|
| 251 |
+
David R. So, Wojciech Manke, Hanxiao Liu, Zihang Dai, Noam Shazeer, and Quoc V. Le. Primer: Searching for efficient transformers for language modeling, 2022. URL https://arxiv.org/abs/2109.08668.
|
| 252 |
+
Alon Talmor, Jonathan Herzig, Nicholas Lourie, and Jonathan Berant. *Commonsenseqa: A question answering challenge targeting commonsense knowledge*, 2019. URL https://arxiv.org/abs/1811.00937.
|
| 253 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need, 2017.
|
| 254 |
+
Zhiguo Wang, Patrick Ng, Xiaofei Ma, Ramesh Nallapati, and Bing Xiang. Multi-passage BERT: A globally normalized BERT model for open-domain question answering. In Kentaro Inui, Jing Jiang, Vincent Ng, and Xiaojun Wan (eds.), Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pp. 5878-5882, Hong Kong, China, November 2019. Association for Computational Linguistics. doi: 10.18653/v1/D19-1599. URL https://aclanthology.org/D19-1599.
|
| 255 |
+
|
| 256 |
+
Ruibin Xiong, Yunchang Yang, Di He, Kai Zheng, Shuxin Zheng, Chen Xing, Huishuai Zhang, Yanyan Lan, Liwei Wang, and Tie-Yan Liu. On layer normalization in the transformer architecture, 2020. URL https://arxiv.org/abs/2002.04745.
|
| 257 |
+
Jungmin Yun, Mihyeon Kim, and Youngbin Kim. Focus on the core: Efficient attention via pruned token compression for document classification. In *Findings of the Association for Computational Linguistics: EMNLP* 2023. Association for Computational Linguistics, 2023. doi: 10.18653/v1/2023-findings-emnlp.909. URL http://dx.doi.org/10.18653/v1/2023-findings-emnlp.909.
|
| 258 |
+
Manzil Zaheer, Guru Guruganesh, Avinava Dubey, Joshua Ainslie, Chris Alberti, Santiago Ontonon, Philip Pham, Anirudh Ravula, Qifan Wang, Li Yang, and Amr Ahmed. Big bird: Transformers for longer sequences, 2021. URL https://arxiv.org/abs/2007.14062.
|
| 259 |
+
Rowan Zellers, Ari Holtzman, Yonatan Bisk, Ali Farhadi, and Yejin Choi. Hellaswag: Can a machine really finish your sentence?, 2019. URL https://arxiv.org/abs/1905.07830.
|
| 260 |
+
Biao Zhang and Rico Sennrich. Root mean square layer normalization, 2019. URL https:// arxiv.org/abs/1910.07467.
|
| 261 |
+
Zhenyu Zhang, Ying Sheng, Tianyi Zhou, Tianlong Chen, Lianmin Zheng, Ruisi Cai, Zhao Song, Yuandong Tian, Christopher Ré, Clark Barrett, Zhangyang Wang, and Beidi Chen. $\mathrm{H}_2\mathrm{o}$ : Heavy-hitter oracle for efficient generative inference of large language models, 2023.
|
| 262 |
+
Hattie Zhou, Arwen Bradley, Etai Littwin, Noam Razin, Omid Saremi, Josh Susskind, Samy Bengio, and Preetum Nakkiran. What algorithms can transformers learn? a study in length generalization, 2023. URL https://arxiv.org/abs/2310.16028.
|
| 263 |
+
|
| 264 |
+
# A APPENDIX
|
| 265 |
+
|
| 266 |
+
# A.1 TRANSFORMERS WITH SELECTIVE ATTENTION LEARN A GENERAL SOLUTION TO VARIABLE ASSIGNMENT
|
| 267 |
+
|
| 268 |
+
Transformers with selective attention reach close to 0 validation loss and $100\%$ precision extremely fast when trained on Variable Assignment and they generalize well to out of distribution cases, unlike transformers without selective attention.
|
| 269 |
+
|
| 270 |
+
Setup. We train small transformers ( $d = 3$ ), with and without selective attention, to solve the Variable Assignment problem with 3 variables, 1,000 possible values, and 128 assignments. We train with a batch size of 2,048 for 65,536 steps.
|
| 271 |
+
|
| 272 |
+
In distribution. The transformer with selective attention reaches a validation loss of 0.002 (and $100\%$ accuracy) after less than 1,000 training steps. The transformer without selective attention only achieves a validation log-perplexity loss of 3.18 and $26\%$ accuracy after 1,000 step. At the end of training (65,536 steps) the transformer with selective attention obtains a loss of 2.2e-8, whereas the transformer with standard attention is at 0.01. Both transformers reach $100\%$ accuracy at the end of training.
|
| 273 |
+
|
| 274 |
+
Out of distribution. We observe much stronger generalization capabilities for the transformer with selective attention. When we run on an out of distribution test set with the same 3 variables but only 2 possible values, the transformer with standard attention's accuracy drops substantially to $70\%$ (loss of 3.64). Meanwhile the transformer with selective attention maintains $100\%$ accuracy (with a loss of 2.4e-8).
|
| 275 |
+
|
| 276 |
+
We observed similar results in other settings (e.g. 10 variables and 10 possible values). We also repeated the experiments with somewhat larger transformers $(d = 8)$ and observed similar results.
|
| 277 |
+
|
| 278 |
+
See Appendix A.11 for an example of the attention patterns for the Variable Assignment task.
|
| 279 |
+
|
| 280 |
+
# A.2 ADDITIONAL SYNTHETIC TASKS
|
| 281 |
+
|
| 282 |
+
We validate selective attention on two additional synthetic tasks, Copy and Parity*, that are on the two opposite extremes in terms of memory requirements. See Figure 1.
|
| 283 |
+
|
| 284 |
+
Setup. We train small transformers $(d = 3)$ , with and without selective attention, to solve the Copy and Parity* tasks. We train with a batch size of 2,048 for 65,536 steps.
|
| 285 |
+
|
| 286 |
+
Copy. Here the transformer gets an arbitrary sequence of varying length delimited by a special token and is tasked with outputting a copy of the sequence. We used lengths that are uniformly distributed between 1 and 24. The context size for this task is $3 + 2 \times L_{\text{max}}$ , where $L_{\text{max}} = 24$ is the length of the longest possible input sequence (the 3 extra tokens are for <BOS>, <EOS> and the special end-of-input-sequence token). To solve this task, the model cannot forget anything before copying starts, after which point it can mask out tokens that were already copied.
|
| 287 |
+
|
| 288 |
+
Parity*. Here the transformer gets a binary sequence where bits in the odd positions are random and bits in the even positions contain the parity of all bits in the earlier odd positions. Equivalently, bits in the even positions contain the XOR of the bits in the previous two positions, so the two previous positions are enough for computing the next token. The loss only considers the even positions.
|
| 289 |
+
|
| 290 |
+
Unsurprisingly, transformers with selective attention achieve practically 0 loss (and $100\%$ accuracy) at the end of training, as do standard transformers without selective attention, on both tasks.
|
| 291 |
+
|
| 292 |
+
# A.3 SEPARATE BILINEAR FORM
|
| 293 |
+
|
| 294 |
+
We experiment with using a separate bilinear form instead of reusing the output of an existing attention head. We compare transformers (for $d = 8$ and $d = 12$ ) trained with selective attention on C4 for 524,288 steps, to similarly trained transformers where the selection function is implemented via a separate bilinear form (adding additional parameters and computation). The transformers with standard selective attention (i.e. sharing the outputs of an existing attention head) achieve the same or slightly better log-perplexities at the end of training (see Table 2).
|
| 295 |
+
|
| 296 |
+
Table 2: The log-perplexity on the validation set after 524,288 training steps for (1) standard attention, (2) selective attention with a separate bilinear form for the selection module (more parameters than the baseline), and (3) selective attention.
|
| 297 |
+
|
| 298 |
+
<table><tr><td></td><td>d = 8</td><td>d = 12</td><td>Additional parameters</td></tr><tr><td>Standard attention</td><td>2.96</td><td>2.68</td><td>No</td></tr><tr><td>Selective attention (separate)</td><td>2.91</td><td>2.63</td><td>Yes</td></tr><tr><td>Selective attention</td><td>2.90</td><td>2.63</td><td>No</td></tr></table>
|
| 299 |
+
|
| 300 |
+
# A.4 SELF-IMPACT
|
| 301 |
+
|
| 302 |
+
Table 3 compares the results of forbidding self-impact (i.e. not allowing a token to affect its own attention operation, as in Section 3.3) to those when allowing it (i.e. not shifting the matrix $S$ ). As can be seen, the shifting provides a small but consistent improvement.
|
| 303 |
+
|
| 304 |
+
Table 3: The average log-perplexity on the validation set of 3 training runs after 65,536 training steps for selective attention vs selective attention without shifting, for various model sizes.
|
| 305 |
+
|
| 306 |
+
<table><tr><td></td><td>d=10</td><td>d=12</td><td>d=14</td><td>d=16</td><td>d=18</td><td>d=26</td></tr><tr><td>Selective attention (no shift)</td><td>2.927</td><td>2.832</td><td>2.753</td><td>2.692</td><td>2.641</td><td>2.516</td></tr><tr><td>Selective attention</td><td>2.923</td><td>2.831</td><td>2.750</td><td>2.691</td><td>2.639</td><td>2.511</td></tr></table>
|
| 307 |
+
|
| 308 |
+
# A.5 ABLATING THE CONSTRAINTS
|
| 309 |
+
|
| 310 |
+
We ablate the 3 constraints selective attention applies to $S$ (see Section 3.2).
|
| 311 |
+
|
| 312 |
+
Negative selection. While with selective attention a token can decide to reduce attention to another token by all future attention operations, allowing a token to strengthen another token's contribution to all future attention operations does not make sense. Indeed, when removing this constraint (dropping the ReLU, so that $S$ can contain negative values) the training does not converge.
|
| 313 |
+
|
| 314 |
+
Masking the <BOS> token. Since several algorithms can benefit from the existence of the sentinel <BOS> token (Leviathan, 2022), it is plausible that masking it is detrimental. When we allow selective attention to mask the <BOS> token, we observe neutral to slightly worse results compared to standard selective attention where the <BOS> token is forced to never be selected, see Table 4.
|
| 315 |
+
|
| 316 |
+
Self-masking. Since selective attention reuses an existing attention head as the selection function, motivated by the absorption observation (see Section 3.1), it seems plausible that a token should never mask itself. Indeed, when we allow tokens to mask themselves (i.e. we stop zeroing out the diagonal of $S$ ) we observe worse results, see Table 5.
|
| 317 |
+
|
| 318 |
+
Table 4: The log-perplexity on the validation set after 524,288 training steps for (1) selective attention without the $< \mathrm{{BOS}} >$ constraint and (2) selective attention.
|
| 319 |
+
|
| 320 |
+
<table><tr><td>d</td><td>Selective Attention (w/o <BOS> constraint)</td><td>Selective Attention</td></tr><tr><td>12</td><td>2.6409</td><td>2.6373</td></tr><tr><td>14</td><td>2.5486</td><td>2.5483</td></tr><tr><td>16</td><td>2.4750</td><td>2.4741</td></tr><tr><td>18</td><td>2.4153</td><td>2.4156</td></tr><tr><td>20</td><td>2.3674</td><td>2.3673</td></tr><tr><td>24</td><td>2.2909</td><td>2.2865</td></tr></table>
|
| 321 |
+
|
| 322 |
+
Table 5: The log-perplexity on the validation set after 524,288 training steps for (1) selective attention without the self-masking constraint and (2) selective attention.
|
| 323 |
+
|
| 324 |
+
<table><tr><td>d</td><td>Selective Attention (w/o self-masking constraint)</td><td>Selective Attention</td></tr><tr><td>12</td><td>2.7348</td><td>2.7251</td></tr><tr><td>14</td><td>2.6510</td><td>2.6423</td></tr><tr><td>18</td><td>2.5261</td><td>2.5209</td></tr></table>
|
| 325 |
+
|
| 326 |
+
# A.6 PERPLEXITY-EFFICIENCY TRADE-OFF
|
| 327 |
+
|
| 328 |
+

|
| 329 |
+
Figure 6 illustrates the trade-off between perplexity gains and efficiency gains when pruning as in Section 4. See Section 6 for details.
|
| 330 |
+
|
| 331 |
+

|
| 332 |
+
|
| 333 |
+

|
| 334 |
+
Figure 6: The trade-off between perplexity and KV-cache size for $d = 12$ transformers with context sizes of 512, 1,024, and 2,048. Note that in all cases the perplexity with selective attention is better or equal to that of the baseline without selective attention (the dotted lines). Selective attention transformers trained with the $\mathcal{L}_{mem}$ loss and $\epsilon = 0.1$ (Equation 2) match the perplexity of the baseline with 16X, 25X, and 47X less memory, while those with the standard loss match the perplexity of the baseline with 5X, 7X, and 8X less memory, respectively.
|
| 335 |
+
|
| 336 |
+
# A.7 EXAMPLE DETAILS
|
| 337 |
+
|
| 338 |
+
The following text from the C4 validation set was used in Figures 5, 11, and 12:
|
| 339 |
+
|
| 340 |
+
the real problem with traditional dental veneers has little to do with how they function or their performance. who determines what a normal, aesthetically pleasing smile looks like is the real issue . america struggled for decades with defining " image " as a marketplace bent on exploiting peoples ' flaws for economic gain . the danger of this national obsession has become systemic since the days of twiggy . fashion magazines offer photoshopped perfection as the standard to which we should aspire . the effects of this insidious marketing made their way into breast implants and the definition of a Hollywood smile . carving their bodies and their teeth , people use their resources to chase a false picture of their " perfect " self . people make investments in the tens of thousands of dollars at their dentist office to get the " perfect " smile . this message has become so endemic that people with nice smiles are convinced only a " perfect " hollywood smile is acceptable . one particularly relevant example of this is highlighted in a june 2015 article entitled " saving jane ' s smile . " gary nankin , dds discusses how he " saved " the smile of a patient who was not content with her first set of # porcelain veneers . 1 . endodontic referral for treatment of tooth number 15 , followed by a composite core build - up . 2 . periodontal therapy in both the anterior region and upper left to achieve optimal tissue health . 4 . preparation of maxillary teeth and placement of permanent restorations . 5 . placement of dental implant by the periodontist followed by preparation of mandibular teeth and placement of permanent restorations . 6 . restore the now fully - healed and osseointegrated implant in the position of tooth number 30 . regarding a person ' s smile , the strong link to self - esteem and self - worth make an imperfect set of teeth a concern . however , the picture in the article clearly illustrates what appears to be a well - constructed and healthy - looking smile . the entire premise is puzzling . how does a dentist promote " saving " a smile that $97 \%$ of the people in america would love to show off ? .
|
| 341 |
+
|
| 342 |
+
# A.8 COMPARISON WITH LOCAL ATTENTION
|
| 343 |
+
|
| 344 |
+
Table 6 compares the validation perplexity of $d = 12$ transformers with various local attention patterns (all-local and alternating), to that of a standard transformer and to that of a transformer with selective attention. For the all-local attention transformers we set all layers to be sliding window attention layers with a fixed sized window. For example, "All-local 32" denotes a transformer where all tokens can only attend up to 32 tokens back. We also include transformers with alternating local and global layers, where we have 3 local attention layers followed by 1 global attention layer, in a repeated fashion. For example, "Local-global 32" denotes a transformer with 3 local attention layers where tokens can only attend up to 32 tokens back, followed by a global layer where tokens can attend to all past tokens, and this 4-layer structure is repeated for the 12 layers of the $d = 12$ transformer. We report the perplexity numbers after 524,288 training steps. We observe that all local attention patterns perform worse than the dense baseline, which in turn performs worse than a transformer with selective attention.
|
| 345 |
+
|
| 346 |
+
Table 6: Validation log-perplexity of transformers with different local attention patterns.
|
| 347 |
+
|
| 348 |
+
<table><tr><td>Model Type</td><td>Validation Log-Perplexity</td></tr><tr><td>All-local 32</td><td>2.7860</td></tr><tr><td>All-local 64</td><td>2.7386</td></tr><tr><td>All-local 128</td><td>2.7154</td></tr><tr><td>All-local 256</td><td>2.6981</td></tr><tr><td>All-local 384</td><td>2.6873</td></tr><tr><td>All-local 448</td><td>2.6849</td></tr><tr><td>All-local 480</td><td>2.6834</td></tr><tr><td>Local-global 32</td><td>2.7046</td></tr><tr><td>Local-global 64</td><td>2.7105</td></tr><tr><td>Local-global 128</td><td>2.7154</td></tr><tr><td>Local-global 256</td><td>2.6993</td></tr><tr><td>Local-global 384</td><td>2.6895</td></tr><tr><td>Local-global 448</td><td>2.6870</td></tr><tr><td>Local-global 480</td><td>2.6861</td></tr><tr><td>Baseline (standard attention)</td><td>2.6815</td></tr><tr><td>Selective attention</td><td>2.6372</td></tr></table>
|
| 349 |
+
|
| 350 |
+
# A.9 RESULTS ON T5
|
| 351 |
+
|
| 352 |
+
We experimented with applying selective attention while pre-training T5 (Raffel et al., 2023). Here we use the standard T5 pre-training recipe and code from T5X (Roberts et al., 2022). Specifically, in this setup, the model is an encoder-decoder, and we apply selective attention to the decoder only, leaving the encoder as-is. The standard T5 span-corruption pre-training objective is used, as in Raffel et al. (2023), both for training and the reported metrics. See Table 7 for the results.
|
| 353 |
+
|
| 354 |
+
We observe some improvements for T5 with selective attention for the 3 tested model sizes.
|
| 355 |
+
|
| 356 |
+
Table 7: The span corruption loss per non-padding token on the validation set of 3 training runs after 524,288 training steps for a baseline T5 encoder-decoder vs a T5 encoder-decoder where the decoder is equipped with selective attention, for various model sizes.
|
| 357 |
+
|
| 358 |
+
<table><tr><td></td><td>T5-small</td><td>T5-base</td><td>T5-large</td></tr><tr><td>T5</td><td>1.962</td><td>1.693</td><td>1.528</td></tr><tr><td>T5 with selective attention</td><td>1.952</td><td>1.691</td><td>1.522</td></tr></table>
|
| 359 |
+
|
| 360 |
+
# A.10 COMPARISON WITH EFFICIENT ATTENTION METHODS
|
| 361 |
+
|
| 362 |
+
Figure 7 compares selective attention to other efficient attention and attention pruning methods, including $H_{2}O$ (Zhang et al., 2023), TOVA (Oren et al., 2024), and sparse attention (Child et al., 2019). We also include Window + 4 following Oren et al. (2024). Note that $H_{2}O$ , TOVA, and Window + 4 can be applied post-training, whereas selective attention and sparse attention require training the model<sup>3</sup>.
|
| 363 |
+
|
| 364 |
+
We observe that in the tested setting of language modeling on C4, selective attention substantially outperforms all of the tested efficient attention baselines.
|
| 365 |
+
|
| 366 |
+

|
| 367 |
+
|
| 368 |
+

|
| 369 |
+
|
| 370 |
+

|
| 371 |
+
Figure 7: The trade-off between validation perplexity and KV-cache size for $d = 12$ transformers with context sizes of 512, 1,024, and 2,048 for selective attention and other efficient attention mechanisms.
|
| 372 |
+
|
| 373 |
+
# A.11 EXAMPLE ATTENTION PATTERNS FOR VARIABLE ASSIGNMENT
|
| 374 |
+
|
| 375 |
+
Figure 8 shows an example of the attention patterns for all 3 layers of transformers with and without selective attention, for the Variable Assignment task. The part of the example sequence shown starts with the tokens: $Z =$ , 177, $Y =$ , 661, $Z =$ , 114, $Z =$ , 468.
|
| 376 |
+
|
| 377 |
+
For the first layer of the transformer with selective attention we observe that tokens of type "<value>" (e.g. 177, 661, etc., i.e., those at the even positions) attend to themselves and to the immediately preceding token (of type "<variable>=", e.g. $\mathbb{Z} =$ , $\mathbb{Y} =$ , etc.). A potential explanation is that this allows the value tokens to absorb the information of the variable they are assigned to, so that from this point onwards, the token would contain a representation of the pair (variable, value), and the preceding variable-only token would no longer be relevant for future tokens. E.g., the token 177 might contain a combined representation of $\mathbb{Z}$ and 177. In this same layer, tokens of type "<variable>=" attend to themselves.
|
| 378 |
+
|
| 379 |
+
We further observe that for the transformer with selective attention, the attention patterns in the second and third layers are almost identical. In these layers, tokens in the even positions, now containing a combined (variable, value) representation according to the postulate above, attend to themselves. Tokens in the odd positions, still containing a representation of the assigned variable according to the hypothesis above, attend to the value of the last assignment to the same variable. This allows masking the previous assignment (see Figure 1).
|
| 380 |
+
|
| 381 |
+
In contrast, the baseline transformer without selective attention (which doesn't solve the Variable Assignment task for out of distribution problems, see Appendix A.1), exhibits attention patterns that are harder to interpret.
|
| 382 |
+
|
| 383 |
+

|
| 384 |
+
Transformer (w/ Selective Attention)
|
| 385 |
+
|
| 386 |
+

|
| 387 |
+
Transformer (w/ Vanilla Attention)
|
| 388 |
+
|
| 389 |
+

|
| 390 |
+
|
| 391 |
+

|
| 392 |
+
|
| 393 |
+

|
| 394 |
+
Figure 8: The attention patterns (attention strength averaged across heads) for all layers of transformers with selective attention (left) and with vanilla attention (right).
|
| 395 |
+
|
| 396 |
+

|
| 397 |
+
|
| 398 |
+
# A.12 ADDITIONAL FIGURES FOR CONTEXT PRUNING
|
| 399 |
+
|
| 400 |
+
Figure 9 illustrates the values of the $F$ matrix averaged across 1,000 examples of length at least 512 from the C4 dataset.
|
| 401 |
+
|
| 402 |
+
Figure 10 compares the values from Figure 9 to those obtained from a different training run (different random initialization and different data shuffle). While this isn't always the case, we sometimes observe stable sparsity patterns like those in this example, hinting at some general properties of language modeling on C4.
|
| 403 |
+
|
| 404 |
+
Figure 11 illustrates the tokens that remain in the context buffer after pruning (as in Section 4) for the example text (see Appendix A.7), for a $d = 12$ model with selective attention, trained with the $\mathcal{L}_{mem}$ loss (Equation 2, $\epsilon = 0.1$ ), for a memory budget where the validation perplexity matches a transformer without selective attention. The per-layer memory budgets chosen by the pruning algorithm for this model are: [8, 48, 8, 8, 24, 8, 168, 16, 8, 64, 8, 8], leading to a memory saving factor of 16X.
|
| 405 |
+
|
| 406 |
+
Figure 12 shows which tokens are pruned for the example text in Appendix A.7.
|
| 407 |
+
|
| 408 |
+

|
| 409 |
+
Figure 9: Visualization of the $F$ matrix (greener is lower, i.e. less masking) for a $d = 12$ transformer averaged across 1,000 examples.
|
| 410 |
+
|
| 411 |
+

|
| 412 |
+
Figure 10: Visualization of the $F$ matrix (greener/bluer is lower, i.e. less masking) for a $d = 12$ transformer averaged across 1,000 examples for two training runs (different random initialization, and different shuffle of the training data). While we only have anecdotal evidence, it is interesting that we sometimes observe these stable sparsity patterns across training runs.
|
| 413 |
+
|
| 414 |
+

|
| 415 |
+
Figure 11: Visualization of the persisted elements for a $d = 12$ transformer for the text in Appendix A.7. The white pixels denote tokens removed from the context buffer as per Section 4.
|
| 416 |
+
|
| 417 |
+
# Layer 0
|
| 418 |
+
|
| 419 |
+
The real problem with traditional dental v# #f# #s has ttle to do with how they function or their performance - who determine #s what a normal #f# #h f#d #f# #oing smile looks like to the real issue. a mea rience "image" as a standard place on #f# #h #f# #h #f# #h #f# #h for this period of time.
|
| 420 |
+
|
| 421 |
+
# Layer 1
|
| 422 |
+
|
| 423 |
+
The real problem with traditional 4# #f#n is, as little as to with how they function or their performance who determine f##s what a normal. a normal. A #f#f #hatic #f#p #f#p #f#p #f#p #f#p #f#p #f#p #f#p #f#p #f#p #f#p #f#p #f#p #f#p #f#p #f#p #f#p #f#p #f#p #f#p #f#p #f#p #f#p #f#p #f#p #f#
|
| 424 |
+
|
| 425 |
+
1.
|
| 426 |
+
|
| 427 |
+
he picture in the street clearly it #just # rates what you be to be a well - constructed and healthy - looking street . The street pre # # is p 4 4 4 4 4 4 # #ling , you can do a de # f # # # # # # # # # # # # # # # # # # # #
|
| 428 |
+
|
| 429 |
+
#
|
| 430 |
+
|
| 431 |
+
# Layer 2
|
| 432 |
+
|
| 433 |
+
The real problem with traditional dental ve #h#s has ttle to wit hwo thc fomr performance. who determine #s what a normal #f#t# #h#d #h#i #p#o# #h#ing smile looks like to the real issue. americu struggle #d for decades with de #h# #hiring "image" as a standard placebo #n #h on #h #h #h #h #h #h for economic gain. the dan @her of this national o #h #h #h #h #h as become system #h fice 1742004 fashion magazine #h #hoped perfect #h as the standard to which we should #h s#h #h H#ds making made way into bread an H#p F#H #h and the definition of a d H#d oolino me car hving their buns and their teeth, people use their resources to c H#h F#H a false picture of their perfect "self." people make investments in the ten 100 dollars of that drhen #h F#H offite gate to the
|
| 434 |
+
|
| 435 |
+
# Layer 3
|
| 436 |
+
|
| 437 |
+
The real problem with traditional dental vs #H# #frs has little to do with how they function or their performance - who determine #s what a normal, #f# #t #h# #f# #d F# #h# #f# #sming smile looks like in the real issue. America struggle #f# for decades as de # H# #f# "imge" "asmark a placebo #n #x en #f# #f# #f# #f# people #f#. f# #f# for emson th 146 f# h# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# d # #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f # f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f#
|
| 438 |
+
the real problem with traditional dental vs #Hfrs has little to do with how they function or their performance - who determine #s what a normal, #f? t F## t F## t F## t F## t F## t F## t F## t F## t F## t F## t F## t F## t F## t F## t F## t F## t F## t F## t F## t F## t F## t F## t F## t F## t F## t F## t F## t F## t F## t F## t F## t F## t F## t F##
|
| 439 |
+
|
| 440 |
+
# Layer 4
|
| 441 |
+
|
| 442 |
+
The real problem with traditional dental v# #f# #s has ttle to do with how they function or their performance - who determine #s what a normal , #f# # F#h #d F#o # #ing smile looks like to the real issue . americu struggle #f #e as the standard to which we should as F#o # #f #s . The effect of this in f# # #f #s #f #turing made their way into bread on F#p H# #s and the definition of a f#f /kmoolte smle . car #ong their bodies and their teeth , people use their resources to c F#o # # f #a false picture of their "perfect" self . people make investments in the thousands of dollars at their #f o f fice to get the #f o f fice . The idea of 'the best person' is that the person who has become the best person in a given time is "the best person" . k#n , d#fs discuss how he "samed the smile of a patient who was not content with her first set of p # F#o # #f #o f F#o # eve r F#o # 1 . 6 and f#o# t f #o f t for treatment of tooth number 15 , followed by a con F#o # f #o core bld - up . 2 period Fof . #fai therapy in both an the nF# # f Riege and reguiel upper to alloseptive thmial healb . 43 preparation of max i F#o #f ffeand placement of permanent restoration F#o . 50 placement of permanent restoration F#o . 60 replacing the rodtly F#o # f ffeand placement of permanent restoration F#o . 70 replacing the rodtly F#o # f ffeand placement of permanent restoration F#o . 80 replacing the rodtly F#o # f ffeand placement of permanent restoration F#o . 90 replacing the rodtly F#o # f ffeand placement of permanent restoration F#o . 100 replacing the rodtly F#o # f ffeand placement of permanent restoration F#o . 110 replacing the rodtly F#o # f ffeand placement of permanent restoration F#o . 120 replacing the rodtly F#o # f ffeand placement of permanent restoration F#o . 130 replacing the rodtly F#o # f ffeand placement of permanent restoration F#o . 140 replacing the rodtly F#o # f ffeand placement of permanent restoration F#o . 150 replacing the rodtly F#o # f ffeand placement of permanent restoration F#o . 160 replacing the rodtly F#o # f ffeand placement of permanent restoration F#o . 170 replacing the rodtly F#o # f ffeand placement of permanent restoration F#o . 180 replacing the rodtly F#o # f ffeand placement of permanent restoration F#o . 190 replacing the rodtly F#o # f ffeand placement of permanent restoration F#o . 200 replacing the rodtly F#o # f ffeand placement of permanent restoration F#o . 210 replacing the rodtly F#o # f ffeand placement of permanent restoration F#o . 220 replacing the rodtly F#o # f ffeand placement of permanent restoration F#o . 230 replacing the rodtly F#o # f ffeand placement of permanent restoration F#o . 240 replacing the rodtly F#o # f ffeand placement of permanent restoration F#o . 250 replacing the rodtly F#o # f ffeand placement of permanent restoration F#o . 260 replacing the rodtly F#o # f ffeand placement of permanent restoration F#o . 270 replacing the rodtly F#o # f ffeand placement of permanent restoration F#o . 280 replacing the rodtly F#o # f ffeand placement of permanent restoration F#o . 290 replacing the rodtly F#o # f ffeand placement of permanent restoration F#o . 300 replacing the rodtly F#o # f ffeand placement of permanent restoration F#o . 310 replacing the rodtly F#o # f ffeand placement of permanent restoration F#o . 320 replacing the rodtly F#o # f ffeand placement of permanent restoration F#o . 330 replacing the rodtly F#o # f ffeand placement of permanent restoration F#o . 340 replacing the rodtly F#o # f ffeand placement of permanent restoration F#o . 350 replacing the rodtly F#o # f ffeand placement of permanent restoration F#o . 360 replacing the rodtly F#o # f ffeand placement of permanent restoration F#o . 370 replacing the rodtly F#o # f ffeand placement of permanent restoration F#o . 380 replacing the rodtly F#o # f ffeand placement of permanent restoration F
|
| 443 |
+
|
| 444 |
+
# Layer 5
|
| 445 |
+
|
| 446 |
+
The real problem with traditional dental ve #f# #frs has ttle to do with how they function or their performance . who gain #s a normal , #f# # f#h # F#d # F#d # F#d # F#d # F#d # F#d # F#d # F#d # F#d # F#d # F#d # F#d # F#d # F#d # F#d # F#d # F#d # F#d # F#d # F#d # F#d # F#d # F#d # F#d # F#d # F#
|
| 447 |
+
|
| 448 |
+
# Layer 6
|
| 449 |
+
|
| 450 |
+
The real treatment with traditional dental ve #f#h s has to lio to how wth thc yor or performance hou do tive f#. what a normal #f#t# #f#d p#o# #f#d #f#d sming smile looks like to the reale. a mea rie 402176394217639421763942176394217639421763942176394217639421763942176394217639421763942176394217639421763942
|
| 451 |
+
|
| 452 |
+
# Layer 7
|
| 453 |
+
|
| 454 |
+
The real problem with traditional dental gay #H#o #Hs has ttle to do how they function or their performance. who determine Hs what a normal, # # #d # # H#o # F#d # H#o # # #ing smile looks like to the real issue. a mea rie 402 for decades with d # # #in "image" as a market + placebo en # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
| 455 |
+
the real problem with traditional dental gay # H#o # Hs has become system f#k since the days of f#k H#o F#d fashion magazine F#d offers photo F#d hoped perfect #Ded as the standard to which we as H#o F#d. The effects of this f#d H#o F#d & H#o marketing is also being explored in the literature. For example, the article on page 13 of the book describes how de F#d fit that the "perfect" smile. This message has become so and even H#o F#d that people with nice smile Hs are co H#o F#d and even only a "perfect." H#o/Foodsmile is accept f#rable, one particularly relevant example of this is highlighted in a June 2015 article entitled " saving Ian H#" s smile. " q H#o n H#" k
|
| 456 |
+
k#, d Hs discuss f#do he "save" the smile of a patient who was not content with her first set of p#. H#o F#d e Vse H#o F#d ## . 1 and f#d O#t F#d refer for treatment of tooth number 15 , followed by a com F#do H#o F#d core build - up. 2 , period F#do.
|
| 457 |
+
f#d therapy in both the an F#do H#o F#d and region upper to achieve optimal tissue health. 4, preparation of max f#do H#o F#d teeth and placement of permanent restoration F#do. 5, placement of dental im F#do H#o F#d by the period F#do H#o F#d followed by preparation of man f#do H#o F#d /Fuliar teeth and placement of permanent restoration F#do. 6, repositioning the max f#do H#o F#d /Fuliar teeth and placement of permanent restoration F#do. 7, repositioning the min f#do H#o F#d /Fuliar teeth and placement of permanent restoration F#do. 8, the picture in the article clearly ill S F##nates what appears to be a well- constructed and healthy-looking smile: the entire pre F#do H#o F#d p F#do H#o F#d Zowhowshe's "be a good idea." How does da F#do H#o F#d promote " save " to enable a " T S C of the purpose " intended would lose to standard
|
| 458 |
+
|
| 459 |
+
# Layer 8
|
| 460 |
+
|
| 461 |
+
The real problem with traditional dental care $\forall \# \# \# \# \# \# \# \# \# \# \# \# \# \# \# \# \# \# \# \# \# \# \# \# \# \# \# \# \# \# \# \# \# \# \# \# \# \# \# \# \# \# \# \# \# \# \# \# \# \# \text{的 他}$ has little to do with how they function or their performance. who determine $H\#s$ what a normal, #f#d #f f##h #f f##h #f f##h #f f##h #f f##h #f f##h #f f##h #f f##h #f f##h #f f##h #f f##h #f f##h #f f##h #f f##h #f f##h #f f##h #f f##h #f f##h #f f##h #f f##h #f f## h #f f##h #f f##h #f f##h #f f##h #f f##h #f f##h #f f##h #f f##h #f f##h #f f##h #f f##h #f f##h #f f##h #f f##h #f f##h #f f##h #f f##h #f f##h #f f##h #f f##
|
| 462 |
+
|
| 463 |
+
# Layer 9
|
| 464 |
+
|
| 465 |
+
The real problem with the dental v# #f# #s has little to do with how they function or their performance. who determine #s what a normal #f# #f# #f# #f# #f# #f# #f# #f# #f# #f# #f# #f# #f# #f# #f# #f# #f# #f# #f# #f# #f# #f# #f# #f# #f# #f# #f# #f# #f# #f# #f# #f# #f# #f# f# #f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f# f#
|
| 466 |
+
|
| 467 |
+
# Layer 1
|
| 468 |
+
|
| 469 |
+
The real treatment with traditional dental ve #h# #frs has little to do with how they function or their performance. who determine #fs what a normal #f# #h# #f# #f# #f# #f# #f#sming looks like to the real issue. a mea rtrige 14 for decades with de # f# #inig " image" as a market place on #h #f# #f# #f# #f# #f# #f# economic gain, the dan #f# of this national o h# f#h# hossion has become system #f# since the days of f#f# f#f# #f# #f# fashion magazine #f# f#f# #f# f#f# #f# perfect #f#d on the standard to which we as f#f# #f# #f# the effects of this in f#h f#f# #f# #f# #f# marketing and advertising is becoming more important. The trend is that the dentists are now able to offer a service at the end of their day.
|
| 470 |
+
|
| 471 |
+
# Layer 1
|
| 472 |
+
|
| 473 |
+
The real problem with traditional dental gay #H#o #Hs has ttle to do how they function or their performance. who determine Hs what a normal #f# #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#0 #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#O #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#o #H#
|
| 474 |
+
|
| 475 |
+
Figure 12: A visualizing of the elements that are masked for the last (512th) token, for a $d = 12$ transformer for the text in Appendix A.7. We observe some interesting patterns, for example, layer 4 persists the end-of-sentence periods ("").
|
| 476 |
+
|
| 477 |
+
# A.13 PARAMETER COUNTS
|
| 478 |
+
|
| 479 |
+
Table 8 shows the actual parameter counts for models with different $ds$ (see Section 5). Note that selective attention does not add any extra parameters.
|
| 480 |
+
|
| 481 |
+
Table 8: The number of model parameters for different values of $d$ as in Section 5.
|
| 482 |
+
|
| 483 |
+
<table><tr><td>d</td><td>n_layers</td><td>n_heads</td><td>d_model</td><td>Number of parameters</td></tr><tr><td>8</td><td>8</td><td>8</td><td>512</td><td>33,603,584</td></tr><tr><td>10</td><td>10</td><td>10</td><td>640</td><td>59,699,200</td></tr><tr><td>12</td><td>12</td><td>12</td><td>768</td><td>97,615,872</td></tr><tr><td>14</td><td>14</td><td>14</td><td>896</td><td>149,666,048</td></tr><tr><td>16</td><td>16</td><td>16</td><td>1024</td><td>218,226,688</td></tr><tr><td>18</td><td>18</td><td>18</td><td>1152</td><td>305,717,760</td></tr><tr><td>20</td><td>20</td><td>20</td><td>1280</td><td>414,387,200</td></tr><tr><td>22</td><td>22</td><td>22</td><td>1408</td><td>546,641,920</td></tr><tr><td>24</td><td>24</td><td>24</td><td>1536</td><td>704,950,272</td></tr><tr><td>26</td><td>26</td><td>26</td><td>1664</td><td>891,468,032</td></tr><tr><td>28</td><td>28</td><td>28</td><td>1792</td><td>1,108,645,888</td></tr></table>
|
ICLR/2025/Selective Attention Improves Transformer/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3b2c6d24dedca6e1ea11a60d22999a1568438df936f18c818a93f4919a570aff
|
| 3 |
+
size 1005891
|
ICLR/2025/Selective Attention Improves Transformer/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:db9904519978144cb4a99d9575733c2db8dd14d4c7a66365b818b20a064df889
|
| 3 |
+
size 620136
|
ICLR/2025/Selective Induction Heads_ How Transformers Select Causal Structures in Context/c66b6248-75f9-4d22-a583-04fa3b64edab_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0ee87f324430b32b915d55f7366bcf3cad0dc08f842afd96f07e22afb07bb7a5
|
| 3 |
+
size 283606
|
ICLR/2025/Selective Induction Heads_ How Transformers Select Causal Structures in Context/c66b6248-75f9-4d22-a583-04fa3b64edab_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d5c8348f8498d92c906e05ed70d19a8b65cae12e895645214904fb0bd2be3d34
|
| 3 |
+
size 309150
|
ICLR/2025/Selective Induction Heads_ How Transformers Select Causal Structures in Context/c66b6248-75f9-4d22-a583-04fa3b64edab_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c3c62de5b32f06ad576f82058d5760e08a7ca62086a6036cb8c76a3156144fba
|
| 3 |
+
size 6448314
|
ICLR/2025/Selective Induction Heads_ How Transformers Select Causal Structures in Context/full.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
ICLR/2025/Selective Induction Heads_ How Transformers Select Causal Structures in Context/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:654ece6e36fa1ef6d516fddb87bd5052b456085ec46d44060e00cf8213a164cf
|
| 3 |
+
size 3180395
|
ICLR/2025/Selective Induction Heads_ How Transformers Select Causal Structures in Context/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:793d15fe3656ebe3faf6533e56a548a6e1724d844bd49bedf92e4fadd9a627e9
|
| 3 |
+
size 1413691
|
ICLR/2025/Selective Label Enhancement Learning for Test-Time Adaptation/baeef0dd-a6b2-4471-befd-2fb3b48b023a_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9ca94be427c80a24c6273e3d7c7cf58b9ecd8dd3c7cc138e1c52f863dec2edce
|
| 3 |
+
size 155289
|
ICLR/2025/Selective Label Enhancement Learning for Test-Time Adaptation/baeef0dd-a6b2-4471-befd-2fb3b48b023a_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4979d7642897a35817b11c5d23dd1c70312bfd5bf9ef19be0054dd7ef0075ab4
|
| 3 |
+
size 185785
|
ICLR/2025/Selective Label Enhancement Learning for Test-Time Adaptation/baeef0dd-a6b2-4471-befd-2fb3b48b023a_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6d5c6fe232b1151d00e2b274aa52700021879e121532b23ef8bbb05962196fbc
|
| 3 |
+
size 581629
|
ICLR/2025/Selective Label Enhancement Learning for Test-Time Adaptation/full.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
ICLR/2025/Selective Label Enhancement Learning for Test-Time Adaptation/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6270b3c8850d6b47bcd08462e8b2ca46d0d88ddb72c2d2ffb933b81bbb09d09f
|
| 3 |
+
size 1698198
|
ICLR/2025/Selective Label Enhancement Learning for Test-Time Adaptation/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:514144bab708e6f69d829880156cc89d79a623ca0836f50fd995ea571975e544
|
| 3 |
+
size 863803
|
ICLR/2025/Selective Task Group Updates for Multi-Task Optimization/6e303ff4-738b-4014-87fd-6d6df18a6e54_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:04d2af21ea3c7b9edadc1f09aa2acf56aa47968cea8e36672c3e980660be8b96
|
| 3 |
+
size 240134
|
ICLR/2025/Selective Task Group Updates for Multi-Task Optimization/6e303ff4-738b-4014-87fd-6d6df18a6e54_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b0463ed0cb22057594017f197aa8924dc837c89687dcef32b3604d69b942ceb5
|
| 3 |
+
size 271229
|
ICLR/2025/Selective Task Group Updates for Multi-Task Optimization/6e303ff4-738b-4014-87fd-6d6df18a6e54_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:830068ad9cd5a81a1da5c5e07aee3ee1f37b70f5d0e8db813c3f09a9ec9b471f
|
| 3 |
+
size 13561486
|
ICLR/2025/Selective Task Group Updates for Multi-Task Optimization/full.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
ICLR/2025/Selective Task Group Updates for Multi-Task Optimization/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3a2e5830d6481e6b1bab2a9c0a181f6a8bf04c8355ac69cb8e073331a2bbb4b3
|
| 3 |
+
size 2992568
|
ICLR/2025/Selective Task Group Updates for Multi-Task Optimization/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7f3362f4a92cf157c1b3efeea6e2e488c16e58993f55e3761d3c80d9521b26c9
|
| 3 |
+
size 1247906
|
ICLR/2025/Selective Unlearning via Representation Erasure Using Domain Adversarial Training/8ce8aa33-2a96-422f-b575-479d4e72ae9f_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f92b47db9621d5349b3191109036259941408329778227381ed2c154cbf7c8b9
|
| 3 |
+
size 117270
|
ICLR/2025/Selective Unlearning via Representation Erasure Using Domain Adversarial Training/8ce8aa33-2a96-422f-b575-479d4e72ae9f_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9754ce428c962904e5cfb8f17939192c6ba67fff35322ac7975da1c589d567f5
|
| 3 |
+
size 132434
|