Matt Cain pitched seven strong innings, Joaquin Arias homered and drove in a career-high five runs, and the San Francisco Giants beat the Los Angeles Dodgers 8-4 on Wednesday night to extend their NL West lead to 2 1/2 games.