
While Large Language Models (LLMs) offer promise for automating SQL query rewriting, their ”black-box” nature presents a major obstacle to practical adoption. The opacity of their reasoning leads to a lack of trust, unexplainable logic, and a high risk of generating syntactically or semantically flawed queries. Furthermore, because of search space pruning and strict cost models, classic database optimizers, despite their robustness, frequently struggle to handle the intricate structural transformations needed for contemporary analytical workloads. We provide Blueprint-SQL, a novel framework that reframes rewriting from opaque text production to transparent, organized planning, in order to address these issues. Our approach trains an LLM agent via reinforcement learning to produce a ”rewrite blueprint”—a high-level, human-readable sequence of composable actions like CONVERT_SUBQUERY_TO_CTE or REORDER_JOIN. This blueprint is then deterministically executed by applying each action to the query’s Abstract Syntax Tree (AST), a process that ensures the final output remains syntactically valid within the supported action space. This architecture decouples strategic reasoning from low-level code generation, yielding three key advantages: built-in explainability, guaranteed robustness, and learned adaptability. Through extensive evaluation against production-grade RDBMS optimizers (PostgreSQL), hybrid LLM-rule systems, and black-box generative models, we demonstrate that Blueprint-SQL achieves state-of-the-art performance on standard benchmarks. Critically, it maintains 100
The identification of anomalies in time series has gained significant attention in both academia and industry, leading to the development of numerous detection approaches. However, anomaly definitions vary across applications, multiple anomaly types may coexist, and the dynamic nature of monitored data further complicates accurate detection. To address these challenges, we propose an explainable, contextualized anomaly detection strategy that can be applied on top of any anomaly detector. A key element of this strategy is the TECAD framework for context generation, which incorporates heterogeneous data sources and leverages causal discovery to derive the context in which an anomaly detector operates. TECAD is model-agnostic, designed for online settings, and serves both explainability and decision-making enhancement in anomaly detection. Experimental results demonstrate that TECAD can function as an explainability method, improving the conciseness and consistency of explanations compared to state-of-the-art approaches, while also providing interpretations beyond monitored features. Furthermore, applying TECAD for contextualized decision-making can significantly enhance the effectiveness of anomaly detectors, yielding improvements of up to a twofold increase in F1-scores, as evidenced by its evaluation in three challenging real-world use cases that are characterized by data and concept drifts.
Knowledge Graphs (KGs) cover abundant factual information and semantic associations between items. They are often used to enhance the representation ability of models in the field of recommendation systems, and provide key support for improving recommendation performance. However, not all information in KGs has the same relevance and value to the target recommendation task. KGs themselves generally have significant inherent sparsity. Some connection information obtained from KGs may also introduce extra noise. Moreover, user behavior collaborative signals and KGs semantic signals are often modeled and processed separately. In this paper, we propose a new knowledge graph-based recommendation framework called KMDCL. To fully explore the semantic value of KGs and improve their adaptability to recommendation tasks, we build a knowledge graph completion strategy using a locally deployed large language model (LLM) . We also propose a knowledge graph denoising method based on diffusion models to accurately filter out low-confidence noisy relations. These two methods are combined to purify and enhance the information of KGs. On this basis, we combine the optimized KG with the user-item interaction graph to build a multi-view representation space for items. We also introduce a contrastive learning mechanism to enhance the semantic discrimination and expression ability of item embeddings. Our extensive experiments on three public datasets show that KMDCL has achieved significant performance improvement compared with a variety of baseline models. Experimental results show that this method can effectively alleviate the challenges brought by data sparsity and knowledge graph noise, and enhance the learned representation to improve the recommendation performance.
Metaphorical expressions evoke stronger emotions than literal language. However, their implicit sentiment mapping characteristics pose significant challenges for sentiment analysis. Existing studies exhibit two major limitations: first, most models focus on modeling the partial of three core elements (the source-domain word S, the target-domain word T, and the metaphorical context C), neglecting the interactions among them in metaphors; second, current research in computational metaphor predominantly adopts a single-type metaphor pattern, making it difficult for models to capture shared representations across different metaphor types, thereby limiting their generalization. To address these issues, this study proposes a multi-type metaphor sentiment analysis framework that jointly models S, T, and C, aiming to accurately identify the sentiment of complex metaphorical texts while revealing the path of metaphorical sentiment transfer, thereby facilitating sentiment analysis of metaphor-rich texts. To effectively model the three elements, a metaphor sentiment analysis model integrating Multi-Task Contrastive Learning and Instruction Tuning (MTCL-IT) is proposed. Finally, multi-perspective experiments are conducted on the constructed English dataset EMSA and Chinese dataset CMSA, both containing S, T, sentiment polarity, and metaphor type information, fully validating the effectiveness of the proposed three-element joint modeling framework and model in sentiment identification and understanding of sentiment mapping mechanisms.