I'm thinking its fuel firing in manifolds. Reason....electronic injection richens fuel for eng coolant temp, air temp, especially in colder temps. For a few seconds it runs on this set parameters, but once O2 sensors read gas, and readjust mixture, fuel leans out. and afterfire stops popping in exhaust. Now how to test this theroy? take to a friend that has a good scanner with readouts, check to see what temp sensors are reading before startup to actual ambient air temp, then start engine and listen to rattle and watch to see what reading changes when rattle disappears, sensor temps, O2 fluctuations.But if either of the temp sensors are way off from actual ambient temp, i would suspect its a bad sensor and change it, regardless of rattle noise But i would suspect an out of range temp sensor, and O2 sensors adjust mixture back(leaner) to stop cat contamination.