Repository Analysis

facebookresearch/faiss

A library for efficient similarity search and clustering of dense vectors.

4.4 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of facebookresearch/faiss, a C++ project with 40,813 GitHub stars. SynthScan v2.0 examined 250,277 lines of code across 925 source files, recording 950 pattern matches distributed across 18 syntactic categories. The overall adjusted score of 4.4 places this repository in the Likely human-written band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

4.4
Adjusted Score
4.4
Raw Score
100%
Time Factor
2026-08-28
Last Push
40.8K
Stars
C++
Language
250.3K
Lines of Code
925
Files
950
Pattern Hits
2026-08-29
Scan Date
0.02
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 16MEDIUM 36LOW 898

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 950 distinct pattern matches across 18 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hyper-Verbose Identifiers390 hits · 390 pts
SeverityFileLineSnippetContext
LOWtests/test_local_search_quantizer.py187 def test_update_codebooks_with_double(self):CODE
LOWtests/test_local_search_quantizer.py210 def test_compute_binary_terms(self):CODE
LOWtests/test_local_search_quantizer.py472 def test_index_accuracy_reconstruct(self):CODE
LOWtests/test_local_search_quantizer.py478 def test_index_accuracy_cqint(self):CODE
LOWtests/test_fast_scan_ivf.py244 def test_by_residual_no_precomputed(self):CODE
LOWtests/test_fast_scan_ivf.py295 def test_qloss_no_residual_ip(self):CODE
LOWtests/test_fast_scan_ivf.py298 def test_qloss_by_residual_ip(self):CODE
LOWtests/test_fast_scan_ivf.py354 def test_equiv_pq_encode_decode(self):CODE
LOWtests/test_fast_scan_ivf.py440 def test_no_residual_single_query(self):CODE
LOWtests/test_fast_scan_ivf.py443 def test_by_residual_single_query(self):CODE
LOWtests/test_fast_scan_ivf.py446 def test_no_residual_ip_single_query(self):CODE
LOWtests/test_fast_scan_ivf.py449 def test_by_residual_ip_single_query(self):CODE
LOWtests/test_fast_scan_ivf.py452 def test_no_residual_odd_dim_single_query(self):CODE
LOWtests/test_fast_scan_ivf.py455 def test_by_residual_odd_dim_single_query(self):CODE
LOWtests/test_fast_scan_ivf.py1096 def test_fastscan_defaults_roundtrip(self):CODE
LOWtests/test_fast_scan_ivf.py1109 def test_fastscan_max_lists_num_caps_probes(self):CODE
LOWtests/test_fast_scan_ivf.py1128 def test_fastscan_ensure_topk_full_fills_heap(self):CODE
LOWtests/test_fast_scan_ivf.py1146 def test_fastscan_ensure_topk_full_with_restrictive_selector(self):CODE
LOWtests/test_fast_scan_ivf.py1167 def test_fastscan_ensure_topk_full_multi_query_works(self):CODE
LOWtests/test_fast_scan_ivf.py1192 def test_fastscan_range_honors_max_empty_result_buckets(self):CODE
LOWtests/test_fast_scan_ivf.py1228 def test_fastscan_fields_exposed(self):CODE
LOWtests/test_contrib.py197 def test_query_iterator_similarity_metric(self):CODE
LOWtests/test_contrib.py360 def test_equal_time_better_perf_shadows(self):CODE
LOWtests/test_contrib.py378 def test_index_pretransformed(self):CODE
LOWtests/test_contrib.py529 def test_range_search_preassigned_coarse_dis_none_matches_zeros(self):CODE
LOWtests/test_contrib.py906 def test_ondisk_merge_with_shift_ids(self):CODE
LOWtests/test_contrib.py924 def test_ivf_scalar_quantizer_types(self):CODE
LOWtests/test_contrib.py957 def test_scalar_quantizer_types(self):CODE
LOWtests/test_contrib.py985 def test_get_code_size_hnsw_non_default_m(self):CODE
LOWtests/test_contrib.py1003 def test_get_code_size_ivf_hnsw_non_default_m(self):CODE
LOWtests/test_contrib.py1015 def test_get_code_size_hnsw_roundtrip(self):CODE
LOWtests/test_contrib.py1024 def test_rabitq_reverse_index_factory(self):CODE
LOWtests/test_graph_based.py100 def test_deterministic_build_recall(self):CODE
LOWtests/test_graph_based.py139 def test_hnsw_unbounded_queue(self):CODE
LOWtests/test_graph_based.py415 def test_add_nan_vector_to_ivf_hnsw(self):CODE
LOWtests/test_graph_based.py633 def test_nsg_supports_pre_built_knn_graph(self):CODE
LOWtests/test_graph_based.py642 def test_nsg_with_pre_built_knn_graph_throws_when_rebuilding_via_add(self):CODE
LOWtests/test_graph_based.py661 def test_nsg_rebuild_throws_with_pre_built_knn_graph(self):CODE
LOWtests/test_clustering_initialization.py23def verify_centroids_from_dataset(test_case, centroids, dataset):CODE
LOWtests/test_clustering_initialization.py63 def test_initialization_methods(self):CODE
LOWtests/test_clustering_initialization.py128 def test_with_existing_centroids(self):CODE
LOWtests/test_super_kmeans.py14 def test_train_rejects_too_few_points(self):CODE
LOWtests/test_super_kmeans.py20 def test_objective_decreases_monotonically(self):CODE
LOWtests/test_super_kmeans.py35 def test_pruned_iter_assignments_close_to_vanilla(self):CODE
LOWtests/test_super_kmeans.py56 def test_pruning_rate_in_expected_range(self):CODE
LOWtests/test_super_kmeans.py77 def test_pdx_offset_correct_for_unaligned_y_batch(self):CODE
LOWtests/test_super_kmeans.py132 def test_cluster_splitting_with_many_duplicates(self):CODE
LOWtests/test_super_kmeans.py159 def test_train_populates_kmeans_surface(self):CODE
LOWtests/test_super_kmeans.py177 def test_final_obj_matches_vanilla_kmeans(self):CODE
LOWtests/test_svs_py.py450 def test_svs_range_search_selected(self):CODE
LOWtests/test_svs_py.py454 def test_svs_add_search_remove_interface(self):CODE
LOWtests/test_svs_py.py458 def test_svs_batch_operations(self):CODE
LOWtests/test_svs_py.py635 def test_svs_leanvec_ood_training(self):CODE
LOWtests/test_svs_py.py640 def test_svs_leanvec_ood_training_smaller(self):CODE
LOWtests/test_svs_py.py643 def test_svs_leanvec_ood_training_wrong_dim(self):CODE
LOWtests/test_svs_py.py648 def test_svs_leanvec_ood_training_wrong_type(self):CODE
LOWtests/test_svs_py.py993 def test_ivf_leanvec_ood_training(self):CODE
LOWtests/test_svs_py.py1000 def test_ivf_leanvec_ood_training_smaller_queries(self):CODE
LOWtests/test_svs_py.py1006 def test_ivf_leanvec_ood_training_wrong_dim(self):CODE
LOWtests/test_svs_py.py1013 def test_ivf_leanvec_ood_training_wrong_type(self):CODE
330 more matches not shown…
Over-Commented Block246 hits · 245 pts
SeverityFileLineSnippetContext
LOWCMakeLists.txt1# @lint-ignore-every LICENSELINTCOMMENT
LOWpyproject-gpu-cuvs.toml121COMMENT
LOWtutorial/python/11-SVS.py1# Portions Copyright (c) Meta Platforms, Inc. and affiliates.COMMENT
LOWtests/test_fastscan_filter.cpp1/*COMMENT
LOWtests/test_svs.cpp21 * limitations under the License.COMMENT
LOWtests/test_hnsw.cpp1/*COMMENT
LOWtests/test_transfer_invlists.cpp1/*COMMENT
LOWtests/test_svs_py.py1# Portions Copyright (c) Meta Platforms, Inc. and affiliates.COMMENT
LOWtests/test_ivf_index.cpp1/*COMMENT
LOWtests/test_meta_index.py141 if with_threads:COMMENT
LOWtests/test_distances_dispatch.cpp1/*COMMENT
LOWtests/test_distances_dispatch.cpp21// * Functions returning an integer (fvec_L2sqr_ny_nearest's chosenCOMMENT
LOWtests/test_ivf_early_termination.cpp1/*COMMENT
LOWtests/test_ivf_sharding.cpp1/*COMMENT
LOWtests/test_super_kmeans_foundations.cpp1/*COMMENT
LOWtests/test_super_kmeans_foundations.cpp21#include <faiss/utils/random.h>COMMENT
LOWtests/test_omp_exception_safety.cpp1/*COMMENT
LOWtests/test_omp_exception_safety.cpp381 std::vector<idx_t> labels(1);COMMENT
LOWtests/bench_hnsw_deterministic.py1# Copyright (c) Meta Platforms, Inc. and affiliates.COMMENT
LOWtests/test_mmap.cpp1/*COMMENT
LOWtests/test_scalar_quantizer.cpp1/*COMMENT
LOWtests/test_custom_result_handler.cpp1/*COMMENT
LOWtests/test_read_index_deserialize.cpp1/*COMMENT
LOWtests/test_read_index_deserialize.cpp21#include <faiss/IndexBinaryHNSW.h>COMMENT
LOWtests/test_read_index_deserialize.cpp141// set_derived_values(). The fix validates M > 0 in read_ProductQuantizerCOMMENT
LOWtests/test_read_index_deserialize.cpp181// -----------------------------------------------------------------------COMMENT
LOWtests/test_read_index_deserialize.cpp441 push_val<int>(buf, 73); // r2 = 73 (decode cache too large for dsq=16)COMMENT
LOWtests/test_read_index_deserialize.cpp761// -----------------------------------------------------------------------COMMENT
LOWtests/test_read_index_deserialize.cpp821 // d=16 → code_size=2 → 16 bits availableCOMMENT
LOWtests/test_read_index_deserialize.cpp1261 // 1 nested ResidualQuantizer (sub-dimension = d / nsplits = 4)COMMENT
LOWtests/test_read_index_deserialize.cpp3661 push_val<int>(buf, 32); // bbsCOMMENT
LOW.github/actions/build_cmake/action.yml101COMMENT
LOWfaiss/index_factory.cpp21#include <faiss/Index2Layer.h>COMMENT
LOWfaiss/index_factory.cpp41#include <faiss/IndexNSG.h>COMMENT
LOWfaiss/IndexFastScan.cpp1/*COMMENT
LOWfaiss/factory_tools.cpp21#include <faiss/IndexIVFFlat.h>COMMENT
LOWfaiss/CMakeLists.txt601 endif()COMMENT
LOWfaiss/IndexHNSW.h41 // When set to false, level 0 in the knn graph is not initialized.COMMENT
LOWfaiss/IndexHNSW.cpp21#include <cstdint>COMMENT
LOWfaiss/IndexFlat.cpp1/*COMMENT
LOWfaiss/IndexFlat.cpp801 FAISS_THROW_IF_NOT(batch_size == 1);COMMENT
LOWfaiss/AutoTune.cpp21COMMENT
LOWfaiss/IndexIVFPQ.cpp21#include <faiss/utils/distances_dispatch.h>COMMENT
LOWfaiss/index_io.h121// When nonzero, deserialization rejects loop-driving fields (nlist,COMMENT
LOWfaiss/index_io.h141// When nonzero, deserialization rejects IndexLattice payloads whoseCOMMENT
LOWfaiss/IndexBinaryIVF.cpp21#include <faiss/IndexLSH.h>COMMENT
LOWfaiss/SuperKMeans.h1/*COMMENT
LOWfaiss/IndexIVFFlatPanorama.h21/// IDEA:COMMENT
LOWfaiss/IndexIVFRaBitQFastScan.cpp1/*COMMENT
LOWfaiss/SuperKMeans.cpp1/*COMMENT
LOWfaiss/SuperKMeans.cpp21#include <faiss/impl/AdSampling.h>COMMENT
LOWfaiss/IVFlib.cpp1/*COMMENT
LOWfaiss/IndexIVFRaBitQFastScan.h1/*COMMENT
LOWfaiss/IndexBinaryHNSW.cpp21#include <faiss/impl/AuxIndexStructures.h>COMMENT
LOWfaiss/Clustering.h41 /// If fewer than this number of training vectors per centroid are provided,COMMENT
LOWfaiss/Clustering.h61COMMENT
LOWfaiss/IndexRowwiseMinMax.h21/// Basically, this index performs a rowwise scaling to [0,1] of every rowCOMMENT
LOWfaiss/clone_index.cpp21#include <faiss/IndexEDEN.h>COMMENT
LOWfaiss/clone_index.cpp41#include <faiss/IndexRefine.h>COMMENT
LOWfaiss/impl/RaBitQuantizer.h21struct ResultHandlerUnordered;COMMENT
186 more matches not shown…
Unused Imports102 hits · 96 pts
SeverityFileLineSnippetContext
LOWtests/test_referenced_objects.py7CODE
LOWtests/test_referenced_objects.py7CODE
LOWtests/test_referenced_objects.py7CODE
LOWtests/test_referenced_objects.py7CODE
LOWtests/test_product_quantizer.py6CODE
LOWtests/test_product_quantizer.py6CODE
LOWtests/test_product_quantizer.py6CODE
LOWtests/test_index_binary_from_float.py6CODE
LOWtests/test_index_binary_from_float.py6CODE
LOWtests/test_index_binary_from_float.py6CODE
LOWtests/test_binary_io.py8CODE
LOWtests/test_binary_io.py8CODE
LOWtests/test_binary_io.py8CODE
LOWtests/test_binary_io.py8CODE
LOWtests/test_scalar_quantizer_correctness.py6CODE
LOWtests/test_scalar_quantizer_correctness.py6CODE
LOWtests/test_scalar_quantizer_correctness.py6CODE
LOWtests/test_wheel_smoke.py174CODE
LOWtests/bench_transposed_encode.py6CODE
LOWtests/test_build_blocks.py6CODE
LOWtests/test_build_blocks.py6CODE
LOWtests/test_build_blocks.py6CODE
LOWtests/bench_hnsw_deterministic.py29CODE
LOWtests/test_binary_factory.py6CODE
LOWtests/test_binary_factory.py6CODE
LOWtests/test_binary_factory.py6CODE
LOWtests/test_index.py7CODE
LOWtests/test_index.py7CODE
LOWtests/test_index.py7CODE
LOWtests/test_omp_threads_py.py6CODE
LOWtests/test_omp_threads_py.py6CODE
LOWtests/test_omp_threads_py.py6CODE
LOWtests/test_omp_threads_py.py6CODE
LOWtests/test_index_accuracy.py6CODE
LOWtests/test_index_accuracy.py6CODE
LOWtests/test_index_accuracy.py6CODE
LOWtests/test_ivflib.py6CODE
LOWtests/test_ivflib.py6CODE
LOWtests/test_ivflib.py6CODE
LOWtests/common_faiss_tests.py8CODE
LOWtests/common_faiss_tests.py8CODE
LOWtests/common_faiss_tests.py8CODE
LOWtests/common_faiss_tests.py8CODE
LOWtests/test_standalone_codec.py8CODE
LOWtests/test_clustering.py6CODE
LOWtests/test_clustering.py6CODE
LOWtests/test_clustering.py6CODE
LOWcontrib/torch/clustering.py14CODE
LOWfaiss/gpu/test/test_gpu_basics.py6CODE
LOWfaiss/gpu/test/test_gpu_basics.py6CODE
LOWfaiss/gpu/test/test_gpu_basics.py6CODE
LOWfaiss/gpu/test/test_gpu_basics.py6CODE
LOWfaiss/gpu/test/test_gpu_index_refs.py6CODE
LOWfaiss/gpu/test/test_gpu_index_ivfsq.py6CODE
LOWfaiss/gpu/test/test_gpu_index.py6CODE
LOWfaiss/gpu/test/test_gpu_index.py6CODE
LOWfaiss/gpu/test/test_gpu_index.py6CODE
LOWfaiss/gpu/test/test_gpu_index.py6CODE
LOWfaiss/python/extra_wrappers.py13CODE
LOWfaiss/python/__init__.py136CODE
42 more matches not shown…
Cross-File Repetition15 hits · 75 pts
SeverityFileLineSnippetContext
HIGHtests/test_ivf_flat_panorama.py0test correctness with various n_levels parameter valuesSTRING
HIGHtests/test_flat_panorama.py0test correctness with various n_levels parameter valuesSTRING
HIGHtests/test_refine_panorama.py0test correctness with various n_levels parameter valuesSTRING
HIGHtests/test_ivf_flat_panorama.py0test edge case: more levels than dimension naturally supportsSTRING
HIGHtests/test_flat_panorama.py0test edge case: more levels than dimension naturally supportsSTRING
HIGHtests/test_refine_panorama.py0test edge case: more levels than dimension naturally supportsSTRING
HIGHtests/test_ivf_flat_panorama.py0test id selectors with dataset smaller than batch sizeSTRING
HIGHtests/test_flat_panorama.py0test id selectors with dataset smaller than batch sizeSTRING
HIGHtests/test_refine_panorama.py0test id selectors with dataset smaller than batch sizeSTRING
HIGHtests/test_ivf_flat_panorama.py0test adding vectors incrementally in multiple batchesSTRING
HIGHtests/test_flat_panorama.py0test adding vectors incrementally in multiple batchesSTRING
HIGHtests/test_refine_panorama.py0test adding vectors incrementally in multiple batchesSTRING
HIGHtests/test_ivf_flat_panorama.py0test the correctness of the ratio of dimensions scannedSTRING
HIGHtests/test_flat_panorama.py0test the correctness of the ratio of dimensions scannedSTRING
HIGHtests/test_refine_panorama.py0test the correctness of the ratio of dimensions scannedSTRING
Deep Nesting78 hits · 74 pts
SeverityFileLineSnippetContext
LOWtests/test_local_search_quantizer.py70CODE
LOWtests/test_graph_based.py828CODE
LOWtests/test_rabitq_fastscan.py180CODE
LOWtests/test_rabitq_fastscan.py561CODE
LOWtests/test_rabitq_fastscan.py710CODE
LOWtests/test_rabitq_fastscan.py757CODE
LOWtests/test_rabitq_fastscan.py809CODE
LOWtests/test_rabitq_fastscan.py850CODE
LOWtests/test_rabitq_fastscan.py934CODE
LOWtests/test_rabitq_fastscan.py1024CODE
LOWtests/test_ivf_flat_panorama.py825CODE
LOWtests/test_flat_panorama.py478CODE
LOWtests/test_flat_panorama.py721CODE
LOWtests/test_scalar_quantizer_correctness.py585CODE
LOWtests/test_fastscan_filter.py31CODE
LOWtests/test_eden.py209CODE
LOWtests/test_merge_index.py23CODE
LOWtests/test_merge_index.py91CODE
LOWtests/test_refine_panorama.py463CODE
LOWtests/test_index_composite.py721CODE
LOWtests/test_hnsw_panorama.py355CODE
LOWtests/test_index.py140CODE
LOWtests/test_index.py574CODE
LOWtests/test_rabitq.py608CODE
LOWtests/test_rabitq.py634CODE
LOWtests/test_rabitq.py655CODE
LOWtests/test_rabitq.py687CODE
LOWtests/test_rabitq.py730CODE
LOWtests/test_rabitq.py751CODE
LOWtests/test_rabitq.py784CODE
LOWtests/test_rabitq.py827CODE
LOWtests/test_rabitq.py906CODE
LOWtests/test_index_accuracy.py416CODE
LOWtests/test_refine.py199CODE
LOWtests/test_search_params.py26CODE
LOWcontrib/exhaustive_search.py60CODE
LOWcontrib/datasets.py508CODE
LOWcontrib/factory_tools.py10CODE
LOWcontrib/factory_tools.py83CODE
LOWcontrib/big_batch_search.py237CODE
LOWcontrib/big_batch_search.py219CODE
LOWfaiss/gpu/test/torch_test_contrib_gpu.py288CODE
LOWfaiss/gpu/test/torch_test_contrib_gpu.py424CODE
LOWfaiss/gpu/test/test_gpu_index_ivfsq.py113CODE
LOWbenchs/bench_hybrid_cpu_gpu.py225CODE
LOWbenchs/bench_hybrid_cpu_gpu.py292CODE
LOWbenchs/bench_quantizer.py42CODE
LOWbenchs/bench_pq_tables.py19CODE
LOWbenchs/bench_hnsw_prune_headroom.py53CODE
LOWbenchs/bench_gpu_1bn.py705CODE
LOWbenchs/bench_rabitq.py156CODE
LOWbenchs/bench_eden.py89CODE
LOWbenchs/bench_eden.py129CODE
LOWbenchs/bench_eden.py351CODE
LOWbenchs/bench_eden.py501CODE
LOWbenchs/bench_fw/optimize.py130CODE
LOWbenchs/bench_fw/benchmark.py129CODE
LOWbenchs/bench_fw/benchmark.py1169CODE
LOWbenchs/bench_fw/index.py73CODE
LOWbenchs/bench_fw/index.py271CODE
18 more matches not shown…
Decorative Section Separators14 hits · 45 pts
SeverityFileLineSnippetContext
MEDIUMCMakeLists.txt8# =============================================================================COMMENT
MEDIUMCMakeLists.txt20# =============================================================================COMMENT
MEDIUMtests/test_rabitq.py485# ==============================================================================COMMENT
MEDIUMtests/test_rabitq.py487# ==============================================================================COMMENT
MEDIUMfaiss/CMakeLists.txt6# =============================================================================COMMENT
MEDIUMfaiss/CMakeLists.txt10# =============================================================================COMMENT
MEDIUMfaiss/CMakeLists.txt90# =============================================================================COMMENT
MEDIUMfaiss/CMakeLists.txt528# =============================================================================COMMENT
MEDIUMfaiss/CMakeLists.txt533# =============================================================================COMMENT
MEDIUMfaiss/gpu/CMakeLists.txt7# =============================================================================COMMENT
MEDIUMfaiss/gpu/CMakeLists.txt19# =============================================================================COMMENT
MEDIUMfaiss/gpu/test/CMakeLists.txt7# =============================================================================COMMENT
MEDIUMfaiss/gpu/test/CMakeLists.txt19# =============================================================================COMMENT
MEDIUMfaiss/utils/simd_impl/partitioning_simdlib256.h47// ── Per-TU SIMD type aliases ──────────────────────────────────────────COMMENT
Structural Annotation Overuse26 hits · 44 pts
SeverityFileLineSnippetContext
LOWINSTALL.md118## Step 1: invoking CMakeCOMMENT
LOWINSTALL.md170## Step 2: Invoking MakeCOMMENT
LOWINSTALL.md205## Step 3: Building the python bindings (optional)COMMENT
LOWINSTALL.md216## Step 4: Installing the C++ library and headers (optional)COMMENT
LOWINSTALL.md227## Step 5: Testing (optional)COMMENT
LOW.github/workflows/index-io-backward-compatibility.yml23 # Step 1: Build with CMake and write filesCOMMENT
LOW.github/workflows/index-io-backward-compatibility.yml48 # Step 2: Install conda faiss-cpu in a clean environment and read filesCOMMENT
LOW.github/workflows/index-io-backward-compatibility.yml85 # Step 1: Install conda faiss-cpu in a clean environment and write filesCOMMENT
LOW.github/workflows/index-io-backward-compatibility.yml114 # Step 2: Build with CMake and read filesCOMMENT
LOWfaiss/impl/RaBitQuantizer.cpp117 // Step 1: Compute 1-bit quantization and base factorsCOMMENT
LOWfaiss/impl/RaBitQuantizer.cpp157 // Step 2: Compute ex-bits quantization (if nb_bits > 1)COMMENT
LOWfaiss/impl/RaBitQuantizerMultiBit.cpp263 // Step 1: Compute L2 norm of residualCOMMENT
LOWfaiss/impl/RaBitQuantizerMultiBit.cpp278 // Step 2: Normalize residualCOMMENT
LOWfaiss/impl/RaBitQuantizerMultiBit.cpp284 // Step 3: Take absolute valueCOMMENT
LOWfaiss/impl/RaBitQuantizerMultiBit.cpp290 // Step 4: Find optimal scaling factorCOMMENT
LOWfaiss/impl/RaBitQuantizerMultiBit.cpp293 // Step 5: Quantize to ex_bitsCOMMENT
LOWfaiss/impl/RaBitQuantizerMultiBit.cpp304 // Step 6: Handle negative dimensions (flip bits)COMMENT
LOWfaiss/impl/RaBitQuantizerMultiBit.cpp312 // Step 7: Pack codes into byte arrayCOMMENT
LOWfaiss/gpu_metal/MetalDistance.mm273 // Step 1: coarse distance matrixCOMMENT
LOWfaiss/gpu_metal/MetalDistance.mm297 // Step 2: coarse top-nprobeCOMMENT
LOWfaiss/gpu_metal/MetalDistance.mm308 // Step 3: IVF scanCOMMENT
LOWfaiss/gpu_metal/MetalDistance.mm340 // Step 4: mergeCOMMENT
LOWfaiss/docs/simd_dynamic_dispatch_migration.md97### Step 1: Templatize on SIMDLevelCOMMENT
LOWfaiss/docs/simd_dynamic_dispatch_migration.md138### Step 2: Split into per-SIMD translation unitsCOMMENT
LOWfaiss/docs/simd_dynamic_dispatch_migration.md195### Step 3: Wire up dispatchCOMMENT
LOWfaiss/docs/simd_dynamic_dispatch_migration.md245### Step 4: Register in build systemCOMMENT
Verbosity Indicators17 hits · 30 pts
SeverityFileLineSnippetContext
LOW.github/workflows/index-io-backward-compatibility.yml23 # Step 1: Build with CMake and write filesCOMMENT
LOW.github/workflows/index-io-backward-compatibility.yml48 # Step 2: Install conda faiss-cpu in a clean environment and read filesCOMMENT
LOW.github/workflows/index-io-backward-compatibility.yml85 # Step 1: Install conda faiss-cpu in a clean environment and write filesCOMMENT
LOW.github/workflows/index-io-backward-compatibility.yml114 # Step 2: Build with CMake and read filesCOMMENT
LOWfaiss/impl/RaBitQuantizer.cpp117 // Step 1: Compute 1-bit quantization and base factorsCOMMENT
LOWfaiss/impl/RaBitQuantizer.cpp157 // Step 2: Compute ex-bits quantization (if nb_bits > 1)COMMENT
LOWfaiss/impl/RaBitQuantizerMultiBit.cpp263 // Step 1: Compute L2 norm of residualCOMMENT
LOWfaiss/impl/RaBitQuantizerMultiBit.cpp278 // Step 2: Normalize residualCOMMENT
LOWfaiss/impl/RaBitQuantizerMultiBit.cpp284 // Step 3: Take absolute valueCOMMENT
LOWfaiss/impl/RaBitQuantizerMultiBit.cpp290 // Step 4: Find optimal scaling factorCOMMENT
LOWfaiss/impl/RaBitQuantizerMultiBit.cpp293 // Step 5: Quantize to ex_bitsCOMMENT
LOWfaiss/impl/RaBitQuantizerMultiBit.cpp304 // Step 6: Handle negative dimensions (flip bits)COMMENT
LOWfaiss/impl/RaBitQuantizerMultiBit.cpp312 // Step 7: Pack codes into byte arrayCOMMENT
LOWfaiss/gpu_metal/MetalDistance.mm273 // Step 1: coarse distance matrixCOMMENT
LOWfaiss/gpu_metal/MetalDistance.mm297 // Step 2: coarse top-nprobeCOMMENT
LOWfaiss/gpu_metal/MetalDistance.mm308 // Step 3: IVF scanCOMMENT
LOWfaiss/gpu_metal/MetalDistance.mm340 // Step 4: mergeCOMMENT
AI Slop Vocabulary9 hits · 24 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_index_accuracy.py252 index.nprobe = 4 # hopefully more robust than 1CODE
MEDIUMtests/test_index_accuracy.py310 index.nprobe = 4 # hopefully more robust than 1CODE
MEDIUMfaiss/IndexPQ.h118/// statistics are robust to internal threading, but not ifCOMMENT
MEDIUMfaiss/IndexIVFPQ.h175/// statistics are robust to internal threading, but not ifCOMMENT
MEDIUMfaiss/impl/PanoramaStats.h17/// Statistics are not robust to internal threading nor toCOMMENT
MEDIUMfaiss/gpu/test/test_gpu_index.py365 # precomputed codes also utilize the coarse quantizerCOMMENT
LOWfaiss/python/array_conversions.py94# TODO: once deprecated classes are removed, remove the dict and just useCOMMENT
MEDIUMfaiss/utils/hamming_distance/hamming_computer-avx512.h16// GenHammingComputer classes leverage SSE/AVX2 intrinsics.COMMENT
MEDIUMfaiss/utils/hamming_distance/hamming_computer-avx2.h14// GenHammingComputer classes leverage SSE/AVX2 intrinsics.COMMENT
Excessive Try-Catch Wrapping17 hits · 22 pts
SeverityFileLineSnippetContext
LOWtests/test_io.py574 except Exception:CODE
LOWtests/test_io.py606 except Exception:CODE
LOWtests/test_build_blocks.py219 except Exception:CODE
LOW…ndex_io_backward_compatibility/cmake_conda_io_utils.py255 except Exception as e:CODE
LOW…ndex_io_backward_compatibility/cmake_conda_io_utils.py288 except Exception as e:CODE
LOW…ndex_io_backward_compatibility/cmake_conda_io_utils.py318 except Exception as e:CODE
LOW…ndex_io_backward_compatibility/cmake_conda_io_utils.py348 except Exception as e:CODE
LOWcontrib/rpc.py145 except Exception as e:CODE
LOWfaiss/gpu/test/test_index_cpu_to_gpu.py43 except Exception as e:CODE
LOWfaiss/gpu/test/test_index_cpu_to_gpu.py59 except Exception as e:CODE
LOWfaiss/gpu/test/test_index_cpu_to_gpu.py97 except Exception as e:CODE
MEDIUMfaiss/gpu/test/test_index_cpu_to_gpu.py40def verify_throws_not_implemented_exception(self, factory_string):CODE
MEDIUMfaiss/gpu/test/test_index_cpu_to_gpu.py50def verify_clones_successfully(CODE
MEDIUMfaiss/gpu/test/test_index_cpu_to_gpu.py92def test_with_flag_set_to_false(self):CODE
LOWbenchs/bench_all_ivf/parse_bench_all_ivf.py139 except Exception as e:CODE
LOWdemos/offline_ivf/offline_ivf.py617 except Exception:CODE
MEDIUMdemos/offline_ivf/offline_ivf.py605def _knn_function(self, xq, xb, k, metric, thread_id=None):CODE
Self-Referential Comments7 hits · 21 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_graph_based.py426 # Create a vector with NaN in the first componentCOMMENT
MEDIUMtests/test_flat_panorama.py686 # Create a random permutationCOMMENT
MEDIUMtests/test_wheel_smoke_gpu.py26# This file is the faiss-gpu wheel smoke test. It also gets collected byCOMMENT
MEDIUMtests/test_hnsw_panorama.py437 # Create a permutation (reverse order for simplicity)COMMENT
MEDIUMtests/test_index.py868 # Create the datasetCOMMENT
MEDIUMtests/test_search_params.py167 # Create a mask of valid IDs (those in subset)COMMENT
MEDIUMfaiss/gpu/hipify.sh42 # Create a backup of the original gpu directoryCOMMENT
Modern Structural Boilerplate10 hits · 10 pts
SeverityFileLineSnippetContext
LOWcontrib/client_server.py65 def set_nprobe(self, nprobe: int) -> None:CODE
LOWcontrib/client_server.py68 def set_omp_num_threads(self, nt: int) -> None:CODE
LOWfaiss/python/__init__.py174logger = logging.getLogger(__name__)CODE
LOWfaiss/python/loader.py107logger = logging.getLogger(__name__)CODE
LOWbenchs/bench_fw/optimize.py20logger = logging.getLogger(__name__)CODE
LOWbenchs/bench_fw/benchmark.py32logger = logging.getLogger(__name__)CODE
LOWbenchs/bench_fw/index.py39logger = logging.getLogger(__name__)CODE
LOWbenchs/bench_fw/benchmark_io.py24logger = logging.getLogger(__name__)CODE
LOWbenchs/bench_fw/descriptors.py16logger = logging.getLogger(__name__)CODE
LOWbenchs/bench_fw/utils.py19logger = logging.getLogger(__name__)CODE
Redundant / Tautological Comments4 hits · 6 pts
SeverityFileLineSnippetContext
LOWtests/test_svs_py.py30# Check if LVQ/LeanVec support is availableCOMMENT
LOWtests/test_hnsw_panorama.py409 # Check if this neighbor is still in the result setCOMMENT
LOWfaiss/python/class_wrappers.py269 # Check if the attribute already exists (valid attribute)COMMENT
LOWfaiss/python/class_wrappers.py271 # Check if it exists on the instance or classCOMMENT
AI Structural Patterns6 hits · 6 pts
SeverityFileLineSnippetContext
LOWcontrib/big_batch_search.py237CODE
LOWfaiss/gpu/test/bench_approaches.py116CODE
LOWbenchs/kmeans_mnist.py35CODE
LOWbenchs/bench_hnsw_prune_headroom.py53CODE
LOWbenchs/bench_fw/utils.py178CODE
LOWdemos/offline_ivf/tests/testing_utils.py29CODE
Docstring Block Structure1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHcontrib/vecs_io.py85 Memory-mapped iterator over chunked .bvecs files. Iterates through all chunk files in order (chunk_0000.bvecs, STRING
Example Usage Blocks3 hits · 4 pts
SeverityFileLineSnippetContext
LOWfaiss/impl/ClusteringInitialization.h46/// Example usage:COMMENT
LOWfaiss/utils/extra_distances.h63/// Example usage:COMMENT
LOWdemos/index_pq_flat_separate_codes_from_codebook.py256# # Example usage:COMMENT
Slop Phrases3 hits · 4 pts
SeverityFileLineSnippetContext
LOWtests/test_build_blocks.py335 # make sure to test extreme casesCOMMENT
LOWtests/test_index_accuracy.py584 # make sure to test below and aboveCOMMENT
MEDIUMcontrib/rpc.py10This code is for demonstration purposes only, and does not include certainSTRING
Dead Code2 hits · 4 pts
SeverityFileLineSnippetContext
MEDIUMbenchs/bench_fw/index.py149CODE
MEDIUMbenchs/bench_fw/index.py150CODE