iTAG: Inverse Design for Natural Text Generation with Accurate Causal Graph Annotations
Organizations: School of Future Technology, South China University of Technology, Guangzhou, China · China Mobile GBA Innovation Institute, Guangzhou, China · Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China
Abstract
A fundamental obstacle to causal discovery from text is the lack of causally annotated text data for use as ground truth, due to high annotation costs. This motivates an important task of generating text with causal graph annotations. Early template-based generation methods sacrifice text naturalness in exchange for high causal graph annotation accuracy. Recent Large Language Model (LLM)-dependent methods directly generate natural text from target graphs through LLMs, but do not guarantee causal graph annotation accuracy. Therefore, we propose iTAG, which performs real-world concept assignment to nodes before converting causal graphs into text in existing LLM-dependent methods. iTAG frames this process as an inverse problem with the causal graph as the target, iteratively examining and refining concept selection through Chain-of-Thought (CoT) reasoning so that the induced relations between concepts are as consistent as possible with the target causal relationships described by the causal graph. iTAG demonstrates both extremely high annotation accuracy and naturalness across extensive tests, and the results of testing text-based causal discovery algorithms with the generated data show high statistical correlation with real-world data. This suggests that iTAG-generated data can serve as a practical surrogate for scalable benchmarking of text-based causal discovery algorithms.
Figures & tables
| Method | fastText | TextCNN | TSCNN | RoBERTa | Human |
|---|---|---|---|---|---|
| Template-based | 0.98 | 0.97 | 0.96 | 0.99 | 0.81 |
| LLM-dependent | 0.58 | 0.61 | 0.59 | 0.64 | 0.57 |
| LLM-dependent+CA | 0.55 | 0.57 | 0.56 | 0.60 | 0.54 |
| LLM-dependent+ID | 0.56 | 0.59 | 0.58 | 0.62 | 0.55 |
| iTAG | 0.52 | 0.54 | 0.53 | 0.57 | 0.51 |
| Pearson Corr. | Spearman Corr. | Linear Regr. |
|---|---|---|
| Metric Corr. p-value 0.928 SHD 0.927 SID 0.921 Average 0.925 / | Metric Corr. p-value 0.926 SHD 0.921 SID 0.928 Average 0.925 / | Metric R 2 95% CI 0.861 [0.703, 0.938] SHD 0.859 [0.699, 0.938] SID 0.848 [0.678, 0.932] Average 0.856 [0.694, 0.936] |
Appendix figures & tables26 assets
Supplementary material from the paper’s appendix.
Appendix
| Parameter | Admissible domain | Tested range (wide) | Main sampling |
|---|---|---|---|
| Variable quantity | |||
| Expected density | |||
| max_parents | |||
| max_children | |||
| Confounder ratio | |||
| Collider ratio |
| Swept parameter | Grid size | range | SHD range | SID range | range | Conclusion |
|---|---|---|---|---|---|---|
| small vs. changing | ||||||
| max_parents | negligible | |||||
| max_children | negligible | |||||
| small | ||||||
| small | ||||||
| negligible |
| Parameter | -value on | partial on | -value on | partial on |
|---|---|---|---|---|
| 0.284 | 0.008 | 0.412 | 0.005 | |
| max_parents | 0.517 | 0.004 | 0.623 | 0.003 |
| max_children | 0.489 | 0.005 | 0.571 | 0.004 |
| 0.341 | 0.007 | 0.456 | 0.004 | |
| 0.378 | 0.006 | 0.502 | 0.004 | |
| 0.562 | 0.003 | 0.649 | 0.002 |
| Provider | API model identifier | Usage in paper |
|---|---|---|
| Anthropic | claude-opus-4-1-20250805-thinking | Default backbone in main tables |
| OpenAI | gpt-5-pro-2025-10-06 | LLM-CG backbone; robustness runs; verifier backbone option |
| DeepSeek | DeepSeek-R1 | Robustness runs |
| Qwen | Qwen3-235B-A22B-Thinking-2507 | Robustness runs |
| Module | temp. | top- | max tokens | Output |
|---|---|---|---|---|
| Phase 2 proposer/refiner ( Initial / Refine ) | 0.3 | 0.95 | 5000 | JSON |
| Phase 2 verifier ( CounterfactualVerification ) | 0.2 | 1.00 | 5000 | JSON |
| Phase 3 textual transformation | 0.7 | 0.95 | 5000 | JSON |
| LLM causal discovery prompt (for baselines/analysis) | 0.0 | 1.00 | 5000 | JSON |
| Template-based | LLM-dependent | LLM+CA | LLM+ID | iTAG | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 3 | 1.00 | 0.0 | 0.0 | 0.72 | 3.5 | 3.0 | 0.77 | 3.0 | 2.5 | 0.79 | 2.8 | 2.3 | 0.98 | 0.4 | 0.2 |
| 4 | 1.00 | 0.0 | 0.0 | 0.68 | 4.7 | 4.1 | 0.73 | 4.0 | 3.6 | 0.75 | 3.8 | 3.4 | 0.97 | 0.6 | 0.3 |
| 5 | 1.00 | 0.0 | 0.0 | 0.64 | 6.0 | 5.5 | 0.69 | 5.4 | 4.9 | 0.71 | 5.1 | 4.7 | 0.96 | 0.8 | 0.4 |
| 6 | 1.00 | 0.0 | 0.0 | 0.60 | 7.3 | 6.8 | 0.66 | 6.6 | 6.1 | 0.68 | 6.3 | 5.9 | 0.95 | 1.0 | 0.5 |
| 7 | 1.00 | 0.0 | 0.0 | 0.57 | 8.7 | 8.2 | 0.63 | 8.0 | 7.5 | 0.65 | 7.7 | 7.2 | 0.94 | 1.2 | 0.6 |
| Method | BERT | GPT-2 | RoBERTa | DistilBERT | Avg. |
|---|---|---|---|---|---|
| Template-based | 0.99 | 0.98 | 0.97 | 0.99 | 0.83 |
| LLM-dependent | 0.61 | 0.63 | 0.62 | 0.66 | 0.58 |
| LLM+CA | 0.58 | 0.60 | 0.59 | 0.63 | 0.56 |
| LLM+ID | 0.59 | 0.61 | 0.60 | 0.64 | 0.57 |
| iTAG | 0.54 | 0.56 | 0.55 | 0.59 | 0.53 |
| Algorithm | iTAG-generated corpora | Real-world corpora | |||||
|---|---|---|---|---|---|---|---|
| RuleBayes | 3 | 0.795 | 1.449 | 0.490 | 0.716 | 1.350 | 0.510 |
| 4 | 0.661 | 2.902 | 1.706 | 0.659 | 2.770 | 1.510 | |
| 5 | 0.592 | 4.043 | 2.407 | 0.614 | 4.580 | 2.880 | |
| 6 | 0.555 | 5.516 | 4.722 | 0.553 | 6.110 | 4.790 | |
| 7 | 0.508 | 7.916 | 6.111 | 0.503 | 7.940 | 6.880 | |
| Metric | Pearson Corr. | p-value | Spearman Corr. | p-value | 95% CI | |
|---|---|---|---|---|---|---|
| 0.923 | 0.891 | 0.851 | [0.725, 0.944] | |||
| 0.924 | 0.877 | 0.855 | [0.628, 0.957] | |||
| 0.929 | 0.931 | 0.864 | [0.778, 0.941] | |||
| Average | 0.925 | / | 0.900 | / | 0.856 | / |
| Template-based | LLM-dependent | LLM+CA | LLM+ID | iTAG | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 3 | 1.00 | 0.0 | 0.0 | 0.70 | 3.8 | 3.2 | 0.75 | 3.2 | 2.8 | 0.77 | 3.0 | 2.6 | 0.97 | 0.5 | 0.3 |
| 4 | 1.00 | 0.0 | 0.0 | 0.66 | 5.1 | 4.5 | 0.71 | 4.4 | 4.0 | 0.73 | 4.2 | 3.8 | 0.96 | 0.7 | 0.4 |
| 5 | 1.00 | 0.0 | 0.0 | 0.62 | 6.5 | 6.0 | 0.67 | 5.9 | 5.4 | 0.69 | 5.6 | 5.2 | 0.95 | 0.9 | 0.5 |
| 6 | 1.00 | 0.0 | 0.0 | 0.58 | 8.0 | 7.4 | 0.63 | 7.3 | 6.8 | 0.65 | 7.0 | 6.5 | 0.94 | 1.1 | 0.6 |
| 7 | 1.00 | 0.0 | 0.0 | 0.55 | 9.6 | 9.0 | 0.60 | 8.9 | 8.3 | 0.62 | 8.5 | 7.9 | 0.93 | 1.3 | 0.7 |
| Method | BERT | GPT-2 | RoBERTa | DistilBERT | Avg. |
|---|---|---|---|---|---|
| Template-based | 0.99 | 0.98 | 0.98 | 0.99 | 0.84 |
| LLM-dependent | 0.63 | 0.65 | 0.64 | 0.68 | 0.60 |
| LLM+CA | 0.60 | 0.62 | 0.61 | 0.65 | 0.58 |
| LLM+ID | 0.61 | 0.63 | 0.62 | 0.66 | 0.59 |
| iTAG | 0.56 | 0.58 | 0.57 | 0.61 | 0.55 |
| Algorithm | iTAG-generated corpora | Real-world corpora | |||||
|---|---|---|---|---|---|---|---|
| RuleBayes | 3 | 0.791 | 1.548 | 0.442 | 0.716 | 1.350 | 0.510 |
| 4 | 0.536 | 3.048 | 1.392 | 0.659 | 2.770 | 1.510 | |
| 5 | 0.526 | 4.016 | 2.397 | 0.614 | 4.580 | 2.880 | |
| 6 | 0.518 | 5.990 | 5.741 | 0.553 | 6.110 | 4.790 | |
| 7 | 0.501 | 6.070 | 8.028 | 0.503 | 7.940 | 6.880 | |
| Metric | Pearson Corr. | p-value | Spearman Corr. | p-value | 95% CI | |
|---|---|---|---|---|---|---|
| 0.862 | 0.842 | 0.743 | [0.552, 0.896] | |||
| 0.901 | 0.879 | 0.811 | [0.575, 0.914] | |||
| 0.893 | 0.865 | 0.797 | [0.672, 0.924] | |||
| Average | 0.885 | / | 0.862 | / | 0.784 | / |
| Template-based | LLM-dependent | LLM+CA | LLM+ID | iTAG | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 3 | 1.00 | 0.0 | 0.0 | 0.69 | 4.0 | 3.4 | 0.74 | 3.4 | 3.0 | 0.76 | 3.1 | 2.8 | 0.96 | 0.6 | 0.4 |
| 4 | 1.00 | 0.0 | 0.0 | 0.65 | 5.3 | 4.7 | 0.70 | 4.6 | 4.2 | 0.72 | 4.3 | 3.9 | 0.95 | 0.8 | 0.5 |
| 5 | 1.00 | 0.0 | 0.0 | 0.61 | 6.8 | 6.2 | 0.66 | 6.1 | 5.6 | 0.68 | 5.8 | 5.3 | 0.94 | 1.0 | 0.6 |
| 6 | 1.00 | 0.0 | 0.0 | 0.57 | 8.3 | 7.7 | 0.62 | 7.5 | 7.0 | 0.64 | 7.2 | 6.7 | 0.93 | 1.2 | 0.7 |
| 7 | 1.00 | 0.0 | 0.0 | 0.54 | 9.9 | 9.3 | 0.59 | 9.2 | 8.6 | 0.61 | 8.8 | 8.2 | 0.92 | 1.5 | 0.8 |
| Method | BERT | GPT-2 | RoBERTa | DistilBERT | Avg. |
|---|---|---|---|---|---|
| Template-based | 0.99 | 0.98 | 0.98 | 0.99 | 0.84 |
| LLM-dependent | 0.62 | 0.64 | 0.63 | 0.67 | 0.59 |
| LLM+CA | 0.59 | 0.61 | 0.60 | 0.64 | 0.57 |
| LLM+ID | 0.60 | 0.62 | 0.61 | 0.65 | 0.58 |
| iTAG | 0.55 | 0.57 | 0.56 | 0.60 | 0.54 |
| Algorithm | iTAG-generated corpora | Real-world corpora | |||||
|---|---|---|---|---|---|---|---|
| RuleBayes | 3 | 0.549 | 1.347 | 0.520 | 0.716 | 1.350 | 0.510 |
| 4 | 0.539 | 2.158 | 1.141 | 0.659 | 2.770 | 1.510 | |
| 5 | 0.524 | 3.453 | 2.549 | 0.614 | 4.580 | 2.880 | |
| 6 | 0.389 | 5.028 | 5.704 | 0.553 | 6.110 | 4.790 | |
| 7 | 0.379 | 5.108 | 5.784 | 0.503 | 7.940 | 6.880 | |
| Metric | Pearson Corr. | p-value | Spearman Corr. | p-value | 95% CI | |
|---|---|---|---|---|---|---|
| 0.879 | 0.845 | 0.773 | [0.586, 0.928] | |||
| 0.874 | 0.845 | 0.765 | [0.498, 0.936] | |||
| 0.885 | 0.856 | 0.783 | [0.608, 0.936] | |||
| Average | 0.879 | / | 0.849 | / | 0.774 | / |
| Backbone | Metric | Full ( ) | w/o RuleBayes | w/o SCITE | w/o LLM-CG |
|---|---|---|---|---|---|
| GPT-5-pro-2025-10-06 | 0.923/0.891/0.851 | 0.801/0.908/0.641 | 0.893/0.675/0.798 | 0.970/0.971/0.940 | |
| GPT-5-pro-2025-10-06 | 0.924/0.877/0.855 | 0.953/0.945/0.909 | 0.836/0.796/0.699 | 0.957/0.970/0.916 | |
| GPT-5-pro-2025-10-06 | 0.929/0.931/0.864 | 0.938/0.927/0.880 | 0.904/0.911/0.817 | 0.964/0.973/0.929 | |
| GPT-5-pro-2025-10-06 | Average | 0.925/0.900/0.856 | 0.897/0.927/0.810 | 0.878/0.794/0.771 | 0.964/0.971/0.928 |
| DeepSeek-R1 | 0.862/0.842/0.743 | 0.775/0.869/0.600 | 0.940/0.934/0.883 | 0.863/0.963/0.745 | |
| DeepSeek-R1 | 0.901/0.879/0.811 | 0.903/0.891/0.816 | 0.874/0.879/0.764 | 0.959/0.939/0.919 |
| Backbone | Metric | Pearson Corr. [95% CI] | Spearman Corr. [95% CI] | [95% CI] |
|---|---|---|---|---|
| GPT-5-pro-2025-10-06 | 0.923 [0.849, 0.972] | 0.891 [0.764, 0.966] | 0.851 [0.725, 0.944] | |
| GPT-5-pro-2025-10-06 | 0.924 [0.793, 0.994] | 0.877 [0.765, 0.964] | 0.855 [0.628, 0.957] | |
| GPT-5-pro-2025-10-06 | 0.929 [0.882, 0.970] | 0.931 [0.869, 0.975] | 0.864 [0.778, 0.941] | |
| GPT-5-pro-2025-10-06 | Average | 0.925 [0.868, 0.965] | 0.900 [0.818, 0.956] | 0.856 [0.755, 0.921] |
| DeepSeek-R1 | 0.862 [0.743, 0.942] | 0.842 [0.765, 0.921] | 0.743 [0.552, 0.896] | |
| DeepSeek-R1 | 0.901 [0.749, 0.957] | 0.879 [0.798, 0.943] | 0.811 [0.575, 0.914] |
| Variant | SHD | SID | # LLM calls | Tokens / sample | |
|---|---|---|---|---|---|
| iTAG (default Phase 3) | 0.967 | 1.06 | 0.56 | 487 | |
| iTAG + Gen-ID (Phase 3) | 0.974 | 0.89 | 0.44 | 3,842 |
| iTAG (default Phase 3) | iTAG + Gen-ID (Phase 3) | |||||
| n | SHD | SID | SHD | SID | ||
| 3 | 0.986 | 0.28 | 0.11 | 0.990 | 0.22 | 0.07 |
| 4 | 0.981 | 0.53 | 0.25 | 0.987 | 0.41 | 0.17 |
| 5 | 0.976 | 0.74 | 0.38 | 0.982 | 0.59 | 0.28 |
| 6 | 0.969 | 0.97 | 0.52 | 0.976 | 0.79 | 0.41 |
| 7 | 0.963 | 1.18 | 0.63 | 0.971 | 0.98 | 0.51 |
| Spurious edges per graph ( ) | Missed edges per graph ( ) | |||||
| Median | Mean | 95th pct. | Median | Mean | 95th pct. | |
| 3 | 0 | 0.14 | 1 | 0 | 0.11 | 1 |
| 4 | 0 | 0.28 | 1 | 0 | 0.21 | 1 |
| 5 | 0 | 0.39 | 2 | 0 | 0.29 | 1 |
| 6 | 0 | 0.52 | 2 | 0 | 0.38 | 2 |
| 7 | 0 | 0.64 | 2 | 0 | 0.47 | 2 |
| Setting | |||
|---|---|---|---|
| iTAG (Exp 1) | 0.004 | 0.09 | 0.11 |
| LLM-dependent (Exp 1) | 0.008 | 0.24 | 0.43 |
| LLM-dependent+CA (Exp 1) | 0.006 | 0.17 | 0.29 |
| LLM-dependent+ID (Exp 1) | 0.007 | 0.21 | 0.38 |
| Detector / Method | =50 | =100 | =200 | =500 | =1000 |
|---|---|---|---|---|---|
| fastText / iTAG | |||||
| TextCNN / iTAG | |||||
| TSCNN / iTAG | |||||
| RoBERTa / iTAG | |||||
| fastText / Template-based | |||||
| TextCNN / Template-based |
| fastText | TextCNN | TSCNN | RoBERTa | Human | |
|---|---|---|---|---|---|
| 3 | 0.51 | 0.53 | 0.52 | 0.56 | 0.50 |
| 4 | 0.53 | 0.55 | 0.54 | 0.58 | 0.52 |
| 5 | 0.51 | 0.54 | 0.52 | 0.57 | 0.50 |
| 6 | 0.54 | 0.56 | 0.55 | 0.59 | 0.53 |
| 7 | 0.52 | 0.53 | 0.53 | 0.56 | 0.51 |
| 8 | 0.50 | 0.52 | 0.51 | 0.55 | 0.49 |
| MIMIC-IV-Note | FinCausal 2025 | JUSTICE | Total | |
|---|---|---|---|---|
| 3 | 38 | 42 | 35 | 115 |
| 4 | 54 | 58 | 51 | 163 |
| 5 | 72 | 68 | 74 | 214 |
| 6 | 83 | 79 | 86 | 248 |
| 7 | 78 | 82 | 76 | 236 |
| 8 | 67 | 64 | 69 | 200 |