Generalization Error Matters in Decentralized Learning Under Byzantine Attacks