← BFCL failure explorer · genlm.org/rollouts

Chain-of-thought length vs. answer correctness

On BFCL function-calling, longer reasoning tracks wrong answers — but most of that is problem difficulty, not the thinking itself.

Qwen3-8B & 14B · temperature 1.0 · 13 single-turn categories · 728,200 samples · length = generation output tokens (CoT-dominated) · valid = BFCL AST/exec pass · source: HF clementepasti/bfcl-rollouts

1 · Pass rate falls as reasoning grows

Each point is a 40-token bin; y is the share of samples in that bin that passed. The rightmost point is 800+ tokens. Monotonic collapse from ~92% to ~41%.

Qwen3-8B Qwen3-14B

2 · Wrong answers skew long

Length distribution within each outcome class (each curve sums to 100% of its own class), per model. Correct answers pile up short; wrong answers have a long right tail.

Correct Wrong
Qwen3-8B
Qwen3-14B

3 · Controlling for the problem, the effect is real but small

This is a difficulty control: the collapse above conflates length with difficulty, so here we hold the problem fixed and compare, on the same problem, the samples the model got wrong against the ones it got right (mixed-outcome problems only). The wrong attempts think only slightly longer, winning the "longer" coin-flip just 54% of the time — so most of the aggregate effect was difficulty.

4 · The pattern holds in every category

Point-biserial correlation between output tokens and correctness, per category (all negative). Strongest where the task is open-ended (live_multiple); weakest on relevance/parallel.

5 · Backtracking (“wait”) tracks failure even harder

Count of the word “wait” (case-insensitive, word-boundary; “but wait” is the stronger self-correction marker) per rollout — a proxy for how much the model second-guesses itself. Wrong answers average 3–4× as many.

Qwen3-8B Qwen3-14B

Same difficulty control as §3, on the same mixed-outcome problems: comparing wrong vs right attempts on the same problem, the “wait” and “but wait” signals disappear. The wrong attempt carries more of them only about half the time (or less) — so unlike CoT length (which kept a ~54% tilt), the strong aggregate correlations above are entirely problem difficulty, not a per-attempt cause of failure.

6 · Same problem, right vs. wrong — what the model actually does

Ten mixed-outcome problems per model (both a correct and a wrong answer exist among the 100 samples). Each shows a representative pair — the passing and failing samples nearest the median CoT length for their class, so neither is cherry-picked. The reasoning trace is collapsed; expand it to read what the model was thinking.

7 · BFCL correctness probes — held-out problems (corrected split)

Sanitized evaluation. We split the full set of 3,641 BFCL problem IDs before looking at validity labels: 1,200 train / 200 validation / 400 test problems, category-stratified, with zero problem-ID overlap and the same IDs for Qwen3-8B and Qwen3-14B. Each problem contributes 100 T=1 rollouts, giving 120,000 training / 20,000 validation / 40,000 test rows per generator. All-correct, mixed, and all-wrong problems remain in the evaluation; this is not the earlier mixed-problem-conditioned experiment. The LM judge is the Qwen3-8B LoRA checkpoint at step 500, trained on this same problem-disjoint setup; it sees the BFCL prompt plus candidate final answer but not the CoT.

