Confounder filetering (CF) method is an efficient method that can remove the influences of confounding factors such as age or gender to improve the across-cohort prediction accuracy of neural networks. One distinct advantage of CF is that it only requires minimal changes of the baseline model’s architecture so that it can be plugged into most of the existing neural networks.