The representation learning of the knowledge graph projects the entities and relationships in the triples into a low-dimensional continuous vector space. Early representation learning mostly focused on the information contained in the triplet itself but ignored other useful information. Since entities have different types of representations in different scenarios, the rich information in the types of entity levels is helpful for obtaining a more complete knowledge representation. In this paper, a new knowledge representation frame (TRKRL) combining rule path information and entity hierarchical type information is proposed to exploit interpretability of logical rules and the advantages of entity hierarchical types. Specifically, for entity hierarchical type information, we consider that entities have multiple representations of different types, as well as treat it as the projection matrix of entities, using the type encoder to model entity hierarchical types. For rule path information, we mine Horn rules from the knowledge graph to guide the synthesis of relations in paths. Experimental results show that TRKRL outperforms baselines on the knowledge graph completion task, which indicates that our model is capable of using entity hierarchical type information, relation paths information, and logic rules information for representation learning.
Generative recommendation systems based on Large Language Models leverage their reasoning capabilities to capture users’ latent interests. However, aligning continuous user behavioral embeddings with the discrete semantic space of LLMs remains a challenge. Direct alignment often leads to semantic mismatch and hallucination issues. Furthermore, existing methods typically rely on multi-stage training strategies to adapt to variations in feature distributions, thereby limiting training efficiency. To address the aforementioned issues, we propose SBT-Rec, a structured behavioral tokenization framework. Specifically, we first design a hierarchical discrete structure discovery module, utilizing a recursive residual quantization mechanism to decompose continuous behavioral vectors into discrete behavioral atoms to resolve modality discrepancies. Second, the multi-scale behavioral semantic reconstruction module reconstructs behavioral representations via residual superposition, thereby reducing data noise. Third, a residual-aware modality distribution aligner is introduced to transform behavioral features into input tokens compatible with the LLM via non-linear mapping. Finally, based on structured discrete representations, we propose a single-stage behavioral-semantic adaptive optimization strategy, achieving end-to-end parameter-efficient fine-tuning. Experiments on the MovieLens, LastFM, and Steam datasets demonstrate that SBT-Rec outperforms existing baseline models in terms of recommendation accuracy, training efficiency, and noise robustness.
Empathetic response generation stands as a pivotal endeavor in the development of human-like dialogue systems. An effective approach in previous research is integrating external knowledge to generate empathetic responses. However, existing approaches only focus on identifying a user’s current emotional state, and they overlook the user’s emotional transition during context, and fail to propel the sustainability of the dialogue. To tackle the aforementioned issues, we propose an empathetic response generation model based on an emotional transition prompt and dual-semantic contrastive learning (EPDC). Specifically, we first compute the transition in users’ sentiment polarity during the conversation and incorporate it into the conversation embedding as sentiment prompts. Then, we generate two distinct fine-grained contextual representations and treat them as positive examples for contrastive learning, respectively, aiming at extracting high-order semantic information to guide the subsequent turn of dialogue. Finally, we also leverage commonsense knowledge to enhance the contextual representations, and the empathetic responses are generated by decoding the combination of semantic and emotional states. Notably, our work represents the pioneering application of emotional prompts and contrastive learning to augment the sustainability of empathetic dialogue. Extensive experiments conducted on the benchmark dataset EMPATHETICDIALOGUES demonstrate that EPDC outperforms the baselines in both automatic evaluations and human evaluations.