Test composition · 400 problemsall wrongmixedall correcttest rollouts
Qwen3-8B23 · 5.8%142 · 35.5%235 · 58.8%40,000
Qwen3-14B20 · 5.0%120 · 30.0%260 · 65.0%40,000
The average within-problem AUROC is defined only on the 142 / 120 mixed test problems; pooled AUROC and selection accuracy use all 400 test problems. Confidence intervals resample whole problems.
Generator · probeselected representationpooled AUROCaccuracy@0.5accuracy@0.66accuracy@0.75average within-problem AUROC
95% problem-bootstrap CI
best-of-100random pickoracleECE
Qwen3-8B · linearlast token · layer 26 · C=0.010.84200.82380.79380.76900.6849 [0.6452, 0.7247]0.89000.82840.94250.1003
Qwen3-8B · MLPlast token · layer 26 · epoch 110.85310.85090.83240.81640.7028 [0.6585, 0.7471]0.86500.82840.94250.0976
Qwen3-8B · LM judgeQwen3-8B LoRA · checkpoint 5000.90080.89420.88660.88190.8836 [0.8373, 0.9267]0.89500.82840.94250.0683
Qwen3-8B · total logprob (baseline)sequence log-probability · no training0.69300.5564 [0.5127, 0.5999]0.82000.82840.9425
Qwen3-14B · linearlast token · layer 40 · C=0.010.85490.84950.82830.80940.6952 [0.6469, 0.7435]0.87500.84830.95000.0997
Qwen3-14B · MLPlast token · layer 28 · epoch 230.87970.86920.86170.85450.7042 [0.6545, 0.7539]0.87000.84830.95000.0935
Qwen3-14B · LM judgeQwen3-8B LoRA · checkpoint 5000.89820.90350.90630.90250.8269 [0.7661, 0.8845]0.88110.84830.95000.0616
Qwen3-14B · total logprob (baseline)sequence log-probability · no training0.67930.5699 [0.5254, 0.6158]0.83750.84830.9500
The updated probes use five-fold cross-validation grouped by problem over the 1,400-problem development pool (1,200 train + 200 validation); the 400 test problems remain untouched until final evaluation. Selection maximizes average within-problem AUROC across mixed development problems. “Best-of-100” selects the highest-scored rollout among all 100 test rollouts for each problem. Random pick includes invalid rollouts; oracle succeeds exactly when a problem has at least one valid rollout. The total-logprob baseline ranks rollouts by the generator’s own sequence log-probability Σ log p (no trained parameters; no length normalization, per JHV’s point that the per-token mean is hard to interpret). It is essentially a length proxy (corr with completion length −0.98 / −0.94 for 8B / 14B) and selects at or below random pick (best-of-100 8B: 0.8200 vs 0.8284). The length-normalized per-token mean behaves similarly (within-problem AUROC 0.5550 / 0.5796; best-of-100 0.8100 / 0.8525).

Best-layer search status. Completed CoT-only winners are 8B linear: last-token layer 26 (CV within-problem AUROC 0.6695); 8B MLP: last-token layer 26 (0.7104); 14B linear: last-token layer 40 (0.7097); and 14B MLP: last-token layer 28 (0.7584). With the final answer included, winners are 8B linear: last-token layer 28 (0.7999), 8B MLP: last-token layer 28 (0.8250), 14B linear: last-token layer 33 (0.7898), and 14B MLP: last-token layer 25 (0.8224).

Qwen3-8B CoT-only linear — layer-wise CV within AUROC
last token · best C per layermean pooled · best C per layer
Selected: last-token layer 26, C=0.01.
Qwen3-14B CoT-only linear — layer-wise CV within AUROC
last token · best C per layermean pooled · best C per layer
Selected: last-token layer 40, C=0.01.

Each bar is the largest five-fold CV mean within-problem AUROC among C∈{0.01, 0.1, 1} for that layer and pooling method. Cross-validation is grouped by problem; mixed development problems receive equal weight.

Embedding-layer results. Layer-0 mean and last-token embeddings are now complete for all 180,000 existing rollouts from each generator. Mean pooling was selected in every embedding-only run; last-token layer-0 representations are constant at the shared end token and consequently give chance-level validation ranking. Embedding-only linear pooled/within AUROC is 0.692/0.594 for 8B and 0.682/0.600 for 14B; embedding-only MLP is 0.783/0.630 and 0.750/0.630. These are informative but clearly weaker than the corresponding residual-stream probes.

Accuracy applies the stated probability threshold to every one of the 40,000 test rollouts. Since every problem contributes exactly 100 scored rollouts, pooled accuracy and the equal-problem mean accuracy are numerically identical.

Qwen3-8B — held-out pooled ROC
linear CoT L26linear embeddings L0 meanlinear + answer L28MLP CoT L26MLP + answer L28LM judgetotal logprobchance
Qwen3-14B — held-out pooled ROC
linear CoT L40linear embeddings L0 meanlinear + answer L33MLP CoT L28MLP + answer L25LM judgetotal logprobchance

Inference runtime per rollout. With generator activations already cached, linear ≈0.3 µs and MLP ≈20–30 µs on CPU. The checkpoint-500 Qwen3-8B LM judge requires a separate full forward pass: completed 5,000-row GPU shards sustained approximately 3.3–5.8 rollouts/s, or ≈0.17–0.30 s/rollout including model loading and output writing. These are pipeline measurements on the Euler hardware used for the experiments, not hardware-normalized kernel benchmarks; activation extraction cost is excluded from the probe figures.

Best-of-N on held-out problems. For each problem and N, sample a size-N subset without replacement from its 100 rollouts and select the highest-scored candidate. Curves are exact expectations over subsets; equal-score maxima are broken uniformly. Shaded 95% intervals come from 10,000 whole-problem bootstrap replicates (seed 0). All 400 test problems—including homogeneous ones—receive equal weight.

