MLCrack

    REINFORCEMENT LEARNING · INTERVIEW QUESTION

    What is a Deep Q-Network (DQN)? What key innovations made it work?

    🔴 advanced · Value-Based Methods

    Hint: Replace Q-table with neural network. Think about experience replay and target networks.

    Answer

    DQN (DeepMind 2015. extends Q-Learning by replacing the Q-table with a deep neural network that maps states to Q-values for all possible actions.

    Key innovations:

    1. Experience Replay: stores past transitions (s, a, r, s') in a replay buffer and samples them randomly for training. Breaks correlation between consecutive updates, improves sample efficiency, allows reuse of experience.

    2. Target Network: uses a separate, slowly-updated copy of the Q-network to compute targets: y = r + γ·max_a' Q_target(s',a'). Updated every C steps by copying weights from the online network. Stabilizes training by reducing oscillations from moving targets.

    3. End-to-End Learning: learns directly from high-dimensional inputs (raw pixels in Atari games) without hand-crafted features.

    This approach allows Q-Learning to scale to environments where state spaces are enormous.

    DQN achieved human-level performance on many Atari 2600 games. Later improvements: Double DQN, Dueling DQN, Prioritized Replay, Rainbow.