Some MOE of Image Classification
date
Oct 3, 2023
Last edited time
Oct 3, 2023 06:33 AM
status
Published
slug
Some MOE of Image Classification
tags
DL
summary
type
Post
Field
Plat
(CVPRW-2020)Using Mixture of Expert Models to Gain Insights into Semantic Segmentation ❌(MICCAI-2022) Patcher: Patch Transformers with Mixture of Experts for Precise Medical Image Segmentation ❌(BMCV2022)Revisiting single-gated Mixtures of Experts ✅(CVPR2021)ClassSR: A General Framework to Accelerate Super-Resolution Networks by Data Characteristic ✅(CVPR2018) HydraNets: Specialized Dynamic Architectures for Efficient Inference
(CVPRW-2020)Using Mixture of Expert Models to Gain Insights into Semantic Segmentation ❌
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fd919c123-ae4b-49b3-af3c-0184fe33faac%2F752cb7fb-190f-4957-ac70-c91c015c045a%2FUntitled.png?table=block&id=b153e77b-7bab-4a7e-b5d2-fcbbe7267ef7&cache=v2)
使用如上结构,文章主要关注可解释性,性能不如 Baseline。
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fd919c123-ae4b-49b3-af3c-0184fe33faac%2F05799a46-e550-4ece-9637-ba217c5857a0%2FUntitled.png?table=block&id=8007cc6d-7c74-48ae-915b-93dfe15d3aba&cache=v2)
主要做法如下:
对于 Expert 对 SubDataset 进行单独训练,然后使用 Gate 结合。
(MICCAI-2022) Patcher: Patch Transformers with Mixture of Experts for Precise Medical Image Segmentation ❌
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fd919c123-ae4b-49b3-af3c-0184fe33faac%2Fc9ad66df-f439-454a-b8ec-0b1e0cebc30a%2FUntitled.png?table=block&id=3ba4d07a-3860-4afc-851d-6d122548b501&cache=v2)
其实就是 SegFormer 加了个 Gating Network.
(BMCV2022)Revisiting single-gated Mixtures of Experts ✅
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fd919c123-ae4b-49b3-af3c-0184fe33faac%2F2c3e0800-4c7f-493a-a48d-f6d0c6d66c23%2FUntitled.png?table=block&id=4e49f820-218d-4189-bca3-5743c7f8aabf&cache=v2)
不同:
首先,我们引入一个新颖的通用知识分支,我们将其称为基本模型:该模块在整个数据集上进行训练,我们使用它(i)来解决潜在的过度拟合:它充当专家正则化的一种形式通过将它们的输出与这个初始基本预测进行集成; (ii) 初始化门,使用基本模型导出的特征空间对训练样本进行聚类。 (iii) 作为提前退出分支,避免在不必要时执行任何专家,并根据输入图像有条件地激活。其次,我们描述了一种简单、轻量级的训练方案,该方案首先通过对基本模型的嵌入进行聚类来初始化专家子集,然后在训练过程中保持门和专家独立,以避免门崩溃问题。
流程:
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fd919c123-ae4b-49b3-af3c-0184fe33faac%2Fe1f36704-1f81-4594-b680-493d69d98757%2FUntitled.png?table=block&id=d7d24b44-43a2-4d84-93ca-5dfa4edc215f&cache=v2)
非常多阶段,首先训练一个 base model,然后使用 base model 的 embedding 来聚类得到 gate 的 target。然后冻结 base model,训练 gate。然后冻结 base model 和 gate,并行训练 expert。最后冻结以上所有,训练 ensembler。
(CVPR2021)ClassSR: A General Framework to Accelerate Super-Resolution Networks by Data Characteristic ✅
这篇是先分别训练 Experts,然后冻结训练 gate。最后微调。
(CVPR2018) HydraNets: Specialized Dynamic Architectures for Efficient Inference
这篇提到,传统的层次分类使用门函数在子任务之间进行分类,并使用分支在子任务内的类之间进行分类。为了使动态执行准确,门函数和所选分支都需要准确地执行各自的分类任务。实际上,门控函数的精度取决于门控组件的容量(计算成本和参数)。使门函数高度精确会产生大量的计算成本,从而抵消了动态执行的好处。
我们使门控计算高效且准确的关键见解是改变子任务和门控函数的功能。
具体做法是:
我们通过对同一类的多个训练图像的图像分类网络的最终全连接层的特征进行平均来计算每个类的特征表示。使用 k 均值和 nb 个聚类中心对这些平均类特征进行聚类会导致特征空间的划分。
然后冻结上面的部分,监督训练每个 Expert 以及 Gate。