Pakistan has been facing a wave of militant attacks over the past few years .