Manuscript Offprint
arXiv:2610.28187Foreword: Pre-Generation Prediction and Characterisation of LLM Test Failures using the Jacobian Lens
A PREPRINT
Somin Kim
KAIST
Republic of Korea
Robert Feldt
Chalmers University of Technology
Sweden
Shin Yoo
KAIST
Republic of Korea
October 21, 2026
ABSTRACT
Testing LLM-based software is expensive: each input needs several sampled responses, each judged by a costly oracle. Further, every prompt or model change calls for re-testing. Pre-generation adequacy measures cut this cost by ranking inputs by failure risk based on the model's internal state. However, the state of the art, Clotho, models only passing reference inputs, and its hidden-state representation says nothing about why inputs fail. We present FOREWORD, a framework built on two ideas: learn from both passing and failing references, and represent inputs through the Jacobian lens (J-lens), an interpretability technique that reads intermediate activations out as scores over vocabulary tokens. FOREWORD pairs these representations with two estimators: a sparse logistic-regression probe or dual Gaussian Mixture Models (dual GMMs), which also yield a reference density (to flag inputs the references do not cover) and failing-class components (to group similar failures). On ten tasks and three open-weight LLMs, all four combinations of representations and estimators outperform Clotho on average, both for prediction of failure (ROC-AUC improves by 0.14 on average and by up to 0.31) and test prioritisation (15% more failures among the 100 top-ranked inputs on average, up to 33%). Prioritisation obtained using small models also transfers better to proprietary models (on average 22% and up to 41% more failures in the first quarter of prioritised inputs). Importantly, our qualitative case study shows that FOREWORD supports semantic characterisation of failures by pointing to ambiguities in labels or task specifications. Combined, FOREWORD can support testers for prioritising inputs, checking support for a prediction, and characterising specific failures, all without generating output.
Keywords Test Adequacy, Large Language Model
1 Introduction
Large Language Models (LLMs) now power software in a growing number of domains, from education [Chu et al.(2025)] and health care [Qiu et al.(2024)] to software development itself [Agarwal et al.(2026)]. Such software must be tested thoroughly, but LLM testing is expensive. LLMs can react to the same input differently each time, so a reliable aggregate verdict on one input may take several iterations, each judged by an oracle that is sometimes itself an LLM [Tan et al.(2025)]. Every change to a prompt, model, or configuration can also require testing again. Testers would therefore like to predict which inputs are likely to fail, understand what failing inputs have in common, and assess when such predictions are supported. Shared failure patterns could help guide fixes and help choose tests that cover different kinds of failure. Yet current LLM testing tools give little guidance even on which inputs to run first [Dobslaw et al.(2026)].
Recently, Clotho [Yoon et al.(2026)], a pre-generation test adequacy measure, was proposed to estimate the likelihood of failure before an output is generated. The key insight is that output uncertainty can be approximated from the
FOREWORD : Pre-Generation Prediction and Characterisation of LLM Test Failures using the Jacobian Lens
LLM's internal latent space: if a new input's hidden-state representation is an outlier relative to inputs known to produce correct outputs, it is more likely to fail. Empirical results show that the ranking lets testers execute inputs likely to fail first, without generating any outputs for the remaining ones. However, Clotho neither characterises shared failure patterns nor distinguishes familiar failures from inputs unlike its references.
We present FOREWORD, a framework that extends Clotho in two ways: (1) learning from both passing and failing reference inputs, and (2) representing inputs through readouts from the Jacobian lens (J-lens), a mechanistic interpretability technique [Gurnee et al.(2026)]. Learning from both outcomes allows us to fit a predictor that distinguishes passing from failing inputs. The J-lens expresses intermediate LLM activations as vocabulary-token scores that reveal concepts the model has available for verbalisation. Unlike Clotho's opaque hidden-state vectors, these scores correspond to readable tokens, offering a basis for describing individual inputs and groups of failures.
FOREWORD represents inputs through vocabulary-aligned J-lens Readout Scores (JRS) and supports two failure estimators that learn from both passing and failing reference inputs. The dual Gaussian Mixture Model (GMM) estimator extends Clotho by fitting separate distributions to passing and failing references. Together, the two GMMs yield a failure score, a reference-density signal for flagging weakly supported inputs, and component groups whose token profiles can be inspected separately. Alternatively, a simpler Logistic Regression (LR) estimator can learn the boundary between passing and failing inputs focusing more directly on failure prediction.
Across ten tasks, including two Python program-synthesis benchmarks with executable tests, our evaluation of FOREWORD separates representation choice from estimator choice by pairing both estimators with JRS and Clotho's Last-token Input Hidden States (LIHS). All four configurations improve average ROC-AUC over Clotho; LR performs best overall. J-lens features provide readable token profiles with similar average discrimination to LIHS, although differences vary by task. In our topic-classification case study, component profiles describe separate failure groups, whereas the inspected global LR weight rankings mix several concepts.
Our contributions are as follows:
• FOREWORD, a pre-generation test adequacy framework that learns from passing and failing references using J-lens features, with LR and dual GMMs as complementary estimators.
• An empirical evaluation across ten tasks and six open-weight and three proprietary LLMs, comparing against Clotho and post-generation uncertainty metrics and assessing prediction, prioritisation, reference support, transfer, and cost.
• A qualitative case study examining how J-lens token profiles characterise failure groups, including groups sharing the same label confusion.
The replication package of FOREWORD is publicly available [Anonymous(2026)].
2.1 Test Adequacy for Large Language Models
Test adequacy measures how well a given test input, or a set of inputs, checks the target System Under Test (SUT). A good adequacy metric is expected to be correlated with fault detection capability: an input with a higher adequacy value should be more likely to reveal unexpected behaviour. Such metrics can be used to assess the quality of existing test inputs [Zhu et al.(1997)], or to prioritise inputs with the aim of revealing unexpected behaviour as early as possible [Elbaum et al.(2001)].
Test adequacy is crucial for efficient testing of LLM-based systems, as their test oracles tend to be expensive, be it human judgement or LLM-as-judges [Tan et al.(2025)]. A reliable test adequacy metric will prioritise inputs according to their likelihood of failing (i.e., producing undesired responses), allowing the test efforts to be focused on those problematic inputs. However, many of the traditional adequacy criteria are white-box, code-based metrics, such as structural coverage [Zhu et al.(1997)]. Consequently, they do not directly apply to Large Language Models (LLMs) that are generative models with no interpretable structural units.
To mitigate the high oracle cost, confidence metrics have been widely adopted. If the LLM response to a given test input has low confidence, it is more likely that the response is not correct. Various confidence metrics have been studied in this context, including token-level likelihood and entropy [Manakul et al.(2023)], and the semantic-level entropy [Farquhar et al.(2024)]. While the uncertainty measures can be used to prioritise test inputs, their common
FOREWORD : Pre-Generation Prediction and Characterisation of LLM Test Failures using the Jacobian Lens
limitation is that uncertainty becomes available only after the full response generation, highlighting the fact that it is a metric for outputs, not inputs.
Clotho is a recently proposed pre-generation test adequacy metric [Yoon et al.(2026)]. It approximates the uncertainty with out-of-distribution measures at pre-generation stage: the reference distribution is obtained by fitting a Gaussian Mixture Model (GMM) using a reference set of passing input with respect to a specific task, iteratively sampled with user labelling. The test adequacy value of an unseen input is the negative log likelihood given by the trained GMM. Since the GMM is fitted with passing inputs, the adequacy score is correlated to the likelihood of the input generating correct output, and therefore can be used to prioritise inputs. Notably, Clotho computes its test adequacy pre-generation, based on the Last-token Input Hidden State (LIHS), i.e., the hidden state of the last input token at a layer two thirds of the way through the Transformer decoder. This representation is known to contain rich semantic information about the given context [Azaria and Mitchell(2023), Zhou et al.(2025)].
2.2 Jacobian Lens
Hidden states such as LIHS are informative but not human-readable. Lens techniques address this by decoding intermediate activations into the model's vocabulary. In a decoder-only Transformer, each layer reads from and writes to a residual stream, whose value after layer at token position we denote . After the last layer, a final normalisation (norm) and the unembedding matrix convert the residual stream into next-token logits. The logit lens [nostalgebraist(2020)] applies norm and directly to intermediate activations. However, this assumes that intermediate layers encode information in the same way as the final layer, which holds only for the last few layers.
The Jacobian lens (J-lens) [Gurnee et al.(2026)] addresses this by first mapping activations into the final layer's representation space, using the average Jacobian , where ranges over prompts from a generic text corpus, over source positions, and over the current and all later positions. The readout of an activation at layer is then . Since is averaged over many contexts, the readout reflects what the activation would generally lead the model to say, rather than what it leads to in one particular context. Gurnee et al. call the representations revealed by the J-lens verbalisable, and the space they form the J-space. They show that the J-space behaves like a global workspace. The model can report, hold, and reason with its contents, and pass them on to downstream computations. Although the J-space spans the entire vocabulary, only a few tokens are strongly active in it at any one time, yielding a sparse representation. In the models they study, these properties are most evident in the middle workspace layers; readouts are noisy in the early layers and, in the final layers, mostly reflect the output the model is about to produce.
Like LIHS, J-lens readouts can be computed from the input alone, before any response is generated. They express the content of the model's workspace in vocabulary coordinates, with each feature corresponding to a token. We therefore investigate them as an input representation for pre-generation test adequacy.
3 FOREWORD
FOREWORD is a framework for pre-generation input adequacy: it supports two input representations, and two adequacy estimators. In addition to the Last-token Input Hidden States (LIHS) of Clotho, FOREWORD can also represent inputs using J-lens readouts [Gurnee et al.(2026)], which capture what the model is poised to verbalise. For estimators, FOREWORD supports Logistic Regression to predict pass or fail outcome of the output to be generated from the given input. Further, unlike Clotho, FOREWORD also learns from failing inputs, so that familiar failure patterns can be recognised, using dual GMM.
Given a target model, a task-specific prompt template , and a candidate pool , we extract a representation for each input without decoding a response. To label an input, we sample 10 responses and use a task-specific oracle to compute , the fraction judged correct. We assign . The labelled inputs form the reference set at acquisition round , with passing and failing subsets and . Once fitted on , the estimators score new inputs from alone. Algorithm 1 constructs adaptively, labelling new inputs and refitting the estimators in each round until the labelling budget is exhausted.
The remainder of this section describes input representations (Section 3.1), adequacy estimators (Sections 3.2 and 3.3), and the adaptive construction of the reference set (Section 3.4).
FOREWORD : Pre-Generation Prediction and Characterisation of LLM Test Failures using the Jacobian Lens
3.1 Input Representations
We consider two representations extracted before response generation. Last-token Input Hidden States (LIHS) use a model activation directly. Jacobian-lens Readout Scores (JRS) is a vocabulary-aligned feature vector constructed from J-lens readouts. Either representation can be paired with either estimator.
LIHS Following Clotho [Yoon et al.(2026)], we extract the hidden state at the last token of the input prompt from the residual stream after the transformer layer located at two-thirds of the model's depth.
JRS Let denote the residual-stream activation at layer and prompt position . The J-lens maps intermediate activations through an averaged Jacobian , followed by the model's final normalisation and unembedding [Gurnee et al.(2026)]. We extract readouts at a fixed token position in the chat-formatted input prompt, before any response tokens are generated. For each selected layer , the resulting pre-softmax vocabulary scores are: , where is the unembedding matrix and is the model vocabulary. The set of layers, , is chosen from a middle-to-late layer band , covering approximately 45% to 90% of each model's depth, following the workspace analysis of Gurnee et al. [Gurnee et al.(2026)]. The exact layer bounds for each model are reported in the experimental setup.
To place readouts from different layers on a comparable scale, we standardize each to zero mean and unit variance across its coordinates, obtaining , and average over layers in : . Each coordinate is thus the standardised score of token , averaged over the selected layers. This pooling preserves the vocabulary alignment of the readouts but yields a -dimensional vector, which is costly to model downstream. Because the informative variation in J-lens readouts tends to concentrate in a relatively small subset of vocabulary coordinates [Gurnee et al.(2026)], we retain only the set of tokens with the largest variance over the candidate pool, and use as the representation. The selected set and its ordering are fixed and reused for all subsequent inputs.
In the remainder of this section, denotes either the LIHS or JRS. Two adequacy estimators take the same as input but differ in how they use the passing and failing references: the LR probe learns to separate two classes, whereas the dual GMM models the distribution of each class.
3.2 Learning to Separate Pass from Fail using Logistic-Regression Estimator
The most direct way to score failure from the references is to learn a decision boundary between the two classes, i.e., pass and fail. At each round , we fit an -regularised logistic-regression probe to on , and define its failure score as , where is the logistic function and and are the fitted weights and bias. The penalty keeps the probe sparse to cater for the high dimensionality as well as the small size of the reference sets in the early rounds.
3.3 Modelling Passing and Failing Distributions using dual GMM Estimator
The second estimator is dual Gaussian Mixture Models (dual GMMs), which is an extension of the GMM used by Clotho. The motivation for dual GMM is two-fold. First, the LR probe models only the boundary between the classes, pass and fail, but not how each class is distributed, providing no measure of how well the references support an input. Second, by modelling supports for both passing and failing inputs (hence the duality), FOREWORD aims to identify groups of similar failures.
The dual GMM projects the representations into a shared PCA space and fits a separate GMM to each outcome class. Together, the two class models yield three outputs: a posterior failure score comparable to that of the LR probe, a reference density that identifies inputs weakly supported by the references, and component memberships that group inputs within each class and provide a basis for investigating recurring failure patterns. We first define these outputs and then describe how the model configuration adapts as the reference set grows.
3.3.1 Class models and derived scores
At round , both classes share a PCA transformation , fitted on the candidate pool and retaining dimensions, which maps each input to . Sharing the transformation places the passing and failing densities in the same coordinates; is stored with the fitted models and reused to score new inputs. In this space, we fit a Gaussian Mixture Model to each class on , with a class-specific number of components and
FOREWORD : Pre-Generation Prediction and Characterisation of LLM Test Failures using the Jacobian Lens
Algorithm 1: Adaptive reference-set construction in FOREWORD, shown for the dual GMM
Input: candidate pool P, prompt template T, representation , initial reference size , labelling budget N, batch size B, minimum references per class
Output: class models , , or if either class has fewer than references
1 Construct and cache for all ;
2 ; label ;
3 ; ;
4 while true do
5 ; ;
6 if then
7 ;
8 foreach do
9 ;
10 ;
11 else
12 ;
13 if or then
14 ;
15 ;
16 if and then
17 ;
18 inputs by ;
19 else
20 ; ;
21 ;
22 ;
23 ; label ;
24 ; ; ;
covariance structure selected as described below. With class priors , the posterior failure score is:
Higher scores indicate stronger evidence for failure relative to passing under the fitted models: we use this score to prioritise inputs before generation.
Modelling the class densities explicitly has a useful by-product with no counterpart in the LR probe: the normalizing term of Eq. (1) is itself informative. Its logarithm,
is the log marginal density of under the fitted class models, which we call the reference density. It measures how well the current references, pooled across both classes, support an input, regardless of which outcome the posterior favours. Computing the posterior already yields , so the reference density comes at no additional cost; we compute both in log space for numerical stability. Pooling both classes distinguishes the reference density from the score by which Clotho ranks inputs: the density under a GMM fitted to passing references only. That score is low both for inputs that resemble failures and for inputs that resemble no reference, whereas the reference density is low only for the latter. Consequently, we can either prioritise inputs using the posterior failure score, or detect out-of-distribution inputs using the reference density.
Finally, each class mixture groups the inputs of its class into components: we assign an input to the component of with the highest posterior responsibility. Among failing references, these component memberships provide the basis for investigating recurring failure patterns.
3.3.2 Adaptive configuration selection
As in Clotho [Yoon et al.(2026)], we adapt the configuration of the dual GMM as the reference set grows, since the appropriate model complexity depends on both the task and the number of available references. The configuration consists of the shared PCA dimensionality and, for each class , the number of mixture components and the covariance structure, . Searching over all combinations of these settings would require fitting many pairs of class models.
FOREWORD : Pre-Generation Prediction and Characterisation of LLM Test Failures using the Jacobian Lens
at every refit. Instead, each time the class models are refitted (line 7 of Algorithm 1), we update the configuration in two steps, each a local search around the previous configuration: we first select the dimensionality with the component counts held fixed, and then reselect the component counts for the chosen dimensionality.
First, we select the dimensionality. The first fit uses 30 dimensions, since no component counts are yet available for evaluating alternatives; at each subsequent refit, we compare the previous dimensionality with dimensions. Using 3-fold cross-validation on , we fit the class models to the training references, compute the passing log odds of each held-out reference , , and compute their Spearman correlation to the observed success rates . We keep the dimensionality with the highest mean correlation across folds.
Second, we reselect the number of components of each class using the newly chosen dimensionality. Ideally, this number matches the number of clusters that the inputs of the class form, but that number is not only unknown in advance but also depends on the dimensionality as well as the reference set. For each class, the number of components we choose is the one that maximises the 3-fold cross-validated log likelihood of the class reference set, i.e., one that fits the existing references the best. Note that, since log likelihoods cannot be compared across different dimensions, the number of components is chosen second. It is also capped at , so that each component is fitted to at least ten references on average. The first fit considers every count up to this cap; subsequent refits consider only the previous count and its neighbouring values. We use full covariance matrices by default and fall back to diagonal ones whenever a class has too few references to estimate them, i.e., fewer references than the free parameters of the full-covariance.
3.4 Adaptive Reference-Set Construction
Algorithm 1 constructs the reference set iteratively, refitting the estimator as new labels are acquired. We present it for the dual GMM and describe the LR variant at the end of this section. Given the candidate pool P and a labelling budget N, the algorithm first constructs and caches the representations of all candidates (line 1). It then labels randomly selected inputs as the initial references and initialises the unlabelled pool (lines 2–3). At each round t, it partitions the references by outcome (line 5). Once both classes contain at least references, it selects the PCA transformation and the class-specific mixture configurations and as described in Section 3.3 (line 7), estimates the class priors, and fits the class models and (lines 9–10). Otherwise, no fitted scorer is available (line 12). The stopping check follows this fit: if the budget is exhausted or the unlabelled pool is empty, the algorithm returns the scorer fitted on the current reference set, or if either class still lacks references (line 14). If acquisition continues, the next batch size is limited by the remaining budget and pool size (line 15). When the scorer is available, inputs are selected by the model-based acquisition criterion MARGIN (lines 17–18), which ranks unlabelled inputs by the binary entropy of their posterior failure scores, favouring inputs near the fitted pass/fail boundary. Diversity sampling fills the remaining positions by repeatedly choosing the input with the greatest minimum Euclidean distance in h-space from the references and inputs already selected for this batch (lines 21–22). If the scorer is unavailable, diversity sampling selects the entire batch (line 20). The batch is then labelled, added to the references, and removed from the unlabelled pool before the next round (lines 23–24). The LR variant uses the same acquisition loop. Lines 7–10 instead fit the probe defined in Section 3.2 to , and MARGIN uses in place of .
4 Experimental Setup
This section details the experimental setup used to evaluate FOREWORD.
4.1 Research Questions
We organise the study around the following research questions.
4.1.1 RQ1. How effectively does FOREWORD predict failing inputs and prioritise them for testing?
We evaluate each method on held-out inputs drawn from the same task. This assesses whether pre-generation scores separate failure-inducing inputs from passing ones, and whether ranking inputs by predicted failure risks enables earlier failure discovery under limited execution budgets.
Compared Methods. We compare FOREWORD with the pre-generation baseline Clotho [Yoon et al.(2026)] and three post-generation adequacy metrics: Token Probability (TOK ) and Token Entropy (TOK ) [Manakul et al.(2023)], and Last Output-token Hidden State Variance (LOHS ). We compare
FOREWORD : Pre-Generation Prediction and Characterisation of LLM Test Failures using the Jacobian Lens
FOREWORD to all the above for evaluation of failure prediction, and only to pre-generation methods as well as random for evaluation of prioritisation. We study the 2 by 2 combinations of representations (LIHS and JRS) and estimators (LR and dual GMM) to separate their contributions.
Evaluation Metrics. We report ROC-AUC for failure prediction study, which measures how well risk scores rank inputs labelled fail above those labelled pass. For prioritisation, we report Failure@N, which counts failed inputs among the highest-risk candidates. For both, we report means over ten seeds, and provide details in our replication package [Anonymous(2026)].
4.1.2 RQ2. How reliably does FOREWORD identify inputs that fall outside its task-specific distribution?
Before acting on a learned failure score, a tester may ask: Can I trust this score for this input? For this, we evaluate whether studied estimators can reliably distinguish inputs within the task distribution from those out of distribution, based on the small set of labelled reference inputs.
Evaluation Setup. For each target task, we partition inputs into three disjoint sets: reference, calibration, and evaluation. The references fit the estimators; the remaining target-task inputs, both passing and failing, are divided roughly evenly between calibration and evaluation. We sample 500 out-of-distribution inputs from four randomly chosen remaining tasks, and inject their input into the target task's prompt template to extract the same representation.
Compared Methods. For each seed, we fit a dual GMM and an -regularised LR probe on the same labelled LIHS references, using each estimator's preprocessing procedure. We compare the dual GMM marginal reference log-density (Eq. (2)), and the LR pass probability .
Evaluation Metrics. For each target, seed, and score, we set a threshold to retain 95% of the in-distribution calibration inputs, then report the False Positive Rate (FPR)@95 when we apply to the held-out target task inputs as well as OOD inputs. We also compute ROC-AUC for each OOD source against the held-out target inputs, treating the latter as positive. FPR@95 is the lower the better, ROC-AUC the higher the better. We report means and standard deviations over ten seeds.
4.1.3 RQ3. Can FOREWORD help characterise LLM failures?
As JRS is tied to specific tokens, we can represent observed failure patterns as tokens. This is more straightforward with failure components of dual GMM: we can pool all inputs belonging to each failure component, and apply J-lens to read the tokens. LR, on the other hand, simply fits a hyperplane in the JRS space which best separates passing and failing input representations. Consequently, we can read out the tokens that have the highest influence on the separation from the normalised weights of the fitted LR models. We qualitatively analyse whether such readouts can characterise different groups of failures taken from TOPIC-CLS and MBPP tasks using Llama-3.1-8B.
Failure Patterns. On TOPIC-CLS, we examine the failing-class GMM components through two complementary analyses. First, we assess whether they show distinctive failure patterns, characterised by each input's ground truth topic and the predicted topic. Second, we examine whether the tokens we read out of the failing input representation reveal semantic characteristics of the failure pattern. To evaluate whether components group failures with similar observed patterns, we measure associations between component membership and ground-truth topics, predicted topics, and true-predicted topic pairs using Cramér's V [Cramér(1946)]. We report means and standard deviations over ten random seeds, and illustrate the patterns using one run (seed 0).
Semantic Characterisation. For each input and token , we average the token's J-lens readout across the workspace bands to obtain , i.e., JRS. We then rank tokens by the difference between the mean of over and its mean over the entire input set, to highlight tokens elevated in . After merging case and punctuation variants, we inspect the top 20 tokens of each component, identify the concept they express, and examine how its prominence in the model's representation relates to the component's failures. For TOPIC-CLS, at the task level, we also rank tokens by their weights in the LR, separately for positive weights (towards failure) and negative weights (towards passing), and inspect the top 20 of each after the same merging. Finally, to show how FOREWORD can assist analysis of individual cases, we report top tokens from failing inputs randomly sampled from held-out sets, i.e., those not labelled during GMM fitting. We do this on both TOPIC-CLS and MBPP. For MBPP, we also compare the readouts with the generated programs and reference solutions.
The intuition for LR scores is that an input confidently predicted to pass must be in-distribution for the target task.
FOREWORD : Pre-Generation Prediction and Characterisation of LLM Test Failures using the Jacobian Lens
Table 1: Target tasks, datasets, and pass rates of the studied open-weight LLMs.
| Task | Inputs | Description | Llama 3.1 8B | Gemma 2 9B | Qwen 3 8B |
|---|---|---|---|---|---|
| ODD-ADD | 6,000 | Odd-number summation [Yoon et al.(2026)] | 0.60 | 0.60 | 0.69 |
| GH-TYPO | 10,000 | Github Typo correction [Hagiwara and Mita(2019)] | 0.51 | 0.64 | 0.58 |
| JSON-FIX | 6,563 | Repair invalid JSON [de Jong(2022)] | 0.75 | 0.83 | 0.94 |
| MODEL-EX | 9,810 | Extract ML model names [CShorten(2022)] | 0.55 | 0.67 | 0.75 |
| POS-TAG | 15,359 | Detect Part-of-speech tags [Silveira et al.(2014)] | 0.77 | 0.81 | 0.79 |
| SPELL-CHK | 10,000 | Fix misspelt words [Fellbaum(1998), Mitton et al.(1980)] | 0.82 | 0.88 | 0.86 |
| SYN-BUG | 20,518 | Find code lines with syntactic bugs [Lee et al.(2024)] | 0.36 | 0.42 | 0.47 |
| TOPIC-CLS | 7,600 | Classify topics of news articles [Zhang et al.(2015)] | 0.78 | 0.82 | 0.77 |
| MBPP | 974 | Python synthesis (MBPP [Austin et al.(2021)]) | 0.63 | 0.64 | 0.71 |
| LCB | 1,055 | Python synthesis (LiveCodeBench [Jain et al.(2025)]) | 0.20 | 0.26 | 0.50 |
4.1.4 RQ4. How effectively can FOREWORD scores obtained from smaller open-weight models prioritize failures in larger or proprietary target models?
FOREWORD requires hidden states, which are not available from proprietary models and expensive to extract from larger open-weight models. Clotho showed that pass-only scores from smaller open-weight models transfer to proprietary models [Yoon et al.(2026)]; we ask whether better modelling of failures in smaller models can improve these transfers. To test this, we fit estimators using source representations from smaller models, and use target outcomes to evaluate the orderings obtained using the estimator scores (see Section 4.2.2 for model pairs).
Compared Methods. We compare all RQ1 methods with Clotho and random ordering.
Evaluation Metrics. Following Clotho, we use a fixed random subset of 2,000 inputs per task, or all non-training inputs for the smaller MBPP and LCB datasets. The inputs are shared across sources, targets, methods, and seeds. Each estimator prioritises them from the most to the least likely to fail. We report normalised failure@25%: the number of failing inputs among the first of the ordering, divided by , where is the number of failing inputs in the evaluation set. A perfect prioritisation scores failure@25% of 1.0, whereas random prioritisation would on average score 0.25. Results are averaged over ten seeds.
4.1.5 RQ5. What computational cost does FOREWORD incur?
We measure computational cost on three randomly chosen tasks (MODEL-EX, POS-TAG, and TOPIC-CLS) at a fixed seed. Because representations are cached and reused across fitting runs, we time extraction and fitting separately. All timings are taken on one machine with a single NVIDIA GeForce RTX 3090 GPU at batch size 1.
Compared Methods. We compare computational costs of all methods studied in RQ1. Each estimator uses the same configuration and active-learning loop as in RQ1.
Evaluation Metrics. For LIHS and JRS, we time the extraction of the same 25 inputs per dataset, three times each, and report the mean and standard deviation of per-input wall-clock time, which for JRS includes the readout operations. For fitting, we compare Clotho's passing-class GMM with full covariance on LIHS [Yoon et al.(2026)], the dual GMM, and the LR probe, fitting the latter two on both LIHS and J-lens, and report wall-clock times.
4.2 Experimental Details
The experimental details for our study is provided.
4.2.1 Target Tasks and Datasets
We evaluate FOREWORD on the eight benchmark tasks used in Clotho [Yoon et al.(2026)], as well as two python program synthesis benchmarks: Mostly Basic Python Problems (MBPP) [Austin et al.(2021)] and Live-CodeBench [Jain et al.(2025)]. Table 1 summarizes the tasks and their corresponding datasets.
4.2.2 Subject Models and Transfer Targets
We evaluate FOREWORD using Llama 3.1 8B [AI@Meta(2024)], Gemma 2 9B [Team(2024)], and Qwen 3 8B [Team(2025)], for which pretrained J-lens models are publicly available [Neuronpedia(0000)]. The last three columns of table 1 reports the fraction of inputs each model passes on each task. For RQ4, we additionally evaluate
FOREWORD : Pre-Generation Prediction and Characterisation of LLM Test Failures using the Jacobian Lens
Table 2: ROC-AUC for pre-generation pass/fail prediction (Best, second best)
| Task ID | Gemma-2-9B | Llama-3.1-8B | Qwen3-8B | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Clotho | LIHS | LIHS | JRS | JRS | Clotho | LIHS | LIHS | JRS | JRS | Clotho | LIHS | LIHS | JRS | JRS | |
| ODD-ADD | 0.682 | 0.799 | 0.838 | 0.809 | 0.836 | 0.811 | 0.880 | 0.901 | 0.858 | 0.896 | 0.726 | 0.792 | 0.828 | 0.818 | 0.837 |
| GH-TYPO | 0.676 | 0.811 | 0.838 | 0.790 | 0.851 | 0.723 | 0.807 | 0.848 | 0.801 | 0.848 | 0.621 | 0.723 | 0.813 | 0.779 | 0.839 |
| JSON-FIX | 0.726 | 0.818 | 0.866 | 0.752 | 0.859 | 0.721 | 0.758 | 0.823 | 0.764 | 0.812 | 0.595 | 0.709 | 0.800 | 0.751 | 0.828 |
| MODEL-EX | 0.624 | 0.848 | 0.890 | 0.846 | 0.873 | 0.673 | 0.820 | 0.858 | 0.782 | 0.859 | 0.471 | 0.720 | 0.773 | 0.723 | 0.785 |
| POS-TAG | 0.631 | 0.628 | 0.708 | 0.712 | 0.740 | 0.561 | 0.622 | 0.697 | 0.683 | 0.731 | 0.596 | 0.674 | 0.745 | 0.668 | 0.752 |
| SPELL-CHK | 0.855 | 0.886 | 0.905 | 0.894 | 0.919 | 0.747 | 0.871 | 0.894 | 0.839 | 0.890 | 0.693 | 0.838 | 0.879 | 0.816 | 0.878 |
| SYN-BUG | 0.888 | 0.936 | 0.954 | 0.887 | 0.943 | 0.718 | 0.849 | 0.928 | 0.931 | 0.950 | 0.744 | 0.868 | 0.895 | 0.918 | 0.923 |
| TOPIC-CLS | 0.607 | 0.807 | 0.816 | 0.864 | 0.864 | 0.614 | 0.803 | 0.808 | 0.854 | 0.827 | 0.563 | 0.717 | 0.781 | 0.847 | 0.830 |
| MBPP | 0.639 | 0.684 | 0.798 | 0.689 | 0.759 | 0.643 | 0.733 | 0.843 | 0.750 | 0.828 | 0.593 | 0.733 | 0.812 | 0.708 | 0.807 |
| LCB | 0.623 | 0.749 | 0.831 | 0.714 | 0.695 | 0.786 | 0.785 | 0.903 | 0.708 | 0.841 | 0.707 | 0.846 | 0.891 | 0.774 | 0.798 |
| Average | 0.695 | 0.797 | 0.844 | 0.796 | 0.834 | 0.700 | 0.793 | 0.850 | 0.797 | 0.848 | 0.631 | 0.762 | 0.822 | 0.780 | 0.828 |
larger models from the same families – Llama 3.3 70B [AI@Meta(2024)], Gemma 3 27B [Team(2024)], and Qwen 3 32B [Team(2025)] – to investigate the effect of model scale. We further include three proprietary models, GPT-4o mini [OpenAI(0000)], Gemini 3.5 Flash Lite [Google(0000)], and Claude Haiku 4.5 [Anthropic(2025)].
4.2.3 Evaluation Protocol and Implementation Details
The reference set is initialised with ten inputs, sampled uniformly at random from a pool of unlabelled inputs and then labelled, and is subsequently expanded in increments of ten until a total labelling budget of inputs is reached.
We implement the logistic regression probe and the density estimators using LogisticRegression from sklearn.linear_model and GaussianMixture from sklearn.mixture, respectively [Pedregosa et al.(2011)]. For logistic regression, we use the liblinear solver. We tune the inverse regularisation strength by cross-validation, choosing the value with the highest AUROC among ten values between and 10. When there are too few references for cross-validation, we set . For density estimation, separate GMMs are fitted to the passing and failing references in a shared PCA space, and their configuration is selected adaptively as described in Section 3.3.2. We restrict the PCA dimensionality to the range of 10 to 50. When cross-validation scores are unavailable for a class, we select its number of components using the Bayesian information criterion (BIC) instead. Expectation-maximisation terminates when the change in the average log-likelihood lower bound falls below or after 200 iterations, whichever occurs first.
To construct JRS, we extract representations at the model-specific assistant-header position immediately preceding response generation, and average per-layer-standardised Jacobian-lens readouts over a mid-to-late workspace band: layers 14–28 of 32 for Llama-3.1-8B, 18–37 of 42 for Gemma-2-9B, and 16–32 of 36 for Qwen3-8B (0-indexed, inclusive).
5 Results
This section presents the results of our experiments.
5.1 RQ1: In-distribution Failure Prediction and Test Prioritisation
5.1.1 RQ1-1: Failure Prediction.
Table 2 reports ROC-AUC with 500 labelled references. All four configurations of FOREWORD separate failing from passing inputs better than Clotho: their mean ROC-AUC is 0.784 for , 0.791 for , 0.839 for , and 0.837 for , compared with 0.675 for Clotho. The improvement holds on every task: averaged over LLMs, each configuration exceeds Clotho on all ten tasks, and both LR configurations do so in all 30 task–LLM combinations. Part of this gain may reflect label usage: Clotho models only the passing-input distribution and discards the failing examples during label acquisition, whereas FOREWORD learns from both.
To assess estimator and representation effects, we use four paired contrasts: LR versus dual GMM within each representation, and JRS versus LIHS within each estimator. We treat tasks as the unit of inference, averaging each contrast over seeds and the three LLMs within a task. For the ten resulting differences, we report a Hodges–Lehmann (HL) estimate and 95% confidence interval, test against zero with a two-sided exact Wilcoxon signed-rank test, and apply Holm's correction to the four p-values for each metric. Estimator choice shows the clearer pattern. LR gains about 0.05 ROC-AUC over dual GMM with either representation (Holm-adjusted ), leading on every task with LIHS and all but TOPIC-CLS with JRS. The JRS–LIHS contrasts are near zero (ROC-AUC +0.003) under both
FOREWORD : Pre-Generation Prediction and Characterisation of LLM Test Failures using the Jacobian Lens
Table 3: ROC-AUC for post-generation pass/fail prediction, with LIHS as the pre-generation reference.
| Task ID | Gemma-2-9B | Llama-3.1-8B | Qwen3-8B | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ODD-ADD | 0.742 | 0.434 | 0.755 | 0.838 | 0.705 | 0.764 | 0.714 | 0.901 | 0.723 | 0.825 | 0.831 | 0.828 |
| GH-TYPO | 0.868 | 0.657 | 0.800 | 0.838 | 0.868 | 0.710 | 0.755 | 0.848 | 0.870 | 0.829 | 0.857 | 0.813 |
| JSON-FIX | 0.736 | 0.545 | 0.604 | 0.866 | 0.827 | 0.628 | 0.645 | 0.823 | 0.617 | 0.531 | 0.539 | 0.800 |
| MODEL-EX | 0.808 | 0.391 | 0.581 | 0.890 | 0.846 | 0.599 | 0.611 | 0.858 | 0.776 | 0.547 | 0.558 | 0.773 |
| POS-TAG | 0.772 | 0.526 | 0.627 | 0.708 | 0.803 | 0.628 | 0.651 | 0.697 | 0.711 | 0.596 | 0.623 | 0.745 |
| SPELL-CHK | 0.896 | 0.705 | 0.831 | 0.905 | 0.884 | 0.755 | 0.785 | 0.894 | 0.845 | 0.714 | 0.755 | 0.879 |
| SYN-BUG | 0.525 | 0.522 | 0.569 | 0.954 | 0.689 | 0.670 | 0.697 | 0.928 | 0.577 | 0.573 | 0.612 | 0.895 |
| TOPIC-CLS | 0.631 | 0.535 | 0.578 | 0.816 | 0.762 | 0.584 | 0.589 | 0.808 | 0.684 | 0.569 | 0.583 | 0.781 |
| MBPP | 0.636 | 0.417 | 0.608 | 0.798 | 0.719 | 0.715 | 0.732 | 0.843 | 0.713 | 0.675 | 0.687 | 0.812 |
| LCB | 0.806 | 0.398 | 0.765 | 0.831 | 0.613 | 0.616 | 0.640 | 0.903 | 0.842 | 0.809 | 0.818 | 0.891 |
| Average | 0.742 | 0.513 | 0.672 | 0.844 | 0.772 | 0.667 | 0.682 | 0.850 | 0.736 | 0.667 | 0.686 | 0.822 |
estimators, with confidence intervals spanning zero; we find no clear overall representation advantage. On the two program-synthesis tasks, MBPP and LCB, LIHS achieves mean ROC-AUCs of 0.82 and 0.88, versus 0.80 and 0.78 for JRS and 0.63 and 0.71 for Clotho. JRS instead outperforms LIHS on TOPIC-CLS and POS-TAG, showing that the preferred representation varies by task.
Table 3 compares LIHS with three post-generation signals for pass/fail prediction. Across the 30 task–model combinations, LIHS achieves the highest mean ROC-AUC of 0.839, ahead of LOHS at 0.750, TOK at 0.680, and TOK at 0.616. It outperforms every post-generation signal in 22 of the 30 combinations. Note that the methods have different requirements: the post-generation signals use generated outputs but need no reference labels, whereas LIHS is trained on labelled examples and can score inputs before generation.
5.1.2 RQ1-2: Test Prioritisation
To assess whether these discrimination gains translate into earlier failure discovery, Table 4 reports failure@N for each task and LLM. Across the 84 task–LLM–N combinations (MBPP and LCB excluded for N = 500 due to small dataset size), each configuration finds more failure-inducing inputs than Clotho in 63 to 76 of them (LIHS : 76) and more than random ordering in at least 83. These results demonstrate the practical benefit of the learned scores: testers can discover more failures on average within the same execution budget.
Answer to RQ1: FOREWORD supports pre-generation failure prediction and earlier failure discovery on held-out inputs from the same task distribution. Across both representations and estimators, the learned scores outperform Clotho on average in difficulty ranking, pass/fail discrimination, and failure discovery within a fixed execution budget. LR provides the most consistent gains, while representation advantages depend on the task and model.
5.2 RQ2: Out-of-distribution Input Detection
Before using a predicted failure risk to prioritise an input, a tester may ask whether the labelled references contain comparable inputs. RQ2 tests whether FOREWORD's dual GMM marginal reference density identifies inputs drawn from other tasks, and whether the LR can provide the same signal.
Across every target–source pair, reference density achieves lower mean FPR95 and higher mean ROC-AUC than either LR-derived score (Table 5). Averaged over the four OOD sources, its FPR95 is 0.185 for JSON-FIX and 0.164 for TOPIC-CLS, compared with 0.879 and 0.639 for pass probability. At these thresholds, reference density retains 94.7% and 95.2% of held-out in-distribution inputs, close to the 95% calibration target. The practical implication is clear. At thresholds that retain 95% of ID inputs, LR pass probability accept most OOD inputs as in-distribution; maximum-softmax confidence accepts over 95% of them for both targets. A high pass probability, or softmax confidence, therefore does not indicate that an input belongs to the reference task, and neither score can serve as a reliable OOD detection filter under this protocol.
Detection difficulty nonetheless varies across sources, which may partly reflect characteristics shared with the target task. For JSON-FIX, FPR95 is relatively high on SYN-BUG inputs, possibly because JSON and source code share syntactic structure. For TOPIC-CLS, the higher FPR95 on MODEL-EX inputs may reflect the expository prose common to abstracts and news text, which may partially explain the difficulty to separate them.
FOREWORD : Pre-Generation Prediction and Characterisation of LLM Test Failures using the Jacobian Lens
Table 4: Mean Failure@N (N ∈ {100, 300, 500}) for pre-generation methods and baselines.
| Task ID | N | Gemma-2-9B | Llama-3.1-8B | Qwen3-8B | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Clotho | LIHS | LIHS | JRS | JRS | Rand. | Clotho | LIHS | LIHS | JRS | JRS | Rand. | Clotho | LIHS | LIHS | JRS | JRS | Rand. | ||
| ODD-ADD | 100 | 100.0 | 100.0 | 100.0 | 100.0 | 100.0 | 38.4 | 99.2 | 93.7 | 99.0 | 90.4 | 99.3 | 44.3 | 83.7 | 94.5 | 93.4 | 73.1 | 95.4 | 36.8 |
| 300 | 299.9 | 299.9 | 299.7 | 300.0 | 298.2 | 115.5 | 292.9 | 278.5 | 296.0 | 272.0 | 296.1 | 132.2 | 228.3 | 263.4 | 265.2 | 234.0 | 270.5 | 99.4 | |
| 500 | 463.9 | 472.1 | 479.0 | 484.8 | 481.6 | 193.3 | 476.5 | 461.9 | 487.9 | 446.8 | 488.4 | 221.7 | 360.2 | 413.6 | 424.9 | 394.7 | 431.9 | 165.2 | |
| GH-TYPO | 100 | 83.3 | 89.9 | 89.9 | 90.2 | 94.4 | 35.1 | 91.9 | 96.1 | 98.3 | 91.1 | 95.1 | 52.3 | 73.2 | 86.2 | 94.1 | 87.0 | 96.1 | 42.3 |
| 300 | 223.6 | 265.5 | 267.4 | 268.5 | 278.5 | 106.0 | 272.4 | 291.7 | 295.1 | 279.0 | 288.3 | 151.8 | 211.4 | 246.1 | 273.2 | 260.1 | 280.6 | 128.5 | |
| 500 | 358.5 | 439.5 | 441.0 | 441.2 | 455.7 | 182.2 | 448.3 | 484.4 | 489.7 | 465.3 | 480.3 | 254.9 | 337.9 | 404.1 | 447.3 | 427.9 | 462.9 | 210.8 | |
| JSON-FIX | 100 | 86.1 | 90.2 | 84.8 | 88.8 | 82.2 | 20.0 | 94.2 | 90.1 | 93.6 | 94.1 | 94.5 | 32.3 | 13.2 | 39.6 | 60.1 | 70.3 | 60.6 | 6.2 |
| 300 | 237.3 | 262.1 | 244.3 | 263.0 | 235.2 | 63.3 | 249.6 | 253.6 | 258.8 | 258.1 | 265.0 | 100.4 | 32.1 | 84.3 | 137.3 | 140.5 | 142.7 | 19.5 | |
| 500 | 342.3 | 393.3 | 386.6 | 424.6 | 383.8 | 104.5 | 367.3 | 379.8 | 408.2 | 386.8 | 407.9 | 165.5 | 51.1 | 117.2 | 178.6 | 171.9 | 193.5 | 35.7 | |
| MODEL-EX | 100 | 59.5 | 85.7 | 96.8 | 87.5 | 94.5 | 34.0 | 81.0 | 86.8 | 95.1 | 82.3 | 91.1 | 48.2 | 23.1 | 50.3 | 73.3 | 62.2 | 79.3 | 26.1 |
| 300 | 165.6 | 248.7 | 284.5 | 264.8 | 278.0 | 100.3 | 226.6 | 251.2 | 279.3 | 245.7 | 268.5 | 143.4 | 69.7 | 151.5 | 204.2 | 189.0 | 223.3 | 79.5 | |
| 500 | 268.3 | 405.7 | 463.0 | 430.9 | 455.4 | 167.2 | 367.0 | 415.2 | 458.8 | 407.2 | 443.7 | 235.7 | 114.3 | 251.2 | 328.2 | 305.7 | 357.6 | 134.4 | |
| POS-TAG | 100 | 84.9 | 84.3 | 80.3 | 87.7 | 85.5 | 20.5 | 76.3 | 74.5 | 81.4 | 63.7 | 74.7 | 26.7 | 81.6 | 84.9 | 91.2 | 77.3 | 78.0 | 22.1 |
| 300 | 220.2 | 240.4 | 208.3 | 255.8 | 234.6 | 60.5 | 175.3 | 189.8 | 219.3 | 186.7 | 211.7 | 76.8 | 189.8 | 205.9 | 237.1 | 217.4 | 221.3 | 67.8 | |
| 500 | 319.7 | 341.0 | 326.2 | 386.1 | 368.0 | 102.7 | 253.6 | 293.1 | 342.7 | 314.7 | 335.3 | 128.2 | 278.6 | 311.3 | 354.1 | 344.7 | 350.2 | 114.7 | |
| SPELL-CHK | 100 | 85.7 | 85.0 | 88.9 | 83.2 | 84.7 | 12.0 | 76.5 | 82.4 | 90.1 | 79.6 | 86.2 | 19.1 | 75.7 | 81.3 | 81.1 | 78.5 | 79.8 | 13.5 |
| 300 | 234.1 | 232.0 | 244.5 | 229.7 | 242.1 | 34.4 | 214.4 | 243.3 | 255.4 | 230.7 | 251.8 | 57.5 | 194.7 | 228.5 | 234.8 | 223.8 | 227.9 | 41.9 | |
| 500 | 356.8 | 355.8 | 379.8 | 356.5 | 379.9 | 57.5 | 329.2 | 392.0 | 414.5 | 370.7 | 404.6 | 96.4 | 285.0 | 353.8 | 372.8 | 351.3 | 368.8 | 70.4 | |
| SYN-BUG | 100 | 97.2 | 95.6 | 96.3 | 97.0 | 97.1 | 56.3 | 89.4 | 86.8 | 96.5 | 95.0 | 98.6 | 64.8 | 90.8 | 88.7 | 95.5 | 96.0 | 87.6 | 53.7 |
| 300 | 292.1 | 287.2 | 292.9 | 290.0 | 292.2 | 174.3 | 266.4 | 267.5 | 287.8 | 290.5 | 294.4 | 196.9 | 264.1 | 265.4 | 286.2 | 290.4 | 273.9 | 159.4 | |
| 500 | 487.6 | 483.3 | 489.0 | 482.2 | 488.6 | 293.5 | 444.5 | 451.9 | 481.3 | 484.4 | 486.0 | 328.6 | 438.3 | 446.3 | 477.0 | 486.6 | 462.9 | 269.6 | |
| TOPIC-CLS | 100 | 51.7 | 83.4 | 89.8 | 93.7 | 96.1 | 15.0 | 56.4 | 69.9 | 76.4 | 86.9 | 84.4 | 20.4 | 52.0 | 66.2 | 79.4 | 91.1 | 89.8 | 22.5 |
| 300 | 124.0 | 214.5 | 242.4 | 266.1 | 262.7 | 49.0 | 133.5 | 185.2 | 208.4 | 246.4 | 233.9 | 62.8 | 125.1 | 172.4 | 211.6 | 253.5 | 251.0 | 69.2 | |
| 500 | 182.6 | 324.9 | 360.9 | 419.8 | 403.9 | 83.1 | 199.7 | 293.2 | 334.6 | 393.7 | 368.5 | 105.7 | 190.5 | 266.2 | 328.4 | 397.4 | 391.0 | 115.1 | |
| MBPP | 100 | 51.3 | 56.8 | 70.9 | 56.8 | 64.4 | 34.0 | 57.7 | 68.1 | 83.6 | 68.6 | 81.4 | 36.5 | 39.4 | 50.2 | 62.4 | 47.1 | 58.5 | 25.0 |
| 300 | 120.2 | 122.7 | 138.7 | 117.5 | 133.2 | 104.9 | 129.2 | 141.3 | 164.0 | 134.3 | 146.8 | 108.9 | 92.4 | 93.3 | 113.5 | 78.6 | 98.5 | 83.0 | |
| 500 | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | |
| LCB | 100 | 86.6 | 91.2 | 96.6 | 89.2 | 84.6 | 74.2 | 99.4 | 97.3 | 99.5 | 92.2 | 95.1 | 81.0 | 86.3 | 91.3 | 94.9 | 71.2 | 79.4 | 54.7 |
| 300 | 240.2 | 268.6 | 276.7 | 251.8 | 244.1 | 221.6 | 279.9 | 280.4 | 291.0 | 273.0 | 282.3 | 246.1 | 208.1 | 241.3 | 255.1 | 184.5 | 198.5 | 168.4 | |
| 500 | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | |
Table 5: Per-source and average out-of-distribution detection results.
| Target | Dual GMM | LR | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| JSON-FIX | Target | TOPIC-CLS | Target | JSON-FIX | Target | TOPIC-CLS | |||||
| OOD Source | FPR95 | ROC-AUC | OOD Source | FPR95 | ROC-AUC | OOD Source | FPR95 | ROC-AUC | |||
| TOPIC-CLS | JSON-FIX | TOPIC-CLS | JSON-FIX | ||||||||
| SPELL-CHK | SPELL-CHK | SPELL-CHK | SPELL-CHK | ||||||||
| SYN-BUG | SYN-BUG | SYN-BUG | SYN-BUG | ||||||||
| MODEL-EX | MODEL-EX | MODEL-EX | MODEL-EX | ||||||||
| Average | Average | Average | Average | ||||||||
Answer to RQ2: FOREWORD's dual GMM reference-density score detects the evaluated cross-task inputs substantially more effectively than LR-derived pass probability or confidence, outperforming both on every target–source pair while retaining approximately 95% of held-out in-distribution inputs. Detection effectiveness nonetheless remains source-dependent.
5.3 RQ3: Characterisation of Failure Patterns
For failing-class component , we select inputs whose posterior failure probability and responsibility within the failing-class GMM for are both at least 0.95, then retain those observed to fail under the evaluation's pass/fail criterion. We denote the resulting set by .
5.3.1 RQ3-1: Failure Patterns Across Components
Fig. 1 shows the true-topic (left) and predicted-topic (right) distributions of components for seed 0, with the final column of each panel giving the pooled distribution across all four components. Read together, the panels show different failure patterns. Sci/Tech accounts for 73% of the failures in these sets and appears in several components, but the components' true–predicted topic differ. isolates a single Sci/Tech→Business confusion, whereas gathers inputs from several true topics that the model mispredicts as World, and concentrates on inputs mispredicted as Other. , by contrast, remains mixed and shows no dominant pattern. Combined, these patterns suggest that the components capture variations in how inputs are misclassified, although distinct behaviour may not be evident in every component.
Component concentrates on Sci/Tech→Business errors: 97% of its inputs have ground-truth topic Sci/Tech but 91% are predicted as Business. mixes Business (48%) and Sci/Tech (44%) inputs, but 84% of its predictions are World. In , 86% of predictions fall outside the four topic labels (“Other”). has more varied predictions: Business (47%), World (30%), and Other (22%) but 65% are actually labelled Sci/Tech.
FOREWORD : Pre-Generation Prediction and Characterisation of LLM Test Failures using the Jacobian Lens

