
Summary
Recent developments in low-resource text classification have emerged, showcasing a parameter-free method that reportedly outperforms BERT in sentiment analysis. The approach utilizes k-nearest neighbors (KNN) for classification and employs gzip for compressing distances, which are then used as feature vectors. This method stands out for its simplicity and speed, prompting further exploration and experimentation by practitioners in the field.
The implementation begins with the creation of a dataset, which is split into training and testing groups. The core of the method revolves around calculating normalized compression distances (NCD) between text samples. By compressing the text and comparing the lengths of the compressed outputs, the algorithm generates a numerical representation that can be utilized for classification. Initial tests with a 500-sample dataset yield an accuracy of around 70%, which, while not surpassing BERT, demonstrates the potential of this straightforward approach.
Further experimentation with a larger dataset of 10,000 samples results in an accuracy of approximately 75.7%. However, the method's performance varies significantly based on sample lengths, with shorter strings often misclassified. The findings suggest that while this technique can yield promising results, it may struggle with texts that deviate from the norm in length or complexity. The exploration highlights the importance of revisiting foundational algorithms in machine learning, emphasizing that effective solutions can exist outside of deep learning paradigms.