many-to-many OR many-to-one for RNN t+1 prediction When designing RNN's to predict the next time-step ahead, I've come across architectures where you train with say n timesteps as input and n timesteps as output (at t+1).input: (X(1), X(2)...X(n)) 
outputs: (X(2), X(3)...X(n+1)). So you have a many-to-many architecture - e.g. here.

I've also seen for the same kind of problems a many-to-one architecture:  input:  (X(1), X(2)...X(n)) output: (X(n+1)).

My question is, what are the advantages and disadvantages of each? Is one generally favoured? I'd presume that since when predicting you already have the timesteps 0 to n there's no benefit in predicting them and therefore no benefit in including them in your loss fn during training, but maybe it helps set the internal state of the RNN correctly?
 A: If we were not predicting the next item in the sequence, I think that the first method would be best---the second would only be used if there were not labels available for every timestep (e.g., if we were trying to determine the sentiment of a sentence and only had a $+$ or $-$ at the very end).  If we had intermediary sentiment labels, it would be an information loss to omit them.  This seems clear.
I am not sure for the case where we are predicting the next value in a sequence, however.  It might even depend on the data itself: perhaps periodic data does better with the first way, for example.  
The gradients are very different, however: (To simplify, suppose that $x^{(t)}$ and the hidden state $h^{(t)}$ are both scalars and ignore the biases.)
The forward equations are:
$h^{(t)}=ux^{(t)}+wh^{(t-1)}$
$y^{(t)}=g(vh^{(t)})$
When we perform BPTT, we must backpropagate through $h^{(t)}$ to access the parameters $u$ and $w$:

input: $(x^{(1)}, x^{(2)}...x^{(n)})$ 
outputs: $(x^{(2)}, x^{(3)}...x^{(n+1)})$.
$\dfrac{\partial{L}}{\partial{h^{(t)}}}=\dfrac{\partial{L}}{\partial{h^{(t+1)}}}\dfrac{\partial{h^{(t+1)}}}{\partial{h^{(t)}}}+\dfrac{\partial{L}}{\partial{y^{(t)}}}\dfrac{\partial{y^{(t)}}}{\partial{h^{(t)}}}$

input:  $(x^{(1)}, x^{(2)}...x^{(n)})$ 
output: $(x^{(n+1)})$
$\dfrac{\partial{L}}{\partial{h^{(t)}}}=\dfrac{\partial{L}}{\partial{h^{(t+1)}}}\dfrac{\partial{h^{(t+1)}}}{\partial{h^{(t)}}}$

If the first weight in our network is very wrong, using the second way it will have to be adjusted based on a gradient sent back through every single hidden state in the entire unrolled network $\dfrac{\partial{L}}{\partial{h^{(t+1)}}}\dfrac{\partial{h^{(t+1)}}}{\partial{h^{(t)}}}$.  Using the first way, it would still get $\dfrac{\partial{L}}{\partial{h^{(t+1)}}}\dfrac{\partial{h^{(t+1)}}}{\partial{h^{(t)}}}$, but would also get feedback from the effect of its own output on the loss: $\dfrac{\partial{L}}{\partial{y^{(t)}}}\dfrac{\partial{y^{(t)}}}{\partial{h^{(t)}}}$. So when we have an output at each step (included in the loss), this seems to send more immediate feeback.
The tuning of $v$ may also benefit from more steps.
