I hear alot of good advice in here.
1. "Play slow first": true that. If you pick sloppy while doing a passage slow, it's going to be mangled playing it fast. The cleanliness when playing fast comes from learning it cleanly slow, and then upping the metronome. Muscle memory learns what you do , whether clean and correct or fast and mangled. What would you rather commit to muscle memory?
2. "You can't play faster than you can hear". Correct. Your ear and brain need to speed up. My recommendations for this task is <John Coltrane> .When you can listen to some of his pieces, Giant Steps, Blue Train and Trane's Slo Blues (hint: tempo is slow, his solo is way not slow) and sing them back, you will be well on your way to hearing fast. I think these are better than <insert guitar hero here> because the melodies are not generic scale runs but are very complex melodies.
3. For me what got my alternating picking up to speed, and back up to speed when I get rusty (which happens when you don't play fast lead all the time) was a program called
Guitar Speed Trainer. (no it ain't my program, but I've used it for a long time). It's got patterns built in for scale runs and also an editor to build your own runs. Then it has a bell curve of bpm where you can set the speeds of each run of the scale. i.e. If you are going through a melodic minor 10 times, you can start at say 70 bpm go to an 180 bpm at the top of the curve and then back down to say 120 bpm as you finsh. The exercise of start slow gets your picking clean, then going to where you almost can't play the scale accurate builds stamina, then going _back_ down to reasonable bpm.... I don't know why, but it works.