Conceptual

Integrated Gated Calculator for Exact Arithmetic in a Frozen LLM

A non-differentiable, adapter-style module (the IGC) inserted after a fixed layer of a pretrained, frozen large language model that lets it compute arithmetic exactly in a single forward iteration, without chain-of-thought, scratchpads, or external tools. At a designated anchor token an attention-based Input Mapping submodule extracts the operands and operator as fixed-length categorical data; a calculator emulated with non-differentiable tensor operations on the GPU produces the result; and a gated Output Mapping submodule writes that result into subsequent tokens, using near-zero gates to avoid destructive interference on non-arithmetic tasks. Because the calculator blocks gradients, an auxiliary cross-entropy loss trains the Input Mapping while teacher-forced substitution of the correct output lets the Output Mapping train in parallel.