Hi, I have had a very similar issue with my late-2012 27" iMac and have been following along here for a month or so.
27-inch, Late 2012
3.4 GHz Intel Core i7
16 GB 1600 MHz DDR3
NVIDIA GeForce GTX 680MX 2048 MB
Fusion Drive 1TB
Since I bought the system in early 2013 there were a few times my son had some freezing issues playing 3d games but never anything that wasn't fixed with a restart and I just wrote it off to driver problems or issues with the game.
Mid-summer this year I began to experience the system locking up with video artifacts filling the screen(small red and green squares mostly, sometimes others). It would happen during any system intensive task such as video editing or rendering, photoshop work, etc. 99% of the time I would have to reboot manually and even then most times the system would refuse to reboot, hanging with a few light graphic artifacts appearing during the grey screen with the progress bar. Resetting PRAM etc would not help and going into hardware diagnostics would not report any issues (even though the Hardware Diag. screens would occasionally have graphic artifacts or flashing colours themselves) The only thing that seemed to get things running again was leaving the the system off for a while and then rebooting. Over the course of a month I tried just about everything - different video drivers, installing the El Capitan beta, reinstalling a completely clean OS etc - without any any luck in resolving the issue. The odd time a panic log was generated it seemed to show the video drivers were the source of the problem.
I eventually found I was able to replicate the problem 100% percent of the time by running GpuTest's FurMark. As soon as the GPU Temp reached 70-80 C the system would hang with extensive video artifacts etc. It seemed like a classic case of a GPU or video memory failure due to a solder joint, very similar to the issues the led to the 2011 Macbook GPU replacement program. Everyone I consulted said that logic board replacement was my only option. Unfortunately it is not under warranty so the cost would be extremely high. I ended up pickup up a new iMac just so I could keep working, figuring eventually I would get the logic board replaced so I could sell or repurpose the system (and probably hoping Apple would announce a replacement program).
Now the interesting part - Wednesday I had some spare time so I replaced the El Capitan beta on that system with a clean instal of the full release version. Since then the system has been on full-time and I cannot replicate the issue at all, either through normal usage or running GpuTest/other system stress tests. FurMark has been running on that system almost constantly during each day with the GPU temp hitting 90-93 C. Occasionally when I stop and restart the test there is a very brief graphical glitch for a split second and then the test runs fine. Other than the updated OS the only thing I can think may be a factor is that the system had been turned off for 4-5 days before the El Cap install.
Any thoughts? If the issue does come back I will post an update.