Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

Don't Reinvent the Wheel: Efficient Instruction-Following Text Embedding based on Guided Space Transformation

About

In this work, we investigate an important task named instruction-following text embedding, which generates dynamic text embeddings that adapt to user instructions, highlighting specific attributes of text. Despite recent advancements, existing approaches suffer from significant computational overhead, as they require re-encoding the entire corpus for each new instruction. To address this challenge, we propose GSTransform, a novel instruction-following text embedding framework based on Guided Space Transformation. Our key observation is that instruction-relevant information is inherently encoded in generic embeddings but remains underutilized. Instead of repeatedly encoding the corpus for each instruction, GSTransform is a lightweight transformation mechanism that adapts pre-computed embeddings in real time to align with user instructions, guided by a small amount of text data with instruction-focused label annotation. We conduct extensive experiments on three instruction-awareness downstream tasks across nine real-world datasets, demonstrating that GSTransform improves instruction-following text embedding quality over state-of-the-art methods while achieving dramatic speedups of 6~300x in real-time processing on large-scale datasets. The source code is available at https://github.com/YingchaojieFeng/GSTransform.

Yingchaojie Feng, Yiqun Sun, Yandong Sun, Minfeng Zhu, Qiang Huang, Anthony K. H. Tung, Wei Chen• 2025

Related benchmarks

TaskDatasetResultRank
Real-time latency evaluationAG-News
Latency (s)36
15
Latency EvaluationBig Patent
Latency (s)39
13
ClusteringNYTClust
V-Measure75.6
9
ClusteringAmzCF
V-measure3.47e+3
9
ClusteringMNews
V-Measure0.6471
9
STSPaperCode
Spearman Correlation0.8343
9
STSMultiHate
Spearman Correlation5.32e+3
9
STSBig Patent
Spearman Correlation0.3834
9
Triplet AlignmentIntEmo
Accuracy96.75
9
Triplet AlignmentToxic
Accuracy63.53
9
Showing 10 of 13 rows

Other info

Code

Follow for update