Understanding Knowledge Hijack Mechanism in In-context Learning through Associative Memory