Figure 1: True-topic (left) and predicted-topic (right) distributions among selected failures in each failing-class component of FOREWORD on TOPIC-CLS with Llama3-8B (seed 0).
Table 6: Failing-class component tokens on TOPIC-CLS and the top 20 tokens with positive (LR, failure) or negative (LR, passing) LR probe weights.
| ... | Top-20 tokens | |
|---|---|---|
| 194 | law, legal, legality, laws, legally, legislation, legislative, lawyers, juris, lawyer, lawsuits, legis, jur, judicial, legislature, government, courtroom, justice, legisl, regulatory | |
| 111 | global, international, globally, worldwide, geopol, globalization, geopolitical, internationally, internacional, globe, diplomatic, world, geography, glob, ernational, diplomacy, diplom, unesco, globals, europe | |
| 269 | companies, company, tech, business, businesses, technology, corporations, corporate, software, microsoft, industry, computer, industries, empresas, corporation, empresa, ibm, marketing, computers, manufacturers | |
| 69 | entertainment, celebrity, celebrities, personality, cultural, persona, hobby, fandom, person, personalities, recreational, personas, personen, musician, individuals, science, history, human, humanity, americans | |
| - | mvp, wereld, cultural, etsy, climate, locals, entertainment, administration, countryside, vendor, lawsuits, globals, china, lobbyist, healthcare, venture, travel, incidents, salesforce, nokia | |
| - | nationally, wrestling, juventus, uruguay, ski, asia, yemen, 科学[science], surname, african, terms, ge, 산鹑[industry], products, automotive, otechnology, retail, monarch, brokerage, corp |
Across ten seeds, the dual GMM identifies failing-class components on average. We measure association using Cramér's , where 0 means no association and 1 means maximal association. Component membership is associated with true–predicted topic pairs (), more strongly with predicted topics () than with true topics (). Thus, knowing an input's component gives information about its observed error, particularly which label the LLM predicts. A failure score can only rank inputs by predicted risk; the failing-class components additionally group failures by recurring error patterns, although some remain mixed.
5.3.2 RQ3-2: Semantic Characterisation
True and predicted topics describe the observed failures but J-lens profiles can add descriptions in vocabulary terms. Table 6 lists the tokens whose average J-lens scores are most increased among each component's failures, compared with their averages across all inputs: legal terms in , international terms in , corporate and technology terms in , and celebrity and entertainment terms in . As we saw above, both and contain Sci/Tech articles predicted as Business, but their profiles distinguish legal () from corporate and technology concepts (). The readout tokens can thus distinguish groups that share a failure pattern but not the same emphasised terms.
JRS can also make LR weights readable as tokens. LR learns a single scoring direction to separate passing from failing inputs, so its global weight ranking combines token contributions across different failure groups. The inspected positive and negative weight rankings (last rows of Table 6) consequently mix several concepts. The GMM component profiles give more focused descriptions, including differences between groups that share a label confusion.
At the input level, the readouts give finer details. Fig. 2a shows one failing input from each of two components of TOPIC-CLS, and , with its leading tokens. In the article about Airbus withdrawing from Microsoft's antitrust appeal, the readout includes company names alongside legal (legal, lawyers, lawsuits) and corporate (corporations, companies) terms. All ten responses predict Business, although the article ground truth label is Sci/Tech. In the Sports-labelled article about Tiger Woods' wedding, the readout includes athlete but is led by terms like celebrity and personalities; five of ten responses predict Other.
FOREWORD : Pre-Generation Prediction and Characterisation of LLM Test Failures using the Jacobian Lens
F0 true: Sci/Tech predicted: Business 10/10
Input: Airbus drops out of Microsoft appeal Aircraft builder withdraws its request to intervene in Microsoft's antitrust appeal; Boeing also forgoes intervention.
Top J-lens tokens (highlighted = also a component top token)
microsoft airbus boeing legal microsoft lawyers corporations airlines companies lawsuits
F3 true: Sports predicted: Other 5/10 World 3/10 Sports 2/10
Input: Tiger Woods Ties the Knot with Swedish Ex-Nanny LONDON (Reuters) - Former world number one Tiger Woods has married Swedish model Elin Nordegren at the luxury Sandy Lane resort in Barbados, the Barbados Daily Nation newspaper reported Wednesday.
Top J-lens tokens (highlighted = also a component top token)
celebrity celebrities personalities personality person persona athlete
name personen individuals
F0 Component readouts: merge / combine / union 0/10 passed
Input: Write a function to find three closest elements from three sorted arrays.
Test: find_closest([1, 4, 10], [2, 15, 20], [10, 12], 3, 3, 2) == (10, 15, 10)
Top J-lens tokens (highlighted = also a component top token)
merged combined merge merging combine merges merger fusion
combining joint
F1 Component readouts: circle / radius / formula 0/10 passed
Input: Write a python function to find the perimeter of a cylinder.
Test: perimeter(2, 4) == 12
Top J-lens tokens (highlighted = also a component top token)
circumference circ circum circle circles diameter perimeter circular
radius round
(a) TOPIC-CLS
(b) MBPP
Figure 2: Representative failures of the failing-class components
Reading Microsoft's antitrust appeal as Business, or a golfer's wedding as celebrity news, is defensible. These cases suggest possible ambiguity in the category boundaries and ground-truth labels, rather than necessarily a misunderstanding of the articles by the LLM. Together with the inputs and generated responses, the readouts can help an analyst identify plausible alternative interpretations that a failure score alone does not describe.
The value of J-lens readouts also extends to program synthesis. In Fig. 2b, on the MBPP task, emphasises merging (merge, combine), while emphasises circle geometry (circumference, radius). In the case, the task asks for the three closest elements, one from each of three sorted arrays. All ten leading J-lens tokens concern merging or combining, but a majority of the responses merge the arrays without enforcing the one-per-array constraint; none passes. In the case, the task asks for the perimeter of a cylinder. The benchmark expects the perimeter of its side-view rectangle, , but the task does not say so. The leading J-lens tokens are circle terms (circumference, circle, radius), with no rectangle term among them, and all ten responses build circle-based formulas with ; none passes. The readout and generated programs together suggest an alternative interpretation of an underspecified task.
These cases show how pre-generation readouts can help characterise failures and identify possible ambiguity in task specifications. The cylinder's perimeter has no standard definition, making an alternative interpretation defensible. As with the golfer's wedding in TOPIC-CLS, the readout and generated responses together help an analyst assess whether the failure reflects an LLM error or ambiguity in the task specification or ground-truth label. However, the readouts do not establish that the highlighted concepts caused the failures. A readout may also suggest an appropriate approach without revealing whether the generated program will implement it correctly.
Answer to RQ3: FOREWORD helps characterise failure groups and individual cases through J-lens token profiles. On TOPIC-CLS, GMM component profiles distinguish concepts even between groups sharing a label confusion. Individual readouts on TOPIC-CLS and MBPP can suggest ambiguity in labels or task specifications. LR weights are also token-readable, but their global rankings mix concepts rather than providing group-specific profiles.
Table 7: Normalised failure@25% on each target model, grouped by the open-weight source model used for scoring, averaged over ten tasks and ten seeds.
| Target | Source | Clotho | LIHS | LIHS | JRS | JRS | Target | Source | Clotho | LIHS | LIHS | JRS | JRS |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Llama-3.3-70B | Llama-3.1-8B | 0.546 | 0.562 | 0.614 | 0.545 | 0.610 | GPT-4o-mini | Llama-3.1-8B | 0.515 | 0.547 | 0.597 | 0.564 | 0.607 |
| Gemma-2-9B | 0.483 | 0.574 | 0.634 | 0.586 | 0.626 | Gemma-2-9B | 0.477 | 0.590 | 0.644 | 0.591 | 0.648 | ||
| Qwen3-8B | 0.488 | 0.574 | 0.621 | 0.577 | 0.633 | Qwen3-8B | 0.481 | 0.590 | 0.662 | 0.622 | 0.676 | ||
| Gemma-3-27B | Llama-3.1-8B | 0.522 | 0.573 | 0.617 | 0.581 | 0.611 | Claude Haiku 4.5 | Llama-3.1-8B | 0.479 | 0.498 | 0.537 | 0.475 | 0.528 |
| Gemma-2-9B | 0.520 | 0.606 | 0.664 | 0.619 | 0.673 | Gemma-2-9B | 0.415 | 0.492 | 0.553 | 0.502 | 0.556 | ||
| Qwen3-8B | 0.482 | 0.580 | 0.652 | 0.613 | 0.656 | Qwen3-8B | 0.435 | 0.513 | 0.582 | 0.533 | 0.587 | ||
| Qwen3-32B | Llama-3.1-8B | 0.494 | 0.516 | 0.549 | 0.493 | 0.549 | Gemini 3.5 Flash Lite | Llama-3.1-8B | 0.453 | 0.481 | 0.517 | 0.474 | 0.508 |
| Gemma-2-9B | 0.432 | 0.515 | 0.579 | 0.531 | 0.572 | Gemma-2-9B | 0.447 | 0.519 | 0.587 | 0.535 | 0.586 | ||
| Qwen3-8B | 0.455 | 0.533 | 0.578 | 0.541 | 0.604 | Qwen3-8B | 0.430 | 0.512 | 0.588 | 0.548 | 0.585 |
FOREWORD : Pre-Generation Prediction and Characterisation of LLM Test Failures using the Jacobian Lens
5.4 RQ4: Transferability of Failure Predictions
Table 7 reports normalised failure@25%. A value of 0.6 means that the first quarter of an ordering contains 60% as many failures as a perfect ordering would place there. Across the six targets, Clotho's pass-only score [Yoon et al.(2026)] averages 0.48. Both LR probes exceed Clotho on every source–target pair, averaging 0.60, a gain of 0.12. The dual GMM scorers average 0.55, a gain of 0.07 that depends more on the source: 0.09 for Gemma-2-9B and 0.10 for Qwen3-8B, but 0.02 for Llama-3.1-8B. Scorer choice has the larger effect. With the representation fixed, LR exceeds dual GMM in all 36 comparisons, by 0.05 on average. With the scorer fixed, LIHS and J-lens differ by only 0.01 on average, with J-lens ahead in 23 of the 36.
The gains extend to all three proprietary targets. Claude Haiku 4.5 and Gemini 3.5 Flash Lite pass most inputs, with mean pass rates of 0.857 and 0.860 across tasks. Even on these two targets, all twelve LR scores exceed their source-matched Clotho scores; their mean normalised failure@25% is 0.559 versus 0.443. The larger open-weight targets also let us assess the role of model family. We compare each source's lead over the other two sources on its own-family target with its lead on the other open-weight targets. Sharing a family gives an average advantage of about 0.02, much smaller than the LR probes' gain over Clotho. It does not overcome source quality: Llama-3.1-8B is the weakest source in 22 of the 24 target–scorer combinations, including all four combinations in Llama-3.3-70B.
Answer to RQ4: Scores from smaller open-weight models can prioritise failures in larger and proprietary models better than Clotho. The LR scores transfer the best, improving normalised failure@25% over Clotho on every source–target pair by 0.12 on average; on GPT-4o-mini, J-lens LR from Qwen3-8B reaches 0.676, against 0.481 for Clotho. The effectiveness of transfer is slightly better within the same model family, but specific source and target pairs matter more.
5.5 RQ5: Computational Cost
Figure 3a shows extraction time per input. J-lens takes 0.40 s per input on average, compared with 0.15 s for LIHS, or 2.7 times as long. This is expected, as LIHS is the hidden state read directly from the forward pass, whereas J-lens must further map that state into vocabulary space through the Jacobian lens [Gurnee et al.(2026)]. Gemma, the largest of the three studied LLMs, is the slowest against both representations, yet J-lens extraction stays below half a second per input in every setting on a single consumer GPU.

