NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

A novel community detection based genetic algorithm for feature selection

Mehrdad Rostami, Kamal Berahmand, Saman Forouzandeh · DOI

TL;DR

This paper introduces CGAFS, a hybrid feature selection framework that combines graph-based community detection with genetic algorithms. By treating features as nodes in a social network and grouping them into "communities," the algorithm effectively eliminates redundant data, leading to higher classification accuracy and faster processing times than traditional meta-heuristic methods.

What Problem Does This Paper Address?

In the era of Big Data, we often deal with "the curse of dimensionality." Datasets in fields like genomics or image recognition can have thousands of features, many of which are either irrelevant (noise) or redundant (highly correlated with other features).

While meta-heuristic algorithms like Genetic Algorithms (GA) or Particle Swarm Optimization (PSO) are popular for picking the "best" features, they have a major blind spot: they often ignore the relationships between the features they select. If an algorithm picks five different features that all provide the exact same information, the model becomes unnecessarily complex and prone to overfitting. The authors set out to create a method that doesn't just find relevant features, but ensures the selected subset is diverse and non-redundant.

Methods

The authors propose the Community Detection Based Genetic Algorithm for Feature Selection (CGAFS). The workflow operates in three distinct phases:

  1. Preprocessing & Filtering: To manage computational load, the authors first calculate a Fisher Score for every feature to measure its individual "discriminatory power." They then keep only the top 100 most relevant features, discarding the obviously irrelevant noise.
  2. Feature Clustering (The Graph Theory Part): This is the core innovation. The authors calculate the Pearson correlation between features and represent the dataset as a graph where features are nodes and correlations are edges. They then use a community detection algorithm (specifically Louvain or ISCD) to automatically group similar features into clusters. Unlike K-means, this method doesn't require the user to guess the number of clusters in advance.
  3. The Genetic Algorithm with a "Repair" Twist: A GA then searches for the optimal subset of features.
  4. Multi-objective Fitness: The fitness function balances two goals: maximizing classification accuracy (using KNN) and minimizing the similarity between selected features.
  5. The Repair Operation: This is the "secret sauce." When the GA produces a new "offspring" (a subset of features), a repair operator checks the communities. If a community is over-represented, it removes redundant features; if a community is ignored, it adds one. This forces the algorithm to pick a diverse "representative" from different information neighborhoods.

Datasets

The algorithm was evaluated on six well-known benchmark datasets from the UCI machine learning repository and other sources:

  • SpamBase: 57 features (Spam detection)
  • Sonar: 60 features (Mines vs. Rocks)
  • Arrhythmia: 279 features (Cardiac patterns)
  • Madelon: 500 features (Artificial dataset)
  • Isolet: 617 features (Speech recognition)
  • Colon: 2,000 features (Gene expression)

Key Insights and Ideas

  • Features as a Social Network: By treating features like members of a community, the algorithm can identify "cliques" of information. Selecting only one or two members from each clique ensures the model isn't hearing the same story twice.
  • Global vs. Local Structure: Traditional methods look at direct (explicit) similarity. Community detection looks at the broader graph structure, capturing implicit relationships that simple correlation might miss.
  • Automated Complexity: One of the biggest headaches in clustering is choosing the number of clusters ($k$). By using community detection, the "optimal" number of feature groups is discovered mathematically based on the data's natural structure.

Key Results

The authors compared CGAFS against three other popular swarm intelligence methods: PSO (Particle Swarm), ACO (Ant Colony), and ABC (Artificial Bee Colony).

  • Higher Accuracy: CGAFS consistently outperformed the others across all three tested classifiers (KNN, SVM, and AdaBoost). For example, on the SpamBase dataset using KNN, CGAFS hit 93.99% accuracy, while the next best (PSO) was 92.54%.
  • Massive Dimensionality Reduction: The reduction was most dramatic on the Colon dataset, where the original 2,000 features were whittled down to an average of just 12.98 features while maintaining peak performance.
  • Efficiency: Despite the extra step of graph construction, CGAFS had the lowest average execution time (37.20 seconds) compared to ABC (46.06s) and ACO (45.51s), likely because the "Repair" operation narrows the search space more effectively.

Limitations and Future Work

While the results are impressive, there are a few areas for further exploration:

  • The Initial Filter: The authors manually reduced the feature set to the top 100 using Fisher scores before applying the graph logic. In extremely complex datasets, it's possible that some valuable feature interactions are lost during this initial "dumb" filtering stage.
  • Computational Scaling: While faster than other meta-heuristics, building a complete correlation graph for datasets with tens of thousands of features (like some genomic data) could become a memory bottleneck.
  • Future Directions: The authors suggest exploring "maximum clique" algorithms and more advanced social network analysis techniques to further refine how feature communities are defined.

Summary updated

BibTeX
@article{rostami2021novel,
  author = {Mehrdad Rostami and Kamal Berahmand and Saman Forouzandeh},
  title = {{A novel community detection based genetic algorithm for feature selection}},
  journal = {J. Big Data},
  year = {2021},
  doi = {10.1186/s40537-020-00398-3},
}
Figure