Program embeddings are dense, continuous vector representations of source code, functions, or abstract syntax trees (ASTs) that capture their semantic and syntactic properties. These embeddings are learned by neural network models like Code2Vec or CodeBERT, which map discrete code elements into a high-dimensional vector space where similar programs are positioned close together. This enables mathematical operations on code for tasks like semantic search, clustering, and analogy-making.
