Robustness of neural networks trained with biologically inspired local learning rules