Mostly it's the spam that it learns from. When it catches something and it's determined by a Mod to be spam, it adds indicators to its spam recognition profile.
No software, no matter how advanced, could become as much of a degenerate as some of our fine members.