i've had that problem on other bikes it could be dirt in the carbs
small amount of dirt can block your carbs when it stops the dirt floats to the bottom of the float bowl thus letting you start her up again as the float bowls fill and the engine sucks it will suck dirt up to the jets blocking the jets then the bike stops so the problem keeps repeating it self
leaving you scratching your head
if you have a spark it cannot be electrical
first thing i check is spark followed by fuel flow be it the fuel tap or carbs if all is ok then it could be electrical at that point i take it to an expert as electrics is not my forte