I'm not sure how I should tackle such problems. To my understanding, $\omega_i$ shows the strength/importance of this edge in the prediction of $f(x)$. But I'm not sure what the gradient with respect to $\omega_i$ is an indication of?
What would the outcome of this problem be if the derivatives all had different values ?