會話推薦(Session-based Recommendation)的目標是通過分析使用者,在短時間內的匿名行為序列,預測其未來的行為。近期,會話推薦的相關研究,目光主要集中於利用各式各樣的機器學習技術,來提升推薦表現,而在這個風潮中,也包括引入對比學習 (Contrastive Learning) 這項技術。儘管對於推薦系統,有著一定程度地改善,但現有研究在許多方面,仍存在一些限制,值得我們多加注意。首先,這些研究僅單獨利用項目層面 (Item-level) 或會話層面 (Session-level) 的對比,來改良推薦系統,此外,還忽略了在項目 (Item) 和會話 (Session) 之間的關係中,所蘊含的重要關聯信息。其次,為了去模擬會話數據中,各種錯綜複雜的關係,許多研究設計了繁瑣的處理流程,以構建多個擴充圖,但這個行為降低了在會話推薦領域中,使用圖對比學習 (Graph Contrastive Learning) 的可行性。為了克服這些缺陷,我們提出了Tri-Rec(Tri-directional Hypergraph Contrastive Learning for Session-based Recommendation),一個創新地將三方向對比 (Tri-directional contrast) 整合進會話推薦領域的模型。三方向對比包含三種不同的對比形式,旨在最大化相似性於:相同項目之間、相同會話之間以及每個會話跟其所包含的項目之間。與許多主流方法,僅利用項目層面或會話層面的對比相反,我們不僅僅使用兩者,還引入了會員層面 (Membership-level) 的對比,使模型能夠獲取更全面的信息。此外,我們還在設計中,整合了超圖神經網絡 (Hypergraph Neural Networks) 和基於自注意力機制的讀出 (Readout) 模組,用以捕捉會話之間的高階關係和具代表性的用戶意圖。在三個真實世界的數據集上,所進行的詳細評估實驗顯示,Tri-Rec 在性能上顯著優於最先進的方法。;Session-based recommendation (SBR) aims to forecast users′ future actions by analyzing their unnamed behavioral sequences within a limited time frame. Recent research in SBR has focused on leveraging various techniques, including the incorporation of contrastive learning. Despite these developments, existing studies exhibit several limitations. First, these studies solely employ either item-level or session-level contrast, overlooking the vital correlation information between items and sessions. Second, to model the various relationships present in session data, numerous studies have designed complex processes to construct multiple augmented views, which diminish the accessibility of graph contrastive learning in SBR. To overcome these challenges, we propose $\textbf{Tri-Rec}$ (Tri-directional Hypergraph Contrastive Learning for Session-based Recommendation), a model that innovatively incorporates tri-directional contrast into SBR. Tri-directional contrast consists of three distinct contrastive forms, with the aim of maximizing the similarity: (1) between the same item, (2) between the same session, and (3) between each session and its containing items in augmented views. Contrary to many prevailing methods that solely employ either item-level or session-level contrast, we not only utilize both but also introduce membership-level contrast, allowing the model to harness more comprehensive information. Furthermore, we integrate the hypergraph neural network and a self-attention based readout module to capture both high-order relationships and representative user intent among sessions. Detailed empirical evaluations conducted on three real-world datasets reveal that Tri-Rec markedly surpasses state-of-the-art approaches in performance.