This paper presents a unified framework for controllable text generation in large language models (LLMs), integrating anchor-based latent space alignment with hidden-state adversarial learning. The framework aims to achieve fine-grained difficulty control in educational content generation, particularly in math problem construction. The proposed method leverages 1) a difficulty anchor module that provides directional semantic guidance in latent space and 2) a hidden-sequence discriminator that enforces distributional consistency with real examples, enabling end-to-end gradient-based optimization during training via continuous relaxation without reinforcement learning or attribute-specific classifiers. The model is fine-tuned via low-rank adaptation (LoRA) and trained to generate intermediate-difficulty math problems by interpolating between easy and hard inputs. Experiments conducted across three backbone LLMs—Qwen2.5-Math-7B, LLaMA-3.2-3B, and EXAONE-4.0-1.2B—demonstrate consistent performance gains. On average, the proposed method improves target difficulty accuracy from 37.3% to 49.0% and F1 score from 0.281 to 0.356, representing a substantial enhancement in controllability. Beyond attribute accuracy, the model also improves semantic quality (BERTScore F1 = 0.660), topic relevance (QRelScore = 0.3758), answerability (RQUGE = 1.5922), and fluency (Perplexity = 4.5605). Ablation studies further confirm that anchor loss and adversarial loss contribute complementary effects, yielding the strongest performance when jointly optimized. These results highlight the effectiveness and scalability of anchor-guided adversarial learning for controllable text generation. The proposed framework offers a practical direction for adaptive learning systems and can be extended to multi-attribute control, personalized difficulty adjustment, and continuous attribute modeling.
Lee et al. (Tue,) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: