Training a -token attention is NP-hard
Abstract
As the title indicates, this work is inspired by the celebrated paper of Blum and Rivest, "Training a -node neural network is NP-complete." They showed that for a -layer, -node, -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 -dimensional query, key, and value, and -dimensional token input (arguably the simplest attention head), the analogous exact-fit problem on a training set of -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.
est. 32% chance this paper gets accepted at ICLR 2027.
What do you think this paper will get?
All positions stay anonymous.