SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2204.04179 · NAACL · 2022

GRAM: Fast Fine-tuning of Pre-trained Language Models for Content-based Collaborative Filtering

Juneyoung Park, Minsam Kim, Yoonseok Yang, Kyu Kim

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 8 functions out of this paper's own repositories and ran 5 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
yoonseok312/GRAM — 5 of 8
FunctionStatusWhere it lives
AdditiveAttention Ran yoonseok312/GRAM/gram/news_recommendation/model_bert.py
pointer only (licence: NONE) · get_code("cae4f1b8ddc3713c")
ElementEncoder Ran yoonseok312/GRAM/gram/news_recommendation/model_bert.py
pointer only (licence: NONE) · get_code("11413dcf5f8a30c0")
MultiHeadAttention Ran yoonseok312/GRAM/gram/news_recommendation/model_bert.py
pointer only (licence: NONE) · get_code("a8fe4d06671859f3")
ScaledDotProductAttention Ran yoonseok312/GRAM/gram/news_recommendation/model_bert.py
pointer only (licence: NONE) · get_code("ee47e6c01a7302ed")
TextEncoder Ran yoonseok312/GRAM/gram/news_recommendation/model_bert.py
pointer only (licence: NONE) · get_code("4c3ddcb374fd904d")
ModelBert Not yet run yoonseok312/GRAM/gram/news_recommendation/model_bert.py
pointer only (licence: NONE) · get_code("1dc11117180ddb6d")
NewsEncoder Not yet run yoonseok312/GRAM/gram/news_recommendation/model_bert.py
pointer only (licence: NONE) · get_code("bb00e2907229e014")
UserEncoder Not yet run yoonseok312/GRAM/gram/news_recommendation/model_bert.py
pointer only (licence: NONE) · get_code("8bf18760aea7dc62")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Content-based collaborative filtering (CCF) predicts user-item interactions based on both users' interaction history and items' content information. Recently, pre-trained language models (PLM) have been used to extract highquality item encodings for CCF. However, it is resource-intensive to train a PLM-based CCF model in an end-to-end (E2E) manner, since optimization involves back-propagating through every content encoding within a given user interaction sequence. To tackle this issue, we propose GRAM (GRadient Accumulation for Multi-modality in CCF), which exploits the fact that a given item often appears multiple times within a batch of interaction histories. Specifically, Single-step GRAM aggregates each item encoding's gradients for back-propagation, with theoretic equivalence to the standard E2E training. As an extension of Single-step GRAM, we propose Multistep GRAM, which increases the gradient update latency, achieving a further speedup with drastically less GPU memory. GRAM significantly improves training efficiency (up to 146×) on five datasets from two task domains of Knowledge Tracing and News Recommendation. Our code is available at https://github.com/yoonseok312/GRAM.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2204.04179")
get_code_for_paper("2204.04179")
have("2204.04179")

Connect an agent — have() is free.