I have the same problem. It existed to a very small extent on Mavericks. I just barely noticed it as some occasional flickering square pixel patterns in the upper left corner of the screen. This is a iMac 27" core i5 from 2010.
I thought upgrading to Yosemite might help. Nope.
It got vastly worse, with whole rows of pulsating pixels obscuring menus and sometime modifying my cursor from its usual black arrow to a small square of pixel blocks.
After trying the usual things, as suggested in the many posts above, I concluded it must be a HW problem, since it existed to a small extent under Mavericks.
I lugged the 27" behemoth to the Apple store, where, of course, it worked perfectly. I left it with them for 7 days. After the first 4 days, they told me they saw no problems and all diagnostics ran fine. A few days later, they called and said they saw the bad pixels and the machine failed its cpu heatsink test and I needed a new main board for about $550.
I declined the repair and took the machine back to my office. It's been running perfectly, with a small desk fan blowing air across the back.
Perhaps this really is heat related and Yosemite is causing the GPU to run hotter? Anyway, it's been fine for about 6 hours.
I'll keep you posted if it goes bad again.
Interestingly, the Apple Genius said he had not seen this kind of problem before. Considering all of the discussions on this site, I'm surprised.