Arithmetic Without Numbers – How LLMs Do Math
2 days ago
- #Activation-Derived Routing
- #Arithmetic Operations
- #Model Auditing
- Arithmetic operations can be directed to Python using a route that learns arguments from the model's internal state, not just from prompt text.
- In a frozen Llama model, activation-derived readouts can supply calculator arguments under a no-parser rule, showing strong, narrow results.
- The route successfully handled real arithmetic prompts and stayed silent on adversarial ones across four operations: multiplication, division with remainder, gcd, and lcm.
- On 11,736 locked examples and 1,536 targets, it achieved exact-answer lifts with zero fires on hard-negative prompts designed to avoid calculator use.
- Using the DeepMind Mathematics Dataset, the route supported gcd, division with remainder, and lcm, improving exact-answer rates significantly over the frozen model alone.
- Mean exact-answer gains were +0.810 for division with remainder, +0.502 for gcd, and +0.968 for lcm, indicating correction of model errors.
- Examples show prompts that should trigger the calculator (e.g., arithmetic requests) and those that should not (e.g., textual references without calculation intent).