{"id":29023301,"url":"https://github.com/rish-16/ma4270-project","last_synced_at":"2025-06-26T03:06:03.668Z","repository":{"id":230186711,"uuid":"778711360","full_name":"rish-16/ma4270-project","owner":"rish-16","description":"Source code for MA4270: Data Modelling and Computation on Transformers and Nadaraya-Watson Kernel Regression","archived":false,"fork":false,"pushed_at":"2024-05-29T00:21:36.000Z","size":9212,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-05-29T14:36:16.798Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rish-16.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-03-28T08:51:39.000Z","updated_at":"2024-05-29T00:21:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"68318871-a815-4acd-894e-afe3f93709d5","html_url":"https://github.com/rish-16/ma4270-project","commit_stats":null,"previous_names":["rish-16/ma4270-project"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rish-16/ma4270-project","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rish-16%2Fma4270-project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rish-16%2Fma4270-project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rish-16%2Fma4270-project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rish-16%2Fma4270-project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rish-16","download_url":"https://codeload.github.com/rish-16/ma4270-project/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rish-16%2Fma4270-project/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261990345,"owners_count":23241189,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2025-06-26T03:06:03.071Z","updated_at":"2025-06-26T03:06:03.645Z","avatar_url":"https://github.com/rish-16.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Self-Attention and Nadaraya-Watson Kernel Regression\n\nHere, we show connections between the **Transformer** and the **Kernel Regression**. We show how the dot-product between queries $\\mathbf{q}_i$ and keys $\\mathbf{k}_i$ can be swapped out with miscellaneous kernel operations $\\alpha(\\cdot, \\cdot)$, chief among them being the _Nadaraya-Watson kernel_ $K$. We also empirically show how Self-attention variants can successfully learn on sequential data like periodic and aperiodic functions.\n\n\u003e This is a class project for _MA4270: Data Modelling and Computation_ by Rishabh Anand (A0220603Y) and Ryan Chung Yi Sheng (A0219702J). [[`pdf`](https://github.com/rish-16/ma4270-project/blob/main/MA4270_Final_Report.pdf)]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frish-16%2Fma4270-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frish-16%2Fma4270-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frish-16%2Fma4270-project/lists"}