Pith. sign in

REVIEW 2 cited by

Learning the greatest common divisor: explaining transformer predictions

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2308.15594 v2 pith:6IQ6Y6PE submitted 2023-08-29 cs.LG cs.AI

classification cs.LGcs.AI
keywords integerstrainingcommondivisorgreatestinputslog-uniformmathcal
verification ladder T0 review T1 audit T2 compute T3 formal
0 comments
abstract

The predictions of small transformers, trained to calculate the greatest common divisor (GCD) of two positive integers, can be fully characterized by looking at model inputs and outputs. As training proceeds, the model learns a list $\mathcal D$ of integers, products of divisors of the base used to represent integers and small primes, and predicts the largest element of $\mathcal D$ that divides both inputs. Training distributions impact performance. Models trained from uniform operands only learn a handful of GCD (up to $38$ GCD $\leq100$). Log-uniform operands boost performance to $73$ GCD $\leq 100$, and a log-uniform distribution of outcomes (i.e. GCD) to $91$. However, training from uniform (balanced) GCD breaks explainability.

Discussion (0). Continue with ORCID to comment.

Forward citations

Cited by 2 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. Full citation record

  1. Uncovering a Universal Abstract Algorithm for Modular Addition in Neural Networks

    cs.LG 2025-05 conditional novelty 6.0 of 10

    Trained MLPs and transformers solving modular addition can be unified under an approximate Chinese Remainder Theorem, and deep or embedding-based networks learn only O(log n) frequency features.

  2. Learning Euler Factors of Elliptic Curves

    math.NT 2025-02 conditional novelty 5.0 of 10

    Neural networks predict the parity of Frobenius traces of elliptic curves from other traces with high accuracy, and their embeddings reveal learned mod-2 and mod-4 structure.

Pith tools