
Reproduction goal: define what “enough data” means
When a sentiment classifier moves from short sentences to long movie reviews, should we reuse the old temperature or fit a new one using labeled target-domain examples? We freeze the classifier and vary only the number of examples used to fit the temperature, then measure the change in probability loss. How many examples are enough depends on the baseline, the tolerance for error and whether the result holds on a new sample.
The previous experiment held the inputs fixed while changing the attention implementation. Small numerical differences left the prediction sets unchanged. Here we return to fixed eager inference and vary only the size of the prefix drawn from the calibration pool. The new artifacts are 1,000 target-domain calibration predictions, seven temperature-fitting trajectories and an independent arithmetic audit. The exploration pool reuses saved predictions and the final confirmation pool remains untouched. The resulting curve describes development data that had already been examined.
Temperature scaling adjusts probabilities without retraining
Temperature scaling divides the classifier’s logits by a positive scalar before normalization. A temperature above one usually flattens the probability distribution, while a temperature below one sharpens it. The model weights and text representation stay fixed. Confidence can change while the highest-scoring label stays the same.
Guo, Pleiss, Sun and Weinberger reported in their paper ICML 2017 that single-parameter temperature shrinks were effective on many of the data sets they examined. This is the paper report, not a cross-domain pattern that has been proven by this experiment. We re-test the impact of the target field sample budget on results, following its proximate negative logarithmic objective. Thesis Page
For category II, the difference between two fractions is , With the reverse temperature This means the same knob:
of which It's the sample number. It's a two-length vector. It is the probability of a positive category. It has to be positive. The probability of negative classes is . This is the probability between two fixed labels and cannot be interpreted as the correct probabilities of fact that open up to generating answers.
It's the number of calibrated samples. is the binary label supplied by the dataset. Lower negative log-likelihood (NLL) is better. The code uses a numerically stable softplus to avoid overflow at large scores. Optimization uses the calibration pool alone, without consulting exploration-pool loss.
Dataset registration and evaluation protocol
Model fixed to DistilBERT SST-2 class checkpoint, review 714eb0fa89d2f80546fda750413ed43d93601a13. Using official headers, negative maps are zero and the front is one; CPU, float32, right cut-off, maximum length of 500112, lots 16 and four lines are all frozen. Models and individual summaries of tokenizer files are stored in resource locks, and no Hashi checks can be bypassed in the cache.
IMDb uses the v1 archive of official tests. The three pools were sorted in a stable identity well before the first projection and registered 1,000 search, 1,000 calibration and 1,000 confirmations of duplicate films and standardized texts respectively. Today, using the same registration form by word, only the model output of the calibration pool is open. The original video review was not re-issued with the source code, and readers obtained the archive and validated the summary through a fixed mirror; no samples were changed or downloads replaced because of unsatisfactory results.
History must be disclosed: SST-2 has been used in this series and in old wheels, with the old temperature coming from historical calibration samples; IMDb exploration ponds have also been used for previous analyses. None of them can be packaged as test sets for first exposure. IMDb is a publicly available material on which it cannot be excluded whether or not the model pre-training has seen its contents. The reduction of direct inter-group duplication by film does not amount to a demonstration of the independence of all sample statistics.
This pre-set budget is 16, 32, 64, 128, 256, 512 and 1,000. The prefixing of the order of registration in the calibration pool is not balanced by labels or easy to select samples. They overlap, so that curved adjacent points do not repeat experiments independently. The primary metric is exploration-pool NLL. Secondary metrics are accuracy, the Brier score summed over both classes, and ECE with ten equal-width bins. The minimum ECE is not set as the selection rule.

