HRank icon indicating copy to clipboard operation
HRank copied to clipboard

Automatically resume training from the highest test acc epoch may cause data leak.

Open henryzhongsc opened this issue 1 year ago • 0 comments

It has been a while since HRank published. Let me start off by saying thank you for sharing this interesting piece of work and bringing in a novel perspective in the pruning realm. However, as we were trying to replicate the HRank results for benchmarking, we noticed the following issue.

By the following lines, it looks like for every new epoch, the checkpoint with the best test acc is being automatically loaded, then the training resumes: https://github.com/lmbxmu/HRank/blob/33050a16c11b5e0f105b268be8c2a42087d11c9d/main.py#L232-L244 https://github.com/lmbxmu/HRank/blob/33050a16c11b5e0f105b268be8c2a42087d11c9d/main.py#L305-L306

We also confirmed it empirically by checking acc and printing out a portion of conv tensor: checkpoint_verify

While I understand that it is common and acceptable practice to report the epoch with the best test acc [1], training every epoch upon the checkpoint with the best test acc sounds like a potential data leak — as it is using test set info to determine operations. It looks like HRank may perform reasonably well without this setting (i.e. by just continuing training upon the latest epoch). Is this by accident?

[1] Li et al. Pruning Filters for Efficient ConvNets. ICLR 2017

henryzhongsc avatar Mar 01 '23 21:03 henryzhongsc