Dumb question, but have you checked/changed the fuel filter?
It sounds like fuel starvation, like vapor locking we used to get with carburators. Clogged filters are too often overlooked.
Other things to check:
foregin objects/sludge in the fuel tank
damaged/cinked fuel lines (bottomed out the frame recently?)
spark: could be computer related, but I don't think so.
Air filter/general tune-up stuff.
How long does it run?
How is the power untill it dies?
When did it start doing this?
What (if anything) did you change before this started?
I apologize if some of this has been listed elsewhere, but its a place to start.