Skip to content

Latest commit

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

SimCLR 做单分类 跑出的结果

1. Datasets

CIFAR-10

2. Training

batch size = 32 (文章里用的是512)
单张卡跑的

3. resultsr

simclr这个方法, 文章给出的没有 每个类的结果,只给出了一个最终的 10个类 的平均结果

MethodDatasetAUROC (Mean)
文章给的结果CIFAR-1087.9%
复现出的结果CIFAR-1089.79%
class0123456789AUROC (Mean)
复现0.87020.98960.90430.83590.86210.88140.88320.93720.93440.88070.8979

欧氏距离训练模型, 然后用不同方法做测试结果:

在做欧氏距离之前,做归一化 ---> 这样的话,这时候的欧氏距离 和 余弦相似度 成 线性相关

通过 对欧氏距离,即 Eulidean(x1, x2) 判断 x1 和 x2的相关性:
| class | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | AUROC (Mean)|
| ---------------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|-------------|
| 余弦相似度做测试 | 0.8687 | 0.9884 | 0.9022 | 0.8389 | 0.8826 | 0.8835 | 0.8941 | 0.9564 | 0.9454 | 0.8843 | 0.9044 |
| 欧式距离做测试 | 0.9076 | 0.9898 | 0.9017 | 0.8346 | 0.8792 | 0.8950 | 0.8967 | 0.9563 | 0.9365 | 0.9039 | 0.9101 |
通过 对欧氏距离 的平方,即 Eulidean(x1, x2)^2 判断 x1 和 x2的相关性:
| class | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | AUROC (Mean)|
| --------------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|-------------|
| 余弦相似度做测试 | 0.8991 | 0.9878 | 0.8966 | 0.8286 | 0.8683 | 0.8877 | 0.8853 | 0.9510 | 0.9290 | 0.8923 | 0.9025 |
| 欧式距离做测试 | 0.9076 | 0.9898 | 0.9017 | 0.8346 | 0.8792 | 0.8950 | 0.8967 | 0.9563 | 0.9365 | 0.9039 | 0.9101 |

在做欧氏距离之前,不做归一化 ---> 只用 欧氏距离 判断两个样本之间的相关性 通过 对欧氏距离,即 Eulidean(x1, x2) 判断 x1 和 x2的相关性:

class0123456789AUROC (Mean)
余弦相似度做测试0.69850.73300.72880.58530.73970.56880.58140.67600.75480.52350.6590
欧式距离做测试0.65900.72760.69400.53940.71900.52510.51400.64250.71930.50830.6248

欧氏距离 的结果 明显不如 余弦相似度的 结果好

用 秩 判断两个样本之间的相关性

通过 秩 (核范数)训练模型,即 rank(x1, x2) 判断 x1 和 x2的相关性:然后用不同方法做测试
class0123456789AUROC (Mean)
余弦相似度做测试0.73120.95190.73170.72390.69020.78150.77380.85750.79840.63090.7671
核范数 做测试0.73150.95210.73160.72470.69010.78180.77460.85760.79890.63110.7674

Citation

@inproceedings{tack2020csi,
title={CSI: Novelty Detection via Contrastive Learning on Distributionally Shifted Instances},
author={Jihoon Tack and Sangwoo Mo and Jongheon Jeong and Jinwoo Shin},
booktitle={Advances in Neural Information Processing Systems},
year={2020}
}

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages