Fault immunization is a technique to further enhance fault tolerance of a neural network. The technique of Chun and McNamee is based on the trial-and-error training, which requires a high computational time. Lursinsap and Tanprasert proposed a mathematical model to capture the characteristic of the fault immunization. However, this model is performed locally to each neuron after training, which may deteriorate the target error and increase the computation time. A generalized mathematical model for the fault immunization is proposed in this thesis by considering the global immunization to enhance the immunity. This model is based on a new cost function, which combines the target error function with the immunization function. We also propose a feasible modified random optimization algorithm to improve the tolerance and several related theorems are proved. From the simulation results, the fault immunity was significantly improved.