Wherever American military aid goes, violence normally follows it and increases tenfold in the region. Look at Pre 9/11, Pakistan was much more stable. They still sufferd the odd sectarian violence but nothing like we have been seeing for the last decade. But when the Bush Administration pretty much forced Pakistan to either be with them or against them (rather then not take sides), Pakistan pretty much had no choice at the time since the America public was shellshocked from the 9/11 attacks and the would go with whatever the Government wanted to do and there were rumours the Bush Administration threatened to destroy Pakistans nuclear stockplie if they didn't help them take on the Taliban. They've paid a tremendous price joining the so called war on terror. Thousands of it's soldiers and citizens killed in war and terrorism.
However as we all know, the Taliban is the baby of the Pakistani secret service the ISI. After the Soviet invasion of Afghanistan, the US and her key allies in that war (Saudi Arabia and Pakistan) funded and supported the worst elements of the Afghan Mujahadeen i.e the most fundamentalist Islamists who would later on turn against the US (a term the CIA coined blow back). Once the war was over, Aghanistan was left to fend for itself and descended into civil war. Pakistan would nuture the Taliban who in turn would eventually take over 90% of Afghanistan and mostly stabilise it. Pakistan now had a majority secure western flank thanks to their Taliban allies and could concentrate on India more and provide further support to the Kashmiri militants who were harrassing Indian security forces and eating into Indian coffers. Pakistan (who the US no longer needed the services of once the Soviets left Afghnistan) recieved a lot of support from India's giant Asian rival China who were happy to see India spending away on securing it's part of Kashmir.
After 9/11 and the Talibans refusal to hand over Bin Laden without proof led to the invasion, routing of the Taliban and subsequent occupation of Afghanistan it was only a matter of time before a major insurgency would start to take hold as well as political will and public support waning. Pakistan is indeed most likley playing a double game such is the nature of the corrupt world we live in where geo political realities and Machiavellian political schools of thought dominate the world wide political landscape. Reason? Just in case the insurgency cannot be defeated and a political settlement has to be reached with the enemy and it looks increasingly likely this will have to be the case. History attests to this in many guerilla campaigns most recently Iraq. By putting their eggs in many baskets Pakistan has taken the safer option of coming out at the end of it with at least something rather then all or nothing. Even so the public and the politicians are divided. It is likely the secular politicians want to root out the extremists as does the top Army brass but most of Pakistans (Islamic) population is poor, illiterate and susceptible to Islamists parties views (who are very popular and anit American) and rougue elements within the ISI are probably the one's most likely to be helping the Taliban while at the same time the ISI is having to help out the CIA.