Seismic attenuation compensation is an important method to enhance signal resolution and fidelity, which can be performed on either prestack or poststack data. I aim at developing the state-of-the-art algorithms and general framework that includes seismic inversion and imaging schemes to compensate the subsurface $Q$ filtering effects.