Abstract
Introduction:
A large language model (LLM)-based pipeline is presented for structured processing of scientific abstracts and for generating paired factual and counterfactual question-answer (QA) instances under document-level intervention constraints.
Methods:
The implemented system extracts entities, events, and relations; induces a lightweight structural causal model (SCM) over scientific variables such as method, data, intervention, outcome, and metric; generates five factual QA pairs per abstract; rewrites them under one selected intervention; and filters inconsistent counterfactuals. The source export contains 100 Scopus abstracts, of which 67 documents with complete pipeline artifacts form the validation cohort. Generation uses gpt-4.1, while automated validation uses gpt-5-mini under a 15-criterion checklist; three human annotators independently score the same 67 documents.
Results:
Human agreement is moderate, with a mean pairwise Cohen's kappa of approximately 0.54. Automated validation is high for original QA and relation-level correctness (0.97 and 0.89) but very low for document-level global consistency (0.07), revealing a substantial gap between local correctness and cross-stage coherence. Under the score-based intervention analysis, 25.4% of documents exhibit a validation decrease above the predefined threshold.
Discussion:
We refer to this quantity as the intervention degradation rate rather than as bias propagation, because the interventions concern scientific-content variables rather than protected attributes. The study evaluates generation quality, intervention sensitivity, and cross-stage consistency; it does not train a foundation model or claim training-time bias mitigation.
1 Introduction
Large language models are increasingly used to extract, summarize, retrieve, and query scientific information, including question answering and retrieval-centered workflows (; ; ; ). Scientific abstracts are attractive inputs for such systems because they compactly encode a study's method, data, experimental setting, outcomes, and evaluation criteria.
At the same time, this compression creates a demanding generation problem: an automatically produced QA pair may be locally fluent and factually plausible while still being inconsistent with another representation produced from the same document.
Structured scientific-text processing therefore requires more than isolated answer correctness. Information extraction must preserve the entities and events explicitly supported by the source; relation extraction must avoid turning association into unsupported causation; and generated questions must remain answerable from the document. Counterfactual generation adds another constraint because a selected variable, such as the method, dataset, cohort size, or evaluation setting, is deliberately changed while the remainder of the document-level scenario should remain coherent. These requirements connect scientific information extraction, scientific QA, and counterfactual reasoning rather than foundation-model training as such.
This work studies that setting through an implemented multi-stage LLM pipeline. Each abstract is first converted into entities, events, and relations. A lightweight SCM then summarizes intervenable scientific variables and their assumed directional dependencies. The same generation backend produces factual QA pairs and SCM-conditioned counterfactual variants, after which a filtering stage removes outputs that are logically inconsistent, unanswerable, or incompatible with the stated intervention. The resulting artifacts are evaluated by human annotators and by a separate LLM validator using the same 15-criterion checklist.
The scope of the contribution is deliberately data- and evaluation-centric. No foundation model is trained or fine-tuned in the experiments, and the consistency objective introduced later is not optimized as a training loss. Consequently, the paper does not claim training-time counterfactual data augmentation, counterfactual fairness, mitigation of demographic bias, or a reduction in an identified causal effect on model predictions. Instead, the causal formalism is used as a structural device for defining intervention targets and for testing whether generated scientific QA artifacts remain valid under controlled changes.
A central empirical issue is the contrast between strong local QA validation and weak global consistency. Original QA receives a mean automated score of 0.97, whereas the document-level consistency criterion receives only 0.07. We therefore treat cross-stage coherence as a primary negative result rather than a peripheral limitation. The analysis focuses on how independent generation stages, a deliberately compressed SCM, and a final filter targeted mainly at counterfactual pairs can preserve local answerability while failing to reconcile dependencies across the full document representation.
The contributions are therefore threefold. First, we specify an auditable SCM-conditioned pipeline for extracting scientific structure and producing paired factual/counterfactual QA from abstracts. Second, we evaluate the pipeline with a criterion-level protocol that separates extraction quality, relation validity, factual QA, counterfactual QA, and end-to-end consistency, and compare three human annotators with an automated validator. Third, we quantify score changes under interventions using intervention sensitivity and an intervention degradation rate, explicitly interpreting these quantities as validation-stability measures rather than as evidence of social bias mitigation or causal-effect reduction.
2 Related work
Scientific-literature question answering increasingly combines language models with retrieval, document grounding, and structured representations. Retrieval-oriented systems use external corpora or indexed document collections to supply evidence before answer generation, while scientific QA systems often operate over narrower evidence units such as abstracts, passages, or extracted claims (; ; ; ). These systems motivate explicit evaluation of faithfulness, answer relevance, and evidence use. The present study differs in that it does not retrieve external context: the source abstract is fixed and is the sole grounding document for extraction and QA generation.
A closely related line of work concerns scientific information extraction and structured generation. Schema-constrained prompting has been used to obtain machine-readable entities, events, relations, and other scientific descriptors, while controlled QA generation seeks questions whose answers can be verified directly against a source text (; ; ). This literature is especially relevant to the implemented pipeline because errors can originate before QA generation: omitted entities, unsupported relations, or over-compressed event descriptions can propagate into later stages even when the final question and answer are locally well-formed.
Counterfactual reasoning provides a complementary mechanism for testing whether a generated representation behaves coherently when one variable is changed. Work on LLM causal reasoning has shown that fluent explanations and correct-looking answers do not necessarily imply stable reasoning under interventions (; ). Counterfactual auditing has likewise been used to probe sensitivity, generalization, and explanation stability in task-specific settings (; ). In the present setting, counterfactuals are used to construct paired scientific QA instances and to assess transformation stability, not to establish that the generator has recovered the true causal structure of the underlying scientific study.
Counterfactual data augmentation is often discussed as a training strategy in which generated variants are added to a learning corpus (; ; ). That literature is conceptually useful because it emphasizes minimal, semantics-preserving interventions; however, it is important to distinguish generation of candidate counterfactual data from demonstrating a training-time augmentation benefit. Our experiments evaluate only the former. We neither retrain a downstream foundation model on the generated QA pairs nor compare pre- and post-augmentation model behavior, so training-time robustness or fairness claims are outside the empirical scope of this paper.
Retrieval-augmented generation (RAG)-oriented evaluation protocols, including Retrieval Augmented Generation Assessment (RAGAS)-style faithfulness and answer-relevance measures, are methodologically relevant when a system retrieves external contexts whose quality can be assessed independently of answer generation. Our pipeline has no retrieval stage, no ranked contexts, and no context-recall variable; therefore retrieval-specific metrics such as context precision or recall are not directly defined for the implemented experiment. The closest applicable dimensions are source-grounded faithfulness and answerability, which are represented in checklist criteria Q1āQ14. A RAG baseline would become appropriate in a comparative study that first retrieves evidence from a larger scientific corpus rather than supplying the target abstract directly.
The current evidence should also be distinguished from controlled baseline or ablation evidence. Direct factual prompting is implemented as the factual-QA stage, and both pre-filter and post-filter counterfactual artifacts are stored, but the reported results do not constitute a randomized comparison against no-SCM prompting, no-filter generation, non-causal perturbation, or RAG. We therefore do not claim superiority over those alternatives. Such comparisons are necessary to attribute gains to the SCM or filtering components rather than to the underlying LLM and are identified explicitly as an experimental limitation.
Taken together, these strands motivate four separable functions in scientific counterfactual QA: source grounding, structured extraction, intervention specification, and generation validation. The present study focuses on their composition within a document-level pipeline. It uses causal and counterfactual literature to define intervention semantics, but its empirical claims concern generated scientific-text artifacts rather than foundation-model training behavior.
3 Proposed method
Figure 1 summarizes the pipeline that is actually implemented and evaluated. The workflow starts from a scientific abstract, produces a structured extraction and a lightweight document-level SCM, generates factual QA pairs, constructs SCM-conditioned counterfactual variants, applies a consistency filter, and finally evaluates the stored artifacts using human and LLM-based validation. No model-training stage is part of the workflow.
Figure 1
3.1 Problem setting
Let denote a collection of scientific abstracts. For each abstract ai, the pipeline produces a structured representation ri containing entities, events, and relations, a lightweight SCM Gi, a set of factual QA pairs Qi, and a set of counterfactual QA pairs . The experimental objective is to characterize the faithfulness and internal consistency of these generated artifacts, not to optimize the parameters of a downstream foundation model.
The intervened variable is denoted by S for notational continuity, but in this study S is not a protected or demographic attribute. It denotes a scientific-content variable selected from the document-level SCM, for example the method, data source, intervention setting, outcome, or metric. This distinction is central to the interpretation of the results: changes in validation score under Sāsā² measure sensitivity of the generation pipeline to a scientific counterfactual, not demographic bias propagation.
We represent the document-level abstraction as a compact structural model in Equation 1
where Vi is the set of extracted scientific variables and Ei is the set of directed dependencies proposed from the extracted content. The implementation does not perform causal discovery and does not identify population-level causal effects. The SCM should therefore be interpreted as an intervention scaffold that constrains which variables may be modified and which downstream components may need to be updated.
3.2 Intervention semantics and consistency characterization
For a factual QA instance x derived from abstract a, let x(sā²) denote a counterfactual variant generated after setting one intervenable scientific variable to an alternative value sā². An admissible transformation should preserve the semantic role of the question while updating the content required by the intervention. The central empirical question is therefore whether the generated pair remains answerable, internally coherent, and compatible with the stated counterfactual scenario.
The earlier training-oriented formulation based on average causal effects and counterfactual fairness is not used here because neither an intervention distribution over protected attributes nor a trained predictor Ŷ is available. We consequently make no claim that ACES ā Ŷ is identified or reduced. Instead, the observed quantities are validation-score differences between factual and counterfactual artifacts produced by the same generation pipeline.
3.3 SCM-conditioned counterfactual generation
For each factual instance x, the generator constructs a counterfactual candidate according to Equation 2
where GLLM denotes the prompted generation backend and ā³ is the lightweight SCM induced for the same abstract. In implementation, the model is instructed to select one intervenable variable, apply a plausible change, preserve the question form as closely as possible, and update the answer consistently with that intervention.
This notation expresses a generation constraint rather than a claim of causal identification. The operator do(S = sā²) specifies the intended semantics of the prompt-level intervention, but the counterfactual text is synthesized by an LLM from the extracted document representation. The pipeline therefore tests whether an explicit structural scaffold can organize controlled rewriting; it does not establish that the generated world corresponds to the unique counterfactual implied by the real data-generating process.
3.4 Counterfactual consistency objective
No foundation model is trained from scratch or fine-tuned in this study. We retain a counterfactual consistency objective only as a conceptual design criterion for comparing factual and counterfactual validation outcomes. Let v(x)ā[0, 1] denote a normalized validation score derived from the checklist. For an admissible transformation, a desirable property is small score displacement, as expressed in Equation 3:
The quantity ācf is not minimized by gradient descent and is not part of the GPT-4.1 generation API. It is simply a compact statement of the intended invariance of validation quality under admissible content interventions. Accordingly, results based on this criterion are evidence about generation stability only and should not be interpreted as a demonstrated training-time regularization effect.
3.5 Empirical intervention sensitivity and degradation rate
We measure intervention sensitivity (IS) using the absolute difference between normalized factual and counterfactual validation scores, as defined in Equation 4:
Low IS indicates that validation quality changes little under the selected intervention, whereas high IS identifies documents for which the counterfactual transformation is less stable.
We replace the term bias propagation rate with intervention degradation rate (IDR), defined in Equation 5:
where Ī“>0 is the predefined threshold for a meaningful validation decrease. IDR is a descriptive robustness statistic. Because the experimental variables are methods, datasets, settings, outcomes, and metrics, IDR is not a fairness metric and does not estimate propagation of protected-attribute bias.
Both IS and IDR are computed from validation-derived proxies rather than independent interventional measurements. They therefore summarize how the evaluator scores paired artifacts and may reflect generation errors, evaluator sensitivity, or both. The revised manuscript uses these metrics only for within-pipeline stability analysis and avoids causal-effect language beyond the prompt-level intervention semantics.
3.6 Controlled-change constraints
Not every component of a counterfactual QA pair should remain unchanged. The selected scientific variable and its direct textual consequences are expected to differ, while the question type, the broader study context, and unrelated extracted content should remain as stable as possible. Operationally, the generator is instructed to modify one intervenable variable per QA pair and the subsequent filter removes pairs that are logically inconsistent, unanswerable, or incompatible with the intervention.
The current filter operates primarily at the pair level and does not perform iterative document-wide reconciliation across entities, events, relations, the SCM, and all QA pairs. This design choice is important for interpreting the low global-consistency result reported later. A stronger architecture would require a cross-stage consistency pass that feeds contradictions back to earlier representations; such a mechanism is not evaluated in the present experimental record and is therefore not claimed as part of the implemented method.
4 Experiments and results
4.1 Experimental setup
The source file used by the generation notebook is a Scopus CSV export (scopus_export_Jan12.csv) containing 100 records with document titles and abstracts. The export is heterogeneous rather than a single-domain benchmark; examples in the processed corpus include medical AI, industrial and manufacturing applications, robotics, and humanārobot collaboration. The generation code iterates over the export in file order without a domain-stratified sampling step. A document enters the reported validation cohort only when the pipeline produces the complete set of stored artifacts required for evaluation. Sixty-seven documents satisfy this criterion and are used in the human and automated validation analyses. Thus, the reported results are a complete-artifact cohort rather than a random 67-document subsample of the original 100 records.
For each successfully processed abstract, GPT-4.1 is prompted to generate exactly five factual QA pairs, corresponding to 335 factual QA anchors across the 67-document validation cohort. The counterfactual stage attempts one intervention-conditioned counterpart for each factual pair before filtering, so the pre-filter design likewise targets up to five counterfactual pairs per document. The final number retained for an individual document can be smaller because the filter removes logically inconsistent, unanswerable, or intervention-incompatible items. The released evaluation is organized at document and checklist-criterion level rather than as a pair-count benchmark; consequently, we report the fixed factual count and the generation rule rather than inferring an unsupported aggregate retained-pair count from document-level metrics.
Generation uses gpt-4.1 through the chat-completions interface with temperature 0.0 and a maximum of 1200 output tokens per call. The same generation backend is reused for entity/event extraction, SCM construction, factual QA generation, counterfactual QA generation, and filtering. Automated validation is performed separately with gpt-5-mini through the Responses API using a strict JSON schema and binary scores for Q1āQ15. Keeping generation and validation in separate calls allows the evaluator to inspect all stored artifacts, although both are OpenAI language models and therefore do not constitute independent model-family validation.
Three human annotators independently scored the same 67 documents on the 15 binary criteria, producing 67 Ć 15 = 1, 005 itemācriterion decisions per rater. The released annotation files identify three raters, and the agreement analysis is computed from their unadjudicated independent labels. No adjudicated gold label is used in the reported Cohen, Fleiss, or Krippendorff coefficients. Formal domain-specific qualification metadata for the annotators were not recorded as part of the released experimental protocol; accordingly, the revised manuscript refers to them as human annotators rather than assuming expert status. This is a limitation when interpreting criteria that require specialized scientific or causal judgment.
The present experimental record does not include controlled runs for no-SCM prompting, no-filter generation, non-causal counterfactual rewriting, or a retrieval-augmented baseline. Direct prompting is represented only by the factual-QA stage and is not a matched counterfactual baseline. We therefore do not attribute the observed validation profile uniquely to the SCM or filter and do not claim superiority over these alternatives. RAGAS-style retrieval metrics are not reported because the implemented system receives the target abstract directly and performs no retrieval; context precision and context recall are consequently undefined. These omissions delimit the comparative scope of the current results and motivate a dedicated component-level benchmark in follow-up work.
4.2 Generation pipeline
The complete generation procedure contained five sequential stages.
First, the abstract was converted into a structured representation containing entities, events, and explicitly stated causal or dependency relations. This stage extracted task-relevant scientific objects such as models, datasets, methods, metrics, and domains, as well as higher-level events such as evaluation, comparison, or intervention.
Second, the extracted information was used to induce a lightweight structural causal model. The model specified a set of causal nodes and directed edges connecting them, together with a subset of intervenable variables. In the implementation used in this study, the SCM was intentionally simple: it focused on document-level causal abstractions such as method, data, intervention, outcome, and metric, rather than attempting full causal discovery from text.
Third, the system generated a set of factual QA pairs directly from the abstract. The prompting strategy explicitly instructed the model to remain strictly grounded in the source text and to return questionāanswer pairs in valid JSON format. This stage provided the factual baseline from which counterfactual variants were later derived.
Fourth, the factual QA set and the SCM were jointly supplied to the model to generate counterfactual QA pairs. For each original QA pair, the model was instructed to select a single intervenable variable, apply a plausible intervention, keep the overall question structure similar, and update the answer accordingly. This design ensured that counterfactual variation was causally targeted rather than generated through arbitrary paraphrasing.
Fifth, the generated counterfactual QA pairs were passed through a filtering stage. The filter removed samples that violated logical consistency, contradicted the intervention description, or became unanswerable after modification. The purpose of this stage was to improve the reliability of the generated data before downstream evaluation.
4.3 Prompts
To reduce prompt drift () across papers and stages, all prompts were standardized and reused across the full corpus. The prompts were deliberately concise and task-specific: each prompt defined the expected information type, the output schema, and the admissibility constraints for the stage. This choice was motivated by the need to obtain machine-readable outputs while minimizing ambiguity in model behavior.
4.3.1 Entity and event extraction
System prompt
Ā Ā You extract structured scientific information.
Ā Ā Return valid JSON only.
User prompt
Ā Ā From the following scientific abstract, extract:
Ā Ā 1. Entities (models, datasets, methods,
Ā Ā metrics, domains)
Ā Ā 2. Events (training, evaluation,
Ā Ā intervention, comparison)
Ā Ā 3. Explicit causal or dependency relations
Ā Ā if stated
Ā Ā Return JSON with fields:
Ā Ā entities, events, relations
Ā Ā Abstract:
Ā Ā ~~~ < abstract>~~~
This prompt was designed to force the model into a schema-constrained information extraction regime (). The instruction to return valid JSON only was essential because the extracted representation served as input to the SCM induction stage. The entity categories were chosen to match the scientific discourse structure typically found in abstracts and to provide enough semantic granularity for downstream causal abstraction.
4.3.2 Structural causal model construction
System prompt
Ā Ā You construct simple structural causal models
Ā Ā for text data.
Ā Ā Return valid JSON only.
User prompt
Ā Ā Given the extracted entities and events
Ā Ā below, define a Structural Causal Model.
Ā Ā Requirements:
Ā Ā * Nodes correspond to variables
Ā Ā * Edges represent causal direction
Ā Ā * Mark intervenable nodes
Ā Ā Return JSON:
Ā Ā nodes, edges, intervenable_nodes
Ā Ā Input:
Ā Ā < entities_events JSON>
This prompt encouraged the model to compress the extracted document semantics into a minimal causal scaffold. The node inventory was intentionally restricted to a small number of semantically broad variables in order to improve consistency across heterogeneous scientific domains.
4.3.3 Factual questionāanswer generation
System prompt
Ā Ā You generate factual QA pairs
Ā Ā from scientific text.
Ā Ā Return valid JSON only.
User prompt
Ā Ā Generate 5 factual QA pairs
Ā Ā based strictly on the abstract.
Ā Ā Questions must be answerable
Ā Ā from the text.
Ā Ā Return:
Ā Ā question, answer
Ā Ā Abstract:
Ā Ā ~~~ < abstract>~~~
The factual QA prompt prioritized textual faithfulness over stylistic diversity and ensured that generated questions remained anchored in the source abstract.
4.3.4 Counterfactual questionāanswer generation
System prompt
Ā Ā You generate counterfactual QA pairs
Ā Ā using causal interventions.
Ā Ā Return valid JSON only.
User prompt
Ā Ā Given:
Ā Ā 1. Original QA pairs
Ā Ā 2. Structural Causal Model
Ā Ā Task:
Ā Ā * Select one intervenable variable
Ā Ā * Apply intervention
Ā Ā * Update answer
Ā Ā * Preserve question form
Ā Ā Return:
Ā Ā original_question
Ā Ā counterfactual_question
Ā Ā original_answer
Ā Ā counterfactual_answer
Ā Ā intervention
Ā Ā Original QA:
Ā Ā < qa_original JSON>
Ā Ā SCM: < scm JSON>
This was the key generative step in the pipeline. Restricting each transformation to one intervention improved interpretability and preserved pairwise comparability between factual and counterfactual examples.
4.3.5 Counterfactual filtering
System prompt
Ā Ā Validate counterfactual QA pairs.
Ā Ā Return valid JSON only.
User prompt
Ā Ā Remove pairs that are:
Ā Ā * logically inconsistent
Ā Ā * unanswerable
Ā Ā * inconsistent with intervention
Ā Ā Return retained pairs only.
Ā Ā Input:
Ā Ā < qa_counterfactual JSON>
The final filtering stage acted as internal quality control and reduced semantically inconsistent counterfactual outputs.
4.4 Generation setup and example output
The generation pipeline was designed as a multi-stage transformation process that converts a scientific abstract into a set of factual and counterfactual questionāanswer pairs. Each abstract was processed sequentially through five stages: structured extraction of entities and events, construction of a lightweight structural causal model (SCM), generation of factual QA pairs, generation of counterfactual QA pairs under explicit interventions, and final filtering of inconsistent or weak outputs. All stages used the same model backend, gpt-4.1, with deterministic decoding (temperature = 0.0) () and a maximum response length of 1,200 tokens. This configuration was selected to prioritize output stability and schema consistency over stylistic diversity, since the pipeline required machine-readable JSON objects that could be reused in downstream stages without manual correction.
The prompting strategy remained deliberately constrained throughout the pipeline. At each stage, the model was instructed to produce only the information relevant to that specific transformation step and to return valid JSON without additional explanation. Such a design choice reduced prompt drift across documents and made the generation procedure easier to reproduce. The factual QA stage was explicitly grounded in the source abstract, whereas the counterfactual stage was conditioned jointly on the factual QA set and the induced SCM, which served as a minimal representation of intervenable variables and causal dependencies. The final filtering stage functioned as an internal quality-control mechanism, retaining only those counterfactual QA pairs that remained logically coherent, answerable, and aligned with the stated intervention.
For each abstract, the system stored a compact chain of intermediate artifacts, including the original abstract, the extracted entities and events, the induced SCM, the factual QA set, the generated counterfactual QA set, and the final filtered outputs. In practice, these artifacts were used primarily for traceability and debugging rather than as end results. Their main value lies in making the generation process inspectable: if a final counterfactual pair is problematic, it is possible to determine whether the error originated in extraction, causal abstraction, factual grounding, intervention choice, or semantic validation.
To illustrate the behavior of the pipeline, consider an abstract describing the use of LLMs for interpreting neuropsychological test results in patients undergoing brain tumor surgery (). From this abstract, the extraction stage identified the principal scientific entities, including the evaluated models [ChatGPT (), Copilot (), and Perplexity ()], the study cohort of 20 patients, the assessment setting of neuropsychological testing before surgery, and the main evaluation criteria, namely readability, understandability, explanatory accuracy, and patient-rated usefulness. The same stage also identified key events such as comparative evaluation of the three models and the assessment of explanation quality. This information was then compressed into a lightweight SCM in which upstream variables represented the method and intervention choices, downstream variables represented the generated explanations and their measured quality, and the final node captured the broader clinical impact in terms of support for multidisciplinary care and patient communication.
The factual QA generation stage then produced a small set of grounded questionāanswer pairs directly supported by the abstract. These questions targeted stable, explicitly stated information rather than speculative interpretation. A representative example is shown in Box below. The example illustrates the intended role of the factual stage: to create semantically clear anchor items that can later be modified under controlled interventions.
Example of a factual questionāanswer pair
Question: Which three large language models were evaluated in the study?
Answer: The three large language models evaluated were
ChatGPT, Copilot, and Perplexity.
This type of output is useful because it is directly grounded in the source abstract, has a unique answer, and clearly refers to a variable that can later be manipulated counterfactually. In other words, the factual pair is not only informative on its own, but also structurally suitable for intervention-based rewriting.
The counterfactual generation stage transformed such factual items into intervention-aware variants. Importantly, the transformation was not intended to produce arbitrary hypothetical questions, but to preserve the semantic function of the original QA pair while changing one selected variable in accordance with the SCM. A representative example is shown in Box below:
Example of a counterfactual questionāanswer pair.
Original question: Which three large language models were evaluated in the study?
Counterfactual question: Which three large language models would have been evaluated if the study had used ChatGPT, Gemini, and Llama 2?
Original answer: The three large language models evaluated were ChatGPT, Copilot, and Perplexity.
Counterfactual answer: The three large language models evaluated would have been ChatGPT, Gemini, and Llama 2.Intervention: Set the method variable to use ChatGPT, Gemini, and Llama 2 as the evaluated models.
This example shows several desirable properties of the generated output. First, the counterfactual question remains tightly coupled to the original factual question, which preserves comparability between the two items. Second, the intervention is explicit rather than implicit, making the source of the counterfactual change transparent. Third, the answer is updated in a way that is locally consistent with the intervention and does not require introducing unrelated modifications to the rest of the scientific context. As a result, the pair approximates a controlled causal rewrite rather than a free-form paraphrase.
The same pattern was observed for other generated items. For instance, questions concerning the study cohort could be transformed by changing the assumed dataset size, while conclusion-oriented questions could be rewritten by modifying the quality of the generated explanations and propagating this change to the inferred study conclusion. These cases are particularly informative because they show that the pipeline can handle both simple factual substitutions and more abstract intervention-to-outcome transformations. In the former case, the modification affects a concrete variable such as the set of evaluated models or the number of included patients. In the latter case, it affects the semantic interpretation of the study outcome, for example by changing whether the generated explanations are accurate and understandable or clinically limited and unreliable.
4.5 Validation protocol and evaluation
4.5.1 Human annotation protocol
To assess the quality of the generated artifacts, the same 67 complete documents were scored independently by three human annotators using a checklist of 15 binary criteria covering entity extraction, event identification, relation construction, factual QA, counterfactual QA, and global consistency. Each rater received the document-level artifacts required to apply the checklist. The raw independent scores, rather than an adjudicated consensus label, are retained for inter-rater reliability analysis.
The checklist separates error sources that can arise at different stages, including hallucinated or missing entities, unsupported relations, incorrect factual grounding, and logically inconsistent counterfactual transformations. Criteria are evaluated independently as 0/1 decisions. Because formal annotator-qualification metadata and a separate adjudication phase were not part of the released protocol, agreement statistics are interpreted as reliability among the participating human raters rather than as agreement against a domain-expert gold standard.
Validation checklist (15 criteria).
Entities: Q1 all extracted entities are explicitly present in the source text; Q2 no hallucinated entities are introduced; Q3 entity categories are assigned correctly; Q4 no important entities are missing.
Events: Q5 all extracted events have direct textual support; Q6 event descriptions do not contain additional information; Q7 no key events are missing.
Relations: Q8 all relations are supported by the text; Q9 no speculative or inferred relations are introduced.
Original question answering: Q10 each question has a uniquely identifiable answer; Q11 answers are factually correct; Q12 answers contain no extraneous information.
Counterfactual question answering: Q13 counterfactual questions are properly linked to original ones; Q14 counterfactual answers are logically consistent.
Global consistency: Q15 the entire pipeline output is internally consistent.
4.5.2 Inter-rater agreement metrics
To assess the reliability of human annotations, we employed multiple agreement metrics that quantify consistency across annotators beyond chance level. Let N denote the number of evaluated items, K the number of categories (in our case K = 2 for binary scoring), and n the number of annotators.
For pairwise agreement between two annotators, we use Cohen's kappa (), defined in Equation 6:
where po is the observed agreement in Equation 7:
and pe is the expected agreement under independence in Equation 8:
with denoting the empirical probability that annotator j assigns label k.
To measure agreement across multiple annotators, we use Fleiss' kappa (), defined in Equation 9:
where the observed agreement is defined in Equation 10:
and nik denotes the number of annotators who assigned category k to item i. The expected agreement is given by Equation 11:
where pk is the overall proportion of assignments to category k across all items.
As a more general reliability measure, we compute Krippendorff's alpha (), defined in Equation 12:
where Do is the observed disagreement and De is the expected disagreement under chance. For nominal data, the observed disagreement is given by Equation 13:
and De is computed analogously using global category frequencies.
All agreement coefficients were interpreted according to standard guidelines, where values in the range [0.41, 0.60] indicate moderate agreement, [0.61, 0.80] substantial agreement, and values above 0.80 near-perfect agreement.
4.5.3 LLM-based validation
In addition to human evaluation, we applied an automated validation procedure with gpt-5-mini under the same 15-criterion checklist. The validator was called through the Responses application programming interface (API) with a strict JavaScript Object Notation (JSON) schema requiring a binary score and a concise evidence-based comment for every criterion.
For each document, the validator received the source abstract, extracted entities/events, the induced SCM, the factual QA set, the pre-filter counterfactual QA set, the filtered counterfactual QA set, and a log excerpt. Its prompt explicitly instructed it to treat the abstract as the primary evidence source and to assign 0 when evidence was unclear. This conservative rule is relevant when interpreting low scores on holistic criteria.
LLM-based validation uses the same entity, event, relation, factual-QA, counterfactual-QA, and global-consistency decomposition as the human checklist, enabling criterion-level comparison. Because generation uses GPT-4.1 and automated validation uses GPT-5-mini, the validator is a distinct model invocation but not an independent model family; the human comparison therefore remains important for assessing evaluator-specific behavior.
4.5.4 Comparison of human and LLM-based validation
To assess whether automated validation can approximate human judgment, we compare human annotations and LLM-based scores across all 15 validation criteria. Figure 2 summarizes agreement patterns at three levels: agreement among human annotators, pairwise consistency between annotators, and alignment between human and LLM-based validation.
Figure 2
4.5.4.1 Overall agreement
Agreement between human annotators was moderate, with a mean pairwise Cohen's kappa () of approximately 0.54, consistent with the global agreement trends observed across criteria. At the pairwise level, the strongest agreement was observed between one annotator pair with Īŗ = 0.68, followed by a moderate pair with Īŗ = 0.54, while the weakest pair achieved Īŗ = 0.38, indicating that some criteria admit broader interpretive variability than others. Figure 2b makes this asymmetry explicit and shows that disagreement is not uniformly distributed across annotators.
When comparing human annotations to LLM-based validation, agreement becomes criterion-dependent rather than uniform. As shown in Figure 2c, the model tracks human judgments more closely on criteria with strong textual grounding, while its alignment weakens on criteria that require broader semantic or causal interpretation. This supports the view that automated validation can approximate human judgment, but does so more reliably for structurally explicit aspects of the pipeline than for globally interpretive ones.
4.5.4.2 Per-criterion analysis
Agreement varies substantially across validation criteria. Figure 2a shows that inter-rater agreement is uneven across Q1āQ15, confirming that the checklist does not behave as a uniformly easy annotation task. In particular, criteria linked to explicit grounding and factual correctness tend to be more stable, whereas criteria related to omissions, event completeness, counterfactual consistency, and end-to-end coherence are more variable. This pattern is expected: validation is easier when the criterion can be checked directly against the abstract, and harder when it involves causal plausibility, semantic preservation, or judgment about whether a generated counterfactual remains scientifically acceptable.
The same tendency appears in the LLM-based evaluation profile. As shown in Figure 3a, the automated validator assigns the highest mean scores to original QA (0.97) and relations (0.89), followed by counterfactual QA (0.85), while entities (0.68) and events (0.60) are more error-prone. The most difficult dimension is global consistency, which receives a mean score of only 0.07. The magnitude of this gap means that local correctness cannot be used as a proxy for document-level reliability.
Figure 3
Inspection of the implemented workflow suggests three concrete architectural sources for this behavior. First, extraction, SCM induction, factual QA generation, counterfactual rewriting, and filtering are separate LLM calls, so an early omission can survive even when a later artifact is locally valid. Second, the SCM deliberately compresses the abstract into broad variables such as method, data, outcome, and metric, which can discard dependencies needed to reconcile all generated statements. Third, the final filter is targeted at counterfactual-pair validity and does not jointly regenerate the entity/event representation, SCM, and QA sets when a document-level contradiction is detected. These mechanisms explain how Q10āQ14 can score highly while Q15 fails, although the current experiment does not isolate their individual causal contribution through ablation.
A more fine-grained picture is provided by the criterion-wise pass rates in Figure 3b. The highest pass rates are observed for Q10āQ13, all at or near 0.97, and Q1, Q2, and Q8 are also comparatively high. In contrast, completeness-related Q4 and Q7 are lower, and Q15 is especially weak at 0.07. We therefore interpret the pipeline as locally reliable on many answerability and grounding checks but not as globally coherent across stages.
4.5.4.3 Systematic differences
The comparison between human and automated validation suggests a systematic difference in evaluation style. Human annotators appear more tolerant of borderline cases when the generated output remains broadly interpretable, whereas the LLM-based validator behaves more conservatively whenever the link between the source abstract and the generated artifact is not explicit. This is especially visible in the lower alignment for criteria that require judgment about semantic sufficiency rather than simple factual correctness. In other words, the model is relatively strong at detecting local factual support, but stricter than humans when evaluating holistic coherence and counterfactual acceptability.
4.5.4.4 Distributional validation and intervention-related effects
Beyond criterion-level agreement, Figure 3c shows the distribution of per-document mean validation scores. Intervention sensitivity is shown separately in Figure 4a, while Figure 4b reports IDR. In the 67-document cohort, 50 documents (74.6%) do not cross the degradation threshold and 17 (25.4%) do. This result indicates that a minority of documents receive a materially lower counterfactual validation proxy after intervention; it does not establish propagation of social or demographic bias.
Figure 4
5 Discussion
The dominant empirical pattern is a sharp separation between local and global consistency. Original QA obtains a mean automated score of 0.97 and counterfactual QA 0.85, yet the global-consistency criterion is only 0.07. This is not a small residual error: it shows that a document can contain individually acceptable extraction or QA artifacts that do not jointly form a coherent representation. Accordingly, downstream use of the generated data should not assume that passing local checks guarantees document-level validity.
The pipeline architecture provides a plausible explanation for the discrepancy. Each stage is generated in a separate call, and downstream stages consume only selected upstream artifacts. The lightweight SCM further compresses scientific content into a small set of broad variables. Finally, the filtering prompt checks whether counterfactual pairs are logically consistent, answerable, and compatible with the intervention, but it does not enforce a document-wide fixed point across extraction, SCM, factual QA, and counterfactual QA. These design choices create opportunities for omissions or reinterpretations to accumulate across stages. Because no cross-stage reconciliation ablation was run, these mechanisms should be read as implementation-grounded explanations rather than experimentally isolated causes.
Inter-rater analysis provides context for the checklist itself. Three annotators each scored 67 documents across 15 criteria, producing 1,005 aligned decisions per rater. Mean pairwise Cohen's kappa is approximately 0.54, with pairwise values of approximately 0.68, 0.54, and 0.38. The spread indicates that criteria requiring completeness, causal interpretation, or holistic counterfactual judgment are less straightforward than direct textual checks. The absence of recorded formal expertise metadata and a separate adjudicated gold standard limits how strongly the human labels can be treated as authoritative ground truth.
The intervention analysis should likewise be interpreted conservatively. IS measures the magnitude of a validation-score change and IDR records whether the counterfactual proxy decreases beyond a threshold. Because the intervened variables are scientific-content variables rather than protected attributes, these quantities are robustness descriptors, not fairness or bias-propagation measures. Moreover, both factual and counterfactual values are derived from the same validation framework, so score differences may combine generation instability with evaluator sensitivity.
The current study does not establish which component is responsible for the observed quality profile. No matched experiments remove the SCM, remove filtering, replace SCM-conditioned rewriting with non-causal rewriting, or add retrieval. As a result, the reported numbers characterize the implemented end-to-end pipeline but cannot be used to claim that the SCM improves over direct prompting or that filtering improves over unfiltered generation. A stronger comparative study should hold the generation model and source abstracts fixed while varying these components and should report both local QA metrics and Q15-style document consistency.
RAG-based comparison is also conditional on task definition. In the present protocol, the source abstract is supplied directly, so there is no retrieval error to measure and RAG-specific context precision/recall are not applicable. If the task is extended to scientific-literature QA over a multi-document collection, retrieval-based baselines and RAGAS-style evidence metrics would become appropriate and would separate retrieval failures from answer-generation failures.
The low global-consistency score also identifies the most important technical extension. A future version should add an explicit cross-stage reconciliation step that jointly checks the extracted entities/events, SCM edges, factual answers, and counterfactual consequences before accepting a document. Such a step could return detected contradictions to the relevant earlier stage for regeneration. This mechanism is motivated directly by the current failure pattern, but it has not been evaluated here; the present paper therefore treats global coherence as an unresolved limitation rather than claiming that it has already been fixed.
Within these limits, the experiments support a narrower conclusion than the original framing: an SCM-conditioned LLM pipeline can generate many locally valid factual and counterfactual scientific QA artifacts and can be audited at a fine-grained criterion level, but local validity does not imply globally coherent document representations. The contribution is consequently an implemented generation-and-validation study, not evidence of training-time foundation-model debiasing.
6 Conclusions
This work evaluated an LLM-based pipeline for structured scientific-text processing and SCM-conditioned factual/counterfactual QA generation. The implemented system extracts document structure, induces a lightweight intervention scaffold, generates five factual QA anchors per abstract, constructs counterfactual counterparts, filters inconsistent outputs, and evaluates the resulting artifacts with three human annotators and GPT-5-mini.
The results characterize generation quality and intervention stability rather than foundation-model fairness. Original QA and relation-level validation are high, whereas 25.4% of documents cross the intervention-degradation threshold. Because interventions operate on scientific variables such as methods, data, and evaluation settings, this quantity is reported as IDR rather than bias propagation rate.
The strongest limitation is document-level consistency: Q15 averages only 0.07 despite much higher local QA scores. This gap indicates that independent stage-wise generation can preserve answerability while losing dependencies across extraction, causal abstraction, and rewriting. The current results therefore support the use of criterion-level auditing but not the assumption that locally valid artifacts are globally coherent.
No foundation model is trained or fine-tuned in the reported experiments, the conceptual consistency objective is not optimized as a loss, and no controlled no-SCM, no-filter, RAG, or non-causal baseline is available. Accordingly, the revised paper makes no claim of training-time counterfactual augmentation benefit, reduced causal effects, or bias mitigation. Future comparative work should isolate these components and evaluate an explicit cross-stage reconciliation mechanism before stronger causal or robustness claims are made.
Statements
Data availability statement
The original contributions presented in the study are included in the repository https://github.com/cataug/CFA.
Author contributions
IM: Conceptualization, Data curation, Software, Writing ā original draft. DM: Supervision, Visualization, Writing ā original draft. VT: Conceptualization, Methodology, Project administration, Supervision, Writing ā original draft, Writing ā review & editing. AG: Conceptualization, Formal analysis, Validation, Writing ā review & editing. VN: Conceptualization, Project administration, Resources, Supervision, Writing ā review & editing. AB: Formal analysis, Investigation, Project administration, Resources, Supervision, Writing ā review & editing.
Funding
The author(s) declared that financial support was not received for this work and/or its publication.
Conflict of interest
The author(s) declared that this work was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
Generative AI statement
The author(s) declared that Generative AI was not used in the creation of this manuscript.
Any alternative text (alt text) provided alongside figures in this article has been generated by Frontiers with the support of artificial intelligence and reasonable efforts have been made to ensure accuracy, including review by the authors wherever possible. If you identify any issues, please contact us.
Publisherās note
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.
References
1
AbdelnabiS.FayA.CherubinG.SalemA.FritzM.PaverdA. (2025). āGet my drift? Catching LLM task drift with activation deltas,ā in 2025 IEEE conference on secure and trustworthy machine learning (SaTML), (Piscataway, NJ: IEEE), 43ā67. doi: 10.1109/SaTML64287.2025.00011
2
AlawwadH. A.AlhothaliA.NaseemU.AlkhathlanA.JamalA. (2025). Enhancing textual textbook question answering with large language models and retrieval augmented generation. Pattern Recognit. 162:111332. doi: 10.1016/j.patcog.2024.111332
3
AmeperosaE.CollinsJ. A.JainM.GargA. (2025). āRocoda: counterfactual data augmentation for data-efficient robot learning from demonstrations,ā in 2025 IEEE international conference on robotics and automation (ICRA), (Piscataway, NJ: IEEE), 13250ā13256. doi: 10.1109/ICRA55743.2025.11128694
4
BalepurN.GuF.RavichanderA.FengS.Boyd-GraberJ. L.RudingerR. (2025). āReverse question answering: can an LLM write a question so hard (or bad) that it can't answer?ā in Proceedings of the 2025 conference of the nations of the Americas chapter of the association for computational linguistics: human language technologies (volume 2: short papers) (Kerrville, TX: Association for Computational Linguistics), 44ā64. doi: 10.18653/v1/2025.naacl-short.5
5
Ben-DavidA. (2008). Comparison of classification accuracy using Cohen's weighted kappa. Expert Syst. Appl. 34, 825ā832. doi: 10.1016/j.eswa.2006.10.022
6
FaloticoR.QuattoP. (2015). Fleiss' kappa statistic without paradoxes. Qual. Quant. 49, 463ā470. doi: 10.1007/s11135-014-0003-1
7
HayesA. F.KrippendorffK. (2007). Answering the call for a standard reliability measure for coding data. Commun. Methods Meas. 1, 77ā89. doi: 10.1080/19312450709336664
8
JiaoY.OuyangS.ZhongM.ZhangY.DingL.ZhouS.et al. (2025). āRetrieval and structuring augmented generation with LLMs for web applications,ā in Companion proceedings of the ACM on web conference 2025 (New York, NY: Association for Computing Machinery), 25ā28. doi: 10.1145/3701716.3715870
9
KicimanE.NessR. O.SharmaA.TanC. (2024). Causal reasoning and large language models: opening a new frontier for causality. Trans. Mach. Learn. Res. 2024, 1ā35.
10
KocicV.LukaÄN.RozajacD.SchwengS.GollobC.NothdurftA.et al. (2025). LLM in the loop: a framework for contextualizing counterfactual segment perturbations in point clouds. IEEE Access13, 85507ā85525. doi: 10.1109/ACCESS.2025.3568052
11
LeeJ.LeeE. J.KimY. I.LimS.-H.AhnS. (2026). Evaluating AI chatbots in neurological function test interpretation for brain tumor surgery. Neurosurg. Rev. 49:83. doi: 10.1007/s10143-025-03995-z
12
LiuX.ChenX. (2026). Who decides: the consumer or the retailer? An LLM-assisted bayesian framework for modeling purchase decisions with retailer influence. J. Retail. Consum. Serv. 89:104645. doi: 10.1016/j.jretconser.2025.104645
13
PlylerM.ChiM. (2025). Iterative counterfactual data augmentation. Proc. AAAI Conf. Artif. Intell. 39, 19931ā19938. doi: 10.1609/aaai.v39i19.34195
14
RahmanA.YuA.ChoK. (2026). Game knowledge management system: schema-governed LLM pipeline for executable narrative generation in RPGs. Systems14:175. doi: 10.3390/systems14020175
15
RenzeM. (2024). āThe effect of sampling temperature on problem solving in large language models,ā in Findings of the association for computational linguistics: EMNLP 2024 (Kerrville, TX: Association for Computational Linguistics), 7346ā7356. doi: 10.18653/v1/2024.findings-emnlp.432
16
RossettiniG.BargeriS.CookC.GuidaS.PaleseA.RodeghieroL.et al. (2025). Accuracy of chatgpt-3.5, chatgpt-4o, copilot, gemini, claude, and perplexity in advising on lumbosacral radicular pain against clinical practice guidelines: cross-sectional study. Front Digit Health7:1574287. doi: 10.3389/fdgth.2025.1574287
17
ThonglekK.WisitkatanyuchaiS. (2025). āGenerating question-answer pairs for interviewing software engineering using LLMs,ā in 2025 3rd international conference on foundation and large language models (FLLM), (Piscataway, NJ: IEEE), 313ā320. doi: 10.1109/FLLM67465.2025.11391101
18
WangJ.YangY.XiaB. (2019). A simplified cohen's kappa for use in binary classification data annotation tasks. IEEE Access7, 164386ā164397. doi: 10.1109/ACCESS.2019.2953104
19
XieZ.NiuF.DaiG.ZhangB. (2025). From claims to stance: zero-shot detection with pragmatic-aware multi-agent reasoning. Electronics14:4298. doi: 10.3390/electronics14214298
20
XuW.PakhomovS.HeagertyP.HorvitzE.BradleyE. R.WoolleyJ.et al. (2025). Perplexity and proximity: large language model perplexity complements semantic distance metrics for the detection of incoherent speech. J. Biomed. Inform. 170:104899. doi: 10.1016/j.jbi.2025.104899
21
YangH.LiM.ZhouH.XiaoY.FangQ.ZhouS.et al. (2025). Large language model synergy for ensemble learning in medical question answering: design and evaluation study. J. Med. Internet Res. 27:e70080. doi: 10.2196/70080
22
YuY.SugiyamaK.JatowtA. (2025). Domain counterfactual data augmentation for explainable recommendation. ACM Trans. Inf. Syst. 43, 1ā30. doi: 10.1145/3711856
23
ZhaoF.-F.HeH.-J.LiangJ.-J.CenJ.WangY.LinH.et al. (2025). Benchmarking the performance of large language models in uveitis: a comparative analysis of chatgpt-3.5, chatgpt-4.0, google gemini, and anthropic claude3. Eye. 39, 1132ā1137. doi: 10.1038/s41433-024-03545-9
24
ZhuY.YuanH.WangS.LiuJ.LiuW.DengC.et al. (2025). Large language models for information retrieval: a survey. ACM Trans. Inf. Syst. 44, 1ā54. doi: 10.1145/3748304
Summary
Keywords
automatic validation, counterfactual question answering, large language models, scientific-text processing, structural causal models
Citation
Malashin IP, Martysyuk DA, Tynchenko VS, Gantimurov AP, Nelyub VA and Borodulin AS (2026) Structurally conditioned counterfactual generation and validation for question answering from scientific text. Front. Comput. Sci. 8:1915137. doi: 10.3389/fcomp.2026.1915137
Received
21 June 2026
Revised
20 August 2026
Accepted
16 September 2026
Published
21 October 2026
Volume
8 - 2026
Edited by
Martina Iammarino, Pegaso University, Italy
Reviewed by
Shelby Solomon Darnell, Strathmore University, Kenya
Moritz Platt, King's College London, United Kingdom
Updates
Copyright
Ā© 2026 Malashin, Martysyuk, Tynchenko, Gantimurov, Nelyub and Borodulin.
This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.
*Correspondence: Ivan P. Malashin, ivan.p.malashin@gmail.com; Vadim S. Tynchenko, vadimond@mail.ru
Disclaimer
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.