Introducing GIST: The next stage in smart sampling
GIST (Greedy Independent Set Thresholding) selects training-data subsets that balance max-min diversity in embedding space against monotone submodular utility, with a provable guarantee of at least half the optimal value; reaching above 0.56 of optimal is proven NP-hard. It sweeps candidate distance thresholds, builds a graph linking points closer than each threshold, and greedily approximates a maximum-utility independent set for each one, achieving utility comparable to the optimum at half the optimal minimum distance. On single-shot ImageNet downsampling with ResNet-56, GIST variants beat random, margin, k-center and submodular baselines on top-1 accuracy, and the selection step's runtime is negligible next to model training.
Related posts
- Sequential Attention: Making AI models leaner and faster without sacrificing accuracy
Google Research hardMasterSequential Attention is a greedy subset-selection algorithm that runs inside a single training run. It uses softmax attention scores over unselected candidates (features, embedding chunks, weight blocks) to add the most informative one at each step, and recomputes scores so the ranking reflects marginal gain and avoids redundant picks. For feature selection it matches or beats baselines on proteomics, image and activity-recognition benchmarks, and on linear regression it is provably equivalent to Orthogonal Matching Pursuit. SequentialAttention++ combines differentiable pruning with combinatorial search to produce block-sparse weights that run efficiently on GPUs and TPUs, with compression gains on ImageNet. Planned uses include recommender embedding optimization and structured LLM pruning.
- Tuning Image Classifiers using Human-In-The-Loop
Zalando Engineering hardMasterAutoThreshold is an Expectation-Maximization procedure that re-tunes an image classifier's class-confidence threshold when product photos drift out of distribution and no labelled validation set exists. Predictions are sorted by confidence. Each iteration, human annotators label a window of m images centred on the current threshold estimate, starting from 1. The threshold is then re-estimated by maximizing a metric such as f-beta on those annotations, repeating until it converges. For a leopard-print classifier, the estimated threshold lands just before negatives start appearing among positives, as confirmed by cumulative-annotation slope plots. Only a small number of labels is needed, and those labels also seed a new training set.
- Image Similarity with Hugging Face Datasets and Transformers
Hugging Face mediumAdeptAn image similarity system can be built by embedding images with a fine-tuned Vision Transformer (CLS token from the last hidden state) and ranking candidates by cosine similarity against a query embedding. The walkthrough uses 🤗 Transformers' AutoModel and 🤗 Datasets' batched map() to embed a 100-image subset of the Beans dataset, then retrieves top-k matches from the test split. For scale, brute-force search over 768-d embeddings becomes costly in memory and compute, so dimensionality reduction via random projection and locality-sensitive hashing, or a FAISS index through Datasets' add_faiss_index(), is recommended.
- Efficient MultiModal Data Pipeline
Hugging Face mediumAdeptData loading, not the model or hardware, was the bottleneck in nanoVLM training: naive pad-to-longest batching wasted roughly 60% of each batch on padding tokens. The pipeline is rebuilt step by step, first with a fixed max length that drops long samples, then by treating batching as a knapsack/bin-packing problem using a PyTorch IterableDataset, worker sharding and a producer-consumer queue. Greedy packing is compared with First Fit Decreasing on toy data. The final ConstantLengthDataset applies a balanced greedy knapsack that respects both token and image budgets, an approach taken from NVIDIA's Eagle 2 paper, and produces dense multimodal batches with minimal padding.
- Machine Learning in Content Moderation at Etsy
Etsy Code as Craft mediumAdeptEtsy's Trust & Safety team detects policy-violating listings with a supervised multimodal classifier that combines an ALBERT text encoder and an EfficientNet image encoder. The two embeddings are fused EmbraceNet-style by late concatenation, followed by a softmax over violation classes plus a neutral no-violation class, and the model is trained with focal loss to handle class imbalance. Training data pairs annotated violations with hard negatives (items reviewed and found not violating) and randomly sampled easy negatives, split by time for progressive evaluation. Because true recall can't be measured at Etsy's listing volume, the team uses an annotated recall proxy, rolls out new challenger models against the champion via canary A/B tests, and retrains when monitoring shows performance degrading. The system has removed over 100,000 violations in a year.