{"id":22848367,"url":"https://github.com/feedzai/truncation-gap","last_synced_at":"2026-02-17T22:01:49.351Z","repository":{"id":229905629,"uuid":"765669582","full_name":"feedzai/truncation-gap","owner":"feedzai","description":"Official code for the paper \"Mind the truncation gap: challenges of learning on dynamic graphs\"","archived":false,"fork":false,"pushed_at":"2024-12-18T11:25:03.000Z","size":37,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-10-17T07:41:32.205Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://arxiv.org/abs/2412.21046","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/feedzai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-03-01T11:36:38.000Z","updated_at":"2025-09-11T16:43:55.000Z","dependencies_parsed_at":"2025-05-07T04:38:45.484Z","dependency_job_id":null,"html_url":"https://github.com/feedzai/truncation-gap","commit_stats":null,"previous_names":["feedzai/truncation-gap"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/feedzai/truncation-gap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feedzai%2Ftruncation-gap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feedzai%2Ftruncation-gap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feedzai%2Ftruncation-gap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feedzai%2Ftruncation-gap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/feedzai","download_url":"https://codeload.github.com/feedzai/truncation-gap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feedzai%2Ftruncation-gap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29559961,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T21:50:49.831Z","status":"ssl_error","status_checked_at":"2026-02-17T21:46:15.313Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-13T04:11:33.296Z","updated_at":"2026-02-17T22:01:49.333Z","avatar_url":"https://github.com/feedzai.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mind the truncation gap: challenges of learning on dynamic graphs\n\nOfficial code for the paper [Mind the truncation gap: challenges of learning on dynamic graphs with recurrent architectures](https://openreview.net/forum?id=QezxDgd5hf).\n\n![Batch truncation in dynamic graphs](figures/sequence-vs-dgraph.svg)\n\nIncludes our toy task implementation, together with the python scripts required to train and evaluate a GRNN model on this task using both full backpropagation and truncated backpropagation.\n\nAlso includes python scripts to reproduce the experiments on public dynamic graph datasets, comparing full and truncated backpropagation.\n\n# Using the synthetic task\n\nOur proposed synthetic link regression task can be used as a simple benchmark to test an algorithm's ability to learn longer term dependencies.\n\n![Toy task](figures/toy-task.svg)\n\nThe following example instantiates the synthetic task with 100 nodes and a memory of 3 steps and uses it to generate edges:\n\n```python\nimport jax\nfrom jax import lax\nfrom tgap.data.buffer_task import get_sampler_link_regression\n\ninit_data, step_data = get_sampler_link_regression(num_nodes=100, delay=3)\n\n# initialize state\nrng = jax.random.PRNGKey(123)\ninitial_data_state = init_data(rng)\n\n# run 1 step\nnew_data_state, (edge_src, edge_dst, edge_feat, edge_target) = step_data(initial_data_state)\n\n# run 1000 steps\nnew_data_state, (edges_src, edges_dst, edges_feat, edges_target) = lax.scan(step_data, initial_data_state, None, 1000)\n```\n\n# Running the synthetic task experiments\n\nInstall dependencies (with python \u003e= 3.9):\n\n```{bash}\npip install -r requirements.txt\n```\n\nRun full or truncated backprop:\n\n```{bash}\n# Full Backprop\npython run_toy_task.py --method FBPTT\n\n# Truncated Backprop\npython run_toy_task.py --method TBPTT\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeedzai%2Ftruncation-gap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffeedzai%2Ftruncation-gap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeedzai%2Ftruncation-gap/lists"}