Skip to content

TGAT MRR - #58

Merged
Jacob-Chmura merged 7 commits into
mainfrom
dev/tgat_mrr
Jun 30, 2025
Merged

TGAT MRR#58
Jacob-Chmura merged 7 commits into
mainfrom
dev/tgat_mrr

Conversation

@Jacob-Chmura

@Jacob-Chmura Jacob-Chmura commented Jun 24, 2025

Copy link
Copy Markdown
Member

Purpose

The purpose of this PR is trying to replicate and patch #57. I extracted the TGAT mrr based example to try and isolate the problem.

Performance

Note: our validation MRR after a single epoch is 0.0740. The TGB leaderboard expects 0.131 ± 0.008 (after 10 epochs). A randomly initialized TGAT model (garbage weights) achieves MRR = 0.0438, so something is happening.

Probably training longer would help. As would using actual static node features (or gaussian random) instead of zeros. There are probably also actual bugs.

Key Changes

  • TGAT mrr example
  • update nbr sampler to make it compatible with non-equal positive and negative links. Used the heurstic fake link time we previously discussed

Relevant Prs

Close #57

Out of scope

  • Debugging actual performance

@Jacob-Chmura Jacob-Chmura self-assigned this Jun 24, 2025
@Jacob-Chmura
Jacob-Chmura marked this pull request as draft June 24, 2025 17:07
@Jacob-Chmura
Jacob-Chmura changed the base branch from main to bug/tgat_attention June 24, 2025 17:47
@Jacob-Chmura
Jacob-Chmura marked this pull request as ready for review June 24, 2025 17:48
device = batch.src.device
z = torch.zeros(len(batch.unique_nids), self.embed_dim, device=device)

for hop in reversed(range(self.num_layers)):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reversed?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe let's walk through this together when we meet

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. This is just how message passing is implemented. You always have to start at your boundary (highest hop)

Comment thread tgm/hooks.py
# we pick random time stamps within temporal window of the batch.
# Using random times on the whole graph will likely produce information
# leakage, making the prediction easier than it should be.
fake_times = torch.randint(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I think this is fine for now. In the ideal case, you should produce timestamp for fake edges based on the true edge that it corresponds to, this is a sufficient condition for us now. We can also address this later on

Base automatically changed from bug/tgat_attention to main June 30, 2025 14:08
@codecov

codecov Bot commented Jun 30, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
tgm/hooks.py 0.00% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

@Jacob-Chmura
Jacob-Chmura merged commit 0e81af0 into main Jun 30, 2025
6 checks passed
@Jacob-Chmura
Jacob-Chmura deleted the dev/tgat_mrr branch June 30, 2025 14:23
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.

TGAT MRR CudaMemory Issue

2 participants