Qwen3-8B — held-out best-of-N
linear CoT L26linear + answer L28MLP CoT L26MLP + answer L28LM judgetotal logproboraclerandom
Qwen3-14B — held-out best-of-N
linear CoT L40linear + answer L33MLP CoT L28MLP + answer L25LM judgetotal logproboraclerandom

Mixed-problem conditional view. The plots below repeat the identical calculation after restricting evaluation to the 142 mixed 8B problems and 120 mixed 14B problems. Every retained problem has at least one correct and one wrong rollout, so these curves isolate ranking quality and reach an oracle value of 1 at N=100. They should not be interpreted as population-level BFCL accuracy.

Qwen3-8B — mixed-only best-of-N (142 problems)
linear CoT L26linear + answer L28MLP CoT L26MLP + answer L28LM judgetotal logproboraclerandom
Qwen3-14B — mixed-only best-of-N (120 problems)
linear CoT L40linear + answer L33MLP CoT L28MLP + answer L25LM judgetotal logproboraclerandom

Best-of-N broken down by category. The aggregate curves above mix categories whose composition is far from uniform, and the detection categories dominate the pool. The panels below repeat the identical calculation (exact subset expectation, 10,000 whole-problem bootstrap replicates, seed 0) within each category of the same 400-problem held-out split, for every category with at least 20 test problems. Each panel carries its own random-pick and oracle anchors, so the visible gap is the selection headroom that actually exists in that category.

linear CoTMLP CoTlinear + answertotal logproboraclerandom
irrelevance · 27 problems
live_irrelevance · 97 problems
live_multiple · 115 problems
live_simple · 28 problems
multiple · 22 problems
parallel · 22 problems
parallel_multiple · 22 problems
simple_python · 44 problems

Reading the panels: on irrelevance and live_irrelevance the probes sit on the oracle line — selection is essentially perfect. On the AST categories the random-pick and oracle lines are close together (the pools are already 93–97% correct) and the probe curves are flat or below random, so the aggregate gain of the combined curve is carried almost entirely by the detection categories. Total logprob is at or below random pick nearly everywhere.

Does the probe discriminate, or just prefer abstention?

CoT only — full pool, cross-fit (3,641 problems; the condition-B selector)
ground truthpicked a callpicked no callcorrect behaviour
Relevant — a call is required2465520.979
Irrelevant — no call is correct10010240.911
CoT + answer — full pool, cross-fit (3,641 problems; the condition-C selector)
ground truthpicked a callpicked no callcorrect behaviour
Relevant — a call is required2454630.975
Irrelevant — no call is correct8910350.921

A selector that simply favoured “say nothing” would score well on the irrelevance categories for the wrong reason. The tables below separate the two hypotheses on the same 400 held-out problems (top row) and on the full 3,641-problem cross-fit pool scored by the deployed selectors (bottom row): each rollout is labelled by whether its answer emits a decodable function call, and the cells count problems by what the probe’s best-of-100 pick actually did. The call detector agrees with the benchmark’s own labels on 99.4% of the 12,400 irrelevance rollouts (passing an irrelevance entry is defined as emitting no call).

linear probe, CoT only (L26)
ground truthpicked a callpicked no callcorrect behaviour
Relevant — a call is required27420.993
Irrelevant — no call is correct91150.927
linear probe, CoT + answer (L28)
ground truthpicked a callpicked no callcorrect behaviour
Relevant — a call is required27240.986
Irrelevant — no call is correct81160.935

Reading: on problems that require a call the probe selects one 99.3% of the time (CoT-only), so it is not applying a blanket “abstain” rule — a rule that would have scored just as well on the irrelevance categories, which is why those numbers alone cannot settle the question. What it does have is a small tilt: across the full 3,641-problem pool the no-call rate among picks is 2.6× its rate in the pools on call-requiring problems (1.9% vs 0.7%), and roughly twice that for the answer-inclusive probe — the same tilt that costs it the small live_relevance control.

Annealing classifier guidance — with replacement. For each N, draw N candidates independently with replacement from each problem's empirical 100-rollout T=1 proposal, then resample one occurrence with weight MLP_scoreβ. β=0 is ordinary random sampling, β=1 is classifier importance resampling, and β=∞ is exactly with-replacement best-of-N. It is not the without-replacement best-of-N curve above: at N=100, IID sampling from a 100-row pool sees only about 63.4 distinct rows on average, whereas sampling without replacement sees all 100. Finite-β expectations use 20,000 shared proposal draws per problem and N (seed 0); shaded 95% intervals bootstrap whole problems 10,000 times. The upper pair uses all 400 test problems; the lower pair conditions on mixed problems only.

β=0β=0.25β=0.5β=1β=2β=4β=∞
Qwen3-8B — MLP L26 annealing with replacement · all 400
Qwen3-14B — MLP L28 annealing with replacement · all 400
Qwen3-8B — MLP L26 annealing with replacement · 142 mixed
Qwen3-14B — MLP L28 annealing with replacement · 120 mixed

Probe and training details. The linear model is logistic regression. The MLP is Linear(d,512) → GELU → Dropout(0.2) → Linear(512,1), trained with weighted binary cross-entropy and AdamW (learning rate 10−3, weight decay 10−4, batch 4,096, maximum 60 epochs, patience 8). Candidate representations covered both the last token and the mean of token hidden states at embedding layer 0 and ten transformer depths. Runs are logged in W&B.

Is there room to improve? Probably some, but the present curves do not argue for simply training longer: early stopping selected epoch 10 for 8B and 23 for 14B, well before the 60-epoch cap. The MLP improves over linear on 14B (+0.027 average within-problem AUROC), but is worse on 8B (−0.026), so added nonlinearity is not uniformly useful. The clearest next experiments are a small hidden-width/dropout/weight-decay sweep, multi-layer feature combinations, and repeated split seeds; larger claims should wait for those controls.

9 · DS-1000 & LiveCodeBench — layerwise probes (interim)

Interim results — campaign in progress. Same generator family, new domains: Qwen3-8B-think rollouts at t=1.0 from the group's thinking campaign (DS-1000: 1,000 problems ×100, random pick 0.501, best-of-100 oracle 0.811, 649 mixed problems; LCB: 714 ×100, random 0.821, oracle 0.906, 261 mixed). Protocol identical to §7: K=3 problem-disjoint cross-fit (seed 0), nested grouped val slices, class-balanced logistic probes on last-token activations at every layer, both spans (CoT-only at </think>; CoT+answer at the final token). Prompt reconstruction validated per-row against the campaign's teacher-forced logprobs (token identity 1.0 on both domains). Curves show test-fold within-problem AUROC by layer.

DS-1000 — linear probe by layer (within-problem AUROC)
computed on 1,000 problems × 100 rollouts; CoT-only span uses the 93,757 rows with a closed CoT
linear CoT onlylinear CoT + answerdashed = MLP-2 (4096→512→256→1), same folds
LiveCodeBench — linear probe by layer (within-problem AUROC)
computed on 714 problems × 100 rollouts; CoT-only span uses the 69,399 rows with a closed CoT
linear CoT onlylinear CoT + answerdashed = MLP-2 (4096→512→256→1), same folds

Linear results. DS-1000: CoT-only peaks at layer 22 with within-problem AUROC 0.584 — far below BFCL's 0.68 — while CoT+answer reaches 0.701 at layer 19, and the all-layer ensembles push to 0.727 (concat) / 0.720 (stacked): on DS-1000, reading the answer matters far more than on BFCL. LCB: 0.614 (CoT-only) / 0.653 (CoT+answer, layer 16) — an independent replication of our earlier LCB numbers through a different pipeline. Pooled AUROCs are higher everywhere (up to 0.93 on LCB) but conflate problem difficulty and are not used for selection. MLP sweep (dashed): input = one layer's last-token vector, d_model = 4096 (Qwen3-8B). MLP-1: 4096→512→1 (ReLU, ≈2.10M params); MLP-2: 4096→512→256→1 (≈2.23M params); class-balanced BCE, AdamW, early stop on grouped-val within-AUROC. MLP-2 at every layer beats linear on all four domain × span cells — most on DS-1000 CoT+answer, 0.744 at layer 21 vs linear's 0.701 (also above concat 0.727 and the stacker 0.720), consistent with capacity paying off at ~60k training rows per fold. LCB: 0.666 vs 0.653 (CoT+answer, both picking layer 16), 0.629 vs 0.614 (CoT-only).

Best-of-N selection (interim: linear probes and ensembles; attention follows). Same estimator as every other selection plot on this page: exact expectation over size-N subsets drawn without replacement from each problem’s 100 rollouts, 95% bands from a 10,000-replicate whole-problem bootstrap (seed 0). Left column: unconditional over all problems. Right column: restricted to mixed problems (at least one correct and one wrong rollout — the population where selection can act; oracle = 1 by construction there). One comparability caveat: the CoT-only curves are computed on each problem’s closed-CoT rollouts only (~94% / ~97% of the pool), so their per-problem candidate pools differ slightly from the other curves.

