I am pretty sure they are the large gadgets on the top of the train that rub on the wires to pick up the power
A Pantograph is used to collect power from overhead wires and a shoe for third rail, such as in the South of England.
As has been said, the flash from these is extremely bright but is also sporadic. If it is regular, then that would lean towards a different answer.