The International Covenant on Civil and Political Rights Article 15 paragraph 1 states:
> If, subsequent to the commission of the offence, provision is made by law for the imposition of the lighter penalty, the offender shall benefit thereby.
So while punishing or increasing the punishment for an act in the past is illegal, making the punishment lighter does apply retroactively.
Now, I have no idea of how pertinent this particular treaty is (I know little about law), but at the very least it shows some consensus that lightening a punishment retroactively is not only allowable but also necessary.
http://www.un.org/en/documents/udhr/index.shtml#a11