Subset Selection

2 posts

google3 min readCurated summary

​Sequential Attention: Making AI models leaner and faster without sacrificing accuracy

Sequential Attention is a greedy subset-selection method designed to make large machine-learning models smaller and faster without materially reducing accuracy. It selects features, layers, blocks, or weights one at a time using attention scores that are recalculated after each choice, allowing the model to account for nonlinear interactions and redundancy. By integrating selection into a single training process, it aims to retain the quality of traditional greedy methods while avoiding their prohibitive computational cost. ## The Subset-Selection Challenge - Feature selection removes irrelevant or redundant inputs, but finding the optimal subset is NP-hard. - Deep neural networks make selection harder because: - A feature that seems unimportant alone may be essential in combination with others. - Features that appear valuable individually may become redundant when selected together. - The same problem applies beyond input features: - Selecting embedding dimensions or chunks. - Pruning entries or blocks from weight matrices. - Choosing layers or other model components. ## How Sequential Attention Works - The method builds a subset step by step rather than weighting all candidates at once. - At each stage: - Previously selected candidates provide context. - Attention scores estimate the importance of every remaining candidate. - The highest-scoring candidate is added permanently. - The model recalculates scores to reflect the candidate’s marginal contribution. - This adaptive process can identify high-order nonlinear interactions that simpler filter methods may miss. - It uses softmax-based attention scores for ranking, but applies them sequentially instead of in a single pass. - Although greedy selection can be expensive when each candidate requires model retraining or evaluation, Sequential Attention performs selection within one training process, greatly reducing overhead. ## Main Benefits - **Efficiency and accuracy:** Candidates can be evaluated in parallel once attention scores are available, while sequential updates preserve adaptive selection. - **Interpretability:** Attention scores provide a view into which inputs or components the model considered important. - **Scalability:** The approach is intended for large candidate sets and modern deep-learning architectures. - **Reduced redundancy:** Recalculating scores after each selection helps prevent the model from repeatedly choosing overlapping or unnecessary components. ## Feature Selection - Traditional greedy feature selection repeatedly retrains or reevaluates a model for every possible feature at every step. - Sequential Attention replaces these expensive marginal-gain calculations with the model’s internal attention weights. - The algorithm: - Scores all unselected features. - Adds the feature with the highest score. - Reruns the model and updates the scores for the remaining features. - The method reportedly achieved state-of-the-art or competitive results across proteomics, image, and activity-recognition benchmarks. - Its one-pass implementation makes greedy-style selection substantially faster. - For linear regression, Sequential Attention is mathematically equivalent to Orthogonal Matching Pursuit (OMP), an established method with theoretical reliability and performance guarantees. ## Block Sparsification - Neural-network pruning removes unnecessary weights to reduce model size and improve deployment efficiency. - Block sparsification removes groups of parameters rather than individual weights, making the resulting sparsity more compatible with hardware acceleration. - Earlier approaches generally fell into two categories: - **Differentiable pruning**, which learns continuous importance proxies. - **Combinatorial optimization**, which searches directly for sparse structures. - The referenced work, “SequentialAttention++ for Block Sparsification,” aims to combine these differentiable and combinatorial approaches into a unified pruning framework. Sequential Attention is best understood as an adaptive, attention-based alternative to costly repeated subset searches. It is particularly promising when model components interact nonlinearly and when hardware-friendly sparsity or feature reduction is needed at scale.

Read original(opens in new tab)
google3 min readCurated summary

Introducing GIST: The Next Stage in Smart Sampling | Google Research

GIST is a data-subset selection algorithm designed to balance diversity and utility when training on massive datasets. It converts the difficult diversity–utility optimization problem into a series of thresholded graph problems and uses a bicriteria greedy strategy to find a high-quality subset efficiently. The algorithm guarantees at least half the value of the optimal solution, while the authors prove that improving beyond a 0.56 approximation is NP-hard. ## Why Smart Sampling Is Difficult - Large ML systems need to process datasets that are increasingly expensive to store, analyze, and train on. - Subset selection aims to choose a smaller but representative set of examples. - **Diversity** prevents redundant selections by maximizing the minimum distance between selected points, typically in embedding space. - **Utility** measures how much relevant or unique information the subset provides, modeled using monotone submodular functions. - Optimizing both objectives simultaneously is NP-hard: - A diversity-only method may select irrelevant examples. - A utility-only method may select many similar examples from one highly relevant cluster. ## How GIST Works ### Diversity Thresholding - GIST fixes a candidate minimum distance rather than optimizing the distance directly. - It builds a graph in which two data points are connected when they are closer than the chosen threshold. - Connected points are considered too similar to coexist in the selected subset. - Selecting points that are not connected enforces the desired spacing between examples. ### Utility-Constrained Independent Sets - For each threshold, GIST seeks a high-utility independent set: a group of points with no edges between them. - This corresponds to selecting valuable examples without choosing mutually conflicting or overly similar points. - Because maximum independent set is NP-complete and lacks practical general-purpose approximation algorithms, GIST uses a specially designed bicriteria greedy method. - The algorithm repeatedly selects high-scoring points and excludes nearby candidates, effectively creating “no-go zones” around selected data. ### Searching Across Thresholds - GIST evaluates all relevant distance thresholds derived from the dataset. - It greedily constructs a candidate subset for each threshold. - It returns the best candidate found across these runs. - If the optimal solution achieves minimum distance \(d\), GIST obtains comparable utility while guaranteeing a minimum distance of roughly \(d/2\). ## Theoretical Guarantees - GIST is presented as the first algorithm with a strong provable guarantee for this diversity–utility tradeoff. - Its output has at least half the value of the absolute optimum. - The authors also prove that finding a solution worth more than 0.56 of the optimum is NP-hard. - These results provide a mathematical guarantee that GIST is not merely producing empirically good subsets, but making a bounded tradeoff between informativeness and coverage. ## Practical Evaluation - GIST was evaluated against several common subset-selection approaches in ML applications. - Comparisons included: - **Random**, a simple baseline that often provides reasonable diversity. - **Margin**, which selects examples the model is uncertain about but does not explicitly promote diversity. - **k-center**, which minimizes representation gaps by keeping all data points close to a selected representative. - **Submod**, which combines utility with an older formulation of diversity. - The experiments, including image-classification benchmarks, reportedly show that GIST outperforms state-of-the-art alternatives while retaining formal guarantees. GIST is therefore a practical choice when subset selection must preserve both broad data coverage and task relevance. Its main advantage is combining competitive real-world performance with a clear approximation guarantee, rather than relying solely on heuristic results.

Read original(opens in new tab)