Idento-computer

An idento-computer is an onboard control system that regulates a Transformer's identity.

The Transformers cartoon
The Insecticons jettisoned themselves out the Decepticon cruiser when it and the Autobot ship crashed on Prehistoric Earth. Stranded and isolated on a foreign world, their idento-computers adapted their forms into insectoid beast modes with the ability to process organic matter. They were discovered four million years later, so there is no telling how long the adaptation process took.