How to keyframe changes to assigned materials in Cycles
It is not possible to keyframe changes to structure (eg adding/removing nodes or links). 

You can achieve the same effect by using mix nodes/mix shaders and keyframe there factor. Or create many different materials and keyframe the material slot.