keras neural network training and validation loss with regular spikes

enter image description here

I trained a simple neural network in keras. The training loss and validation loss shows regular spikes after certain epochs. The x-axis of the figure is epochs, and the y-axis is loss. Notice the large validation loss spike correspond with small training loss spike. I used fit_generator. I tried optimizer SGD and Adam, and the spikes still appear.
Interestingly, changing batch size doesn't influence the shape or period of the spike. Changing optimizer influences spike magnitude, but doesn't influence the repeating period.
Any thoughts on why this happens?