An auto-regressive model that captures bidirectional context