Reading the upstream code and local implementation
Read the author's warehouse first. ModelWithTemperature.temperature_scale, confirm that input is a logits rather than the probability of being normalized; read again set_temperature, see the order in which you first collect the validation set output and then optimize the cross-breathing. ce1154ec7d5235eee046f28875c3dd8421f11d45, The license is MIT. The original use of GPU and LBFGS was achieved; local teaching was independently written, with the same objective, and was replaced by a one-dimensional root, without claiming to repeat the same optimizer.
This is a guide number for inverse temperatures. Each can be recalculated from the two-dimensional logits and tabs saved. The search area is fixed to , The internal root approaches 100 times in two; if both ends indicate that the best is at the border, then the boundary is recorded without expanding silently. This positive zone also guarantees not to reverse classification labels by negative temperature. None of this seventh tranche has touched the edge.
Read the classification forwards in a fixed version of Transformers: The input grid is a batch multiplied sequence length, and the output is a batch multiplied by two. The framework version is 4:49 and the model achieves a corresponding fixed submission. The source-code map identifies the official model call, the independent temperature alignment and self-written data registration codes respectively, avoiding the misinterpretation of “calling the official model” as “replicating an official experiment”.
Minimal experiment and observed results
The eight calibration samples were tested for real models, followed by 1,000 formal calibration reasoning. The model is forward measured at 59.96 seconds, with a complete process of about 64 seconds and the process peaking with a resident memory of 2012872704 bytes; accurate time-consuming, system and peak memory is based on environmental logs. The 1,000 logits of the exploration pool are real model records that have not been regenerated, let alone filled with random arrays. There is no training classifier and there is no reading of the confirmation pool output.
| Calibration budget | Temperature | Exploration pool NLL | Difference relative to old temperature NLL |
|---|---|---|---|
| Not calibrated | 1.0000 | 0.441018 | +0.154710 |
| Continue SST-2 Temperature | 2.4819 | 0.286309 | 0 |
| 16 | 3.5056 | 0.311103 | +0.024794 |
| 32 | 3.5405 | 0.312288 | +0.025979 |
| 64 | 2.9601 | 0.294573 | +0.008265 |
| 128 | 2.6615 | 0.288365 | +0.002056 |
| 256 | 2.6169 | 0.287715 | +0.001407 |
| 512 | 2.5871 | 0.287329 | +0.001020 |
| 1000 | 2.3896 | 0.285911 | -0.000398 |
This is the actual validation: all re-calibration programmes are better than total non-column, but only the maximum budget is slightly lower than the old temperature on this sample of exploration. When 16 to 32, the budget doubled and losses slightly deteriorated. It is therefore not possible to derive directly from “additional labels” that “each step necessarily improves”. In thousands of cases, the margin is only about four parts per 10,000 and there are no areas of uncertainty that support it as a stabilizing advantage.
All conditions classified 890 of 1,000 reviews correctly. At the largest calibration budget, the Brier score was 0.169648, versus 0.169316 with the old temperature. ECE rose slightly from 0.028521 to 0.028950. The small NLL improvement did not extend to every metric. Each metric measures a different property, so the primary conclusion should use the metric specified in advance.
Troubleshooting and limits of the evidence
The most frequent error is to treat embedded budgets as seven independent validations. Currently, only one fixed sequence is being studied and early prefixes may occasionally contain more difficult samples. Article 16 is correct, while article 32 is correct; these denominators are small and can only describe the composition of the sample and cannot be used to explain the overall difficulty. To discuss temperature estimates, this should be done under a separate registered duplicate sampling agreement rather than taking good-looking lines on an ad hoc basis.
The second error was to equate the reduction of calibration losses with a general improvement. The calibration labels were involved in the alignment of parameters, and their loss was of a training nature; while separate from its identity, the exploration pool had been observed in several articles. We can use it to make assumptions, but not as a final confirmation of independence. The value of recognizing the pool derives from long-term non-participation options, not only from documents called “confirmation”.
The third error is the confusion of probability calibration and preservation coverage. This section does not re-estimate the insulation threshold, nor does it prove that 90 per cent of coverage is restored, let alone providing sample or sub-group assurance. A global temperature cannot repair lost emotional clues. Even if the probability loss is reduced, error samples still exist; at a positive temperature for category II, the monotonous structure of the order of confidence does not automatically become more faulty.
Recalculates with a stand-alone script and does not import the proposed combination function. It uses two types of log-sum-exp, which divide gold to minimize stability, to check the best losses for each tranche and independently rebuild softmax, correct numbers, Brier and pool identities. Enter a summary, script, command, exit code and result to be archived. This is a definitive arithmetic audit, not pretend that the real person has read it. We did not propose a new semantic label, nor did we claim that the post-termination tags remained in place, so no new artificial gold markers would be generated this time.
How to verify the calibration-budget curve
The review was conducted first by checking identity, not by looking at a map. The 1,000 logos for the calibration projection must be aligned with the calibrated list in the registration form; the exploratory forecast must correspond to another list. Even if the number of lines were equal, the error in using an exploratory document as a calibration input would result in seemingly smooth and factual leakages. An independent script therefore uses the comparison of identification sequences as a hard-ass assertion, and any change in line order or pool mix will fail immediately.
The second step checks the target function. The final number of temperature may vary with the optimized algorithm, but the calibration losses obtained by both algorithms should be consistent within the numerical tolerance. This time, it is not required to divide gold into the same parameters as the dichotomy, but rather to check whether they have reached the same loss. For flat targets, a simple comparison of the decimals of parameters would create false failures; for mislabelling, loss audits could reveal problems in a timely manner.
The third step is to understand the cost of reasoning separately from the proposed costs. After producing 1,000 logits at a time, the seven-stage temperature estimates are used again and do not need to rerun the neural network seven times. This allows experiments to focus on the label budget rather than blending into different reasoning configurations, cut-off of different text or random model status. The official log retains each input and output shape; memory is the peak of the process reported in the operating system, not a large amount of model power or a commitment to cross-machine performance.

