ACTIVE: A Dynamic Pareto-Frontier-Based Unified Index for Dual-Vector Query. Supports efficient build, search, and streaming update operations. The full version of the paper is available here.
- C++17 or later
- CMake >= 2.8
- Boost (for
dynamic_bitset) - TBB (Intel Threading Building Blocks)
- OpenMP
Install dependencies on Ubuntu/Debian:
sudo apt install build-essential cmake libboost-all-dev libtbb-devcd ACTIVE
mkdir -p build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j$(nproc)The compiled executables will be located under build/test/.
To compile individual tools under tools/ (data preparation utilities):
mkdir -p tools/exe
g++ tools/gen_alpha.cpp -o tools/exe/gen_alpha
g++ tools/process_base.cpp -o tools/exe/process_base
g++ tools/gen_trace.cpp -o tools/exe/gen_trace
g++ tools/gen_gt.cpp -o tools/exe/gen_gt -fopenmpBuild a DEG (Distance-Enhanced Graph) index from base embedding and location vectors.
| Item | Path |
|---|---|
| Source | test/build_index.cpp |
| Executable | build/test/build_index |
Usage:
./build_index <vec_base_emb> <vec_base_loc> <graph_index> <ef(L)> <max_edges(R)> <threads> <max_emb_dis> <max_loc_dis>
Search the index for k-nearest neighbors given a query set with alpha-weighted distance.
| Item | Path |
|---|---|
| Source | test/search.cpp |
| Executable | build/test/search |
Usage:
./search <vec_base_emb> <vec_base_loc> <graph_index> <L> <K> <alpha_file> <query_emb> <query_loc> <query_gt> <threads> <max_emb_dis> <max_loc_dis> <search_type>
Insert new data points into an existing DEG index.
| Item | Path |
|---|---|
| Source | test/insert.cpp |
| Executable | build/test/insert |
Usage:
./insert <graph> <base_emb> <base_loc> <trace1> [trace2 ...] <gt1> [gt2 ...] <ef> <max_edges> <threads> <id_flag> <delete_mode> <L> <K> <angle> <query_alpha> <query_emb> <query_loc>
Perform a single-round update (insert / delete / both) on the index, with search evaluation between rounds.
| Item | Path |
|---|---|
| Source | test/update.cpp |
| Executable | build/test/update |
Usage:
./update <graph_path> <base_emb> <base_loc> <trace_path> <ef(L)> <max_edges(R)> <threads> <id_flag> [L K query_alpha query_emb query_loc query_gt] <delete_mode>
Scripts for generating datasets, traces, and ground truth:
| Script | Description |
|---|---|
tools/process_dataset.sh |
Full pipeline: gen_alpha, process_base, gen_trace, gen_gt |
tools/gen_trace_gt.sh |
Generate update traces and ground truth for streaming benchmarks |
tools/et_base.sh |
Dataset preprocessing with sliding-window ground truth generation |
The index works with .fvecs (float vectors) and .ivecs (integer vectors) binary formats:
- Each file starts with a 4-byte dimension header
- Each vector is stored as
(dim, values...)wheredimis a 4-byte integer followed bydimelements
├── include/ # Header files (index, component, builder, etc.)
├── src/ # Library source files
├── test/ # Executable entry points (build, search, insert, update)
├── tools/ # Data preparation utilities
├── CMakeLists.txt # Top-level build configuration
└── ACTIVE-FULL.pdf # Full paper