Skip to content

Fix edge feature layout handling for RGCN and edge updates#18

Open
benben951 wants to merge 10 commits into
IBM:mainfrom
benben951:fix/edge-feature-layout-and-updates
Open

Fix edge feature layout handling for RGCN and edge updates#18
benben951 wants to merge 10 commits into
IBM:mainfrom
benben951:fix/edge-feature-layout-and-updates

Conversation

@benben951

Copy link
Copy Markdown

Summary

  • keep the Payment Format column as the RGCN relation type even when ports or time deltas are enabled
  • normalize all other edge features while preserving the categorical relation column for RGCN
  • fix the edge update averaging in GINe, GATe, and PNA to match the node update residual averaging
  • add regression tests for the edge feature layout helpers

Testing

  • python -m unittest discover -s tests
  • python -m compileall edge_feature_utils.py data_loading.py data_util.py models.py training.py tests/test_edge_feature_utils.py

Fixes #10
Fixes #8

@benben951 benben951 force-pushed the fix/edge-feature-layout-and-updates branch 2 times, most recently from fb56de6 to 8ff6d94 Compare April 11, 2026 11:04
Signed-off-by: benben951 <jie13383393540@163.com>
Signed-off-by: benben951 <jie13383393540@163.com>
Signed-off-by: benben951 <jie13383393540@163.com>
Signed-off-by: benben951 <jie13383393540@163.com>
Signed-off-by: benben951 <jie13383393540@163.com>
Signed-off-by: benben951 <jie13383393540@163.com>
Signed-off-by: benben951 <jie13383393540@163.com>
Signed-off-by: benben951 <jie13383393540@163.com>
Signed-off-by: benben951 <jie13383393540@163.com>
@benben951 benben951 force-pushed the fix/edge-feature-layout-and-updates branch from 8ff6d94 to e56d4e2 Compare April 11, 2026 11:05
@benben951

Copy link
Copy Markdown
Author

Hi maintainers, I updated this PR to remove the accidental CRLF line-ending noise from the touched files. The review diff should now be much smaller and focused on the actual changes:

  • Preserve Payment Format as the RGCN relation column even when ports/time-deltas are appended.
  • Normalize only continuous edge features while leaving the categorical relation column intact for RGCN.
  • Swap only the port columns for reverse message passing, instead of assuming the final two edge columns are always ports.
  • Use the same residual averaging expression for edge updates as node updates.
  • Add regression tests for the edge feature layout helpers and reverse-MP edge attributes.

Local verification after the cleanup:

  • python -m compileall edge_feature_utils.py data_loading.py data_util.py models.py training.py tests/test_edge_feature_utils.py passes.
  • python -m unittest discover -s tests could not run in my local lightweight environment because torch is not installed there (ModuleNotFoundError: No module named 'torch'). The tests are written against the project?s PyTorch dependency and should run in the normal project environment.

Could you please take another look when you have a chance? Happy to split this into smaller PRs if that would make review easier.

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.

Bug of Normalisation [Possible Bug?] Inconsistency of Feature Update in models.py

1 participant