Skip to main navigation menu Skip to main content Skip to site footer

Frequent Subgraph Mining and Structural Prompt Injection for Large Language Model Fine-Tuning

Abstract

This paper proposes a fine-tuning method for large language models that integrates frequent subgraph mining and structural cue injection, aiming to simultaneously enhance structural inductive ability and decision auditability in structured tasks. The method takes graph data as input, extracts reusable high-order structural patterns through relation-constrained frequent subgraph mining, and constructs a pattern library to characterize structural prototypes that stably appear across samples. Subsequently, the structural prototypes are compiled into readable structural cues, which, together with task instructions, form conditional inputs, enabling the model to explicitly focus on key structural evidence during inference and reduce semantic ambiguity caused by structural information serialization. To achieve efficient and controllable knowledge injection, the fine-tuning stage employs an efficient parameter update strategy, restricting trainable increments to a constrained low-rank subspace, and aligning cue-induced structural anchors with the model's internal representation through structural consistency regularization, thereby suppressing irrelevant directional drift and improving training stability. This framework forms a closed loop between structure discovery, structure representation, and structure injection, enabling end-to-end training and deployment without relying on complex external engineering modifications, and is suitable for graph classification and related structured reasoning scenarios requiring structural evidence.

pdf