Stuart Mimms "a.k.a. Rudolph Hayes" was a mental patient from Mendota, Minnesota, who checked himself into an institution in 1990 and checked out in 1992. He eventually used a false identity of Rudolph Hayes (a man who died in 1978 in a car accident) to join the FBI. He was a stellar cadet who began helping Agent John Doggett and Agent Dana Scully with a case they were working on involving the murders of two women.
He seemed to possess a strange ability to speak to the dead through their crime scene photographs. This could have all just been his schizophrenia given the symtoms of that disease. In any case his obsession with the case of John Doggett's son's murder gave him crucial knowledge of the perpetrators. So it is possible the crime scene photos of Luke Doggett actually spoke a message to him OR his obsessiveness from being schizophrenic led him to notice details lost to others.
Though A.D. Brad Follmer misdirected Doggett to accuse Hayes/Mimms of the crime of murdering Luke Doggett, Hayes proved his innocence because he had phoned in the anonymous tip that led to finding the second female victim of Nicholas Regali. Mimms had told Doggett that Bob Harvey abducted Luke Doggett but Nicholas Regali killed the boy. His whole goal in joining the FBI had been to become a credible enough person to give the information to Doggett and be believed. With his identity exposed, he returned to the institution which he thought of as home.