ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Sinkhorn Gibbs kernel

Exponentiating −Cᵢⱼ/ε turns each transport cost into a positive kernel weight, with smaller costs receiving larger weights. The following alternating row and column scalings seek the supplied marginals. The function finally returns transport cost for the resulting…

Implementation mathematicsSource recovered; runtime not executed
Learn with the Atlas

Learn to read this model

Start with the symbols, follow the operations, and check what the result means.

Open guided lesson
gh-eq-2285dd0903dec16fsource-comment-equation
InitializekernelK=exp(−C/ε)Initialize kernel K = exp(-C/ε)

Read the equation

Exponentiating −Cᵢⱼ/ε turns each transport cost into a positive kernel weight, with smaller costs receiving larger weights. The following alternating row and column scalings seek the supplied marginals. The function finally returns transport cost for the resulting plan; it does not add the entropy term to the reported objective, and finite iterations need a marginal-residual check.

Terms & definitions

TermMeaning in this source
K

Gibbs kernel

C

Pairwise transport costs

epsilon

Positive entropy-regularization scale

How it works

Read the definition from its right-hand expression to the quantity on the left. Its surrounding source records the intended input, state, or parameter context. Where the source leaves an operation unspecified, this page preserves that gap.

Assumptions & limits

Source recovery establishes that the expression appears in this record. Its mathematical validity, implementation behavior, and interpretation must be assessed separately. See the linked source and research notes for the checks available for this version.

Original context

Read the surrounding source passage
	n := len(p)
	m := len(q)

	if n == 0 || m == 0 {
		return 0.0
	}

	// Initialize kernel K = exp(-C/ε)
	K := make([][]float64, n)
	for i := range K {
		K[i] = make([]float64, m)
		for j := range K[i] {
			K[i][j] = math.Exp(-c[i][j] / epsilon)
		}
	}

	// Initialize scaling vectors
	u := make([]float64, n)
Exact original notation
Initialize kernel K = exp(-C/ε)

Related builds

Sources & provenance

01
Go mathematical helpers
Lines 238–238 · 33aa84f2aa61
02
Go mathematical helpers
Lines 238–238 · 33aa84f2aa61

Search equations, builds, manuscript text, and recovered sources.