Skip to content

pyther-hub/Amazon_ml_challenge_2023

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Amazon_ml_challenge_2023

The project participated in the Amazon ML Challenge, which aimed to enhance product descriptions using advanced natural language processing techniques. The provided dataset consisted of a CSV file with three columns: product name, description, and bullet points. Approximately 40% of the rows had empty description and bullet point fields, leaving only the product names for all entries. The team leveraged the Universal Sentence Encoder (USE) and FAISS to perform similarity search and generate augmented product descriptions.

Methodology

  • Universal Sentence Encoder (USE): The Universal Sentence Encoder is a pre-trained deep learning model developed by Google Research. It transforms variable-length sentences or phrases into fixed-length vectors, capturing their semantic meanings. By encoding the product names using USE, the team obtained dense vector representations for each product name, which allowed for efficient similarity calculations.

  • FAISS (Facebook AI Similarity Search): FAISS is an open-source library developed by Facebook AI Research for efficient similarity search and clustering of dense vectors. It excels at handling large-scale datasets and accelerates the process of similarity matching. The team utilized FAISS to perform similarity search based on the vector encodings of product names obtained from the USE.

  • Feature Extraction with FAISS: To enable efficient similarity search, the team extracted relevant features from FAISS to fine-tune the search process. These features included distance metrics and index structures that optimized the retrieval of similar product names from the dataset.

  • Exponential Weighted Sum: Once the similarity search was performed using FAISS, the team applied an exponential weighted sum technique to combine the retrieved similar product names and their associated descriptions and bullet points. This approach prioritized more relevant and similar descriptions, providing a cohesive and comprehensive set of augmented product descriptions.

Key Features of FAISS

  • Efficient Similarity Search: FAISS is specifically optimized for similarity search tasks, where the goal is to find the nearest neighbors or similar items to a given query vector within a large dataset. It employs specialized algorithms and data structures, such as inverted file lists and quantization, to achieve significant speedups in similarity search tasks compared to traditional brute-force methods.

  • Vector Quantization: Vector quantization is a technique used in FAISS to reduce the memory footprint and speed up the search process. It involves encoding high-dimensional vectors into a smaller number of bits while preserving the similarity relationships. This quantization approach enables efficient storage and retrieval of dense vector representations.

  • Index Structures: FAISS offers different types of index structures to facilitate fast similarity searches. Some popular index structures in FAISS include IVF (Inverted File) index, HNSW (Hierarchical Navigable Small World) index, and PQ (Product Quantization) index. Each index structure is designed for specific use cases and data types.

  • GPU and CPU Support: FAISS provides support for both CPU and GPU acceleration. It utilizes GPU capabilities to speed up the computation of similarity searches, allowing for even faster processing of large-scale datasets.

  • Extensibility: FAISS is designed as a flexible and extensible library. It allows users to plug in custom distance metrics, index structures, and data preprocessing techniques to tailor the search process to their specific needs.

In summary, FAISS is a powerful library that excels in efficient similarity search and clustering of dense vectors. Its ability to handle large-scale datasets, support GPU acceleration, and offer various index structures makes it an essential tool for applications in natural language processing, computer vision, recommendation systems, and other fields that involve similarity-based retrieval and clustering tasks.

About

Amazon ML challenge solution

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published