Modern language models evaluate code for malice by routing information through internal "moral" pathways, suggesting these systems weigh security questions using machinery typically reserved for ethical judgment.
Key Points
- Researchers analyzed mixture-of-experts (MoE) models, including OLMoE and DeepSeek-V2-Lite, to track how they process questions about malicious code.
- When asked to identify malicious code, models consistently activate the same internal expert networks used for questions regarding morality and ethics.
- Routing experiments showed that forcing a model to use a different question's expert path significantly alters its final answer.
- Pruning studies revealed that while these moral pathways are consulted during decision-making, the actual judgment is not stored within those specific experts.
- The study utilized 240 code samples, including both malicious and benign PyPI packages, to map how models frame security-related queries.