In fact the precise mechanism of reversal is not known as in many viral examples one can reverse virulent strain again to attenuated state through in vitro propagation!
There is no single answer to that question. The answer is different for each attenuated virus. In the early days, pre-1970 such as when live attenuated polio viruses were being developed, the researchers would passage the virus through various cell lines and chicken embyos and so on and then select for clones or isolates that would no longer paralyze a monkey when injected into the monkey skull. Some of those strains had single point mutations which could easily mutate back to wild type.
Today it is possible to engineer viruses which lack whole genes, or which have a few hundred mutations so they could never regain all the wild-type sites because they live for only a few rounds of replication in the host (hence they are severely attenuated and unable to cause disease and spread in an epidemic form).
So, in theory we can easily make a 100% safe live attenuated polio vaccine, but in practice the rules and regulations and cost of testing and producing a new, safer vaccine are prohibitive. The rules laws about vaccine design and testing have not really kept up with changes in biotechnology, at least not in the USA.
I completely agree with Brian. There are so many examples of vaccine escape both in human and veterinary field. No matter how many mutations you introduce to attenuate your virus, when there is change in environment and conditions the viruses would try to fit into the changing environment and could revert back, obviously certain mutations reverse more rapidly than others. However with continuous passage in tissue culture followed by sequencing - you'd be able to find it out.