# Counterfactual Prediction with Continuous Treatments

This sibling project develops **HCGM-Dose**: it extends the HCGM abduction--intervention--reduction grammar from a binary treatment to a continuous intervention path.

> **Concept migration note (2026-07-13).** This is a continuous-intervention
> application of **Unit Mechanism Learning**. Its implemented \(q(U\mid X)\)
> denotes a directly learned abduction distribution \(\mathcal A(X)\); no
> population prior or Bayes update is required. The old symbol and HCGM-Dose
> label remain temporarily because paper, code, frozen evidence, and the reader
> site are coupled. Dose \(A\) is an explicit causal mechanism input, not part
> of the fixed-context base problem.
>
> At world level one actual realization \(U=u^\star\) selects the token/unit
> embedding. Pretreatment \(X=x\) is factual evidence and
> \(q_\phi(u\mid x)\) is epistemic uncertainty about that same token, not a
> population identity redraw. Every dose query reuses the factual abduction
> result and changes only \(a\) in \(Y_u(a)=f_\theta(a,E;u)\). Point,
> Gaussian, and Cauchy are three possible abduction results; this paper
> evaluates the latter two. Cauchy uses location/scale and has no finite
> mean/variance when non-degenerate.

Portfolio state: independent `HCGM-CT` second-wave incoming candidate. It does
not yet occupy a stable RQ/P slot and must not be folded into the binary paper as
an appendix. Mapping and allocation gates live in
`/Users/cms/.openclaw/workspace/projects/two-month-ten-conference-papers/state/hcgm-paper-bridge-v0.yaml`.

The working model is

\[
q_\phi(du\mid O)=\prod_j\operatorname{Cauchy}(du_j;m_j(O),\gamma_j(O)),\qquad
Y(a)=f_\theta(a,E;U),
\quad
f_\theta(a,E;u)=c(a)+w(a)^\top u+\sigma(a)E_a.
\]

Here \(m_j\) is a Cauchy location/median, not a mean; the implementation's
legacy field may still be named `mu`.

It targets conditional location dose-response surfaces, finite-dose contrasts, and local dose derivatives. It does not treat unsupported dose extrapolation or an unobserved cross-dose joint process as identified.

## Layout

```text
seed.md                 research seed and scope
assumption-ledger.md    causal, smoothness, support, and coupling boundaries
experiment-ledger.md    executed evidence and artifact map
main.tex                manuscript entry point
sections/               paper sections and proofs
implementation/         clean-room code, tests, runners, and outputs
generated/              manuscript tables generated from checked results
figures/                manuscript figures generated from checked results
site/                   source-derived reader site and public projection
```

## Reproduce

```bash
cd implementation
uv sync --extra dev
uv run pytest
uv run python experiments/run_synthetic_study.py
./scripts/fetch_official_benchmarks.sh
uv run python experiments/run_official_simu1_benchmark.py
uv run python experiments/run_official_ihdp_benchmark.py
uv run python experiments/run_official_news_benchmark.py
uv run python experiments/run_support_sensitivity.py
uv run python experiments/render_artifacts.py
cd ..
./build.sh
python3 site/build.py
```

The official benchmark commands are long-running confirmatory runs. Their
checked summaries, frozen configs, source commit, host/runtime metadata, and
per-replication rows are retained under `implementation/outputs/`; generated
paper tables fail closed if a benchmark grid is incomplete or non-finite.

## Reader site

```text
https://research.wehub.us/blog/hcgm/continuous-treatment/
```

The site covers the research question, analytic mechanism, identification
audit, benchmark comparison, interactive support diagnostic, conclusion, PDF,
and reproducibility path. Its `evidence.js` is generated from frozen experiment
CSVs; `site/public-site/` is a projection and should not be hand-edited.

The ICLR style is a drafting shell, not a venue claim.
