Skip to content

Training, adaptation, compression, and systems techniques · Training, fine-tuning, adaptation, compression, and systems techniques · TRN039 · Training method

Tent test-time entropy minimization

Adapts selected normalization parameters and statistics using unlabeled test-time inputs to reduce prediction entropy.

Explained here Component demo, not a trained model CodeSplash's run and the reference's record

In CodeSplash

Documented in the Academy only. There's no Set up button.

Availability
Explained here
Code example
Component demo, not a trained model
Who ran it
CodeSplash's run and the reference's record
CodeSplash's run
The reference's example ran in Python and R here, and they agree.
The reference's record
Python: Ran in the reference's review. The report doesn't record which version of the code ran. R: Reviewed but not run: R wasn't available to the reference's authors.

Purpose

Adapts selected normalization parameters and statistics using unlabeled test-time inputs to reduce prediction entropy.

Question / hypotheses

Does this intervention improve the intended quality, adaptation, resource, or reliability objective under a controlled comparison? It defines a method, not an intrinsic null-hypothesis test.

Architecture / computational structure

A pretrained classifier updates a restricted parameter subset online while processing target-domain batches.

Assumptions

Confidence sharpening must correlate with correctness under the shift; this can fail. Batch composition, ordering, and reset policy are part of the deployment algorithm.

Formula / computational definition

Lent=−1B∑i∑cpθ(c∣xi)log⁡pθ(c∣xi).L_{ent}=-\frac1B\sum_i\sum_c p_\theta(c\mid x_i)\log p_\theta(c\mid x_i).

Parameters and notation

Learned at adaptation: selected normalization affine parameters; statistics may be updated. Hyperparameters: learning rate, steps/batch, episodic versus continual reset, parameter subset, batch size.

Fitting, fine-tuning, and adaptation

Evaluate the entire adaptive stream protocol rather than treating test examples as an IID fixed-model evaluation. Preserve a reset checkpoint and monitor collapse, class drift, and retained performance.

How to use and calibrate

Example: adapt to a controlled image corruption stream without labels while comparing a frozen baseline.

Example application

adapt to a controlled image corruption stream without labels while comparing a frozen baseline.

Interpretation / pitfalls

Watch out

Lower entropy can mean confidently wrong predictions. Updating on a benchmark changes the evaluation regime and must be disclosed; target labels still cannot be used for tuning.

Python and R code examples

Scope: numerical mechanism demonstration. Validation: Python executed successfully on the supplied synthetic inputs; R reviewed but not executed (Rscript unavailable).

Python and R

The reference's own programs, shown as written. A component demo shows one central piece of the method; it doesn't train a full model.

Python

Component demo, not a trained model — numerical mechanism demonstration. · needs numpy

import numpy as np
P=np.array([[.8,.2],[.6,.4]])
print(-np.mean(np.sum(P*np.log(P),axis=1)))
R

Component demo, not a trained model — numerical mechanism demonstration.

P <- rbind(c(.8,.2),c(.6,.4))
print(-mean(rowSums(P*log(P))))

Sources

From the CodeSplash reference, entry TRN039.