Training a $2$-token attention is NP-hard
Keep the title, authors and abstract in paper.json
potentialpaper · 2026-11-23 19:49 UTC · d8a10ce906cc ·
.potentialpaper/metadata.json modified
+++ b/.potentialpaper/metadata.json@@ -1,19 +1,5 @@{- "layout": 5,- "identifiers": [- {- "scheme": "openreview",- "value": "d6HH2Irwch"- }- ],- "title": "Training a $2$-token attention is NP-hard",- "authors": [],- "abstract": "As the title indicates, this work is inspired by the celebrated paper of Blum and Rivest, \"Training a $3$-node neural network is NP-complete.\" They showed that for a $2$-layer, $3$-node, $n$-input neural network (arguably the simplest neural network), deciding whether weights exist that fit a given training set exactly is NP-complete. We show that for an attention head with $1$-dimensional query, key, and value, and $n$-dimensional token input (arguably the simplest attention head), the analogous exact-fit problem on a training set of $2$-token sequences is NP-hard, and that if softmax is replaced with hardmax, the decision problem becomes NP-complete. These hardness results persist when fitting allows a fixed positive tolerance, measured coordinatewise or by mean squared loss.",- "year": 2027,- "venue": "ICLR 2027 (under review)",- "source": "openreview",- "license": {- "metadata": "CC0-1.0",- "abstract": "CC0-1.0"- }+ "layout": 6,+ "kind": "paper",+ "key": "3c0f9a83-2f60-4891-95ef-87031344cdb3"}
paper.json added
+++ b/paper.json@@ -0,0 +1,9 @@+{+ "title": "Training a $2$-token attention is NP-hard",+ "authors": [],+ "abstract": "As the title indicates, this work is inspired by the celebrated paper of Blum and Rivest, \"Training a $3$-node neural network is NP-complete.\" They showed that for a $2$-layer, $3$-node, $n$-input neural network (arguably the simplest neural network), deciding whether weights exist that fit a given training set exactly is NP-complete. We show that for an attention head with $1$-dimensional query, key, and value, and $n$-dimensional token input (arguably the simplest attention head), the analogous exact-fit problem on a training set of $2$-token sequences is NP-hard, and that if softmax is replaced with hardmax, the decision problem becomes NP-complete. These hardness results persist when fitting allows a fixed positive tolerance, measured coordinatewise or by mean squared loss.",+ "license": {+ "metadata": "CC0-1.0",+ "abstract": "CC0-1.0"+ }+}