Generalization of RLVR Using Causal Reasoning as a Testbed
Reinforcement learning with verifiable rewards (RLVR) has emerged as a promising paradigm for post-training large language models (LLMs) on complex reasoning tasks. Yet, the conditions under which RLVR yields robust generalization remain underexplored. This paper provides an empirical study of RLVR generalization in the setting of probabilistic inference over causal graphical models. This setting offers two natural axes along which to examine generalization: (i) the level of the probabilistic query—associational, interventional, or counterfactual—and (ii) the structural complexity of the query, measured by the size of its relevant subgraph. We construct a dataset of causal graphs and queries spanning these difficulty axes and fine-tune Qwen-2.5-Instruct models using RLVR or supervised fine-tuning (SFT). We vary both the model scale (3B-32B) and the query level included in training. We find that RLVR yields stronger within-level and acrosslevel generalization than SFT, but only for specific combinations of model size and training query level. Further analysis shows that RLVR’s effectiveness depends on the model’s initial reasoning competence. With sufficient initial competence, RLVR improves an LLM’s marginalization strategy and reduces errors in intermediate probability calculations, producing substantial accuracy gains, particularly on more complex queries. These results show that RLVR can improve specific causal reasoning subskills, with its benefits emerging only when the model has sufficient initial competence. Our code and data is available at https://github.com/zhichul/rlcausal.
Introduction. Reinforcement learning with verifiable rewards (RLVR) (Lambert et al., 2025; DeepSeek-AI et al., 2025) is a promising paradigm for post-training large language models (LLMs) on complex reasoning tasks. RLVR leverages automatic correctness signals from domains equipped with reliable verifiers, and has enabled substantial progress in mathematical problem solving (Shao et al., 2024; Lambert et al., 2025; DeepSeek-AI et al., 2025), formal theorem proving (Xin et al., 2024; Ren et al., 2025; Wang et al., 2025), code generation (Le et al., 2022; Liu & Zhang, 2025), and in biomedical and chemistry applications (Biomni & Sky RL, 2025; Narayanan et al., 2025). Despite rapid progress across diverse domains, the conditions under which LLMs trained with RLVR exhibit reliable generalization beyond their training data remain underexplored.
Recent work has begun to examine the generalization behavior of reinforcement-learning fine-tuning (RL) relative to supervised fine-tuning (SFT) or hybrid approaches (Chu et al., 2025; Chen et al., 2025; Swamy et al., 2025; Qiu et al., 2025). Particularly relevant is Chu et al. (2025), which evaluates the generalization of RLVR and SFT on novel variants of text and visual reasoning tasks. Our work differs from these prior work by focusing on a challenging and essential task: causal inference.
Causal inference provides a structured setting for examining RLVR generalization, because its three levels of inference—associational, interventional, and counterfactual, known collectively as the causal ladder (Bareinboim et al., 2022; Pearl & Mackenzie, 2018)—form a hierarchy that supports both within- and across-level generalization tests. CLadder (Jin et al., 2023) covers this hierarchy and serves as a holistic causal inference benchmark, requiring models to interpret natural language scenarios, identify query types, and formalize causal expressions, in addition to performing the derivation and calculation needed to answer the query. In our setting, we focus on the derivation and calculation, which require more steps on larger and more interconnected graphs, making them useful for probing how LLMs fine-tuned with RLVR perform as required number of reasoning steps increases. We therefore construct our own dataset, RLCausal, whose questions are about fully specified causal graphs instead of natural language scenarios. We also vary the graph structure, extending beyond CLadder’s manually curated topologies to larger, randomly generated 10-node graphs.
Our task is illustrated in fig. 1 top. Concretely, the input x contains a description of a causal graph and a query. For RLVR, the LLM outputs intermediate reasoning steps followed by a probability distribution ˆp as the final answer.1 For SFT, the LLM directly outputs the distribution ˆp.2 We define processes for sampling instances of our task, and compute for each instance a reference answer p⋆ via variable elimination (Zhang & Poole, 1994).
We then run RLVR and SFT fine-tuning experiments starting from a representative LLM family, Qwen2.5-Instruct (Qwen et al., 2025), varying model size and the level of query seen during training. Our RLVR training uses variants of GRPO (Shao et al., 2024) and DAPO (Yu et al., 2025b), and our SFT baseline is trained to maximize the probability of p⋆conditioned on task input x.
We present the following findings from our experiments and analysis:
- Within- and Across-level Generalization When trained and evaluated on the same query level, RLVR achieves stronger generalization than SFT on association and intervention queries for models ≥7B, but under-performs on 3B (for all levels) and counterfactual level (for all sizes); When measuring generalization to a different query level from training, RLVR outperforms SFT on sizes ≥7B (figs. 3 and 4). RLVR is often more precise than SFT and better on more complex queries (fig. 6). 2. Scaling and LLM’s Reasoning Prior We trace the effectiveness of RLVR partly back to the strength of the LLM reasoning competence prior to fine-tuning. Scaling up the size of the LLM improves reasoning significantly: 3B models fail to reason before and after RLVR, while an 32B model prompted to reason zero-shot beats a 32B model that is fine-tuned but predicts the answer directly (fig. 4 bottom). 3. RLVR improves marginalization strategy and reduces derivation and calculation errors. Overall, when there is sufficient initial reasoning competence, RLVR shifts the marginalization strategy of LLMs towards incremental marginalization (fig. 5 top), reduces abstract probability/causal derivation errors (e.g. dropping dependencies, confusing intervention with observation) (fig. 5 bottom) as well as calculation errors (fig. 27).
Overall, our findings contribute to the understanding of RLVR’s generalization behavior as well as its effectiveness on enhancing LLMs’ reasoning capabilities on formal causal reasoning tasks.
Related work. RLVR for LLM Post-Training Reinforcement learning is becoming a common step of LLM post-training. Early works use RL to align LLMs using human preference data (Ouyang et al., 2022). Reinforcement learning with verifiable rewards (RLVR) (Lambert et al., 2025; DeepSeek- AI et al., 2025) teach reasoning on domains where reward (often a combination of correctness and format) can be verified automatically. This led to significant progress in domains such as math problem solving theorem proving, and code generation (DeepSeek-AI et al., 2025; Ren et al., 2025; Liu & Zhang, 2025). In this paper, we attempt to understand the successes and limitations of RLVR’s generalization, using a controlled family of causal reasoning tasks.
Understanding RLVR’s Generalization Several recent studies explored the respective contribution of SFT and RL to the generalization of the resulting LLM (Chu et al., 2025; Chen et al., 2025; Swamy et al., 2025), with evidence that SFT is useful for warm-starting, while RL can significantly improve generalization. Another line of work investigates how SFT and RL should be ordered or combined to achieve the best generalization result (Liu et al., 2025b; Qiu et al., 2025). Swamy et al. (2025) and Qin et al. (2025) study the sources of RLVR’s effectiveness and where it improves models, and Yue et al. (2025); Sun et al. (2025); Liu et al. (2025a) and Wu & Choi (2025) study changes on the generalization boundary of LLMs fine-tuned with RLVR. Similar to the earlier works, we investigate generalization of RLVR and SFT, and similar to the latter works, we focus on understanding the limits and the sources of RL’s effectiveness itself. Different from these works, we focus on the causal reasoning domain, a less explored but important area that remains challenging.
LLM for Causal Reasoning LLMs’ understanding of causality has been receiving increasing interest (Yu et al., 2025a), as LLMs make their way into domains like medicine and law where causal reasoning is essential. One line of work investigates the real world causal knowledge and reasoning of pretrained LLMs (Kıcıman et al., 2024; Zeˇcevi ́c et al., 2023; Chi et al., 2024). These benchmarks are valuable for assessing whether LLMs encode plausible causal facts about the world, but they are less suited for probing RLVR, which focuses more on step-by-step reasoning over such facts to draw new conclusions, a separate skill from memorization of the facts or conclusions. A line of datasets that focus more on formal causal reasoning capabilities include CLadder, Corr2Cause, and Carl-gt (Jin et al., 2023; 2024; Tu et al., 2024).
Method. We are interested in studying the limits of generalization of RLVR using the task of probabilistic inference in causal graphical models. In this section, we discuss the task definition (section 2.1), training objectives (section 2.2), and the main factors we will vary in our experiments (section 2.3).
Please refer to fig. 1 (top) for an illustration of the task input and output.
Input We use Qwen2.5-Instruct (Qwen et al., 2025) as our base model. The input x for our task consists of a system message xsys containing short instructions for task and format (fig. 8, appendix) and a user message xuser describing a concrete task instance (fig. 13, appendix), including a description of the causal graphical model and a query. The description of the causal graph includes variable definitions, the graph structure, and mechanism parametrizations.
Output For RLVR, the output y is a reasoning chain followed by a probability distribution. For SFT, the output y is directly a probability distribution. See fig. 1 (top) for an illustration of the task for RLVR. We perform extraction of the answer ˆpy from y using regular expression. Each training instance x comes with a reference answer p⋆ x.
Reinforcement Learning with Verifiable Rewards We optimize the RL objective Ex∼T Ey∼pθ(x) [r(y)], where T is the distribution over training instances. Following typical RLVR setups (DeepSeek-AI et al., 2025), we use a combination of format and accuracy reward, specifically r(y) = 0.8 · rans(ˆpy, p⋆ x) + 0.2 · rformat(y), where Supervised Fine-tuning For our supervised fine-tuning baseline, we directly maximize the conditional likelihood of the reference answer y⋆ x for input x, Ex∼D log pθ(y⋆ x | x).
Data Setup We stratify the task instances across two axes of difficulty: first, by the query’s level (association, intervention, or counterfactual), and second, by the complexity of the query as measured by its relevant subgraph.4 We vary the source of the training data between individual levels to measure across-level generalization, and breakdown within-level generalization by complexity.
Fine-tuning Setup We vary the model size between 3B, 7B, and 32B within the Qwen2.5-Instruct family, using variants of GRPO (Shao et al., 2024) and DAPO (Yu et al., 2025b) for RL, and maximum likelihood of p⋆conditioned on x for SFT.
In fig. 1 (bottom left) we provide a diagram for the generative process of synthesizing data for our task. We first describe the objects that we sample, then the step by step process for sampling them.
Structural Causal Models We use structural causal models (SCMs) (Pearl et al., 2016) with binary variables,5 no cycles, and independent noise variables as our causal graphical model family. Such a structural causal model M = (G, F, Q) is defined by a DAG G = (V, E), where each node i ∈V is associated with a variable vi and a deterministic function fi ∈F that defines its relationship with its parents pa(vi) and a noise variable ui following distribution qi ∈Q. This gives Queries fig. 2 illustrates queries of each level and their graph modifications. Following notation in Pearl et al. (2016), an association level query p(vi | vj = vj) concerns statistical dependence, asking about the distribution of vi given an observed value vj = vj. An intervention level query p(vi(vj=c)) concerns causal effects, asking about the distribution of vi under an external intervention that sets vj to c. A counterfactual level query p(vi(vj=c) | vk = vk) concerns hypothetical alternatives, asking about the distribution of vi had vj been set to c, in a world where we in fact observed vk = vk.6 Difficulty Metric We first stratify queries by their level, as they represent different modes of reasoning. In our setting where we provide the fully parametrized SCM as input, association queries of the form p(vi | vj = vj) requires abduction (summing out ancestors in the posterior), intervention queries of the form p(vi(vj=c)) requires deduction (sum out ancestors after fixing vj), and counterfactual requires abduction followed by deduction (infer posterior of noise variables, then sum out noise variables and ancestors in an alternative world after fixing vj).
Discussion. Overall, these findings suggest that RLVR is sensitive to the LLM’s reasoning success rate prior to fine-tuning, echoing the cold start problem (DeepSeek-AI et al., 2025) in RLVR post-training. Since we start from Qwen2.5-Instruct (Qwen et al., 2025), which is already instruction-tuned and has some reasoning-tuning too, the limitations seen here is likely more specific to the causal domain.
Analysis-II: LLM’s success rate prior to fine-tuning improves with scale and especially with reasoning. The prior is a major source of RLVR’s effectiveness. In fig. 4 (bottom), we show the initial accuracy of LLMs prompted to reason (used in RLVR) versus LLMs prompted to directly predict the answer (used in SFT). Across all levels, both the reasoning prompt and the direct prediction prompt’s accuracy prior to fine-tuning increases substantially with scale, but reasoning benefits more from scaling. Furthermore, the reasoning prompt prior to fine-tuning achieves a higher accuracy than non-reasoning prompt across the board. Notably, on intervention and association queries, 32B models fine-tuned with SFT still under-performs zero-shot reasoning (fig. 4 bottom). This demonstrates the substantial benefit of the reasoning prior, which we next show RLVR improves on.
Analysis-III: RLVR favors incremental marginalization strategy and reduces abstract reasoning errors and calculation errors. Answering queries from our causal inference task requires abstract reasoning about probability and causality (e.g. marginalization and graph modification) as well as low-level calculations (e.g. substitution of values and arithmetic). See example in fig. 10.
In fig. 5 (top), we see that for 7b and 32b models, RLVR shifts the marginalization strategy towards incremental marginalization, and we found that this effect is especially strong on more difficult queries (see fig. 21 top)—those with a larger number of relevant nodes to sum over. A possible explanation for this shift could be that brute-force summation often introduces large summations with terms that are long products of conditional probabilities, which can give rise to more chances of errors, causing incorrect answers (green shaded), and resulting in RLVR learning to avoid it. In fig. 5 (top), we also see that for 3b models, instead of learning to marginalize correctly, they learned to avoid marginalization after RLVR (grey), frequently predicting the answer without any calculations (see fig. 17 for an example). The high rate of failure (indicated by shading) of marginalization-based solutions (incremental, brute-force, and neighbors) prior to training is a possible explanation for why 3b LLMs avoided it after RLVR.
Analysis-IV: How does RLVR models behave differently from SFT models? In fig. 6 (top), we show that within each query type, on 7B and 32B LLMs, SFT tend to perform better on the less complex queries of that type, while RLVR performs better on more complex queries of that type. In fig. 6 (bottom), we plot the proportion of correct answers as we relax the criterion of correctness from exact match to within 0.2 in total variation distance. We show that LLMs fine-tuned with RLVR are more precise, while SFT models often is only able to get the solution approximately correct. Both RLVR and SFT significantly improve the precision of the LLMs relative to base.
Conclusion. In this paper, we investigated the generalization behavior of RLVR and SFT using probabilistic inference in causal graphical models as a testbed. Our main findings are that RLVR is less effective when the task is too challenging for the model prior to fine-tuning, but when the LLM has a basic level of successful reasoning rate on a problem level, RLVR significantly improves generalization, by fixing domain-specific reasoning errors and boosting systematic marginalization strategies, outperforming SFT, and especially on more complex queries. We also find that the LLM’s prior (both reasoning and direct prediction) scales with model size, and scaling gains are stronger with reasoning.
Our findings add to an emerging line of investigation into RLVR’s generalization (Chu et al., 2025; Chen et al., 2025; Swamy et al., 2025). A future direction is to explore more deeply the roles of execution quality and strategy quality in reasoning and RLVR (e.g. see recent works Qin et al., 2025; Sinha et al., 2025). This may provide us more insights into the mechanism of RLVR’s generalization.
Our findings also add to an increasing body of work studying LLMs for causal reasoning (Kıcıman et al., 2024; Jin et al., 2023; 2024). Their effectiveness on some commonsense counterfactual causal reasoning settings (Kıcıman et al., 2024) contrasts with our results on more challenging formal counterfactual reasoning problems. A possible future direction is to understand this gap better.
Lines of inquiry this paper opens 24
Research framings built by reading the notes related to this paper — the questions it feeds into.
What limits and mechanisms underlie causal reasoning in language models?- Can external causal models teach reasoning better than reinforcement learning alone?
- Why do LLMs reason fluently about causality but lack causal rigor?
- How can extracted causal belief networks enable intervention simulation?
- Can a Reflect mechanism detect and revise failed causal predictions?
- How does causal structure avoid behaviorist limitations in LLM social simulation?
- Can modular expert decomposition extend beyond time into other causal dimensions?
- What architectural changes would help LLMs distinguish causal relationships from temporal sequences?
- Do LLMs show stronger reasoning about causality than about temporal ordering?
- What computational methods most reliably establish causal evidence in AI mechanism discovery?
- When does prediction without causal mechanism fail to support good decisions?
- Why do smaller models learn to avoid marginalization instead of improving it?
- What counts as the base model's logic prior in RLVR systems?
- How much does the RL stage improve over supervised fine-tuning alone?
- Which components of the RL recipe drive its generalization advantage over SFT?
- How much of Fin-R1's gain comes from SFT versus the GRPO stage?
- Does SFT degrade reasoning quality before reinforcement learning corrects it?
- How do RL and SFT differ in which parameters they actually modify?
- Does the SFT-versus-RL split hold for reasoning tasks beyond math fine-tuning?
- Does cold-start SFT capability differ fundamentally from RL strategy learning?