How to detect cause of mob spawning

Is there any way to detect how a mob was spawned? At the very least, just a way to detect if they were spawned naturally (as in just in the world, not from spawner blocks).

Continue to help post