Full-waveform inversion (FWI) represents an advanced geophysical imaging technique focused on intricately depicting subsurface physical properties by iteratively minimizing the differences between the simulated and observed seismograms. Unfortunately, the conventional FWI utilizing a least-squares loss function suffers from various drawbacks, including the challenge of local minima and the necessity for human intervention in parameter fine-tuning. It is particularly problematic when handling noisy data and inadequate initial models. Recent works have exhibited promising performance in two-dimensional FWI by integrating structural sparse representation to procure adaptive dictionaries. Drawing inspiration from the competitiveness of structural sparse representation, we introduce a paradigm of group sparse residuals that integrates two types of complementary prior information by harnessing both the internal and external subsurface media models. The proposed algorithm is based on an alternate minimization algorithm to guarantee workflow flexibility and efficient optimization capabilities. We experimentally validate our method for two baseline geological models, and a comparison of the results demonstrates that the proposed algorithm faithfully recovers the velocity models and consistently outperforms other traditional or learning-based algorithms. A further benefit from the group sparse coding used in this method is that it reduces the sensitivity to data noise.