Bike is shifting on its own
Neil is right, most all &quot;auto shifting&quot; or &quot;ghost shifting&quot; is the result of cable-tension problems.
If the cable is a bit loose, the derailleur will try to shift &quot;up&quot; to a smaller cog.  If too tight, it will try to catch the next larger cog.
Cables stretch, especially after a short period where the new cables stretch to the point they're stable.  after that, they should be good for a long time.
Try this.
Shift to the highest (smallest) cog and try to pull the derailleur cable away from the frame.  If there's a lot of slack, it's too loose.  If it feels very tight....
With either condition, make sure the shifter is in the highest position, and loosen the cable at the derailleur and then pull it snug.  Re-tighten the securing bolt and run it through the gears; it should be very close.
Ideally, the chain should jump smartly to each cog both up and down, and seat solidly on the cog.
If it's just a bit off, you can play with the barrel adjuster either at the shifter or at the derailleur.
Another cause of such problems is a bent rear derailleur &quot;hanger&quot;, the part that the derailleur attaches to.
Some of these are very soft aluminum and can be easily bent.
Make sure the derailleur cage is exactly parallel to the cogs and the hanger is not visibly bent.