Visualizing piecewise linear neural networks
ReLU networks compute continuous piecewise-linear functions, and visualizing a small 2-input network layer by layer shows how each layer partitions the input plane into a polyhedral complex of linear regions, one per feasible activation pattern. With 8 neurons in the first layer, only 37 of the 256 possible activation patterns are feasible in 2D. Second-layer boundaries are straight inside first-layer regions and kink or terminate at region boundaries. The regions are computed by enumerating activation patterns per parent region and checking linear-constraint feasibility. Trained networks carve the plane into many more polygons than randomly initialized ones.
Related posts
- Can you reverse engineer our neural network?
Jane Street Tech Blog hardMasterA Jane Street ML puzzle shipped a fully specified, hand-built PyTorch network with integer weights that outputs 0 for almost every input, and the writeup follows one solver's path to cracking it. The last two layers implement a 16-byte equality check using ReLU(v-x-1) - 2ReLU(v-x) + ReLU(v-x+1). The thousands of layers before them turned out to compute MD5, spotted from 32 repeating blocks of 48 layers. Along the way the solver tried integer linear programming, graph reductions that shrank 2M nodes to 75K, bound propagation and a SAT solver, all defeated by the hash's irreversibility. He also found an unintended length-encoding bug for inputs over 32 characters, but the actual answer came from brute-forcing the target hash with a large English word list once the function was identified.
- Simple considerations for simple people building fancy neural networks
Hugging Face mediumAdeptBuilding and debugging neural networks goes best with a disciplined workflow: inspect the data before modeling, establish simple baselines such as logistic regression on word2vec or fastText embeddings, and verify the implementation by overfitting a small batch (e.g. 16 examples) to near-zero loss with regularization off. Common silent bugs include wrong tensor indexing, forgetting model.eval() or zero_grad(), passing probabilities instead of logits to the loss, symmetric initialization, unused parameters, and bad tokenization. Plotting losses, parameters and gradients and printing model outputs during training helps catch problems. For hyperparameters, a random search over a manually defined grid is a strong baseline, and understanding each component beats blind tuning.
- AI-generated synthetic neurons speed up brain mapping
Google Research easyNoviceMoGen, a point cloud flow matching model built on PointInfinity, generates realistic synthetic 3D neurite shapes. It was trained on 1,795 human-verified mouse axons, and human experts could not distinguish its outputs from real neurites. Adding 10% MoGen-generated data to the training set of the PATHFINDER connectomics reconstruction model cut reconstruction errors by 4.4%, mostly by reducing merge errors. At the scale of a full mouse brain, that equals an estimated 157 person-years of manual proofreading saved. MoGen is released open source with species-specific models for mouse, zebra finch and fruit fly, and future work targets error-prone geometries and synthetic electron microscopy images.
- Faster Retrieval for Better, More Efficient RAG
Apple Machine Learning Research hardMasterMaximum inner product search can be amortized by training small neural networks offline on a known query distribution, exploiting the fact that the max-inner-product function is the convex support function of the key set, whose gradient is the best-matching key. SupportNet, a loosely constrained input convex neural network, learns per-cluster support functions to replace centroid routing in IVF indexes. On Natural Questions (~2.6M passages, 128 clusters) it reaches 95% routing recall about 1.9× faster than centroids. KeyNet maps a query to its predicted best key as a query rewriter in front of a FAISS IVF index, reaching 99% recall up to ~8× faster and scanning ~11× fewer keys. Use KeyNet when speed is the bottleneck, and SupportNet when calibrated scores are needed or models must be small.
- NPHardEval Leaderboard: Unveiling the Reasoning Abilities of Large Language Models through Complexity Classes and Dynamic Updates
Hugging Face mediumAdeptNPHardEval is a dynamic LLM reasoning benchmark of 900 automatically generated algorithmic questions: 9 problems (3 P, 3 NP-complete, 3 NP-hard), each at 10 difficulty levels. Its questions are refreshed monthly to prevent overfitting and avoid numerical computation so that logical reasoning is measured on its own. Models are scored by Weighted Accuracy, which weights higher difficulty levels linearly more, and by Failure Rate, the share of responses that cannot be parsed. Closed models led, with GPT-4 Turbo best overall. Claude 2 did best on NP-complete questions, and open models such as Yi-34b, Qwen-14b, Phi-2 and Mistral-7b beat closed ones on some tasks. Instructions for reproducing the zero-shot and few-shot runs are included.