LearnQuestion bank

Define a convex function in two equivalent ways. Why do optimisers prefer convex problems, and is the training loss of a deep network convex?

ResearchTechnicalEasy

Theme reported publicly: Google DeepMind

Answer it yourself first, out loud or on paper, then compare.

Answer

Model answer, written in a candidate's voice

In short

  • Chord definition: f(θx+(1−θ)y) ≤ θf(x)+(1−θ)f(y) for θ in [0,1].
  • Equivalent first-order condition: tangent lies below the graph, f(y) ≥ f(x)+∇f(x)ᵀ(y−x); for twice-differentiable functions, Hessian is PSD everywhere.
  • Convexity makes every local minimum global, so gradient-based methods have guarantees; strong convexity adds uniqueness and linear-rate convergence.
  • Deep-network training loss is non-convex due to products of weights and permutation symmetry, yet SGD often works via overparameterisation and escaping saddles; least squares and logistic regression are convex examples.

In full

A convex function on a convex domain satisfies the chord condition f(θx+(1−θ)y) ≤ θf(x)+(1−θ)f(y) for all θ in [0,1]; equivalently, for a differentiable function, the tangent at any point lies below the graph, f(y) ≥ f(x)+∇f(x)ᵀ(y−x), and for twice-differentiable functions this is equivalent to a PSD Hessian everywhere. Optimisers prefer convex problems because every local minimum is global, so gradient descent and related methods have meaningful guarantees, and strong convexity gives a unique minimiser plus linear convergence rates under standard smoothness assumptions. The training loss of a deep network is not convex: it contains products of weights and has permutation symmetries, so it has many equivalent minima and saddle points. That said, SGD works well in practice, partly because overparameterised networks have benign landscapes and saddles are often escaped, though this is not a global guarantee. Convex examples include least squares and logistic regression, which are the canonical problems where these guarantees apply directly.

Checked against sources by an independent AI reviewer.

What a strong answer covers

  • Chord definition f(θx+(1−θ)y) ≤ θf(x)+(1−θ)f(y), or a first-order condition (the tangent lies below the function), or a PSD Hessian.
  • Every local minimum is global, so gradient descent has guarantees. Strong convexity gives uniqueness and rates.
  • Deep-net losses are non-convex (weight-permutation symmetry, products of weights), yet SGD works well in practice: saddles, overparameterisation.
  • Examples of convex problems: least squares, logistic regression.

Common mistakes

  • Confusing convex functions with convex sets.
  • Claiming non-convexity means bad local minima dominate.