We present a theoretical derivation of the relationship between scattering attenuation and porosity based on a multiple back-scattering model. Two parameters, a heterogeneity parameter γ and a formation parameter β0, are introduced to characterize this relationship: Q-1s = Q-1sO (1 + βOφ)2eγf, where φ is porosity, QsO is a measured value at φ = 0. The formation parameter βO describes the micro-scale formation properties such as rock and pore fluid properties and cracks. The heterogeneity parameter φ represents the effects of local/regional-scale heterogeneities on scattering attenuation, such as layers and fractures. The relative importance of these two parameters depends on the propagating wavelength. This analytical form fits empirical results in oceanic crust that have been previously reported. Numerical analysis shows that the local/regional-scale heterogeneity, γ, plays a more dominant role than the microscale properties, βO, on scattering attenuation at seismic and sonic wavelengths in the oceanic crust.