At one point our forums came under attack from spammers. Those spammers then applied link building to pages on our forums where they spammed. The end result was them sending us links from sites they hacked linking to hundreds of domains per page.
Now, all I can do on my end is delete all pages where I had spam on my site and hope for the best. Does it change my back link profile? Of course, but not at my fault. I can not imagine Google penalizing a site for something out of our control.