Solved by albanD in post #2 
              
              
                Hi, 
I would say this is caused by the “No free lunch theorem”  
This is a rather fundamental limitation of AD I’m afraid. 
The issue you have here is thatall your outs and inputs are dependent. And so all the gradient “flowing” for one will flow the same way as the ones flowing for another. And so …