Euphoria16 / Shapley-NAS

[CVPR 2022] Implementation of "Shapley-NAS: Discovering Operation Contribution for Neural Architecture Search"
22 stars 3 forks source link

BUG in shap_estimation #1

Open zhanglei1172 opened 1 year ago

zhanglei1172 commented 1 year ago

Hi ! Thanks for your open source, but I'm a little confused about your code. https://github.com/Euphoria16/Shapley-NAS/blob/06497276e819a38af997415a5015900aa3e93667/train_search.py#L252

Why minus the std of samples? If it's a Monte Carlo approximation, just only need to calculate the sample mean.

Euphoria16 commented 1 year ago

Hi, thanks for your question. The approximation of Shapley value is conducted across different inputs. We found that the same operation may show very large contribution on some of the input samples while having large negative value on others. So we evaluate the actual importance by mean minus std to mitigate the effect of input distribution.