I remember in Justice (which I have yet to succeed in wiping from my mind ) that Picard implied that Federation science was capable of "detecting the seeds" of violent criminality. I'm not sure how this would work - the sinister side would be some kind of brain scan. The not-so-sinister side would be that people involved with children (teachers, etc) might be well-trained in detecting anti-social or violent tendencies, for which treatment could be sought (and which would hopefully be more efficacious than our current treatments).
Either way, I'm not sure how this bears out in practice, since we have at least three examples of serial killers (or other violent murderers) not only in the Federation, but in Starfleet*, which you would think would be pretty picky when it comes to psychological profiling.
*
Chu'lak, Field of Fire (DS9, Season 7)
Lon Suder, Meld (VOY, Season 2) - although Suder was actually never officially in Starfleet, having come to Voyager via the Maquis.
Walter Pierce, Eye of the Beholder (TNG, Season 7) - not a serial killer, but a murder/suicide perpetrator; pretty violent, IMO!
I'm sure there are others, but they're the ones I can think of off the top of my head...
When you are dead, you don't know that you are dead. It is difficult only for others.
It's the same when you are stupid...