decoder for posterior-grams