What each core costs to store
- CP stores R·ΣIₙ numbers: linear in R.
- Tucker stores ΠRₙ + ΣIₙRₙ: the core’s product grows fastest. A mode kept whole (Rₙ = Iₙ) stores no factor.
def cp_numbers(shape, rank):
return rank * sum(shape)
def tucker_numbers(shape, ranks):
core = int(np.prod(ranks))
factors = sum(n * r for n, r in zip(shape, ranks) if r < n)
return core + factors
On a 256 × 256 × 3 × 3 convolution kernel at rank 100, CP stores 51,800 numbers (518R) and Tucker-2 at (100, 100, 3, 3) stores 141,200 (512R + 9R²), about 2.7× as many. 90,000 of them are core entries.
But equal rank is the wrong comparison: at equal rank Tucker fits at least as well. A count tells you the price of a model, not what it buys.