In what sense is logistic regression a single-neuron neural network, and why is that a useful mental model?

Quick Overview

Asks how logistic regression maps onto a single neuron with a sigmoid activation and why that view helps when learning neural networks. It tests the shared loss and gradient, the softmax extension to many classes, and what changes once hidden layers are added.

In what sense is logistic regression a single-neuron neural network, and why is that a useful mental model?

Role: Data Scientist

Category: Machine Learning

Difficulty: medium

Interview Round: Other

In what sense is logistic regression a single-neuron neural network, and why is that a useful mental model? ```hint Write out the forward pass Write the logistic regression prediction as a formula, then write what one unit in a neural network computes. Match the pieces one by one. ``` ```hint Compare the training Compare the loss and its gradient in both settings, then think about what changes once you stack several of these units. ``` ### What a Strong Answer Covers - The component-by-component mapping between logistic regression and a single unit. - The loss and gradient the two share, and how the model is trained. - How the picture extends to multiclass outputs and to hidden layers. - What changes when moving from one unit to a deep network, such as convexity, interpretability and the shape of the decision boundary. - Concrete ways the analogy helps in practice. ### Follow-up Questions - Why can a single sigmoid unit not separate XOR, and what are two ways to fix that? - Why is binary cross-entropy preferred over squared error as the loss for a sigmoid output? - What happens to logistic regression weights when the training data is linearly separable, and how does regularization help? - Zero initialization works for logistic regression. Why does it fail for a network with hidden layers?

Overview: Asks how logistic regression maps onto a single neuron with a sigmoid activation and why that view helps when learning neural networks. It tests the shared loss and gradient, the softmax extension to many classes, and what changes once hidden layers are added.

PracHub logo
General
Nov 25, 2026
mediumData ScientistOtherMachine Learning
0
0

In what sense is logistic regression a single-neuron neural network, and why is that a useful mental model?

What a Strong Answer Covers Guidance

  • The component-by-component mapping between logistic regression and a single unit.
  • The loss and gradient the two share, and how the model is trained.
  • How the picture extends to multiclass outputs and to hidden layers.
  • What changes when moving from one unit to a deep network, such as convexity, interpretability and the shape of the decision boundary.
  • Concrete ways the analogy helps in practice.

Follow-up Questions Guidance

  • Why can a single sigmoid unit not separate XOR, and what are two ways to fix that?
  • Why is binary cross-entropy preferred over squared error as the loss for a sigmoid output?
  • What happens to logistic regression weights when the training data is linearly separable, and how does regularization help?
  • Zero initialization works for logistic regression. Why does it fail for a network with hidden layers?