Modern neural networks of the transformer family require the practitioner to decide, before training begins, how many attention heads to use, how deep the network should be, and how wide each component should be. These decisions are made without knowledge of the task, producing architectures that are systematically larger than necessary: empirical studies find that a substantial fraction of heads and layers can be removed after training without performance loss. This paper introduces DDCL-INCRT, an architecture that determines its own structure during training. Two complementary ideas are combined. The first, DDCL (Deep Dual Competitive Learning), replaces the feedforward block with a dictionary of learned prototype vectors representing the most informative directions in the data. The prototypes spread apart automatically, driven by the training objective, without explicit regularisation. The second, INCRT (Incremental Transformer), controls the number of heads: starting from one, it adds a new head only when the directional information uncaptured by existing heads exceeds a threshold. The main theoretical finding is that these two mechanisms reinforce each other: each new head amplifies prototype separation, which in turn raises the signal triggering the next addition. At convergence, the network self-organises into a hierarchy of heads ordered by representational granularity. This hierarchical structure is proved to be unique and minimal, the smallest architecture sufficient for the task, under the stated conditions. Formal guarantees of stability, convergence, and pruning safety are established throughout. The architecture is not something one designs. It is something one derives.
Figures & tables
Result
Status
Source
Prototype anti-collapse guarantee
Inherited
[ 1 ]
Algebraic decomposition Lq=LOLS+V
Inherited
[ 1 ]
Two-timescale Lyapunov (frozen architecture)
Inherited
[ 2 ]
Channel Destruction Theorem
Inherited
[ 2 ]
Spectral growth criterion
Inherited
[ 3 ]
Finite convergence (standalone INCRT)
Inherited
[ 3 ]
Table 1: Origin of the main results. Inherited : used without modification from cited work. Extended : strengthened or generalised here. New : proved for the first time in this paper.
Assump.
Informal meaning
First use
Required by
(A1)
Prototype bank non-degenerate: S(P)>0
Sec. 4
Thm. 1 , 2 , 6
(A2’)
∃k,k′ : prototypes differ along u∗
Sec. 4
Thm. 1 , 2
(A3)
T large enough for soft assignments
Sec. 4
Thm. 1
(B1)
Each head’s prototype bank non-degenerate
Sec. 5
Thm. 3 , 4 , 5
(B2)
Prototype subspaces mutually orthogonal
Sec. 5
Thm. 3 , 4
(B3)
Heads have distinct initial gate activities
Sec. 5
Thm. 3
Table 2: Complete list of assumptions. (H1)–(H5) inherited from [ 3 ] .
Figure 1: Synthetic experiments 1–3. Left (Exp. 1): Spectral ordering and directional coverage: λ(h) decreasing in h (bars match theoretical eigenvalues, circles); coverage fraction exceeds the theoretical lower bound 1−εθw=0.899 (dashed). Centre (Exp. 2): Temperature divergence: all eight heads converge to Tmin=0.1 in order of decreasing λ(h) ; Spearman rank correlation =−1.00 (prediction: ≤−0.9 ). Right (Exp. 3): Separation force monotonicity: fractional F(h) strictly decreasing (bars); empirical ratios lie on the diagonal, confirming the bound of Lemma 27 .
Figure 2: Experiment 4 (Colab, BERT/SST-2, frozen encoder, 3 epochs). (a) Directional energy Γh per head: values range from 0.15 to 0.32, confirming head differentiation on real data. (b) max∣S(P(h′)) after−S(P(h′)) before∣=0 at all six pruning events (log scale; bars touch 10−15 ), verifying Theorem 6 (i) with machine precision. (c) Actual Fsep drop (blue) equals Fsep of the pruned head (red) exactly at every event (all labelled OK ), verifying Lemma 14 : prototype subspace orthogonality makes the drop decompose exactly.
Hyperparameter
Value
Encoder architecture
Embedding dimension d
64
Attention heads (initial)
2
Dropout
0.4
Weight decay
10−3
DDCL-INCRT layer
Table 3: Hyperparameters for Experiment 5 (end-to-end SST-2).
Figure 3: Experiment 5 (end-to-end, SST-2, d=64 , θw=0.8 , λreg=0.05 , 10 epochs). Left: training loss and validation accuracy over 10 epochs; final validation accuracy 69.4% . Centre: residual content λmax(Ares) at the five growth events, strictly decreasing ( 4.36→2.38→2.15→1.35→0.84 ), confirming the spectral ordering prediction. Right: separation force Fsep(h) (bars) and prototype spread S(P(h)) (green curve) per head; S(P(h))>0 for all heads confirms assumption (A1); Fsep is partially ordered, with deviations attributable to end-to-end co-adaptation after growth events.
Exp.
Prediction
Metric
Theorem
1
λ(h) decreasing in h
Growth order
Sec. 12
1
Coverage ≥1−εθw
∑λ(h)/∥Ma∥F2
Sec. 12
2
T∞(h) increasing in h
Temperature order
Sec. 5
2
tmin(h) decreasing in λ(h)
Rank corr. ≤−0.9
Sec. 5
3
F(h) decreasing in h
Bar chart
Sec. 12
3
Ratio bound saturated
Scatter vs. diagonal
Lem. 27
Table 4: Experimental predictions and corresponding theoretical results (Experiments 1–3 and 5). Experiment 4 results are tabulated in the caption of Figure 2 .