IDEAS home Printed from https://ideas.repec.org/a/spr/snopef/v6y2025i3d10.1007_s43069-025-00521-1.html
   My bibliography  Save this article

Contextual Product Recommendation Using Transformer-Based Models: Uncovering Product Dependencies in Transactional Data

Author

Listed:
  • Mohammed Mghari

    (Abdelmalek Essaâdi University)

  • Abdelilah Mhamedi

    (Abdelmalek Essaâdi University)

  • Abdelaaziz El Hibaoui

    (Abdelmalek Essaâdi University)

Abstract

Understanding the relationships between products within an invoice can significantly enhance the accuracy and effectiveness of recommendation systems in e-commerce. In this paper, we propose a novel approach to model transactional data using transformer architectures, treating invoices as analogous to sentences and products as words. Using the Online Retail dataset, we construct sequences of products for each invoice and train a Generative Pre-trained Transformer (GPT)-based model with multi-head attention to uncover latent relationships based on product co-occurrence within transactions. This approach captures contextual dependencies, enabling the model to predict complementary and alternative products more effectively than traditional methods. For example, products frequently purchased together can reveal nuanced contextual patterns that are often overlooked by standard recommendation techniques. Our results demonstrate the potential of natural language processing techniques for transactional data and show that this method leads to more accurate, diverse, and context-aware recommendations. These improvements can directly impact e-commerce platforms by increasing cross-selling opportunities, enhancing customer satisfaction, and driving sales through more personalized shopping experiences.

Suggested Citation

  • Mohammed Mghari & Abdelilah Mhamedi & Abdelaaziz El Hibaoui, 2025. "Contextual Product Recommendation Using Transformer-Based Models: Uncovering Product Dependencies in Transactional Data," SN Operations Research Forum, Springer, vol. 6(3), pages 1-25, September.
  • Handle: RePEc:spr:snopef:v:6:y:2025:i:3:d:10.1007_s43069-025-00521-1
    DOI: 10.1007/s43069-025-00521-1
    as

    Download full text from publisher

    File URL: http://link.springer.com/10.1007/s43069-025-00521-1
    File Function: Abstract
    Download Restriction: Access to the full text of the articles in this series is restricted.

    File URL: https://libkey.io/10.1007/s43069-025-00521-1?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    As the access to this document is restricted, you may want to

    for a different version of it.

    More about this item

    Keywords

    ;
    ;
    ;
    ;

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:spr:snopef:v:6:y:2025:i:3:d:10.1007_s43069-025-00521-1. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Sonal Shukla or Springer Nature Abstracting and Indexing (email available below). General contact details of provider: http://www.springer.com .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.