The figure is drawn from the preservation of the outcome document, with a logarithmic scale applied to the cross-axis and two baselines maintained. Connecting only helps to read embedded sequences and does not mean a projection of an undetermined budget; there is no error line, nor does it mean that the error was zero. To compare budget efficiency, additional registrations are required for permitted loss differentials, sampling repetitions and labelling costs, which are left to follow-up controlled studies.
Testable research question and summary
The author assumes that the old temperature has provided a rather strong baseline at this checkpoint and in this video review, it is estimated that small samples of target domains are easily deviating from it. However, the evidence available does not distinguish this proximity from a stable cross-domain structure or is an accident for this division. The competitive explanation that the “target domain recalibration will only improve probability loss and not wrong sequencing” can be subsequently registered, while keeping the parameters budget in line with projected costs.
The result is conditional: sixteen examples already outperform unscaled probabilities on this curve without beating the old temperature. Even one thousand examples yielded only a small NLL difference. None of them can be directly extended to other models and areas. The next article should continue to examine what amounts of recalibration have been repaired and what errors have been left, rather than immediately declaring a cross-domain solution.
Source code and reproduction instructions
Open fixed version verified anonymously: Source Directory、README、SOURCE_MAP. The minimum offline recurrence command is python analyze.py && python audit.py, the result is a slotting of results and independent audit records. The complete model runs with fixed dependencies to be executed. python run.py fetch、python run.py smoke and python run.py formal; download and cache path options can be found at README. The archive contains all self-written modules, weights and raw text are obtained through validation downloads. This is the actual execution of eight test runs, 1,000 formal calibration reasoning to match the seventh tranche; confirm that the pool does not produce any predictions.
References
Search date: 2026-11-20.
- Guo, Pleiss, Sun, Weinberger. 2017. On Calibration of Modern Neural Networks,ICML/PMLR 70.
- I don't know what to do with it. Author Temperature Zoom Source, fixed submission, MIT.
- Hugging Face, DistilBERTSST-2 model card, the fixed resource identity can be found in the source code lock.
- Hugging Face, Transformers Classifier,Apache-2.0.
- Maas, Daly, Pham, Huang, Ng, Potts. 2011. Learning Word Vectors for Sentiment Analysis,ACL.
Apps by the author
Alongside this blog, I build small tools to make everyday life more manageable. Here are two apps I developed independently:
- Daily Expense Journal: Track income and expenses, give each amount a purpose, and plan budgets and savings goals. View on the App Store.
- One Small Action: Start with a small action that fits the time and energy you have, then record how it felt and what you noticed. View on the App Store.