(a) Average extraction time per input
(b) Cumulative fitting time
Figure 3: Computational cost of representation extraction and scorer fitting for each task–model combination.
Figure 3b shows the cumulative fitting time over the 500-label active-learning loop. Clotho is by far the slowest: fitting its passing-class GMM takes 874 s per run on average, about seven times the roughly two-minute average of the other four pairs. We attribute the difference mainly to how the covariance is modelled. Both GMM-based methods fit PCA-reduced features, but Clotho estimates a full covariance matrix for each mixture component, whereas the dual GMM usually falls back to diagonal covariance because each class has too few references to estimate a full one.
Among these four pairs, the representation has a small, scorer-dependent effect: J-lens lowers the dual GMM's average fitting time from 133 s to 113 s (15%) but raises the LR probe's from 122 s to 131 s (7%). The scorer likewise has a small, representation-dependent effect: replacing the dual GMM with the LR probe lowers the average from 133 s to 122 s on LIHS (8%) but raises it from 113 s to 131 s on J-lens (16%). As a result, the dual GMM on J-lens is the cheapest of the five pairs on average. The two scorers have comparable costs even though a GMM is the more complex model, because both spend most of their time on hyperparameter search: the dual GMM runs about 500 small fits per iteration on PCA-reduced features, whereas the LR probe runs about 50 L1-regularised fits on all original feature space. This parity is specific to RQ1's search configuration rather than a general property of GMMs versus logistic regression.
FOREWORD : Pre-Generation Prediction and Characterisation of LLM Test Failures using the Jacobian Lens
Answer to RQ5: FOREWORD’s additional cost lies in extraction: J-lens adds about 0.25 s per input over LIHS, yet stays below 0.5 s per input on a consumer GPU. On J-lens, the dual GMM and the LR probe each take about two minutes to fit over the 500-label loop, whereas Clotho’s passing-class GMM takes as long as the dual GMM and as long as the LR probe.
6 Discussion
What J-lens contributes. Derived from the same forward pass as LIHS, JRS adds a readable basis for characterising failures rather than new information. Its comparable average discrimination suggests little predictive cost for this readability. Task differences remain: JRS leads on TOPIC-CLS and POS-TAG, while LIHS leads on MBPP and LCB. These differences may reflect how the corpus used to estimate the Jacobians and token selection shape the task-relevant information JRS retains. Varying this corpus, vocabulary size, and layer range could assess sensitivity to these choices.
J-lens readouts are essentially decoded internal layer activations. Consequently, while some may support failure characterisation, fundamentally they lack any self-reflective diagnosis capabilities. For example, we observe that J-lens readouts correctly point to dynamic programming as the approach towards the solution for MBPP, only to fail to generate a correct implementation. Further studies are required to explore whether self-diagnostic prompting can elicit deeper characterisation.
Component profiles characterise failure groups through prominent tokens, while individual readouts can suggest alternative interpretations of inputs or task specifications. These descriptions come at the extra extraction cost reported in Section 5.5. Readouts could also characterise LIHS-fitted groups; whether fitting in JRS yields more coherent groups remains untested. Our descriptive interpretation is limited to a few cases. Future studies, potentially involving human users, should assess whether readouts help analysts characterise failures and revise task prompts beyond what inputs and generated responses alone support.
Concept-level test coverage. FOREWORD characterises groups of failing inputs through their prominent readout tokens. Such group-level summaries may obscure the multiple concepts within an individual input, as the Airbus article illustrates (Section 5.3.2). Future work could jointly identify shared concepts and overlapping groups of inputs, allowing an input to belong to several groups. Concept combinations could then serve as discrete, interpretable units of test coverage. Testers could prioritise combinations associated with frequent failures and generate inputs for combinations poorly represented in the test set. Defining the relevant concept space and establishing criteria for adequate coverage remain open questions.
7 Threats to Validity
Threats to internal validity concern anything that could interfere with the observed effect of FOREWORD, namely its predictive and characterising power. JRS depends on subsets of tokens the LLM is ready to verbalise, hence we cannot rule out possibilities that certain tokens are correlated with failures without actually causing them. We try to minimise such threats by presenting the actual readout tokens in RQ3 for a qualitative analysis. However, only a full understanding of LLM internals can fundamentally rid us of such threats. External validity lies on the degree of generalisation of the reported results. Our study primarily reports on J-lenses for three 8-9B open weight LLMs, against ten tasks; similarly, the transfer study only concerns three proprietary models. Other architectures, such as reasoning models, may produce different Jacobian workspaces, resulting in different results. RQ2 also operationalises distribution shift using other tasks' inputs placed into the target prompt; such inputs may be easier to detect than drift encountered in deployment. Only further experimentation can reduce threats to external validity. Finally, threats to construct validity concerns whether we are measuring what we intend to observe. We use established measures (ROC-AUC, Failure@N, FPR95), as well as scikit-learn implementations that have withstood public scrutiny, to mitigate threats. However, these measures fundamentally remain proxies.
8 Conclusion
We propose FOREWORD, a pre-generation test adequacy framework for LLMs that learns from both passing and failing reference inputs. FOREWORD represents each input either as hidden states or as vocabulary-aligned J-lens readouts. Across ten tasks and three open-weight LLMs, FOREWORD outperforms Clotho, the existing state-of-the-art pre-generation adequacy metric. The LR probe performs the best for failure prediction, with the average ROC-AUC 0.84 over 0.68 of Clotho; the dual GMM provides a reference density, which can flag out-of-distribution inputs with much
FOREWORD : Pre-Generation Prediction and Characterisation of LLM Test Failures using the Jacobian Lens
lower false positive rates than LR. Most importantly, dual GMMs can group failures that share the same confusion; further, J-lens readouts can characterise those failures semantically. Finally, scores computed on small models transfer to larger and proprietary targets, raising normalised failure@25% from 0.48 to 0.60, allowing testers to prioritise inputs for expensive models before querying them. In future work, we plan to build on these concept-level groupings to measure concept-level test coverage and to generate inputs for poorly covered concept combinations.
References
[Agarwal et al.(2026)] Shyam Agarwal, Hao He, and Bogdan Vasilescu. 2026. AI IDEs or Autonomous Agents? Measuring the Impact of Coding Agents on Software Development. In Proceedings of the 23rd International Conference on Mining Software Repositories. 857–862. doi:10.1145/3793302.3793589
[AI@Meta(2024)] AI@Meta. 2024. Llama 3 Model Card. (2024). https://github.com/meta-llama/llama3/blob/main/MODEL_CARD.md
[Anonymous(2026)] Anonymous. 2026. Replication Package for Foreword. https://anonymous.4open.science/r/foreword-3. Accessed: 2026-10-03.
[Anthropic(2025)] Anthropic. 2025. Introducing Claude Haiku 4.5. https://www.anthropic.com/news/claude-haiku-4-5.
[Austin et al.(2021)] Jacob Austin, Augustus Odena, Maxwell Nye, Maarten Bosma, Henryk Michalewski, David Dohan, Ellen Jiang, Carrie Cai, Michael Terry, Quoc Le, et al. 2021. Program synthesis with large language models. arXiv preprint arXiv:2108.07732 (2021).
[Azaria and Mitchell(2023)] Amos Azaria and Tom Mitchell. 2023. The Internal State of an LLM Knows When It's Lying. In Findings of the Association for Computational Linguistics: EMNLP 2023, Houda Bouamor, Juan Pino, and Kalika Bali (Eds.). Association for Computational Linguistics, Singapore, 967–976. doi:10.18653/v1/2023.findings-emnlp.68
[Chu et al.(2025)] Zhendong Chu, Shen Wang, Jian Xie, Tinghui Zhu, Yibo Yan, Jingheng Ye, Aoxiao Zhong, Xuming Hu, Jing Liang, S Yu Philip, et al. 2025. LLM Agents for Education: Advances and Applications. EMNLP (Findings) (2025), 13782–13810. doi:10.18653/v1/2025.findings-emnlp.743
[Cramér(1946)] Harald Cramér. 1946. Mathematical Methods of Statistics. Princeton University Press, Princeton, NJ.
[CShorten(2022)] CShorten. 2022. arXiv Dataset: Hugging Face Dataset Card. https://huggingface.co/datasets/CShorten/Last-Week-on-ML-ArXiv. Accessed: 2025-09-11.
[de Jong(2022)] Jos de Jong. 2022. JSON Repair: How to fix JSON and validate it with ease. https://jsoneditoronline.org/indepth/parse/fix-json/. Accessed: 2025-09-11.
[Dobslaw et al.(2026)] Felix Dobslaw, Robert Feldt, Juyeon Yoon, and Shin Yoo. 2026. Challenges in Testing Large Language Model-Based Software: A Faceted Taxonomy. ACM Transactions on Software Engineering and Methodology 35, 9 (2026), 261:1–261:24. doi:10.1145/3806396
[Elbaum et al.(2001)] Sebastian G. Elbaum, Alexey G. Malishevsky, and Gregg Rothermel. 2001. Incorporating Varying Test Costs and Fault Severities into Test Case Prioritization. In Proceedings of the International Conference on Software Engineering (ICSE 2001). ACM Press, 329–338.
[Farquhar et al.(2024)] Sebastian Farquhar, Jannik Kossen, Lorenz Kuhn, and Yarin Gal. 2024. Detecting hallucinations in large language models using semantic entropy. Nature 630, 8017 (2024), 625–630. doi:10.1038/s41586-024-07421-0
[Fellbaum(1998)] Christiane Fellbaum. 1998. WordNet: An electronic lexical database. MIT press.
[Google(0000)] Google. [n.d.]. Gemini 3.5 Flash Lite Model. https://ai.google.dev/gemini-api/docs/models/gemini-3.5-flash-lite.
[Gurnee et al.(2026)] Wes Gurnee, Nicholas Sofroniew, Adam Pearce, Mateusz Piotrowski, Isaac Kauvar, Runjin Chen, Anna Soligo, Paul Bogdan, Euan Ong, Rowan Wang, et al. 2026. Verbalizable representations form a global workspace in language models. arXiv preprint arXiv:2607.15495 (2026).
[Hagiwara and Mita(2019)] Masato Hagiwara and Masato Mita. 2019. GitHub typo corpus: A large-scale multilingual dataset of misspellings and grammatical errors. arXiv preprint arXiv:1911.12893 (2019).
[Jain et al.(2025)] Naman Jain, Alex Gu, Wen-Ding Li, Fanjia Yan, Tianjun Zhang, Sida Wang, Armando Solar-Lezama, Koushik Sen, and Ion Stoica. 2025. Livecodebench: Holistic and contamination free evaluation of large
FOREWORD : Pre-Generation Prediction and Characterisation of LLM Test Failures using the Jacobian Lens
language models for code. In International Conference on Learning Representations, Vol. 2025. 58791–58831. doi:10.48550/arXiv.2403.07974
[Lee et al.(2024)] Hokyung Lee, Sumanyu Sharma, and Bing Hu. 2024. Bug in the code stack: Can llms find bugs in large python code stacks. arXiv preprint arXiv:2406.15325 (2024).
[Manakul et al.(2023)] Potsawee Manakul, Adian Liusie, and Mark Gales. 2023. SelfCheckGPT: Zero-Resource Black-Box Hallucination Detection for Generative Large Language Models. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, Houda Bouamor, Juan Pino, and Kalika Bali (Eds.). Association for Computational Linguistics, Singapore, 9004–9017. doi:10.18653/v1/2023.emnlp-main.557
[Mitton et al.(1980)] Roger Mitton et al. 1980. Birkbeck spelling error corpus. Oxford Text Archive Legacy Collection (1980).
[Neuronpedia(0000)] Neuronpedia. [n. d.]. neuronpedia/jacobian-lens. https://huggingface.co/neuronpedia/jacobian-lens.
[nostalgebraist(2020)] nostalgicebraist. 2020. interpreting GPT: the logit lens. LessWrong. https://www.lesswrong.com/posts/AcKRB8wDpdaN6v6ru/interpreting-gpt-the-logit-lens
[OpenAI(0000)] OpenAI. [n.d.]. GPT-4o Mini Model. https://developers.openai.com/api/docs/models/gpt-4o-mini.
[Pedregosa et al.(2011)] F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay. 2011. Scikit-learn: Machine Learning in Python. Journal of Machine Learning Research 12 (2011), 2825–2830. doi:10.5555/1953048.2078195
[Qiu et al.(2024)] Jianing Qiu, Kyle Lam, Guohao Li, Amish Acharya, Tien Yin Wong, Ara Darzi, Wu Yuan, and Eric J Topol. 2024. LLM-based agentic systems in medicine and healthcare. Nature Machine Intelligence 6, 12 (2024), 1418–1420. doi:10.1038/s42256-024-00944-1
[Silveira et al.(2014)] Natalia Silveira, Timothy Dozat, Marie-Catherine de Marneffe, Samuel Bowman, Miriam Connor, John Bauer, and Christopher D. Manning. 2014. A Gold Standard Dependency Corpus for English. In Proceedings of the Ninth International Conference on Language Resources and Evaluation (LREC-2014).
[Tan et al.(2025)] Sijun Tan, Siyuan Zhuang, Kyle Montgomery, William Tang, Alejandro Cuadron, Chenguang Wang, Raluca Popa, and Ion Stoica. 2025. Judgebench: A benchmark for evaluating llm-based judges. In International Conference on Learning Representations, Vol. 2025. 63277–63303.
[Team(2024)] Gemma Team. 2024. Gemma. (2024). doi:10.34740/KAGGLE/M/3301
[Team(2025)] Qwen Team. 2025. Qwen3 Technical Report. arXiv:2505.09388 [cs.CL] https://arxiv.org/abs/2505.09388
[Yoon et al.(2026)] Juyeon Yoon, Somin Kim, Robert Feldt, and Shin Yoo. 2026. Clotho: Measuring task-specific pre-generation test adequacy for LLM inputs. Proceedings of the ACM on Software Engineering 3, FSE (2026), 1910–1932. doi:10.1145/3797114
[Zhang et al.(2015)] Xiang Zhang, Junbo Zhao, and Yann LeCun. 2015. Character-level convolutional networks for text classification. In Proceedings of the 29th International Conference on Neural Information Processing Systems - Volume 1 (Montreal, Canada) (NIPS'15). MIT Press, Cambridge, MA, USA, 649–657.
[Zhou et al.(2025)] Shide Zhou, Tianlin Li, Kailong Wang, Yihao Huang, Ling Shi, Yang Liu, and Haoyu Wang. 2025. Understanding the Effectiveness of Coverage Criteria for Large Language Models: A Special Angle from Jailbreak Attacks. In 2025 IEEE/ACM 47th International Conference on Software Engineering (ICSE). IEEE Computer Society, Los Alamitos, CA, USA, 730–742. doi:10.1109/ICSE55347.2025.00209
[Zhu et al.(1997)] Hong Zhu, Patrick A. V. Hall, and John H. R. May. 1997. Software unit test coverage and adequacy. ACM Comput. Surv. 29, 4 (Dec. 1997), 366–427. doi:10.1145/267580.267590