Whenever you're ready, walk me through how you'd approach this.
Derive the formula for cross-entropy loss from first principles and explain how it is used in gradient descent. Cover the binary classification case, extend the result to multiclass softmax classification, and connect the loss to maximum likelihood estimation. State the assumptions, derive the gradient with respect to logits, and explain numerical stability considerations. Include a concise Python implementation and a finite-difference gradient check.