Skip to content

fix: correct the GES/LGES/TGES baselines - #39

Merged
fesanghary merged 2 commits into
mainfrom
fix/ges-lges-baseline-public
Aug 30, 2026
Merged

fix: correct the GES/LGES/TGES baselines#39
fesanghary merged 2 commits into
mainfrom
fix/ges-lges-baseline-public

Conversation

@fesanghary

Copy link
Copy Markdown
Contributor

The GES, LGES and TGES baselines were substantially understated. Two independent problems:

  • ges_discovery read causal-learn's adjacency matrix with the endpoints transposed, so every directed contemporaneous edge came back reversed and every directed lagged edge was silently dropped.
  • The vendored GES search behind lges_discovery / tges_discovery had defects in its CPDAG construction and its Insert, Delete and Turn operators. The forward phase stopped short of the optimum, so LGES never converged — F1 sat at 0.35–0.52 on ex2 no matter how much data it was given.

All three now also apply temporal background knowledge (a variable can only cause another at an equal or later time step), which the lag-embedded search previously ignored. ges_discovery gains an engine= argument selecting the vendored search (default) or causal-learn.

Results. On the baseline_comparison datasets, F1 moves from 0.125/0.154/0.522/0.333 (GES) and 0.400/0.417/0.526/0.333 (LGES/TGES) to 0.636/0.917/0.949/0.435 for all three. Any prior comparison against these baselines understates them.

Verification. Every correction was checked against upstream ges 1.1.1 — no defect originated with the upstream authors. The corrected search returns CPDAGs identical to upstream's on random DAGs, and is faster than it. New tests cover the CPDAG pipeline exhaustively (every DAG on 4 and 5 nodes) plus convergence and differential agreement with causal-learn.

Notebooks re-executed, with a new cell showing where GES, LGES and TGES actually diverge (they coincide on all four bundled datasets, but not on larger/noisier data).

fesanghary and others added 2 commits August 29, 2026 16:39
The GES, LGES and TGES baselines were substantially understated.

- `ges_discovery` read causal-learn's adjacency matrix with the endpoints
  transposed, reversing directed contemporaneous edges and dropping directed
  lagged ones.
- The vendored GES search behind LGES/TGES had defects in its CPDAG
  construction and its Insert, Delete and Turn operators, so the forward
  phase stopped short of the optimum and LGES never converged.
- All three now apply temporal background knowledge (a variable can only
  cause another at an equal or later time step), which the lag-embedded
  search previously ignored. `ges_discovery` gains an `engine=` argument
  selecting the vendored search (default) or causal-learn.

F1 on the baseline_comparison datasets moves to 0.636/0.917/0.949/0.435 for
all three. Every correction was verified against upstream ges 1.1.1 -- no
defect originated with the upstream authors -- and the corrected search
returns CPDAGs identical to upstream's on random DAGs. Notebooks re-executed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@fesanghary
fesanghary requested a review from a team as a code owner August 29, 2026 20:42
@github-actions

Copy link
Copy Markdown

⚠️ Deprecation Warning: The deny-licenses option is deprecated for possible removal in the next major release. For more information, see issue 997.

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@fesanghary
fesanghary merged commit 4c29aa3 into main Aug 30, 2026
10 checks passed
@fesanghary
fesanghary deleted the fix/ges-lges-baseline-public branch August 30, 2026 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant