Replace linear activation functions with non-linear ones (e.g., ReLU, tanh) to reduce the impact of excessive linearity in the learned functions. Additionally, use techniques such as dropout and batch normalization to improve model robustness against adversarial examples.