linear CoT onlylinear CoT + answerstacked ensemble (CoT + answer)concat all layers (CoT + answer)MLP-2 (CoT + answer)MLP-1 (CoT only)total logproboraclerandom
DS-1000 — best-of-N · all problems
computed on … problems × 100 rollouts
DS-1000 — best-of-N · mixed problems only
computed on … problems × 100 rollouts
LiveCodeBench — best-of-N · all problems
computed on … problems × 100 rollouts
LiveCodeBench — best-of-N · mixed problems only
computed on … problems × 100 rollouts

Reading. The answer-inclusive linear probe delivers the only positive selection: DS-1000 +6.3pp over random pick at N=100 (0.564 vs 0.501; +9.6pp on mixed, and the stacked ensemble adds to 0.641 there against a 1.0 oracle); LCB +2.1pp (0.842 vs 0.821; +5.6pp mixed). Total logprob is exactly at random everywhere. Corrected reading (the earlier apparent below-random fall of the CoT-only curves was an estimator artifact: closed-CoT pools hold ~94 rollouts and the subset estimator returned 0 for N above the pool size; truncated-CoT candidates are now scored never-select, which restores 100-candidate pools): the CoT-only probe selects nearly as well as the answer-inclusive one. DS-1000 at N=100: CoT-only 0.557 / CoT+answer 0.564 / stacked ensemble 0.578 vs random 0.501 (mixed-only: 0.607 / 0.619 / 0.641 vs 0.523). LCB: CoT-only and CoT+answer tie at 0.842 vs random 0.821 (mixed-only: both 0.824 vs 0.768). Total logprob sits at random everywhere. The MLPs extend the lead: MLP-2 (CoT+answer) is DS-1000's best selector at 0.609 (+10.8pp over random; 0.689 on mixed vs the stacker's 0.641), and MLP-1 (CoT-only) edges ahead on LCB at 0.846 (mixed 0.835). Its wrong argmax picks are short, confidently concluded CoTs (score–length correlation −0.32), not degenerate outputs.

Attention family at layer 4 — first epochs (preliminary). The attention probes train online over every token position of the span. Values are val within-problem AUROC, the mean over 3 folds of each fold's best epoch (the epoch column gives that epoch per fold), against converged linear probes. Full-layer runs are in flight. The entropy column is the attention-weight Shannon entropy normalized by its maximum ln T, where T is the number of positions the head attends over: the rollout's generated tokens only (prompt excluded), up to and including </think> for the CoT-only span or up to the final token for CoT+answer — H(α)/ln T ∈ [0,1], so 1 = uniform weights (mean pooling) and 0 = a single-token spike, comparable across rollouts of different lengths (multi-head variants: weights averaged over heads first). Mean over 240 rollouts (DS-1000, one per sampled problem): the free-query heads are still effectively mean-pooling, while cross-attention has already learned to concentrate — on the CoT+answer span it puts ~30% of its mass on the final 1% of tokens.

domainspanprobe val within-AUROC @ layer 4attention entropyepoch of best (f0/f1/f2)
DS-1000CoT onlylinear @L4 (control)0.535
DS-1000CoT onlyattention (free query)0.5400.99 (uniform)1 / 0 / 1
DS-1000CoT onlycross-attention (multi-head, H=4)0.5440.371 / 1 / 0
DS-1000CoT + answerlinear @L4 (control)0.719
DS-1000CoT + answerattention (free query)0.5680.99 (uniform)1 / 0 / 1
DS-1000CoT + answercross-attention (multi-head, H=4)0.5820.04–0.411 / 1 / 0
LCBCoT onlylinear @L4 (control)0.643
LCBCoT onlyattention (free query)0.623n/m0 / 0 / 0
LCBCoT onlycross-attention0.597n/m0 / 0 / 0
LCBCoT + answerlinear @L4 (control)0.613
LCBCoT + answerattention (free query)0.640n/m0 / 0 / 0
LCBCoT + answercross-attention0.628n/m0 / 0 / 0

n/m = not yet measured (the attention-map autopsy has run on DS-1000 only). Interim by design: the relaunched chains train all top-5 layers per span for up to 6 epochs with early stopping; best-of-N selection curves against oracle/random follow with the final export.