├── Adversarial Attack └── README.md ├── README.md ├── .gitignore ├── Novel Class Discovery └── README.md ├── Treatment Effect Estimation └── README.md ├── Semi-supervised Learning └── README.md ├── Knowledge Distilling └── README.md ├── Uncertainty └── README.md ├── GCN └── README.md ├── Long-tail └── README.md ├── Noisy Label └── README.md ├── Contrastive Learning └── README.md ├── LICENSE ├── Domain Shift └── README.md ├── Neural Network └── README.md └── OOD Detection └── README.md /Adversarial Attack/README.md: -------------------------------------------------------------------------------- 1 | # Table of Contents 2 | 3 | - [Table of Contents](#table-of-contents) 4 | - [Adversarial](#adversarial) 5 | 6 | # Adversarial 7 | 8 | > Adversarial attack and defense. 9 | 10 | - [Adversarial Examples Improve Image Recognition](https://arxiv.org/abs/1911.09665) (CVPR2020) 11 | - 4分 12 | - motivation:之前的adversarial training在大数据集上虽然可以提高鲁棒性,但都会降低在clean data上的准确率,因此作者希望通过adversarial样本来提高clean data准确率。 13 | - 文中认为之前adversarial training的问题出在distribution mismatch,即对抗样本和真实样本的分布是不一致的。因此可以多加一个辅助的BN,使得二者通过不同的BN以免混淆分布。 14 | 15 | - [Explaining and Harnessing Adversarial Examples](https://arxiv.org/abs/1412.6572) (ICLR2015) 16 | - 5分 17 | - 经典的FGSM方法。 18 | - 从线性模型出发,一个原始样本perturbation η如果满足无穷范数小于其图像分辨率,那么分类器理应无法分出区别。但是经过W^T*η之后,却会因为高维度而将perturbation放大而导致误分。 19 | - 最终的FGSM方法中,求梯度就是linearize the cost function around the current value of θ,取sign是为了obtaining an optimal max-norm constrained pertubation。 20 | 21 | 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 论文阅读笔记 2 | 3 | **记录一些读过的论文,给出个人对论文的评分情况并简述论文insight** 4 | 5 | **评分细节:** 6 | 7 | - 5分:值得反复阅读的论文,非常具有启发性 8 | 9 | - 4分:值得精读的论文,具有一定的启发性 10 | 11 | - 3分:值得粗略阅读的论文,了解论文大概思想后会有一定收获 12 | 13 | - 2分:价值不大的论文,读完基本没有收获 14 | 15 | - 1分:粗制滥造的论文 16 | 17 | > 论文将按照年份依次排序,绝大多数论文将会给出[arXiv](https://arxiv.org/)的链接. 18 | 19 | 20 | # Table of Contents 21 | 22 | - Towards Robust Deep Learning 23 | - [OOD Detection](https://github.com/curryandsun/neural_network_papers/tree/main/OOD%20Detection) 24 | 25 | - [Long-tail](https://github.com/curryandsun/neural_network_papers/tree/main/Long-tail) 26 | 27 | - [Noisy Label](https://github.com/curryandsun/neural_network_papers/tree/main/Noisy%20Label) 28 | 29 | - [Domain Shift](https://github.com/curryandsun/neural_network_papers/tree/main/Domain%20Shift) 30 | 31 | - [Uncertainty](https://github.com/curryandsun/neural_network_papers/tree/main/Uncertainty) 32 | 33 | - [Adversarial Attack](https://github.com/curryandsun/neural_network_papers/tree/main/Adversarial%20Attack) 34 | 35 | 36 | - Exploiting Unlabeled Data 37 | 38 | - [Semi-supervised Learning](https://github.com/curryandsun/neural_network_papers/tree/main/Semi-supervised%20Learning) 39 | 40 | - [Contrastive Learning](https://github.com/curryandsun/neural_network_papers/tree/main/Contrastive%20Learning) 41 | 42 | - [Novel Class Discovery](https://github.com/curryandsun/neural_network_papers/tree/main/Novel%20Class%20Discovery) 43 | 44 | 45 | - Others 46 | - [Neural Network](https://github.com/curryandsun/neural_network_papers/tree/main/Neural%20Network) 47 | 48 | - [Knowledge Distilling](https://github.com/curryandsun/neural_network_papers/tree/main/Knowledge%20Distilling) 49 | 50 | - [Treatment Effect Estimation](https://github.com/curryandsun/neural_network_papers/tree/main/Treatment%20Effect%20Estimation) 51 | 52 | - [GCN](https://github.com/curryandsun/neural_network_papers/tree/main/GCN) 53 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Project files 2 | */*/ 3 | 4 | *.pdf 5 | *.py 6 | *.xlsx 7 | 8 | # IPython notebook checkpoints 9 | .ipynb_checkpoints 10 | 11 | # Editor temporaries 12 | *.swn 13 | *.swo 14 | *.swp 15 | *.swm 16 | *~ 17 | 18 | # macOS dir files 19 | .DS_Store 20 | 21 | # Symbolic files 22 | tools/shared/cwrap_common.py 23 | 24 | # Ninja files 25 | .ninja_deps 26 | .ninja_log 27 | compile_commands.json 28 | *.egg-info/ 29 | docs/source/scripts/activation_images/ 30 | 31 | ## General 32 | 33 | # Compiled Object files 34 | *.slo 35 | *.lo 36 | *.o 37 | *.cuo 38 | *.obj 39 | 40 | # Compiled Dynamic libraries 41 | *.so 42 | *.dylib 43 | *.dll 44 | 45 | # Compiled Static libraries 46 | *.lai 47 | *.la 48 | *.a 49 | *.lib 50 | 51 | # Compiled protocol buffers 52 | *.pb.h 53 | *.pb.cc 54 | *_pb2.py 55 | 56 | # Compiled python 57 | *.pyc 58 | *.pyd 59 | 60 | # Compiled MATLAB 61 | *.mex* 62 | 63 | # IPython notebook checkpoints 64 | .ipynb_checkpoints 65 | 66 | # Editor temporaries 67 | *.swn 68 | *.swo 69 | *.swp 70 | *~ 71 | 72 | # Sublime Text settings 73 | *.sublime-workspace 74 | *.sublime-project 75 | 76 | # Eclipse Project settings 77 | *.*project 78 | .settings 79 | 80 | # QtCreator files 81 | *.user 82 | 83 | # PyCharm files 84 | .idea 85 | 86 | # OSX dir files 87 | .DS_Store 88 | 89 | # GDB history 90 | .gdb_history 91 | 92 | ## Caffe2 93 | 94 | # build, distribute, and bins (+ python proto bindings) 95 | build 96 | build_host_protoc 97 | build_android 98 | build_ios 99 | /build_* 100 | .build_debug/* 101 | .build_release/* 102 | distribute/* 103 | *.testbin 104 | *.bin 105 | cmake_build 106 | .cmake_build 107 | gen 108 | .setuptools-cmake-build 109 | .pytest_cache 110 | aten/build/* 111 | 112 | # Bram 113 | plsdontbreak 114 | 115 | # Generated documentation 116 | docs/_site 117 | docs/gathered 118 | _site 119 | doxygen 120 | docs/dev 121 | 122 | # LevelDB files 123 | *.sst 124 | *.ldb 125 | LOCK 126 | LOG* 127 | CURRENT 128 | MANIFEST-* 129 | 130 | # generated version file 131 | caffe2/version.py 132 | 133 | # setup.py intermediates 134 | .eggs 135 | caffe2.egg-info 136 | 137 | # Atom/Watchman required file 138 | .watchmanconfig 139 | 140 | # Files generated by CLion 141 | cmake-build-debug 142 | 143 | # Files generated by ctags 144 | CTAGS 145 | tags 146 | TAGS 147 | 148 | # BEGIN NOT-CLEAN-FILES (setup.py handles this marker. Do not change.) 149 | # 150 | # Below files are not deleted by "setup.py clean". 151 | 152 | # Visual Studio Code files 153 | .vscode 154 | .vs 155 | 156 | # YouCompleteMe config file 157 | .ycm_extra_conf.py 158 | 159 | # Files generated when a patch is rejected 160 | *.orig 161 | *.rej 162 | -------------------------------------------------------------------------------- /Novel Class Discovery/README.md: -------------------------------------------------------------------------------- 1 | # Table of Contents 2 | 3 | - [Table of Contents](#table-of-contents) 4 | - [Novel Class Discovery](#novel-class-discovery) 5 | 6 | # Novel Class Discovery 7 | 8 | > NCD is similar but different from semi-supervised learning, because, in 9 | the latter, the working assumption is that labeled and unlabeled sets share the same classes. Differently, in NCD, the two sets of classes are supposed to be disjoint. Moreover, differently from common clustering, scenarios, in an NCD framework, labeled data can be utilized at training time, and the challenge consists in transferring the supervised knowledge on the known classes to improve clustering of the unknown ones. 10 | 11 | > 个人觉得NCD这个setting存在几个问题:1.labeled set样本数目大于unlabeled set。2.现实中labeled set和unlabeled set不一定是disjoint的。3.现实中难以得知unlabeled set中的类别数目。 12 | 13 | - [A Unified Objective for Novel Class Discovery](https://arxiv.org/abs/2108.08536) (ICCV2021_oral) 14 | - 4分 15 | - movitation在于将NCD问题中常见的多个训练目标进行统一。unlabel的部分与SWaV几乎一致,所谓的unified objective就是把label和unlabel的两组logits concat到一起。 16 | 17 | - [OpenMix: Reviving Known Knowledge for Discovering Novel Visual Categories in an Open World](https://arxiv.org/abs/2004.05551) (CVPR2021) 18 | - 3分 19 | - 为了充分利用label data,采用了将label data与unlabel data做mixup再self-training的方法。 20 | 21 | - [Neighborhood Contrastive Learning for Novel Class Discovery](https://arxiv.org/abs/2106.10731) (CVPR2021) 22 | - 3分 23 | - 在[RS](https://arxiv.org/abs/2002.05714)的基础上加上对label data的supervised contrastive learning和对所有data的neighborhood contrastive learning。 24 | 25 | - [Automatically Discovering and Learning New Visual Categories with Ranking Statistics](https://arxiv.org/abs/2002.05714) (ICLR2020) 26 | - 5分 27 | - 论文的novelty在于结合self-supervised learning以及自己提出的一个Ranking Statistics。训练可分为三步: 28 | - 1.全部数据上用RotNet预训练low-level features。 29 | - 2.冻结网络前面几层,用label data进行finetune。 30 | - 3.对于unlabel data,用Ranking Statistics得到相似矩阵,再用BCE进行训练。 31 | 32 | - [Multi-class Classification without Multi-class Labels](https://arxiv.org/abs/1901.00544) (ICLR2019) 33 | - 3分 34 | - 与[KCL](https://arxiv.org/abs/1711.10125)一个套路,只不过把衡量相似度的方法由KL散度换成了内积,形式上更加简洁了。 35 | 36 | 37 | - [Learning to Discover Novel Visual Categories via Deep Transfer Clustering](https://arxiv.org/abs/1908.09884) (ICCV2019) 38 | - 4分 39 | - label data上pretrain再在unlabel data上做cluster的思路。 40 | - 文中提到了估计unlabel data类别数目的方法。大体就是划分出验证集,然后枚举不同的K做K-means,选择效果最好的那个K。 41 | 42 | - [Learning to cluster in order to transfer across domains and tasks](https://arxiv.org/abs/1711.10125) (ICLR2018) 43 | - 4分 44 | - 核心思想是把原有的类别信息不好迁移,那就迁移similarity信息。 45 | - 做法是利用label data训练一个similarity prediction netwrok,再用其生成unlabel data的pseudo similarity用于训练。 46 | 47 | 48 | -------------------------------------------------------------------------------- /Treatment Effect Estimation/README.md: -------------------------------------------------------------------------------- 1 | # Table of Contents 2 | 3 | - [Table of Contents](#table-of-contents) 4 | - [Reviews](#reviews) 5 | - [Model-agnostic Methods](#model-agnostic-methods) 6 | - [Model-specific Methods](#model-specific-methods) 7 | - [NN-based](#nn-based) 8 | - [Tree-based](#tree-based) 9 | 10 | # Reviews 11 | 12 | > Causal inference frameworks include the potential outcome framework (by Donald Rubin) and the structural causal model (by Judea Pearl). Treatment Effect Estimation is an important task in the potential outcome framework. 13 | 14 | > W:treatments, X:variables, Y:outcomes, C:Confounders 15 | 16 | - [A Survey on Causal Inference](https://arxiv.org/abs/2002.02770) (arXiv2020) 17 | - 5分 18 | - 关于potential outcome framework下的causal inference的综述。 19 | - 三个经典的assumption: 20 | - Assumption 1: unit之间独立(如在社交网络中是不成立的)以及the single version for each treatment。 21 | - Assumption 2: 在给定X时,W与Y独立。这表示当给定X时,W可以看成random给的。这个假设隐含着所有confounders都包含在给定的X之中,但在实际情况中显然可能存在一些confounders没有被观测到。 22 | - Assumption 3 Positivity表明在给定X时,任意的W都是可能的。 23 | - Two major challenges in treatment effect estimation and confounder bias are: 24 | - Missing counterfactuals outcome: 对照实验是代价高昂的,现实中往往只能观测到一个outcome,而其余的treatment下的outcome即counterfactual outcome. 25 | - Confounder bias: Confounders are the variables that affect both the treatment assignment and the outcome. Confounders导致了treatment group和control group之间的selection bias,相当于covariate shift问题。 26 | - Propensity score即e(x)=P(W=1|X=x),刻画了给定X=x对于treatment的偏好。实际上这里的X也可以写成C。实际应用中通常用lr去估计。 27 | 28 | # Model-agnostic Methods 29 | 30 | > 与具体使用的模型无关,强调的是方案的框架与思路,又被称作meta-learner。 31 | 32 | - [Meta-learners for Estimating Heterogeneous Treatment Effects using Machine Learning](https://arxiv.org/abs/1706.03461) (PNAS2019) 33 | - [Nonparametric estimation of heterogeneous treatment effects: From theory to learning algorithms](https://arxiv.org/abs/1706.03461) (AISTATS2021) 34 | - [Towards optimal doubly robust estimation of heterogeneous causal effects](https://arxiv.org/abs/2004.14497) (arXiv2020) 35 | - [Quasi-Oracle Estimation of Heterogeneous Treatment Effects](https://arxiv.org/abs/1712.04912) (arXiv2017) 36 | - 5分 37 | - meta-learner中又包括indirect learners以及direct learners,后者目标是直接建模effect,而前者并不是。 38 | - indirect learners: 包括S-learner和T-learner两种最基本的baseline。 39 | - direct learners: 通常是两阶段的建模过程,第一阶段首先得到effect的伪标记,即论文中常提到的pseudo-outcomes。第二阶段再利用effect的伪标记做回归直接建模得到从X到effect的模型。 40 | 41 | 42 | # Model-specific Methods 43 | 44 | > 与具体使用的模型相关的方法,包括基于NN的,基于树的方法等等。 45 | 46 | ## NN-based 47 | 48 | > 使用NN时,基于表示学习来缓解selection bias带来的对照组和实验组的分布偏移。 49 | 50 | - [Learning Representations for Counterfactual Inference](https://arxiv.org/abs/1605.03661) (ICML2016) 51 | - [Estimating individual treatment effect: generalization bounds and algorithms](https://arxiv.org/abs/1606.03976) (ICML2017) 52 | - 4分 53 | - 借用DA中的那一套方法和理论做表征对齐。用NN时非常好用的方法。 54 | 55 | ## Tree-based 56 | 57 | > 使用Tree时,通过改变节点分裂的方式缓解selection bias。 58 | 59 | - [Bayesian Nonparametric Modeling for Causal Inference](https://www.google.com/search?q=Bayesian+Nonparametric+Modeling+for+Causal+Inference&oq=Bayesian+Nonparametric+Modeling+for+Causal+Inference&aqs=chrome..69i57j0i30j69i61.2065j0j4&sourceid=chrome&ie=UTF-8) (JCGS2011) 60 | - [Generalized Random Forests](https://arxiv.org/abs/1610.01271) (arXiv2016) 61 | - 5分 62 | - 非常知名的两个基于树的方法,分别为BART和Causal Forest。 -------------------------------------------------------------------------------- /Semi-supervised Learning/README.md: -------------------------------------------------------------------------------- 1 | # Table of Contents 2 | 3 | - [Table of Contents](#table-of-contents) 4 | - [Semi-supervised Learning](#semi-supervised-learning) 5 | - [Basic](#basic) 6 | - [Open-set](#open-set) 7 | 8 | # Semi-supervised Learning 9 | 10 | > 半监督学习。 11 | 12 | ## Basic 13 | 14 | > 主流的半监督学习方法,主要集中于vision领域。 15 | 16 | - [FixMatch: Simplifying Semi-Supervised Learning with Consistency and Confidence](https://arxiv.org/abs/2001.07685) (NIPS2020) 17 | - 4分 18 | - 相对于ReMixMatch来说更加简单直观。相比MixMatch的改进主要在于一致性正则的一些不同: 19 | - 1.平方差异损失改为了交叉熵损失(一定好吗?原文并没有讨论。) 20 | - 2.sharpen label改为带threshold的one-hot label。ablation study中认为前者需要多一个超参但并没有带来明显提升。 21 | - 3.MixMatch:原样本输出分布去逼近aug样本输出分布。FixMatch:weak aug样本的输出分布去逼近strong aug样本的输出分布。这里本质上还是strong aug带来的提升。 22 | 23 | - [ReMixMatch: Semi-Supervised Learning with Distribution Alignment and Augmentation Anchoring](https://arxiv.org/abs/1911.09785) (ICLR2020) 24 | - 4分 25 | - 对MixMatch做了两点改进。 26 | - 1.distribution alignment:鼓励模型在期望意义下的输出分布逼近p(y)。将每个伪标签后处理,对齐有标记数据的p(y)分布,隐式地实现上述目标(就像MixMatch中用sharpen隐式地实现熵最小原则一样)。 27 | - 2.augmentation anchor: 类似AutoAugment的一种更强的数据增强。notice:将一致性正则中常用的平方损失换成了交叉熵。 28 | - 还加上了自监督里比较经典的Rotation Loss。 29 | 30 | - [Self-training with Noisy Student improves ImageNet classification](https://arxiv.org/abs/1911.04252) (CVPR2020) 31 | - 4分 32 | - 与传统self-training或者KD的区别在于两点:Our key improvements lie in adding noise to the student and using student models that are not smaller than the teacher. 33 | - When applied to unlabeled data, noise has an important benefit of enforcing invariances in the decision function on both labeled and unlabeled data. 34 | 35 | - [Temporal Ensembling for Semi-Supervised Learning](https://arxiv.org/abs/1610.02242) (ICLR2017) 36 | - [Virtual Adversarial Training: A Regularization Method for Supervised and Semi-Supervised Learning](https://arxiv.org/abs/1704.03976) (TPAMI2018) 37 | - [Mean teachers are better role models: Weight-averaged consistency targets improve semi-supervised deep learning results](https://arxiv.org/abs/1703.01780) (NIPS2017) 38 | - [MixMatch: A Holistic Approach to Semi-Supervised Learning](https://arxiv.org/abs/1905.02249) (NIPS2019) 39 | - 5分 40 | - semi-supervised learning必读经典,基本都包括了两个重要原则: 41 | - 1.一致性正则:相同的输入应该产生相同的输出。通常采用原样本与aug样本两者输出的平方差异损失。 42 | - 2.最小熵准则:分类面应该穿过低密度区域,即对样本输出的置信度较高,即输出分布的熵最小。通常采用样本输出与伪标签之间的交叉熵来实现。因为不管是转化为one-hot还是sharpen后的伪标签(sharpen相当于是soft版本的ont-hot),都相较于输出分布有着更小的熵。 43 | 44 | 45 | ## Open-set 46 | 47 | > Open-set SSL,考虑的是unlabeled data中包括OOD样本的情况。 48 | 49 | - [OpenMatch: Open-set Consistency Regularization for Semi-supervised Learning with Outliers](https://arxiv.org/abs/2105.14148) (NIPS2021) 50 | - 4分 51 | - 将classfier换成OVA的想法很有意思,因为softmax注定只能将样本预测为某一个类别,而OVA针对每一个类别,预测样本是否为该类别,那么也就有可能存在不是任何类别的预测,也就是OOD样本。这个motivation非常自然。 52 | 53 | - [OpenCoS: Contrastive Semi-supervised Learning for Handling Open-set Unlabeled Data](https://arxiv.org/abs/2107.08943) (arXiv2021) 54 | - 3分 55 | - open-set SSL一个很直接的想法就是在unlabel data上利用contrastive learning。这篇文章可以看作一个baseline,其通过label data计算prototype,再通过cos相似度来判定ID or OOD。 56 | 57 | - [Safe Deep Semi-Supervised Learning for Unseen-Class Unlabeled Data](http://proceedings.mlr.press/v119/guo20i.html) (ICML2020) 58 | - 4分 59 | - 加入样本级别的w系数,希望ood样本的w尽可能小,采用了类似meta-learning的bi-level优化。 60 | 61 | - [Multi-Task Curriculum Framework for Open-Set Semi-Supervised Learning](https://arxiv.org/abs/2007.11330) (ECCV2020) 62 | - 4分 63 | - 同时训练OOD detector和ID classifier。不像传统的selection直接用msp选择,这里多设置了一个分支用来学一个OOD score。这里直接把label样本标为ID,unlabel样本标为OOD,这一分支就是一个二分类的noisy label问题。 64 | 65 | - [Semi-Supervised Learning under Class Distribution Mismatch](https://ojs.aaai.org/index.php/AAAI/article/view/5763) (AAAI2020) 66 | - 3分 67 | - 采用了selection的方法,主要思想也是通过msp加阈值选出高置信度的样本认为是可利用的ID样本,为了提高confidence的可信度还采用了time维度上的ensemble。思路很简单,文章表述偏花里胡哨。 68 | 69 | -------------------------------------------------------------------------------- /Knowledge Distilling/README.md: -------------------------------------------------------------------------------- 1 | # Table of Contents 2 | 3 | - [Table of Contents](#table-of-contents) 4 | - [Knowledge Distilling](#knowledge-distilling) 5 | - [Distilling From Logits](#distilling-from-logits) 6 | - [Distilling From Features](#distilling-from-features) 7 | - [Self-KD](#self-kd) 8 | - [Others](#others) 9 | 10 | # Knowledge Distilling 11 | 12 | > 知识蒸馏。 13 | 14 | ## Distilling From Logits 15 | 16 | > Logits层面的蒸馏。 17 | 18 | - [Revisiting Knowledge Distillation via Label Smoothing Regularization](https://arxiv.org/abs/1909.11723) (CVPR2020) 19 | - 5分 20 | - motivation:在实验中发现两点不符合常理的现象:1.student网络也能指导teacher网络。2.准确率很低的teacher网络也能指导student网络。 21 | - 非常清晰地分析了KD和label smooth之间的关系。两者形式上本身就非常相似,label smooth可以看成是人工设计的一直输出均匀分布的virtual teacher,同理KD也可以看成是更强的可学习的label smooth。 22 | - 由此提出了TF-KD,一种是直接拿pretrain的student网络当成teacher,一种是将soft label加上temperature。 23 | - 文章思路非常清晰,idea也很好,但是实验也并不能表明TF-KD就比LSR好多少,也没有去探究normal-KD比TF-KD能好在哪。 24 | 25 | - [Distilling the Knowledge in a Neural Network](https://arxiv.org/abs/1503.02531) (NIPS2014) 26 | - 5分 27 | - Hinton出品,知识蒸馏开山之作。 28 | - 属于logit级别的知识蒸馏。student网络一方面用带温度的softmax去学习teacher网络的分布,一方面用hard的softmax去学习真实标签。 29 | - teacher网络很大很复杂,他的soft标签可以包含一些类之间的关系,而这些是hard标签所没有的,因此可以把这部分看作其学到的“知识”,再交由student小网络进行学习。 30 | 31 | ## Distilling From Features 32 | 33 | > Features或Relations层面的蒸馏。 34 | 35 | - [Similarity-Preserving Knowledge Distillation](https://arxiv.org/abs/1907.09682) (ICCV2019) 36 | - [A Gift from Knowledge Distillation:Fast Optimization, Network Minimization and Transfer Learning](https://openaccess.thecvf.com/content_cvpr_2017/papers/Yim_A_Gift_From_CVPR_2017_paper.pdf) (CVPR2017) 37 | - 4分 38 | - 两篇文章都是从feature map的角度进行蒸馏。 39 | - 第一篇由浅层feature map(b\*c\*h\*w)生成一个表示batch内样本间相似度的相似矩阵(b\*b),对这个矩阵进行蒸馏。蒸馏的信息:batch内样本的相似度。 40 | - 第二篇由一个样本两个不同层的feature map(c1\*h\*w和c2\*h\*w)生成FSP(c1\*c2),对其进行蒸馏。FSP:The extracted feature maps from two layers are used to generate the flow of solution procedure(FSP) matrix。即蒸馏不同layer间feature map的flow信息。 41 | 42 | - [Paying More Attention to Attention: Improving the Performance of Convolutional Neural Networks via Attention Transfer](https://arxiv.org/abs/1612.03928) (ICLR2017) 43 | - 4分 44 | - 通过由feature map(c\*h\*w)生成的attention map(h\*w)来进行蒸馏。这里的attention map其实就是feature map做了一个channel-wise的pooling后的统计量。 45 | 46 | ## Self-KD 47 | 48 | > 自蒸馏。 49 | 50 | - [Regularizing Class-wise Predictions via Self-knowledge Distillation](https://arxiv.org/abs/2003.13964) (CVPR2020) 51 | - 3分 52 | - self-kd,或可以理解为正则化。流程非常简单,取标签相同的两个batch,对其输出概率求KL散度作为正则项损失,即要求标签相同的输入拥有更加相近的输出概率分布。 53 | - 可以理解为更加真实的label smooth,因为是把相同标签的样本的输出看成soft label。可以说和Deep mutual learning结构几乎完全相同,只不过是使用了同一个网络以及pair的输入。另一方面和PairwiseConfusion完全相反。 54 | - 不得不感叹2020年了,还能这样水一篇CVPR。 55 | 56 | - [Be Your Own Teacher: Improve the Performance of Convolutional Neural Networks via Self Distillation](https://arxiv.org/abs/1905.08094) (ICCV2019) 57 | - [MSD: Multi-Self-Distillation Learning via Multi-classifiers within Deep Neural Networks](https://arxiv.org/abs/1911.09418) (arXiv2019) 58 | - 4分 59 | - 这两篇非常类似,都属于self-kd。 60 | - 要求每个浅层模型都具有独立判别的能力,且与深层模型接近。三项loss可以分别看成是:1.深度监督(DSN) 2.深层模型对浅层模型的输出分布监督 3.深层模型对浅层模型的feature监督。 61 | - 对后两项是否确实有实际意义表示存疑。 62 | - 后一篇实验效果远好于第一篇,但论文中读不出具体的改进。 63 | 64 | - [Deep mutual learning](https://arxiv.org/abs/1706.00384) (CVPR2018) 65 | - 3分 66 | - 两个网络mutual的训练,将输出分布求KL散度作为Loss的一项。 67 | - 目标是两个网络之间相互指导训练(互相趋同),最后两个网络都可以拿出来用。Long-tail问题中多专家框架和这个很像,但是是将多专家输出分布的KL散度之间最大化(互相不同),然后集成起来用。 68 | - 一个模型学到的概率分布可以看作是模型学到了数据内部的一个本质规律,就可以用来指导另外一个模型。也可以看作一个正则化的手段,类似于一种更加贴合数据本身规律的label smooth。 69 | 70 | ## Others 71 | > 其它。 72 | 73 | - [Neural Networks Are More Productive Teachers Than Human Raters: Active Mixup for Data-Efficient Knowledge Distillation from a Blackbox Model](https://arxiv.org/abs/2003.13960) (CVPR2020) 74 | - [Computation-Efficient Knowledge Distillation via Uncertainty-Aware Mixup](https://arxiv.org/abs/2012.09413) (arXiv2020) 75 | - 4, 3分 76 | - 前者提出了一个很有意思的setting:即把KD和AL联系在一起,认为teacher是AL中的oracle,teacher输出的distribution认为是真实label。那么很自然的就用到AL中的uncertainty query的想法,把mixup后的samples中最不确定的去query teacher。注意整个过程都是unlabel的。 77 | - 后者做了几点小修小改: 78 | - 1.提出了KD-efficiency的概念,即需要考虑student的前后向+teacher的前向,而第一篇文章只考虑了query的次数,显然是不够的。 79 | - 2.Uncertainty-Aware Mixup:第一篇先mixup再前向过一遍student算uncertainty,这一篇其实就是反之,先算uncertainty再mixup,这样显然可以减少student的计算量。且uncertainty大的样本显然更需要mild mixup,因为其本身还包含大量信息,这样的mixup是更有道理的。 -------------------------------------------------------------------------------- /Uncertainty/README.md: -------------------------------------------------------------------------------- 1 | # Table of Contents 2 | 3 | - [Table of Contents](#table-of-contents) 4 | - [Reviews](#reviews) 5 | - [Non-Bayesian Methods](#non-bayesian-methods) 6 | - [Bayesian Methods](#bayesian-methods) 7 | 8 | # Reviews 9 | 10 | > Predictive uncertainty is important because it enables accurate assessment of risk, allows practitioners to know how accuracy may degrade, and allows a system to abstain from decisions due to low confidence. 11 | 12 | - [Aleatoric and Epistemic Uncertainty in Machine Learning: An Introduction to Concepts and Methods](https://arxiv.org/abs/1910.09457) (arXiv2019) 13 | - 5分 14 | - 关于uncertainty的综述。 15 | - Aleatoric uncertainty refers to the irreducible part of the uncertainty, which is due to the non-deterministic nature of the sought input/output dependency. Epistemic uncertainty is, uncertainty due to a lack of knowledge about the perfect predictor, for example caused by uncertainty about the parameters of a model. In principle, this uncertainty can be reduced. 16 | - Aleatoric Uncertainty指的是任务本身的不确定性(如数据存在noise或任务本身很困难),即使best model也只能给出不确定的预测。而Epistemic Uncertainty指的是由于认知不足(如数据量不足),训练得到的模型与best model之间存在的差异。 17 | - 两个概念是相对给定的(X,Y,H,P)而言的。增加数据量(X空间没变)可以降低Epistemic Uncertainty,增加数据维度(X空间改变)可以降低Aleatoric Uncertainty。而OOD问题可以看成是训练数据只占了真实分布P(X,Y)的一小部分,因此存在很大的Epistemic Uncertainty。 18 | - 在BNN中,epistemic uncertainty is modeled by placing a prior distribution over a model’s weights(因此也叫model uncertainty), aleatoric uncertainty on the other hand is modeled by placing a distribution over the output of the model(这里指的是在fix W的情况下的output,在分类中就是softmax的输出,而在回归问题中通常输出一个Gaussian,如果没有fix那么可以认为output刻画的是total uncertainty). 19 | - 当假设空间H非常大(如DNN)时,model uncertainty essentially disappears, while approximation uncertainty might be high。此时,inductive inference will essentially be of a local nature: A class y is approximated by the region in the instance space in which examples from that class have been seen, aleatoric uncertainty occurs where such regions are overlapping(如两类非常相似,本身就难以区分), and epistemic uncertainty where no examples have been encountered so far(如OOD样本)。 20 | - 公式(22)和(23)很有意思,后者是先ensemble再求熵用于估计total uncertainty,前者是先求熵再ensemble用于估计Aleatoric Uncertainty,而两者的差就是Epistemic Uncertainty。容易验证:当Epistemic Uncertainty为0时,相当于所有单个模型都是一样的,那total uncertainty显然等于Aleatoric Uncertainty,因此差确实为0。 21 | 22 | # Non-Bayesian Methods 23 | 24 | > Non-Bayesian的方法。 25 | 26 | - [On Calibration of Modern Neural Networks](https://arxiv.org/abs/1706.04599) (ICML2017) 27 | - 5分 28 | - 第一篇考虑DNN中的calibration问题的工作。 29 | - 有意思的一个点是对DNN很难overfit的一个猜测:overfit可能并不是发生在test error上,而是发生在test NLL loss上,也就是说在不断训练过程中,虽然模型的预测准确率保持很高,但是模型的预测趋向于overconfident。 30 | - 如果只有训练集很难做calibration,因为训练集准确率很高,那么模型只需要输出高置信度即可。因此可以通过post-hoc calibration方法找到一个映射,使得模型的输出经过这个映射后在验证集上达到最优。 31 | - 但这样的方法显然是在期望意义下的,是对模型整体的一个校准。如果我们需要考虑数据本身,比如用户需要模型对自己特定的某个输入产生准确的置信度,这样的方法是不精准的。 32 | 33 | - [Simple and Scalable Predictive Uncertainty Estimation using Deep Ensembles](https://arxiv.org/abs/1612.01474) (NIPS2017) 34 | - 4分 35 | - 通过ensemble的方法来刻画uncertainty。 36 | - How to evaluate predictive uncertainty? held-out validation set + proper scoring rules. 37 | - 方法很简单,认为ensemble可以使得Predictive Uncertainty Estimation更加精准,可以分为分类和回归两种情况: 38 | - 分类:直接将多个model输出的后验概率分布做平均。注意这里仍然是使用后验概率分布加scoring rules的方式来刻画uncertainty。 39 | - 回归:单个模型训练时输出的$\sigma$项是在刻画aleatoric uncertainty。ensemble后的$\sigma$项可以分解为aleatoric uncertainty和epistemic uncertainty两项。 40 | 41 | # Bayesian Methods 42 | 43 | > BNNs(Bayesian Neural Networks) learn a posterior distribution over parameters that quantifies parameter 44 | uncertainty, a type of epistemic uncertainty that can be reduced through the collection of additional data. 45 | 46 | - [What Uncertainties Do We Need in Bayesian Deep Learning for Computer Vision?](https://arxiv.org/abs/1703.04977) (NIPS2017) 47 | - 5分 48 | - 分离aleatoric uncertainty和epistemic uncertainty。 49 | - 为什么要分离? 50 | - it is important to model aleatoric uncertainty for: 51 | - Large data situations, where epistemic uncertainty is explained away, 52 | - Real-time applications, because we can form aleatoric models without expensive Monte Carlo samples. 53 | - And epistemic uncertainty is important for: 54 | - Safety-critical applications, because epistemic uncertainty is required to understand examples which are different from training data, 55 | - Small datasets where the training data is sparse. 56 | - 具体做法: 57 | - 认为aleatoric uncertainty是data-dependent的,因此让模型直接输出一个$\sigma$项去建模aleatoric uncertainty,具体实现时增加一个head即可。此时loss本质上是对Gaussian做MLE。 58 | - epistemic uncertainty即多次采样输出的方差,这里不管用BNN,MC-dropout或ensemble,思想都是一致的。 59 | - 分类问题在logit空间上做即可。 -------------------------------------------------------------------------------- /GCN/README.md: -------------------------------------------------------------------------------- 1 | # Table of Contents 2 | 3 | - [Table of Contents](#table-of-contents) 4 | - [GCN](#gcn) 5 | - [Basic](#basic) 6 | - [Over-smooth](#over-smooth) 7 | - [Better Aggregation](#better-aggregation) 8 | - [Others](#others) 9 | 10 | # GCN 11 | 12 | > 图卷积神经网络。 13 | 14 | ## Basic 15 | 16 | > GCN基础。 17 | 18 | - [Semi-Supervised Classification with Graph Convolutional Networks](https://arxiv.org/abs/1609.02907) (ICLR2017) 19 | - 5分 20 | - GCN开山之作。 21 | - [知乎上一篇很好的解析](https://zhuanlan.zhihu.com/p/120311352) 22 | - 最终GCN的aggregation相当于是自身结点与邻居结点的加权和,这个权重与自身和邻居的度有关,度越大则权重越小。 23 | 24 | - [Inductive Representation Learning on Large Graphs](https://arxiv.org/abs/1706.02216) (NIPS2017) 25 | - 5分 26 | - transductive(训练过程中val和test都是可见的:GCN) -> inductive(训练过程中val和test都是unseen的,只有train set的结点和边:GraphSAGE) 27 | - 简而言之,GCN是学每个结点固定的表示,而GraphSAGE是学K个aggregation函数。因此对于测试中的新结点或新图,只需要通过其邻居对其做aggregation即可,而不用重新训练整个网络。 28 | - Aggregate and Combine:instead of aggregating a node and its neighbors at the same time,GraphSAGE aggregates the neighbors first and then combine the resulting neighborhood representation with the node’s representation.The COMBINE step is key to this paradigm and can be viewed as a form of a ”skip connection” between different layers. 29 | 30 | - [Graph Attention Networks](https://arxiv.org/abs/1710.10903) (ICLR2018) 31 | - 5分 32 | - GAT:weighted mean aggregation + self-attention。 33 | - GCN的aggregation相当于加权平均,但这个权重来自于整个图的信息,显然计算量大,且是transductive的。而GraphSAGE的mean aggregation直接取平均。于是作者想到了可以用self-attention的方法学得一个权重来进行加权平均。 34 | 35 | ## Over-smooth 36 | 37 | > GCN中的过平滑问题。 38 | 39 | - [DropEdge: Towards Deep Graph Convolutional Networks on Node Classification](https://openreview.net/pdf?id=Hkx1qkrKPr) (ICLR2020) 40 | - 3分 41 | - DropEdge to alleviate over-fitting and over-smoothing. 42 | - code中具体实现DropEdge时邻接矩阵竟然变成不对称的了,风中凌乱... 43 | 44 | - [Deeper Insights into Graph Convolutional Networks for Semi-Supervised Learning](https://arxiv.org/abs/1801.07606) (AAAI2018_oral) 45 | - 5分 46 | - GCN每一层都在做aggregation and transformation.因此GCN和FCN的唯一区别就在于先做了一次aggregation。文中分析aggregation就是特殊的Laplacian smoothing。 47 | - The Laplacian smoothing computes the new features of a vertex as the weighted average of itself and its neighbors’.Since vertices in the same cluster tend to be densely connected, the smoothing makes their features similar.于是过多次的aggregation就会导致over-smooth,即不同类的结点特征也混淆在一起了。 48 | 49 | - [Representation Learning on Graphs with Jumping Knowledge Networks](https://arxiv.org/abs/1806.03536) (ICML2018_oral) 50 | - 5分 51 | - Motivated by observations that reveal great differences in neighborhood information ranges for graph node embeddings, we propose a new aggregation scheme for node representation learning that can adapt neigborhood ranges to nodes individually. 52 | - JKnet uses dense skip connections to combine the node features of each layer to preserve the locality of the node representations. 53 | 54 | ## Better Aggregation 55 | 56 | > 探索更好的聚合方式。 57 | 58 | - [Measuring and Improving the Use of Graph Information in Graph Neural Networks](https://openreview.net/pdf/3ff628aed23920c95386567ad7acc7885d49b122.pdf) (ICLR2020) 59 | - [Measuring and Relieving the Over-smoothing Problem for Graph Neural Networks from the Topological View](https://arxiv.org/abs/1909.03211) (AAAI2020) 60 | - 4分 61 | - 前者提出了两个图本身的指标:λf衡量邻居结点与自身的feature差异性(information gain);λl衡量邻居结点与自身的label差异性(information noise)。显然,一个图若有更大的λf和更小的λl,则更利于aggregation。后者也提出了非常类似的指标。 62 | - 基于上述两个指标前者提出了一个类似GAT的网络,两点不同比较有意思: 63 | - 1.attention系数排名小于2|E|λl的全部置0,相当于认为其是与不同label结点相连的noise信息。 64 | - 2.λf用来设置hidden layer的维度,显然λf越大,则需要更大的维度来保证information gain。 65 | - 后者通过伪标签将不同类的边去去掉,将同类的边加上。是个非常自然的想法,但是复杂度过高。 66 | 67 | - [When Do GNNs Work: Understanding and Improving Neighborhood Aggregation](https://www.ijcai.org/Proceedings/2020/181) (IJCAI2020) 68 | - 4分 69 | - 与上述两篇非常相似,提出了对于每个结点两个指标:一个来衡量邻居的标签差异性,一个来衡量自身与邻居的标签相似性,然后认为前者过大是harmful的,后者过小则是useless的。 70 | - 做法很有意思,根据这两个指标计算出每个结点每次aggregation的权重,因此可能出现不同结点aggregation次数不一样的情况,这也是文章的motivation之一,即不同的结点显然需要不同次数的aggregation。 71 | 72 | - [Simplifying Graph Convolutional Networks](https://arxiv.org/abs/1902.07153) (ICML2019) 73 | - [MixHop: Higher-Order Graph Convolutional Architectures via Sparsified Neighborhood Mixing](https://arxiv.org/abs/1905.00067) (ICML2019) 74 | - 5, 4分 75 | - Higher-Order aggregation。 76 | - 前者假设GCN中的非线性层(ReLU)意义不大,因此直接用SkX作为aggregation features。文中指出k>1时,Sk act as a low-pass-type filters。notice:SGC would fail when the feature input is nonlinearly-separable because the graph convolution part does not contribute to non-linear manifold learning.这也解释了为什么在random split的情况下,SGC无法收敛。 77 | - 而后者类似JKnet,将SkXWk从1到k做concat,与JKnet的不同:MixHop是每次aggregation时都使用了Higher-Order的filter,而JKnet每次aggregation仍是1阶的,只是最后将每层的feature都拿出来作为最后的representation。 78 | 79 | ## Others 80 | 81 | > 其它。 82 | 83 | - [Graph Random Neural Network for Semi-Supervised Learning on Graphs](https://arxiv.org/abs/2005.11079) (NIPS2020) 84 | - 4分 85 | - 将MixMatch的做法用到GCN。 86 | - aug用的是直接随机将X矩阵某些行置0,也就是随机将一些结点的特征向量全部置0。 87 | - 将aggregation and transformation解耦:aug s次得到s个不同的X,每一个X都先做一次K阶平均的aggregation,再接一个MLP做transformation。得到输出后,s个输出分布取平均再sharpen作为伪标签。 88 | 89 | - [Revisiting Graph Neural Networks:All We Have is Low-Pass Filters](https://arxiv.org/abs/1905.09550) (CoRR2019) 90 | - [PairNorm: Tackling Oversmoothing in GNNs](https://arxiv.org/abs/1909.12223) (ICLR2020) 91 | - [Revisiting Graph Convolutional Network on Semi-Supervised Node Classification from an Optimization Perspective](https://arxiv.org/abs/2009.11469) (arXiv2020) 92 | - 4分。 93 | - 三篇文章都包含一个相同的优化问题:graph-regularized least squares (GRLS),从这个角度可以得到GCN是其闭式解的一阶近似。 94 | - 第一篇对于SGC中的loss-pass filter有更详细的解释。后两篇都考虑了不相邻结点的正则化。 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /Long-tail/README.md: -------------------------------------------------------------------------------- 1 | # Table of Contents 2 | 3 | - [Table of Contents](#table-of-contents) 4 | - [Long-tail](#long-tail) 5 | - [Reweight](#reweight) 6 | - [Decoupling](#decoupling) 7 | - [Tail Augmentation](#tail-augmentation) 8 | - [Others](#others) 9 | 10 | # Long-tail 11 | 12 | > 长尾分布问题,主要集中于图像分类。 13 | 14 | ## Reweight 15 | 16 | > Reweight loss,通常是在大类和小类间做一个trade-off。 17 | 18 | - [Exploring Classification Equilibrium in Long-Tailed Object Detection](https://arxiv.org/abs/2108.07507) (ICCV2021) 19 | - 4分 20 | - Equilibrium Loss的核心思想是应该用训练过程中的预测值而不是类别数目去做reweight,这一点是有道理的,因为最终的分类准确率并不完全正比于类别数目,还需要考虑hard和easy的情况。Loss最终的形式与Logit Adjustment是一致的。 21 | 22 | - [Long-Tail Learning via Logit Adjustment](https://arxiv.org/abs/2007.07314) (ICLR2021_spotlight) 23 | - 5分 24 | - 这篇文章的related work写的很不错,非常清晰地涵盖了最近研究长尾分布的主要论文。 25 | - 文中通过对平衡准确率的建模,提出了新的后处理方法以及Loss调整方法。motivation非常自然,可以理解成LDAM考虑了pair-wise margin的Loss,且实验效果也不错。 26 | 27 | - [Learning imbalanced datasets with label-distribution-aware margin loss](https://arxiv.org/abs/1906.07413) (NIPS2019) 28 | - 4分 29 | - 从margin的角度提出了LDAMLoss,还有DRW的训练方法,有一些理论分析,被后续大量工作作为baseline。 30 | - 关于DRW:按照样本逆频率reweight Loss是一种常见的做法,目的是让每一类的Loss是均衡的,但这种做法往往只在训练初期管用。因为当你reweight每一类的Loss之后,小类的样本会获得更大的Loss,经过一轮的训练以后,其Loss会降得更低,重新使得各类Loss回归到不平衡的状态。 31 | - 因此DRW这个方法可以看成是一种刺激网络突然更加关注小类的做法,往往在具体实验中呈现出acc突然上升然后慢慢回落的现象。DRW算是一种非常tricky的方法,强行在后期做一个刺激来提高acc。 32 | 33 | - [Class-balanced loss based on effective number of samples](https://arxiv.org/abs/1901.05555) (CVPR2019) 34 | - 4分 35 | - 文中提出在采样时会出现一些特征重复的现象,因此样本数并不能完全代表采样的覆盖情况。作者通过一些假设,简单推倒出一个有效样本数的概念,并以此代替频率对Loss进行修正。思想非常简单清晰,被后续大量工作作为baseline。 36 | 37 | 38 | ## Decoupling 39 | 40 | > 训练特征阶段instance-balanced,训练分类器阶段class-balanced。 41 | 42 | - [Decoupling Representation and Classifier for Long-Tailed Recognition](https://arxiv.org/abs/1910.09217) (ICLR2020) 43 | - 5分 44 | - 应该是第一次将nn中Long-tail问题分为特征提取和分类两部分。实验表明即使是在Long-tail的数据集中,nn依然可以学到良好的特征表示,但需要对分类器W做后处理。文中根据实验现象提出了W对每一类进行L2Norm的方法。 45 | 46 | - [BBN: Bilateral-Branch Network with Cumulative Learningfor Long-Tailed Visual Recognition](https://arxiv.org/abs/1912.02413) (CVPR2020_oral) 47 | - 4分 48 | - 提出了BBN网络结构来解决Long-tail问题,本质思想与Decoupling类似,希望特征学习阶段是不平衡的而分类器学习阶段是平衡的。 49 | - 实验效果非常优秀,但是实际上在对比之前的方法时并不算公平,因为网络参数量更大,且每个batch采样也是两倍。 50 | 51 | ## Tail Augmentation 52 | 53 | > 对小类进行增广。这类方法通常想法新奇,但实现较为复杂。 54 | 55 | - [Deep Representation Learning on Long-tailed Data: A Learnable EmbeddingAugmentation Perspective](https://arxiv.org/abs/2002.10826) (CVPR2020) 56 | - [Memory-based Jitter: Improving Visual Recognition on Long-tailed Data with Diversity In Memory](https://arxiv.org/abs/2008.09809) (arXiv2020) 57 | - 3分 58 | - [知乎原作者解析](https://zhuanlan.zhihu.com/p/112248291) 59 | - 以上两篇出自同一作者,本质思想类似:都是希望从特征空间层面来扩充tail类的表示。 60 | - 第一篇是从head类中学到一个分布再扩充到tail类;第二篇应该是受到MoCo的启发,同样存储一个特征的memory queue,但是这里的特征是带标签的,并且做了一个反频率采样,再把memory queue中的特征扩充到所有类的特征空间中,使得在特征空间中类数目比较均匀。 61 | 62 | - [M2m: Imbalanced Classification via Major-to-minor Translation](https://arxiv.org/abs/2004.00431) (CVPR2020) 63 | - 4分 64 | - motivation:另类的over-sampling,将head类的样本转化为tail类的样本来构建一个平衡数据集。 65 | - x = argminx=x0L(g;x,k) +λ·fk0(x) 66 | - 全文的核心就是上述公式。其中x是tail(k)类中的样本,x0是head(k0)类中的样本,g是在原始D中训练得到的分类器,f是最终的分类器。该优化目标就是希望x被g认为是tail类的,且f认为其不是head类的。通过梯度下降求解该式即可将x0转化为x。 67 | 68 | - [Feature Space Augmentation for Long-Tailed Data](https://arxiv.org/abs/1912.02413) (ECCV2020) 69 | - 3分 70 | - motivation:如果tail类过于under-represent,再怎么reweight也不管用,于是希望想办法增强tail类feature space的表示。 71 | - 认为CAM大的地方是class-specific features,小的地方是class-generic features,再将不同样本的这俩feature混合来实现feature space的aug。 72 | - 想法挺有意思,但是实验完全没有选用strong baseline,估计实际效果不太行。 73 | 74 | 75 | ## Others 76 | 77 | > 其它。 78 | 79 | - [Self-supervised Learning is More Robust to Dataset Imbalance](https://arxiv.org/abs/2110.05025) (ICLR2022_under review) 80 | - [Exploring Balanced Feature Spaces for Representation Learning](https://openreview.net/forum?id=OqtLIabPTit) (ICLR2021) 81 | - 4分 82 | - 探究self-supervised learning在long-tailed数据集上将学得如何的表示。 83 | - "more balanced":在各类的linear classification表现上差异很小。 84 | - "more robust":对于在balanced以及long-tailed数据集上的linear classification性能gap,SSL要小于CE (但CE的总体性能仍是优于SSL的,这里只比较gap)。 85 | - "more transferable":对于迁移到下游任务的表现来说,SSL要优于CE。 86 | - 以上都说明SSL学到的是label-irrelevant的更generalized特征。 87 | 88 | - [Improving Contrastive Learning on Imbalanced Seed Data via Open-World Sampling](https://arxiv.org/abs/2111.01004) (NIPS2021) 89 | - 3分 90 | - 看完对setting有以下疑惑: 91 | - 为什么要有一个seed data?(感觉应该是只有一个包含LT和OOD的巨大的open-world data,然后从里面进行sample) 92 | - seed data是ImageNet-100-LT,而open-world data是ImageNet-900,这难道不是全部都OOD了? 93 | - 为什么seed data是LT的但open-world data却是balanced? 94 | 95 | - [Long-tailed Recognition by Routing Diverse Distribution-Aware Experts](https://arxiv.org/abs/2010.01809) (ICLR2021_spotlight) 96 | - 4分 97 | - 集成学习的思想。stage1学experts的参数,两个Loss要求多个experts好而不同(每个experts可以关注不同的类)。stage2学对每个instance具体的experts的选择方法。 98 | - 为了降低模型复杂度:网络中所有channel变为四分之一(代码更新后发现这里其实是减少到四分之三,原论文有非常大的误导性),网络前一部分参数共享,stage2专家分配。 99 | - 实验效果好到离谱,同时提升head类和tail类,且各大任务都能提升6%左右。 100 | 101 | - [Learning From Multiple Experts: Self-paced Knowledge Distillation for Long-tailed Classification](https://arxiv.org/abs/2001.01536) (ECCV2020_spotlight) 102 | - 4分 103 | - motivation:如果把Long-tail数据集分为多个子集,那么在每个子集中Long-tail的程度就会减缓,分开训练后的精度就会提高。 104 | - 因此,首先在这些子集上训练出来多个专家。这些专家可以起到两个作用:1.通过置信度来告诉student网络每个样本的难度,也就对应文中的课程学习模块。2.对student网络进行知识蒸馏。 105 | 106 | - [Rethinking the Value of Labels for Improving Class-Imbalanced Learning](https://arxiv.org/abs/2006.07529) (NIPS2020) 107 | - 3分 108 | - [知乎原作者解析](https://zhuanlan.zhihu.com/p/259710601) 109 | - 其中半监督学习框架引入了其他的unlabeled data,文中也讨论了如何选取这些unlabeled data。 110 | - 利用自监督对长尾数据集预训练,再使用其他任何的长尾学习算法。 111 | 112 | - [Rethinking Class-Balanced Methods for Long-Tailed Visual Recognition from a Domain Adaptation Perspective](https://arxiv.org/abs/2003.10780) (CVPR2020) 113 | - 4分 114 | - 关于Domain Adaptation的分析很有意思。概括来说就是将Long-tail问题分成两个部分: 115 | - 1.Ps(y)≠Pt(y),这也是之前rebanlance方法一直在解决的事情。 116 | - 2.Ps(x|y)≠Pt(x|y),即小类的under-represent问题,有很多方法通过对tail的aug来解决。 117 | - 提出的方法:reweight + meta-learning。1中类级别的系数直接采用CB的系数,2中样本级别的系数则初始化为0然后通过meta-learning学得。基本上就是L2RW的思路,但仍然就是传统的reweight的方法,个人认为没办法解决2中的问题。 118 | 119 | 120 | 121 | 122 | 123 | -------------------------------------------------------------------------------- /Noisy Label/README.md: -------------------------------------------------------------------------------- 1 | # Table of Contents 2 | 3 | - [Table of Contents](#table-of-contents) 4 | - [Noisy Label](#noisy-label) 5 | - [Robust Loss or Regularization](#robust-loss-or-regularization) 6 | - [Loss Adjustment](#loss-adjustment) 7 | - [Sample Selection](#sample-selection) 8 | - [Open-set](#open-set) 9 | 10 | 11 | # Noisy Label 12 | 13 | > 标记噪声问题。[一篇很好的综述](https://arxiv.org/abs/2007.08199)。 14 | 15 | ## Robust Loss or Regularization 16 | 17 | > 设计对噪声数据更加鲁棒的loss或者regularization。 18 | 19 | - [Early-Learning Regularization Prevents Memorization of Noisy Labels](https://arxiv.org/abs/2007.00151) (NIPS2020) 20 | - 4分 21 | - motivation:DNN在noisy label的学习过程中有’early learning‘的现象:first use patterns, not brute force memorization, to fit real data,then memorize noisy label。因此,将早期模型的输出作为后期的一个正则化,有点像self-KD。 22 | - 在KD中,拟合target用的是KL散度,但文中用的是内积。原因是KL散度相比内积对target的拟合程度更高,是想利用到dark knowledge,对本文来说会过拟合。 23 | - 从梯度的角度说明了两点: (1) ensure that the contribution to the gradient from examples with clean labels remains large, and (2) neutralize the influence of the examples with wrong labels on the gradient. 24 | - 文章的图画的是真好,看图就非常容易明白作者的idea。 25 | 26 | - [Symmetric Cross Entropy for Robust Learning with Noisy Labels](https://arxiv.org/abs/1908.06112) (ICCV2019) 27 | - 4分 28 | - RCE是MAE的一般情况,本质上还是symmetric loss那一套。实际上在没有noise的情况下,RCE会降低性能,因此其主要还是解决noise,而文中所提到的的hard和easy的说法偏向于讲故事。 29 | 30 | - [Generalized Cross Entropy Loss for Training Deep Neural Networks with Noisy Labels](https://arxiv.org/abs/1805.07836) (NIPS2018) 31 | - 5分 32 | - MAE虽然noise-tolerant,但是在优化上对于所有样本有相同的梯度,遇到大规模数据集难以优化。而CE则implicitly weighed more on samples with predictions that agree less with provided labels,也因此对noise更敏感。因此很自然的想法就是结合两者的优点,设计一个既robust又易优化的loss。 33 | 34 | - [Robust Loss Functions under Label Noise for Deep Neural Networks](https://arxiv.org/abs/1712.09482) (AAAI2017) 35 | - 5分 36 | - noise-tolerant: the loss function L is noise-tolerant意味着使用L和ERM原则在clean data D1以及noisy data D2上训练得到的两个分类器在D1上有着相同的错分率。 37 | - symmetric loss function: 对于所有类的one-hot label计算得到的loss值求和为一个定值,如MAE Loss。文章从不同的noisy type出发,理论分析了symmetric loss更强的鲁棒性。 38 | 39 | 40 | ## Loss Adjustment 41 | 42 | > Loss correction, or label correction. 43 | 44 | - [Training Deep Neural Networks on Noisy Labels with Bootstrapping](https://arxiv.org/abs/1412.6596) (ICLR2015) 45 | - [Dimensionality-Driven Learning with Noisy Labels](https://arxiv.org/abs/1806.02612) (ICML2018) 46 | - [Unsupervised Label Noise Modeling and Loss Correction](https://arxiv.org/abs/1904.11238) (ICML2019) 47 | - 4分 48 | - Label correction.其通用套路是将noisy label与pseudo label做一个线性加权,而权重系数则是设计的重点。 49 | 50 | - [Making Deep Neural Networks Robust to Label Noise: a Loss Correction Approach](https://arxiv.org/abs/1609.03683) (CVPR2017) 51 | - 5分 52 | - Loss correction.先估计噪声转移矩阵T,再通过两种方式来做correction: 53 | - backward:计算得到loss之后再乘T-1。 54 | - forward:计算loss时将T乘在输出概率分布p上。 55 | 56 | - [Using trusted data to train deep networks on labels corrupted by severe noise](https://arxiv.org/abs/1609.03683) (CVPR2017) 57 | - 4分 58 | - Loss correction.先用noisy data训练一个model,再在anchor points上估计噪声转移矩阵T。 59 | 60 | 61 | ## Sample Selection 62 | 63 | > 样本筛选。 64 | 65 | - [DivideMix: Learning with Noisy Labels as Semi-supervised Learning](https://arxiv.org/abs/2002.07394) (ICLR2020) 66 | - 5分 67 | - 用GMM拟合loss分成clean set和noisy set,再利用mixmatch做半监督训练。 68 | 69 | - [Understanding and Utilizing Deep Neural Networks Trained with Noisy Labels](https://arxiv.org/abs/1905.05040) (ICML2019) 70 | - 4分 71 | - 有意思的理论分析:In [Zhang et al. (2017)](https://arxiv.org/abs/1611.03530), it has 72 | been empirically found that the generalization performance of DNNs is highly dependent on the noise ratio. In this paper, the authors theoretically and empirically find that the test accuracy can be quantitatively characterized in terms of the noise ratio. 73 | - 接下来很自然的想法就是用cross-validation得到test acc再用于估计noise ratio。这样就可以解决Co-teaching方法必须事先获得noise ratio的问题。 74 | 75 | - [Decoupling "when to update" from "how to update"](https://arxiv.org/abs/1706.02613) (NIPS2017) 76 | - [Co-teaching: Robust Training of Deep Neural Networks with Extremely Noisy Labels](https://arxiv.org/abs/1804.06872) (NIPS2018) 77 | - [How does Disagreement Help Generalization against Label Corruption?](https://arxiv.org/abs/1901.04215) (ICML2019) 78 | - [Combating noisy labels by agreement: A joint training method with co-regularization](https://arxiv.org/abs/2003.02752) (CVPR2020) 79 | - 3分 80 | - Co-teaching系列。 81 | 82 | 83 | 84 | 85 | 86 | ## Open-set 87 | 88 | > 考虑Noisy + OOD。 89 | 90 | - [Open-set Label Noise Can Improve Robustness Against Inherent Label Noise](https://arxiv.org/abs/2106.10891) (NIPS2021) 91 | - 4分 92 | - 很有意思的文章。提出open-set noise可以是有益的。 93 | - 通过不断变换open-set data的label来给模型训练增加难度,consume the extra representation capacity of neural networks, thereby preventing the neural network from overfitting inherent noisy labels. 94 | 95 | - [Learning from Noisy Data with Robust Representation Learning](https://openaccess.thecvf.com/content/ICCV2021/papers/Li_Learning_From_Noisy_Data_With_Robust_Representation_Learning_ICCV_2021_paper.pdf) (ICCV2021) 96 | - [MoPro: Webly Supervised Learning with Momentum Prototypes](https://arxiv.org/abs/2009.07995)(ICLR2021) 97 | - 3分 98 | - 一作都是[[PCL](Prototypical Contrastive Learning of Unsupervised Representations)](https://arxiv.org/abs/2005.04966)的作者,这两篇文章相当于给PCL找了个在open-set noise上的应用。 99 | 100 | - [NGC: A Unified Framework for Learning with Open-World Noisy Data](https://arxiv.org/abs/2108.11035) (ICCV2021_oral) 101 | - 4分 102 | - 提出一个新setting:在open-set noise的基础上再考虑inference时存在OOD样本。是一个make sense的setting。 103 | - 本质做法是基于近邻的contrastive learning,针对Noisy + OOD的情况设计了一些基于graph的准确选取近邻的方法。其中,选取LCC的这一步类似于[TopoFilter](https://arxiv.org/abs/2012.04835),不同的是利用confidence删边替代了异类删边+LCC外围剔除的操作。 104 | 105 | - [Jo-SRC: A Contrastive Approach for Combating Noisy Labels](https://arxiv.org/abs/2103.13029) (CVPR2021) 106 | - 3分 107 | - 考虑到了noisy应该分为ID noisy以及OOD noisy,因此在sample selection的时候应该分两步:1.首先分为clean与noisy样本。2.再将noisy样本分为ID与OOD(衡量两个view的输出概率分布的consistency,认为差异小的是ID)。 108 | 109 | - [Iterative Learning with Open-set Noisy Labels](https://arxiv.org/abs/1804.00092) (CVPR2018) 110 | - 5分 111 | - 第一篇考虑open-set noise的文章。方法的本质是利用feature做noisy data detection。用feature是考虑到open-set noise的存在,没办法像close-set一样做loss correction或label corretion。 112 | - Cons: 没有对ID noise和OOD noise做分离以及不同的训练,而是直接把这两者同时检测出来当成是noisy data。 113 | -------------------------------------------------------------------------------- /Contrastive Learning/README.md: -------------------------------------------------------------------------------- 1 | # Table of Contents 2 | 3 | - [Table of Contents](#table-of-contents) 4 | - [Contrastive Learning](#contrastive-learning) 5 | - [Basic](#basic) 6 | - [Better Understanding](#better-understanding) 7 | - [Better Sampler](#better-sampler) 8 | - [Dense](#dense) 9 | 10 | # Contrastive Learning 11 | 12 | ## Basic 13 | 14 | > 对比学习的主流方法 15 | 16 | - [Bootstrap your own latent: A new approach to self-supervised Learning](https://arxiv.org/abs/2006.07733) (NIPS2020) 17 | - [Exploring Simple Siamese Representation Learning](https://arxiv.org/abs/2011.10566) (arXiv2020) 18 | - 5分。 19 | - 两者都是做减法的思路,都通过一个predictor来引入不对称性,使得模型不能通过简单学得一个trivial的解来使得正样本之间的表示一致,因此带来了无需使用负样本的可能性。 20 | 21 | - [Unsupervised Learning of Visual Features by Contrasting Cluster Assignments](https://arxiv.org/abs/2006.09882) (NIPS2020) 22 | - 5分。 23 | - SWaV。不同于对比学习中常见的直接使用表示进行对比的思想,SWaV的核心思想在于要求两个view之间cluster assignment的一致性。 24 | - 为什么不直接用内积后的cluster assignment交换到另外一个view而是去解一个复杂的优化问题?这是为了加上最大熵的正则化来避免全部assign到同一个cluster上的平凡解。 25 | - prototypes和网络参数是同时更新的。 26 | 27 | - [Momentum Contrast for Unsupervised Visual Representation Learning](https://arxiv.org/abs/1911.05722) (CVPR2020_oral) 28 | - 5分 29 | - KaiMing He出品。指出之前的办法要么不够large,要么不够consistent。算法主要包括以下几点: 30 | - 采用了queue的方式构建负样本dictionary,使得其size可以大大超过mini-batch的size,而又不用像MB那样存储所有样本的表示。 31 | - 对于f_k的参数,采用了momentum的变化方式,使得f_q的参数可以更平滑地影响f_k。这其实也是非常重要且与1.高度耦合的一个想法。因为queue中的表示是不断更新的,如果没有momentum来平滑地影响f_k,则queue中新加入的表示将与原来的表示差异过大,从而导致模型难以收敛。以上两点也就算MoCo算法的核心思想:large and consistent。 32 | - shuffle batch normalization:multi-GPU的设置下,对每一个mini-batch,shuffle f_k的samples order(算loss时shuffle回来),而f_q的保持不变,这样就保证了每个GPU上的两个encoder的用于BN的subset是不同的,防止模型因为相似的BN统计值而leak information。 33 | 34 | - [A Simple Framework for Contrastive Learning of Visual Representations](https://arxiv.org/abs/2002.05709) (ICML2020) 35 | - 5分 36 | - Hinton出品。算法主要包括以下几点: 37 | - Simple体现在抛弃了memory bank等各种人工设计的模块,采用了最基本最简洁的contrastive learning框架。可以这么simple的前提在于要加大batchsize来提高负样本的采样数目,文中使用了恐怖的8096。 38 | - 探究了data augmentation的重要性。 39 | - 将常用的linear的head转化为具有激活函数的MLP,并使用MLP前的表示作为最后结果。这是因为MLP后的表示作用于最终的优化目标,对于各种数据增强表现出不变性,这会使得这个表示抛弃了与这些数据增强相关的信息,而整个MLP就相当于一个缓冲地带,在MLP之前的表示可以maintain更多与数据增强相关的信息。 40 | 41 | - [Unsupervised Embedding Learning via Invariant and Spreading Instance Feature](https://arxiv.org/abs/1904.03436) (CVPR2019) 42 | - 4分 43 | - NPID方法用到了Memory Bank,使得t时刻encoder得到的query只能和t-1时刻得到的dictionary来构建正负pair,再进行Loss计算,这样显然效果不够好。 44 | - 该方法用augmentation的方法构建正pair,用mini-batch中的其他样本构建负pair,实现了真正的instance-level的对比学习。 45 | 46 | - [Unsupervised Feature Learning via Non-Parametric Instance Discrimination](https://arxiv.org/abs/1805.01978) (CVPR2018_spotlight) 47 | - 5分 48 | - motivation:尽管监督学习的目标只是分类,但模型可以隐式地学习到类别之间的相似度,即模型学到了监督信息所没有赋予的dark knowledge。那么如果赋予每一个样本一个标签,用instance-wise代替class-wise,这样也可以学到样本的特征表示,那么这样的表示也应该同样隐含着类别的相似度信息。 49 | - class-wise转为instance-wise后不能简单应用CE(类别太多),因此采用了NCE和Memory Bank。 50 | - 可以说是contrastive learning真正应用在大规模图像数据上的开山之作。 51 | 52 | - [Deep Clustering for Unsupervised Learning of Visual Features](https://arxiv.org/abs/1807.05520) (ECCV2018) 53 | - 4分 54 | - DeepCluster方法,思路很简单:将通过CNN后的特征进行聚类,再用聚类的结果作为伪标签反向传播到CNN。 55 | 56 | 57 | ## Better Understanding 58 | 59 | > 对对比学习的理解 60 | 61 | - [Decoupled Contrastive Learning](https://arxiv.org/abs/2110.06848#) (ICLR2022 under review) 62 | - 4分 63 | - 分析了InfoNCE Loss的梯度,其中都有共同所谓NPC项,导致positive和negative是couple在一起的,这就导致两个问题: 64 | - When the positive sample is close to the anchor and less informative, the gradient from the negative samples are also reduced. 65 | - When the negative samples are far away and less informative, the learning rate from the positive sample is mistakenly reduced. 66 | - 因此,直接的想法就是去掉NPC项实现两者的decouple,作者通过移除分母中的postive项来实现这一点。 67 | - 从直觉上来说,移除分母中的postive项可以增大其中negative项的影响,从而带来了小batch-size的可能性。 68 | 69 | - [What Should Not Be Contrastive in Contrastive Learning](https://arxiv.org/abs/2008.05659v2) (ICLR2021) 70 | - [What Makes for Good Views for Contrastive Learning?](https://arxiv.org/abs/2005.10243) (NIPS2020) 71 | - 5分 72 | - InfoNCE Loss是在最大化v1, v2互信息的下界,那么应该怎么选取v1, v2呢?直观上来说,如果v1, v2本身互信息太大,比如两个view非常接近,模型学到的有很多Excess noise,即图片本身的特性;但若太小,比如两个view完全不一样,则模型学不到东西。 73 | - 那么最合适的v1, v2应该是互信息中只包含task-relevant的信息,对于不同的任务应该选择不同的view。比如下游任务是要用颜色分类,那么v1, v2就应该是除了颜色一样其他都不一样。 74 | 75 | - [Understanding Contrastive Representation Learning through Alignment and Uniformity on the Hypersphere](https://arxiv.org/abs/2005.10242) (ICML2020) 76 | - 5分 77 | - we identify two key properties related to the contrastive loss: 78 | - alignment (closeness) of features from positive pairs 79 | - uniformity of the induced distribution of the (normalized) features on the hypersphere 80 | 81 | ## Better Sampler 82 | 83 | > 更好的正负采样方式 84 | 85 | - [Incremental False Negative Detection for Contrastive Learning](https://arxiv.org/abs/2106.03719) (ICLR2022_under review) 86 | - 4分 87 | - 探究contrastive learning中存在的False Negative问题。提出的方法可以检测出False Negative,并将其从负样本集合中移除(或类似[SupCon](https://arxiv.org/abs/2004.11362)一样加入正样本集合)。显然该方法下界为SimCLR,上界为SupCon。 88 | - 利用聚类做False Negative检测的想法也非常直接,即特征越接近,则越有可能是False Negative。 89 | 90 | - [Unsupervised Deep Learning by Neighbourhood Discovery](https://arxiv.org/abs/1904.11567) (ICML2019) 91 | - 4分 92 | - movitation:NPID方法,将每个样本都作为单独类,也就强制分开了本来是同类的样本,一定程度上失去了class consistency。而DeepCluster方法则是非常全局的做了一个聚类。而本文中的ND方法相当于是二者的一个中和,希望从局部(文中的AN,AN中设置label相同)选取正pair。 93 | - 认为低熵样本(只有少量样本与其相似)更能反映class consistency,从而只用他们选取AN。而其他样本在本轮中则仍然单独当作一个类。 94 | - 本文提到的consistency与MoCo方法是不同的,前者是从空间的角度,相同类的伪标签应该也是相同的。而后者是从时间的角度,不断变化的encoder_k对相同样本的结果应该是相同或类似的。 95 | 96 | - [Local aggregation for unsupervised learning of visual embeddings](https://arxiv.org/abs/1903.12355) (ICCV2019) 97 | - 4分 98 | - Memory Bank中的采样是随机的,显然没有充分利用其中信息。本文中作者定义了两个集合Bi和Ci,可以简单理解为Bi是Memory Bank中离目标特征vi较近的集合,而Ci是更近的集合。文中Bi从V中选取了k个最近点,而Ci则是通过聚类得到。 99 | - 正样本选自Bi^Ci,负样本则是选自Bi-Bi^Ci。相当于从V中选择了价值更大的进行Loss计算。 100 | - 可以看成是DeepCluster和NPID方法的结合。 101 | - 仍局限于Memory Bank,但是提供了一种采样的新思路,即采样时不应该是随机采样,而应该从与vi更相近的点中采样。 102 | 103 | 104 | ## Dense 105 | 106 | > pixel-wise contrastive learning 107 | 108 | - [Self-Supervised Visual Representations Learning by Contrastive Mask Prediction](https://arxiv.org/abs/2108.07954) (ICCV2021) 109 | - 3分 110 | - 取region+ROI Align用在Dense CL很合适。 111 | - 个人没太明白用一个mask遮住图片的某一个region再加上mask prediction head去恢复的意义是什么。把两者都去掉就是典型的Dense CL的做法了。 112 | 113 | - [Dense Contrastive Learning for Self-Supervised Visual Pre-Training](https://arxiv.org/abs/2011.09157) (CVPR2021_oral) 114 | - 5分 115 | - 效果很好的Dense CL Baseline。将通用的GAP+MLP结构换成了1*1 Conv,以保证feature map的size。因为ResNet最后输出7*7的size,最后文章选用的grid size就是7。因此这样的表示其实是patch-level的。 116 | - 正样本来自于增强样本所有patch表示中最接近的那一个,负样本来自于其他图片的image表示。 117 | - 118 | - [Unsupervised Learning of Dense Visual Representations](https://arxiv.org/abs/2011.05499) (NIPS2020) 119 | - 4分 120 | - 第一篇Dense CL的文章。做法也比较简单,Encoder-decoder的结构,每个pixel都有对应的表示,找到对应位置的pixel的表示作为正样本对,再用别的图片的pixel的表示作为负样本对。 121 | 122 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Creative Commons Legal Code 2 | 3 | CC0 1.0 Universal 4 | 5 | CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE 6 | LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN 7 | ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS 8 | INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES 9 | REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS 10 | PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM 11 | THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED 12 | HEREUNDER. 13 | 14 | Statement of Purpose 15 | 16 | The laws of most jurisdictions throughout the world automatically confer 17 | exclusive Copyright and Related Rights (defined below) upon the creator 18 | and subsequent owner(s) (each and all, an "owner") of an original work of 19 | authorship and/or a database (each, a "Work"). 20 | 21 | Certain owners wish to permanently relinquish those rights to a Work for 22 | the purpose of contributing to a commons of creative, cultural and 23 | scientific works ("Commons") that the public can reliably and without fear 24 | of later claims of infringement build upon, modify, incorporate in other 25 | works, reuse and redistribute as freely as possible in any form whatsoever 26 | and for any purposes, including without limitation commercial purposes. 27 | These owners may contribute to the Commons to promote the ideal of a free 28 | culture and the further production of creative, cultural and scientific 29 | works, or to gain reputation or greater distribution for their Work in 30 | part through the use and efforts of others. 31 | 32 | For these and/or other purposes and motivations, and without any 33 | expectation of additional consideration or compensation, the person 34 | associating CC0 with a Work (the "Affirmer"), to the extent that he or she 35 | is an owner of Copyright and Related Rights in the Work, voluntarily 36 | elects to apply CC0 to the Work and publicly distribute the Work under its 37 | terms, with knowledge of his or her Copyright and Related Rights in the 38 | Work and the meaning and intended legal effect of CC0 on those rights. 39 | 40 | 1. Copyright and Related Rights. A Work made available under CC0 may be 41 | protected by copyright and related or neighboring rights ("Copyright and 42 | Related Rights"). Copyright and Related Rights include, but are not 43 | limited to, the following: 44 | 45 | i. the right to reproduce, adapt, distribute, perform, display, 46 | communicate, and translate a Work; 47 | ii. moral rights retained by the original author(s) and/or performer(s); 48 | iii. publicity and privacy rights pertaining to a person's image or 49 | likeness depicted in a Work; 50 | iv. rights protecting against unfair competition in regards to a Work, 51 | subject to the limitations in paragraph 4(a), below; 52 | v. rights protecting the extraction, dissemination, use and reuse of data 53 | in a Work; 54 | vi. database rights (such as those arising under Directive 96/9/EC of the 55 | European Parliament and of the Council of 11 March 1996 on the legal 56 | protection of databases, and under any national implementation 57 | thereof, including any amended or successor version of such 58 | directive); and 59 | vii. other similar, equivalent or corresponding rights throughout the 60 | world based on applicable law or treaty, and any national 61 | implementations thereof. 62 | 63 | 2. Waiver. To the greatest extent permitted by, but not in contravention 64 | of, applicable law, Affirmer hereby overtly, fully, permanently, 65 | irrevocably and unconditionally waives, abandons, and surrenders all of 66 | Affirmer's Copyright and Related Rights and associated claims and causes 67 | of action, whether now known or unknown (including existing as well as 68 | future claims and causes of action), in the Work (i) in all territories 69 | worldwide, (ii) for the maximum duration provided by applicable law or 70 | treaty (including future time extensions), (iii) in any current or future 71 | medium and for any number of copies, and (iv) for any purpose whatsoever, 72 | including without limitation commercial, advertising or promotional 73 | purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each 74 | member of the public at large and to the detriment of Affirmer's heirs and 75 | successors, fully intending that such Waiver shall not be subject to 76 | revocation, rescission, cancellation, termination, or any other legal or 77 | equitable action to disrupt the quiet enjoyment of the Work by the public 78 | as contemplated by Affirmer's express Statement of Purpose. 79 | 80 | 3. Public License Fallback. Should any part of the Waiver for any reason 81 | be judged legally invalid or ineffective under applicable law, then the 82 | Waiver shall be preserved to the maximum extent permitted taking into 83 | account Affirmer's express Statement of Purpose. In addition, to the 84 | extent the Waiver is so judged Affirmer hereby grants to each affected 85 | person a royalty-free, non transferable, non sublicensable, non exclusive, 86 | irrevocable and unconditional license to exercise Affirmer's Copyright and 87 | Related Rights in the Work (i) in all territories worldwide, (ii) for the 88 | maximum duration provided by applicable law or treaty (including future 89 | time extensions), (iii) in any current or future medium and for any number 90 | of copies, and (iv) for any purpose whatsoever, including without 91 | limitation commercial, advertising or promotional purposes (the 92 | "License"). The License shall be deemed effective as of the date CC0 was 93 | applied by Affirmer to the Work. Should any part of the License for any 94 | reason be judged legally invalid or ineffective under applicable law, such 95 | partial invalidity or ineffectiveness shall not invalidate the remainder 96 | of the License, and in such case Affirmer hereby affirms that he or she 97 | will not (i) exercise any of his or her remaining Copyright and Related 98 | Rights in the Work or (ii) assert any associated claims and causes of 99 | action with respect to the Work, in either case contrary to Affirmer's 100 | express Statement of Purpose. 101 | 102 | 4. Limitations and Disclaimers. 103 | 104 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 105 | surrendered, licensed or otherwise affected by this document. 106 | b. Affirmer offers the Work as-is and makes no representations or 107 | warranties of any kind concerning the Work, express, implied, 108 | statutory or otherwise, including without limitation warranties of 109 | title, merchantability, fitness for a particular purpose, non 110 | infringement, or the absence of latent or other defects, accuracy, or 111 | the present or absence of errors, whether or not discoverable, all to 112 | the greatest extent permissible under applicable law. 113 | c. Affirmer disclaims responsibility for clearing rights of other persons 114 | that may apply to the Work or any use thereof, including without 115 | limitation any person's Copyright and Related Rights in the Work. 116 | Further, Affirmer disclaims responsibility for obtaining any necessary 117 | consents, permissions or other rights required for any use of the 118 | Work. 119 | d. Affirmer understands and acknowledges that Creative Commons is not a 120 | party to this document and has no duty or obligation with respect to 121 | this CC0 or use of the Work. 122 | -------------------------------------------------------------------------------- /Domain Shift/README.md: -------------------------------------------------------------------------------- 1 | # Table of Contents 2 | 3 | - [Table of Contents](#table-of-contents) 4 | - [Domain Adaptation](#domain-adaptation) 5 | - [Unsupervised Domain Adaptation](#unsupervised-domain-adaptation) 6 | - [Open-set Domain Adaptation](#open-set-domain-adaptation) 7 | - [Domain Generalization](#domain-generalization) 8 | 9 | # Domain Adaptation 10 | 11 | > 领域自适应。以下以S表示source domain,T表示target domain。 12 | 13 | ## Unsupervised Domain Adaptation 14 | 15 | > target domain数据没有label,最主要的DA场景。 16 | 17 | - [ToAlign: Task-oriented Alignment for Unsupervised Domain Adaptation](https://arxiv.org/abs/2106.10812) (NIPS2021) 18 | - 3分 19 | - 用Grad-CAM找到source feature中task-oriented的部分,并使得target feature仅与该部分做align。这样的做法在别的领域并不新鲜,如在Long-tail中有类似的[工作1](https://arxiv.org/abs/2008.03673)、[工作2](https://ojs.aaai.org/index.php/AAAI/article/view/16458)。 20 | 21 | - [Maximum Classifier Discrepancy for Unsupervised Domain Adaptation](https://arxiv.org/abs/1712.02560) (CVPR2018_oral) 22 | - 5分 23 | - 提出的问题很好:之前的工作简单把S和T的feature做align,这样做没有考虑类别信息。oracle的做法应该是只把S和T中类别相等的feature做align。 24 | - 提出的做法很novel(OOD检测中的[MCD](https://arxiv.org/abs/1908.04951)是直接受到这篇的启发):从[ADDA](https://arxiv.org/abs/1702.05464)的框架来看,本文实质上就是把adversarial objective改成了classifier discrepancy。 25 | - 这个做法真的可以解决这个问题吗?本文其实暗含一个假设就是S和T中同类的样本的feature应该是接近的(就像论文中的Figure 2 一样),这样在minimize discrepancy这一步时才能将T上的feature移动到对应类别的support上。如果这个假设不成立,那移动的方向就有可能是错误的,那也并不能解决提出的问题。 26 | 27 | - [Adversarial Discriminative Domain Adaptation](https://arxiv.org/abs/1702.05464) (CVPR2017) 28 | - 5分 29 | - 还是Adversarial Domain Adaptation的这一套框架,总结了这一套框架的三个设计点: 30 | - 1.从feature extractor可以是discriminative或者generative的。 31 | - 2.S和T的两个feature extractor可以是共享或者不共享参数的。不同于之前大部分工作共享参数,本文没有共享。 32 | - 3.adversarial objective可以是之前的MMD或者domain classification loss。本文从GAN中受到启发,采用所谓的GAN loss,也就是generator with the standard loss function with inverted labels。 33 | 34 | - [Domain Separation Networks](https://arxiv.org/abs/1608.06019) (NIPS2016) 35 | - 4分 36 | - motivation:把features划分为domain-specific和domain-invariant两类。这和long-tail问题中分成class-specific和class-invariant两类的想法异曲同工。 37 | - 相较于之前只做domain-invariant的工作来说,相当于多提取了一个domain-specific的特征。注意最后分类的时候还是只用的domain-invariant的特征,也就是说domain-specific的特征只是为了帮助提取到更好的domain-invariant的特征。 38 | - similarity loss就采取之前的MMD或者domain classification loss。difference loss使得一个domain的两个特征趋于正交。 39 | 40 | - [Deep Reconstruction-Classification Networks for Unsupervised Domain Adaptation](https://arxiv.org/abs/1607.03516) (ECCV2016) 41 | - 3分 42 | - 方法包括两点:1.supervised source label prediction and 2.unsupervised target data reconstruction。其中第二点就是迫使网络提取的feature能够重建T上的样本,也就相当于在feature上混入了T的信息。 43 | 44 | - [Domain-Adversarial Neural Networks](https://arxiv.org/abs/1412.4446) (JMLR2016) 45 | - 5分 46 | - 受到Ben-David理论工作启发的直接应用。Theorem 2刻画了学习器在T上的泛化能力与以下几点相关: 47 | - 1.在S上的empirical risk。 48 | - 2.S与T的H-divergence。 49 | - 3.最优学习器在S和T上取得的risk之和。 50 | - 第3点刻画任务本身的难度,即是否存在一个学习器在S和T上都有较好的泛化能力。 51 | - 第1,2点是试图去优化的。即 a trade-off between the minimization of the source risk and the H-divergence。 52 | - H-divergence难以直接优化,因此采用辨别domain来源的替代任务进行估计。优化时存在一个gradient reversal layer,也就是minimize discriminator的Ld loss使其能够鉴别domain的来源,并maximize feature extractor的Ld loss使不同domain的feature难以分辨,这就体现了adversarial。 53 | 54 | - [Learning Transferable Features with Deep Adaptation Networks](https://arxiv.org/abs/1502.02791) (ICML2015) 55 | - [Deep Domain Confusion: Maximizing for Domain Invariance](https://arxiv.org/abs/1412.3474) (arXiv2014) 56 | - 5分 57 | - The maximization of the domain classification loss in [DANN](https://arxiv.org/abs/1412.4446) is replaced by the minimization of the Maximum Mean Discrepancy (MMD) metric. MMD度量了S和T上features分布的差异,最小化MMD相当于对两个domain上的features做了一个confusion。 58 | 59 | ## Open-set Domain Adaptation 60 | 61 | > 在DA中考虑open-set的类别,包括open-set DA和universal DA。 62 | 63 | - [Open Set Domain Adaptation](http://openaccess.thecvf.com/content_ICCV_2017/papers/Busto_Open_Set_Domain_ICCV_2017_paper.pdf) (ICCV2019) 64 | - 5分 65 | - 新setting:考虑DA中S和T都存在unknown class,且S和T中的unknown class互相不重叠。在测试时,将所有unknown class考虑为同一个类,即需要进行K+1的分类任务,此时考虑open-set acc即可。为了和closed-set进行对比,也考虑closed-set acc。 66 | - 这个问题的难点在于如何让DA中的feature alignment只在shared class上做,而消除unknown class的负面影响。 67 | - 方法核心类似于self-training,分为两步迭代进行: 68 | - 根据T与S上的feature的距离,给T上的样本打pseudo label(包括unknown)。 69 | - 根据pseudo label,将S的feature做映射,使得S与T上相同类(不包括unknown)的feature尽可能接近。这一步相当于DA中经典的feature alignment,且只在shared class中的相同类上做,忽略了unknown class。 70 | 71 | 72 | # Domain Generalization 73 | 74 | > Domain Generalization通常关注multi-source training data的图片分类问题,类似的概念有[OOD generalization](https://arxiv.org/abs/2108.13624)。DG与DA的区别在于前者训练时target domain是未知,因此是一个更难但更泛化的任务。其中DG又分为有或没有domain-label的两种setting,现在的研究更关注后者。 75 | 76 | - [A Style and Semantic Memory Mechanism for Domain Generalization](https://arxiv.org/abs/2112.07517) (ICCV2021) 77 | - 3分 78 | - 如果想把contrastive learning用到DG中该怎么用?这篇文章给了一个很好的范式。 79 | - 总体来说,就是先类似[DSN](https://arxiv.org/abs/1608.06019)一样将feature分解为正交的semantic feature和domain feature两部分,再对两者分别做类似MoCo的contrastive learning。 80 | 81 | - [Learning to Diversify for Single Domain Generalization](https://arxiv.org/abs/2108.11726) (ICCV2021) 82 | - [Domain Generalization with MixStyle](https://arxiv.org/abs/2104.02008) (ICLR2021) 83 | - [Domain Generalization Using a Mixture of Multiple Latent Domains](https://arxiv.org/abs/1911.07661v1) (AAAI2020) 84 | - 4分 85 | - 三篇文章共同的重要假设:visual domain is closely related to image style。 86 | - 前两篇文章通过style transfer的方法(具体做法类似[AdaIN](https://arxiv.org/abs/1703.06868))来做domain augmentation。 87 | - 第三篇文章通过style cluster来确定domain-label,再用传统的adversarial框架。 88 | 89 | - [Deep Stable Learning for Out-Of-Distribution Generalization](https://arxiv.org/abs/2104.07876) (CVPR2021) 90 | - 3分 91 | - 还是基于reweight的stable learning的那一套,但希望扩展到DNN上。存在两个难点: 92 | - 如何在DNN的feature space上刻画non-linear dependencies?文中采用了RFF来刻画feature space两个维度之间的关联,并通过reweight来尽可能减少各个维度之间的关联,即所谓的learning sample weights for decorrelation。 93 | - 如何避免global reweight的高资源开销?文中采用了saving and reloading stratagy,类似于contrastive learning中的memory bank。 94 | 95 | - [DecAug: Out-of-Distribution Generalization via Decomposed Feature Representation and Semantic Augmentation](https://arxiv.org/abs/2012.09382) (AAAI2021) 96 | - 4分 97 | - 对数据集domain shift程度划分出两个标准,比较有趣: 98 | - Correlation:即domain与semantic label的相关性,相关性越强,也就越难学到domain-irrelevant的特征,任务也就越难。 99 | - Diversity:即存在的domain的多样性。 100 | - 不同于[DSN](https://arxiv.org/abs/1608.06019)中直接优化两个feature正交,文中的优化classification loss和domain loss对feature的两个梯度正交。这样确保了feature对两个loss的贡献方向是正交的,也就可以通过文中的两个branch把这正交的两部分分别提取出来作为semantic feature以及domain feature。 101 | 102 | - [Self-Challenging Improves Cross-Domain Generalization](https://arxiv.org/abs/2007.02454) (ECCV2020_oral) 103 | - 4分 104 | - 根据loss对feature的梯度做了类似dropout的事情,扔掉梯度大的地方,强制模型去关注所有feature(问题:这样可能会扔掉前景的特征反而让模型更关注背景?个人感觉这个方法work的点更偏向于防止overfit到source domain上)。 105 | - 具体实现时即有spatial-wise又有channel-wise。 106 | 107 | - [Domain Generalization by Solving Jigsaw Puzzles](https://arxiv.org/abs/1903.06864) (CVPR2019) 108 | - 3分 109 | - Jigsaw Puzzles这样的self-supervised signals有利于DG。那么rotate或者contrastive learning有用吗? 110 | - 这个做法没有用到training data存在多个domain的这一点。 111 | 112 | - [Stable Prediction across Unknown Environments](https://arxiv.org/abs/1806.06270) (KDD2018) 113 | - 4分 114 | - 什么是Stable Prediction?就是在不同domain上预测的error的均值和方差都低。 115 | - 重要的假设:首先将X分为stable features S和noisy features V,其中对于Y的预测只与S有关。且在不同的domain上都存在同样的P(y|s)来刻画S到Y的映射。在这样的假设下,我们只需要模型学得P(y|s)即可。 116 | - 文章的核心在于Eq(3)和Eq(4): 117 | - Eq(3)表示通过reweight来消除features与T的关联。 118 | - Eq(4)表示将特征中的每一个维度分别当作控制变量,reweight后希望尽可能消除其与其它维度之间的关联。这是因为直接消除S和V之间的关联是很难做到的,那么干脆decorrelate all features,从而使得最后模型最终学得的就是S到Y的映射。 -------------------------------------------------------------------------------- /Neural Network/README.md: -------------------------------------------------------------------------------- 1 | # Table of Contents 2 | 3 | - [Table of Contents](#table-of-contents) 4 | - [Neural Network](#neural-network) 5 | - [Interpretability](#interpretability) 6 | - [Tricks](#tricks) 7 | - [Hard And Easy](#hard-and-easy) 8 | - [Architecture](#architecture) 9 | 10 | # Neural Network 11 | 12 | > 有关神经网络的各类杂文,如可解释性,tricks等。 13 | 14 | ## Interpretability 15 | 16 | > 神经网络的可解释性相关文章。 17 | 18 | - [Revisiting the Calibration of Modern Neural Networks](https://arxiv.org/abs/2106.07998) (NIPS2021) 19 | - 4分 20 | - 用大量实验revisit calibration。有意思的几个现象: 21 | - The best current models, including the non-convolutional MLP-Mixer and Vision Transformers, are well calibrated compared to past models and their performance is more robust to distribution shift. 22 | - In-distribution calibration slightly deteriorates with increasing model size (类似于之前工作的发现), but this is out-weighed by a simultaneous improvement in accuracy. 23 | - Under distribution shift, calibration improves with model size, reversing the trend seen in-distribution. Accuracy and calibration are correlated under distribution shift, such that optimizing for accuracy may also benefit calibration. 24 | 25 | - [Do Wide and Deep Networks Learn the Same Things? Uncovering How Neural Network Representations Vary with Width and Depth](https://arxiv.org/abs/2010.15327) (ICLR2021) 26 | - 3分 27 | - 实验性的文章。发现了一个'block structure'现象:即Resnet相对于数据集过参数化后,有很多laryer输出相似的特征,即是冗余的。个人感觉这个现象是比较显然的,Resnet的跳接就是想做这样的事情。文中也没有讨论别的网络是否有这样的现象(reviewer也提到了这一点)。 28 | - 比较有意思的一点是,文中发现较深或者较宽的网络最终虽然有着相似的acc,但是对于对于某些类,两者的acc却差很多(好而不同?有集成的潜质)。甚至在某些类上,小型网络能比大型网络做的更好。 29 | 30 | - [On Calibration of Modern Neural Networks](https://arxiv.org/abs/1706.04599) (ICML2017) 31 | - 5分 32 | - 文中指出了虽然近年来nn的acc不断提高,但是calibration却是在降低的(如Resnet),也就是说模型最后输出的confidence并不能真的代表置信度。 33 | - 首先给出了一个利用分块思想来计算ECE的方法,可以衡量模型的calibration程度。实验表明,增加模型宽度/深度,BN层以及weight decay都会降低模型的calibration。 34 | - 提出了temperature scaling方法,是在训练集上训练后,固定模型参数再通过验证集来训练后处理方法的参数。 35 | - overfitting manifests in probabilistic error rather than classification error. 36 | 37 | - [Understanding deep learning requires rethinking generalization](https://arxiv.org/abs/1611.03530) (ICLR2017_Best paper) 38 | - 5分 39 | - 实验证明了无论是输入扰动还是标签扰动,神经网络都可以百分百的拟合训练数据。那么核心问题来了,明明网络只需要暴力地去记住训练集就好,为什么实际上却有着强大的泛化能力呢? 40 | - 1.正则化:对泛化能力有提升,但是并不显著。 41 | - 2.有限样本情况下,两层Relu神经网络的表达能力。 42 | - 3.SGD隐式地提高了泛化能力。 43 | - 总的来说,文章最终也没有解释为什么,但是给人们一些新的角度重新去思考这个问题。 44 | 45 | - [Learning Deep Features for Discriminative Localization](https://arxiv.org/abs/1512.04150) (CVPR2016) 46 | - 5分 47 | - CAM,广泛用于可视化模型的spatial attention。 48 | - 模型最后一层activation map经过GAP之后再过Linear(W)层得到logits。activation map的每个channel可以看成是独立的表示,那么CAM就定义为channel-wise的加权和。权重来自于W(每个channel表达某类的重要性),再upsample恢复到原尺寸就可以可视化模型到底关注了图像的哪些位置。 49 | - 之后出现的[Grad-CAM](https://arxiv.org/abs/1610.02391)避免了必须使用GAP,更具有广泛性。对于GAP-FC类的CNN来说,Grad-CAM中类别logit对于activation map求导后产生的结果与CAM是完全一致的,因此可以看成是CAM的一般形式。 50 | 51 | - [How transferable are features in deep neural networks?](https://arxiv.org/abs/1411.1792) (NIPS2014_oral) 52 | - 5分 53 | - 纯实验文章,全文没有一个公式。主要想回答两个问题: 54 | - 都说DNN浅层学到的是general feature,而深层学到的时specific feature,那么具体到每一层会如何?是在DNN的哪个地方发生了general到specific的改变? 55 | - transfer learning中该如何选择freeze或fine-tune? 56 | - 全文的核心就是Figure2,其中有很多有意思的发现: 57 | - BnB在3,4,5层的performance drops due to fragile co-adaptation:features that interact with each other in a complex or fragile way such that this co-adaptation could not be relearned by the upper layers alone. 58 | - AnB显示在当前task中,学到的general feature大致在前三层,且越往后越specific。 59 | - AnB+高于BnB+显示出transfer learning的优越性:transferring features will boost generalization performance even if the target dataset is large。 60 | 61 | 62 | ## Tricks 63 | 64 | > 神经网络的各种tricks,如mixup,label smooth等。 65 | 66 | - [Exponential Moving Average Normalization for Self-supervised and Semi-supervised Learning](https://arxiv.org/abs/2101.08482) (CVPR2021_oral) 67 | - 5分 68 | - 在使用EMA model的时候,只有模型参数是EMA的,BN中的均值和方差仍然使用当前batch的样本进行更新,这显然是不合理的。 69 | - 方法简单有效,那就是把将BN的均值和方差也设置为student模型的EMA,可以解决作者所提出的Model parameter mismatch问题。 70 | 71 | - [When Does Label Smoothing Help](https://arxiv.org/abs/1906.02629) (NIPS2019) 72 | - 5分 73 | - Hinton出品,从三个方面讲label smooth的作用。 74 | - 一是label smooth可以让正确类的特征tighter,且类template到其余类的距离会更加趋同。 75 | - 二是从calibration的角度说明了label smooth的作用。 76 | - 三是说明了虽然label smooth可以提高模型精度,但这样的模型作为知识蒸馏的teacher模型却是不好的,因为label smooth损失了类之间的相关性,而这正是知识蒸馏所需要的。 77 | 78 | - [On Mixup Training: Improved Calibration and Predictive Uncertainty for Deep Neural Networks](https://arxiv.org/abs/1905.11001) (NIPS2019) 79 | - 4分 80 | - mixup可以提高模型的calibration。 81 | - The data augmentation provided by mixup is a form of regularization that prevents overfitting and memorization.The label smoothing resulting from mixup might be viewed as a form of entropic regularization on the training signals.即sample层面和label层面的mixup都对calibration有提高。 82 | 83 | - [Bag of Tricks for Image Classification with Convolutional Neural Networks](https://arxiv.org/abs/1812.01187) (CVPR2019) 84 | - 3分 85 | - 记录了应用nn进行图像分类的各种tricks,第五章介绍的mixup,label smooth,知识蒸馏等都是非常有用的技巧。 86 | 87 | - [How Does Batch Normalization Help Optimization?](https://arxiv.org/abs/1805.11604) (NIPS2018) 88 | - 5分 89 | - 1.BN并不一定与ICS(internal covariate shift)有直接联系。 90 | - 2.BN真正的作用在于使得loss landscape更加平滑:it reparametrizes the underlying optimization problem to make its landscape significantly more smooth. 91 | 92 | - [mixup: BEYOND EMPIRICAL RISK MINIMIZATION](https://arxiv.org/abs/1710.09412) (ICLR2018) 93 | - 5分 94 | - mixup,实质上是给模型加上了一个线性系统的先验,实验效果非常显著。在本地跑mixup时,resnet18_cifar10可以提升一个点,resnet18_cifar100可以提升三个点。 95 | 96 | - [Regularizing Neural Networks By Penalizing Confident Output Distributions](https://arxiv.org/abs/1701.06548) (ICLR2017) 97 | - 3分 98 | - Hinton出品。加入了负熵的正则项,惩罚低熵即high-confident的输出,因此模型将更不容易overconfident。最后说明了uniform的label smooth也是在干类似的事情。 99 | - 但其实16年提出label smooth的文章里就已经提到了其与利用熵的正则化是相似的,但是没有进行实验。因此就只是干了一遍前人提出来了没干的事情? 100 | 101 | - [Rethinking the Inception Architecture for Computer Vision](https://arxiv.org/abs/1512.00567) (CVPR2016) 102 | - 4分 103 | - label smooth诞生地。本文提出了Inception V2,其中label smooth只是论文的一小部分,做了一些经验上地分析,ICLR2017 Hinton文章里的很多思想在其中已经有所提及。 104 | - 在本地跑label smooth时,resnet18_cifar10可以提升0.4,resnet18_cifar100可以提升两个点。 105 | 106 | ## Hard And Easy 107 | 108 | > 关于样本难易的相关文章。 109 | 110 | - [Let’s Agree to Agree: Neural Networks Share Classification Order on RealDatasets](https://arxiv.org/abs/1905.10854) (ICML2020) 111 | - 3分 112 | - 实验性的文章。文中阐述的有两点发现很有意思: 113 | - 1.The order in which different architectures learn the data is similar.神经网络学习时,存在一个order,且不同网络结构学习的order是类似的。这是符合我们直觉的,就是一个先易后难的order。 114 | - 2.After convergence,we see that ResNet-50 first learns all the examples AlexNet does, then continues to learn new examples.个人感觉根据8-a图得到的结论不是原文的结论,而是在小网络达到最高acc后,大网络同时学习只有小网络分类正确的样本和新的样本。 115 | 116 | ## Architecture 117 | 118 | > 神经网络的结构。 119 | 120 | - [Non-local Neural Networks](https://arxiv.org/abs/1711.07971) (CVPR2018) 121 | - 5分 122 | - spatial-wise attention。 123 | - 注意这里的attention map是hw\*hw尺度的,建模的是spatial-wise两两之间的联系,而不是h\*w这样建模的是每个点的重要性。 124 | 125 | - [Squeeze-and-Excitation Networks](https://arxiv.org/abs/1709.01507) (CVPR2018) 126 | - 5分 127 | - SEnet:channel-wise attention。 128 | - 建模通道之间的关系,通过网络的全局损失函数自适应的重新矫正通道之间的特征相应强度。是一个c尺度的attention,通过global pool(->c\*1\*1)+FC+sigmoid得到attention系数。对于Resnet来说,可以加入每一个Basicblock中。 129 | 130 | - [CBAM: Convolutional Block Attention Module](https://arxiv.org/abs/1807.06521) (ECCV2018) 131 | - 3分 132 | - channel-wise attention + spatial-wise attention。论文中称两者分别为'look what'和'look where'。 133 | - 在SEnet的基础上加了一个spatial-wise attention。这是一个h\*w尺度的attention,通过channel-wise pool(->2\*h\*w)+conv+sigmoid得到attention系数,同样可以加入每一个Basicblock中。 134 | 135 | - [MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications](https://arxiv.org/abs/1704.04861) (CVPR2017) 136 | - 4分 137 | - 通过depthwise separable convolution(深度可分离卷积)降低网络计算量。 138 | - 如一个5\*5\*16\*32(16->32:in_planes->out_planes)的卷积参数,转化为channel-wise的卷积加上一个conv1\*1将通道数扩展,即5\*5\*1\*16 + 1\*1\*16\*32。 139 | 140 | 141 | 142 | -------------------------------------------------------------------------------- /OOD Detection/README.md: -------------------------------------------------------------------------------- 1 | # Table of Contents 2 | 3 | - [Table of Contents](#table-of-contents) 4 | - [OOD Detection](#ood-detection) 5 | - [Open-Set Recognition](#open-set-recognition) 6 | - [Anomaly Detection and Localization](#anomaly-detection-and-localization) 7 | 8 | 9 | 10 | # OOD Detection 11 | > Out-of-Distribution (OOD) detection: OOD这个定义很大,包括semantic shift, domain shift等都可以被称为OOD。其中,将一个数据划分为两个部分可以认为是只存在semantic shift(相当于OSR),而使用两个数据集则可以认为是同时存在semantic shift和domain shift。当前OOD detection大多数文章仍兼顾multi-class分类以及OOD检测。如果只考虑后者,则更多会被定义为anomaly detection或novelty detection。 12 | 13 | > Following terms also include anomaly detection and novelty detection(they are usually considered as the single-class case). 14 | 15 | > 不错的一篇[综述](https://arxiv.org/abs/2110.11334),对于AD,ND,OSR,OOD等相关领域做了较为清晰的定义和区分。 16 | 17 | - [ReAct: Out-of-distribution Detection With Rectified Activations](https://arxiv.org/abs/2111.12797) (NIPS2021) 18 | - 5分 19 | - OOD问题中的一个公认的异常问题:模型对部分OOD样本输出高confidence。 20 | - 文中认为这个问题是由于OOD样本的activations也就是features会出现一些异常的非常高的值,因此修剪之后模型在OOD样本上的logit的降低幅度将大于ID样本,从而ID和OOD样本更容易区分。这个思路和ODIN中的两个trick类似。 21 | - 那么为什么OOD样本的features会出现一些异常的非常高的值呢?文中用BN来解释很有趣:测试时BN中的统计量是用的ID样本的移动平均,当输入OOD样本时,BN就无法正常的norm,因此产生了异常。文中也验证了将BN用OOD样本的统计量替代后则可以消除这种异常。 22 | - 也就是说BN可能只适用于iid环境,在non-iid的环境中使用BN都需要考虑distribution shift可能带来的影响。如有用两个BN解决distribution mismatch的[做法](https://arxiv.org/abs/1911.09665)。 23 | 24 | - [Exploring the Limits of Out-of-Distribution Detection](https://arxiv.org/abs/2106.03004) (NIPS2021) 25 | - 3分 26 | - large-scale pre-trained transformers有利于OOD检测。 27 | 28 | - [Semantically Coherent Out-of-Distribution Detection](https://arxiv.org/abs/2108.11941) (ICCV2021) 29 | - 5分 30 | - 对于benchmark的讨论很有意思:指出之前的方法near-perfect的原因可能在于对于dataset low-level feature的overfit。 31 | - 方法需要用到ID与OOD混合的unlabel data,实验中直接将TinyImageNet作为unlabel data因为其本身就是混杂着ID和OOD样本的。而测试集中包含TinyImageNet的test data,其ID的部分可以认为是存在covariate shift问题,需要正确分类;而OOD的部分则同时存在covariate shift和label shift问题,需要检测出来。 32 | - 方法比较简单,对unlabel data做筛选,ID的就当成label data训练,OOD的就用OE。 33 | 34 | - [Bridging In- and Out-of-distribution Samples for Their Better Discriminability](https://arxiv.org/abs/2101.02500) (arXiv2021) 35 | - 3分 36 | - motivation:use corrupted images as the intermediate of ID and OOD. 37 | - 对每种transformation定义一个soft label,而这个soft label对应于这种transformation后的在原ID网络中的acc,也就是说acc越低认为corrupt更严重,则更偏向于OOD。 38 | 39 | - [SSD: A Unified Framework for Self-Supervised Outlier Detection](https://openreview.net/forum?id=v5gjXpmR8J) (ICLR2021) 40 | - 4分 41 | - contrastive self-supervised学表示,再聚类。test时算马氏距离做OOD Detection。idea并没有什么novelty,与NIPS18的Mahalanobis方法很相似,只不过因为没有label信息,因此需要自监督+聚类来确定簇中心和协方差矩阵。 42 | - 对数据的access分的很清晰:如果可以用in-distribution的label?那就把contrastive变为supervised contrastive;如果可以用少量OOD data?引入所谓的few-shot OOD setting,其实就是将OOD data也考虑在距离的计算之内从而更为精准。 43 | 44 | - [Detecting Out-of-Distribution Examples with Gram Matrices](http://proceedings.mlr.press/v119/sastry20a.html) (ICML2020) 45 | - 4分 46 | - 所谓的Gram Matrices其实就是一个样本activation map(c*h*w)中channel-wise correlations(c*c),那么其实这个就可以表征训练集的一些特征,测试样本若与其bia较大则可以认为是OOD。 47 | - 这其实和KD里面用feature来蒸馏的做法很类似,能不能把KD那套搬到OOD里面来用? 48 | 49 | - [CSI: Novelty Detection via Contrastive Learningon Distributionally Shifted Instances](https://arxiv.org/abs/2007.08176) (NIPS2020) 50 | - 4分 51 | - contrastive学表示再打分的大框架。 52 | - 有意思的一个点是:In particular, we verify that the “hard” augmentations, thought to be harmful for contrastive representation learning, can be helpful for OOD detection.也就是将“hard” augmentations后的样本作为neg项加入contrastive loss的计算,这样学到的表示对classify没有提升,但对OOD有帮助。 53 | 54 | - [Contrastive Training for Improved Out-of-Distribution Detection](https://arxiv.org/abs/2007.05566) (arXiv2020) 55 | - 3分 56 | - supervised + contrastive学表示,test时计算与每个类的马氏距离。也就是利用contrastive生成更general的features,想法类似于[Generative-Discriminative Feature Representations for Open-Set Recognition](https://openaccess.thecvf.com/content_CVPR_2020/html/Perera_Generative-Discriminative_Feature_Representations_for_Open-Set_Recognition_CVPR_2020_paper.html)。 57 | 58 | - [Generalized ODIN: Detecting Out-of-distribution Image without Learning from Out-of-distribution Data](https://arxiv.org/abs/2002.11297) (CVPR2020) 59 | - 4分 60 | - motivation:在train以及valid过程中,应该保持OOD dataset是unseen状态。 61 | - 在之前的包括ODIN,Maha等方法中,其超参其实是对着测试集的OOD dataset调的,而这显然是错误且在现实应用中无法接受的。 62 | - 文中的核心贡献应该是对ODIN方法做了改进,使得其超参无需在OOD dataset中调得。文中大篇幅的概率方面的解释偏于讲故事。 63 | - 在DomainNet上做的实验非常有意思。 64 | 65 | - [Unsupervised Out-of-Distribution Detection by Maximum Classifier Discrepancy](https://arxiv.org/abs/1908.04951) (ICCV2019) 66 | - 3分 67 | - 很有意思的idea:OOD样本更集中于boundary附近,那么用两个不同的classifier,OOD样本显然会比ID样本有更大output difference,那么就可以用这一点来做OOD detection。 68 | - 需要用到unlabel的ID和OOD的混合dataset来做finetune,用来进一步Maximum Classifier Discrepancy。这里其实是如果是只有OOD的dataset理论上是更好的,因此其实并没有发挥混合dataset中ID样本的作用。 69 | - 实验的setting其实是transductive的,但文中并没有明确表明这点,这点很有问题。 70 | 71 | - [Deep Anomaly Detection with Outlier Exposure](https://arxiv.org/abs/1812.04606) (ICLR2019) 72 | - 4分 73 | - motivation:用OOD dataset对训练好的nn做finetune(如使得OOD data的输出分布更接近均匀分布),期望其泛化到test时的OOD data中。也就是说该方法needs access to some OOD datasets。 74 | 75 | - [A Simple Unified Framework for Detecting Out-of-Distribution Samples and Adversarial Attacks](https://arxiv.org/abs/1807.03888) (NIPS2018) 76 | - 5分 77 | - supervised学表示,再把每个类的features看作是高斯分布,test时计算马式距离。 78 | - why Mahalanobis distance? 79 | - 马氏距离相比于欧氏距离考虑到各种属性之间的联系,即消除了一些属性相关性,更重要的是实验效果都比欧氏距离好。 80 | - 本质上就是把softmax分类换成了LDA,为什么会好呢?个人感觉对着OOD调超参起到了很大作用。LDA甚至需要满足特征服从高斯分布这样的假设,也就是说如果前面的表示学习做的没那么好,马氏距离也就不会这么好用了。 81 | - 这里也就有一个有意思的点:表示做好了,OOD其实也就不难了,也就没什么好做的了。但其实现在大部分OOD工作就是在toy数据集上做着学好表示后的事情。什么样的OOD场景是难的且该去做的其实是值得思考的问题。 82 | 83 | - [Training Confidence-calibrated Classifiers for Detecting Out-of-Distribution Samples](https://arxiv.org/abs/1711.09325) (ICLR2018) 84 | - 4分 85 | - 利用GAN来生成靠近boundary的样本当作OOD样本,约束网络在OOD样本上输出均匀分布。和[OE](https://arxiv.org/abs/1812.04606)方法很类似,只不过这里用GAN来生成而不是直接利用OOD dataset。 86 | 87 | - [Enhancing The Reliability of Out-of-distribution Image Detection in Neural Networks](https://arxiv.org/abs/1706.02690) (ICLR2018) 88 | - 5分 89 | - 1.On in-distribution images, modern neural networks tend to produce outputs with larger variance across class labels. 90 | - 2.neural networks have larger norm of gradient of log-softmax scores when applied on in-distribution images. 91 | - 根据上述两个观察,提出了用temperature scaling和类似FGSM的input preprocessing来进一步拉大ID和OOD样本输出概率分布的差别,再用max-softmax方法来判定。该方法记为ODIN。 92 | - 文中的OOD指标相比于baseline更加清晰。 93 | 94 | - [Deep One-Class Classification](http://proceedings.mlr.press/v80/ruff18a.html) (ICML2018) 95 | - 4分 96 | - 传统的kernel-based one-class方法有OCSVM以及SVDD,其中OCSVM希望将映射后的高维特征与原点更好的区分开来,也就是找到一个良好的half-space;而SVDD是希望映射后的高维特征分布在半径很小的超球内。 97 | - 而本文的思路就是将SVDD中的kernel映射改为用cnn学得的表示,再用类似SVDD的优化目标端到端地优化。 98 | 99 | - [A Baseline for Detecting Misclassified and Out-of-Distribution Examples in Neural Networks](https://arxiv.org/abs/1610.02136) (ICLR2017) 100 | - 4分 101 | - out-of-distribution的检测是一个不平衡二分类问题,需要用ROC,PR等指标衡量。 102 | - OOD检测最直接的思路就是取softmax后最大的概率值作为判断标准,小于阈值则认为是OOD。文中用该方法建立了一系列baseline。 103 | - 观察发现OOD样本通常也有较大的confidence,因此这样的方法势必有局限性。 104 | 105 | # Open-Set Recognition 106 | 107 | > Open-Set Recognition(OSR): 需要同时做好分类和检测。且OSR中的open-set更接近于只有semantic shift,而不考虑low-level distributional shift或者说domain shift。 108 | 109 | - [Open-Set Recognition: A Good Closed-Set Classifier is All You Need](https://arxiv.org/abs/2110.06207) (ICLR2022_under review) 110 | - 5分 111 | - 从实验上验证了ID classfier的分类性能和检测性能是高度线性相关的。 112 | - 此处的分类性能指的是泛化能力,因此增大模型capacity,data augmentation等可以提高模型泛化性能的方法都可以提高其检测性能。而如果分类性能是由于overfit来提高的,那么是不能提高检测性能的。 113 | - 对这个现象可以有两个解释: 114 | - 与calibration联系起来。提高模型泛化能力可以提高模型的calibration under distribution shift,那么对于OOD样本的刻画也就更加精准。 115 | - 从feature的角度来讲。一般来说,ID的样本要比OOD样本拥有更大的feature norm,而stronger cross-entropy models project features further from the origin, while still ensuring that any ‘uncertain’ samples have lower feature norms (OOD samples are interpreted as ‘uncertain’ during evaluation). 116 | 117 | - [Generative-Discriminative Feature Representations for Open-Set Recognition](https://openaccess.thecvf.com/content_CVPR_2020/html/Perera_Generative-Discriminative_Feature_Representations_for_Open-Set_Recognition_CVPR_2020_paper.html) (CVPR2020) 118 | - 3分 119 | - motivation:auto-encoder + rotation loss来提高instance-wise的表示。 120 | 121 | - [Learning Open Set Network with Discriminative Reciprocal Points](https://arxiv.org/abs/2011.00178) (ECCV2020_spotlight) 122 | - 4分 123 | - motivation:一般nn后面接的线性层每个类都有一个模板向量来代表类的表示。而这篇文章则反之,用Reciprocal Points来代表不属于此类的表示。不属于某类的包括other classes和unknown classes,那么这种方法相比于常规做法就能对unknown classes做更好的建模。 124 | - loss中的两项正好表示两个目标: 125 | - 1.分类:距离类Reciprocal Points最远才表示属于此类。 126 | - 2.保证Reciprocal Points是非此类的表示:类内样本到Reciprocal Points的距离要足够远。 127 | 128 | - [Classification-Reconstruction Learning for Open-Set Recognition](https://arxiv.org/abs/1812.04246) (CVPR2019) 129 | - 3分 130 | - motivation:认为openmax方法中利用logits来表征某个样本其实是不利于unknown detection的(class-wise)。 131 | - 因此用类似ladder nets的网络结构 + reconstruction loss来计算另一个中间表示z(instance-wise,可以用self-supervised?),结合logits与z再用openmax。 132 | 133 | - [Towards Open Set Deep Networks](https://arxiv.org/abs/1511.06233) (CVPR2016) 134 | - 5分 135 | - 训练时仍采用softmax,测试时将softmax改造成多出一个unknown类的openmax。具体来说分为以下几步: 136 | - 对于类j,找到所有正确分类为该类的training data,取出所有logits的第j项,计算所有到中心的距离并排序,用最大的n个做极值理论分析(Extreme Value Theory),即去fit Weibull分布。 137 | - 测试时计算样本logits每一项到中心的距离,代入Weibull分布计算属于inlier的概率w,再对logits做calibration,并得到新的第K+1项,再使用softmax即得到K+1项的概率。 138 | - [Extreme Value Theory](https://en.wikipedia.org/wiki/Extreme_value_theory)用于刻画n个i.i.d.随机变量的最大值在n趋向于无穷时的分布,在本文中体现在取最大的n个到中心的距离去fit Weibull分布。 139 | - 可以看出openmax的核心思想在于建模ID数据的logits,认为logits与ID数据分布偏差较大的可能是OOD。 140 | 141 | 142 | # Anomaly Detection and Localization 143 | 144 | > 不仅需要检测出异常图片,还需要定位异常的位置,通常使用[MVTec AD](https://openaccess.thecvf.com/content_CVPR_2019/html/Bergmann_MVTec_AD_--_A_Comprehensive_Real-World_Dataset_for_Unsupervised_Anomaly_CVPR_2019_paper.html)数据集。 145 | 146 | - [DRAEM -- A discriminatively trained reconstruction embedding for surface anomaly detection](https://arxiv.org/abs/2108.07610) (ICCV2021) 147 | - 4分 148 | - simulated anomaly generation的算法比较高明。 149 | - 想法有点类似GAN:生成器负责把异常图片恢复为正常图片,判别器负责找到异常图片与恢复图片的异常区域,这样在测试的时候就可以直接输出segmentation的结果。 150 | 151 | - [CutPaste: Self-Supervised Learning for Anomaly Detection and Localization](https://arxiv.org/abs/2104.04015) (CVPR2021) 152 | - 3分 153 | - CutPaste即crop图片随机一块在粘贴到随机位置,再将这样操作后的图片认为是异常图片,就变成了二分类self-supervised问题。 154 | 155 | - [PaDiM: a Patch Distribution Modeling Framework for Anomaly Detection and Localization](https://arxiv.org/abs/2011.08785) (ICPR2021) 156 | - [Sub-Image Anomaly Detection with Deep Pyramid Correspondences](https://arxiv.org/abs/2005.02357) (arXiv2020) 157 | - [Deep Nearest Neighbor Anomaly Detection](https://arxiv.org/abs/2002.10445) (arXiv2020) 158 | - 4分 159 | - 方法无需训练,只需要在ImageNet上pretrain的CNN。 160 | - 后续的方法有image-level的,也有patch-level的;有基于KNN的,有基于混合高斯的。但本质思路就是建模normal image特征的distribution,测试时再与之进行对比。属于baseline方法,但效果出奇地好。 161 | 162 | - [Explainable Deep One-Class Classification](https://arxiv.org/abs/2007.01760) (ICLR2021) 163 | - 3分 164 | - 本质就是二分类情况下的[CAM](https://arxiv.org/abs/1512.04150)。所谓的upsample也并不重要,在CAM原paper中是一笔带过的。 165 | 166 | - [Patch SVDD: Patch-level SVDD for Anomaly Detection and Segmentation](https://arxiv.org/abs/2006.16067) (ACCV2020) 167 | - 3分 168 | - SVDD要求所有样本映射到一个中心点C附近,而Patch SVDD则要求相邻patch的特征相似。 169 | --------------------------------------------------------------------------------