Flow2Vec: Value-Flow-Based Precise Code Embedding
summary
Builds an interprocedural value-flow graph from LLVM IR (IVFG) and uses CFL-reachability to filter only realizable call/return paths, formulates reachability with matrix powers and Katz Index to get a high-order proximity matrix, then factorizes into K-dimensional embeddings with separate source/target vectors to preserve asymmetric transitivity and context sensitivity. Evaluated on 32 open-source projects with ~17,000 methods (80/20 split), it improves method-name and summarization F1 by ~16–20% over code2seq/code2vec and ablations show each property adds 3.7–7.8% F1.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 1:05Code embedding importance
- 3:19Limitations of structured embeddings
- 5:14Flow2Vec goal and workflow
- 6:21Flow2Vec phases example
- 9:26CFL-reachability and Katz Index
- 12:36Embedding vector construction
- 12:59Evaluation setup and datasets
- 13:20Performance vs code2vec and code2seq
- 14:06Ablation analysis contributions
- 14:52Q&A
related talks
20mVectorizing Sparse Coiteration for Two-finger Loop Structure (Extended Abstract)
23mFLUX, Open Research, and the Future of Visual AI
50mVector Ops: run vector embedding-powered apps in prod
16mMachine Learning on Source Code
27mImproving Vectorization Heuristics in a Dynamic Compiler with Machine Learning Models
49mlda2vec
37mMachine Learning on Source Code
43mpackage2vec: getting to know PyPI packages with ML
