Interactive architecture builder. Drag to pan, scroll to zoom, right-click to edit.
Build a neural network and see how it transforms words into numbers to learn, layer by layer.
Neural networks are powerful mathematical machines, but they only operate on numbers. They can't directly understand text like "hello" or "world". The first and most crucial step in Natural Language Processing (NLP) is to convert text into a numerical format that a network can process. This process is called text vectorization or word embedding.
Our interactive visualization demonstrates the key stages a neural network follows to process text data:
First, the input sentence is broken down into individual units called tokens (usually words). Each token is then mapped to a numerical vector called an embedding. This isn't just a random number; it's a multi-dimensional representation that captures the word's meaning and context. Words with similar meanings will have similar embedding vectors.
The numerical embeddings are fed into the hidden layers of the network. Each layer takes the output from the previous one and performs complex mathematical transformations. The goal is to combine the initial word-level features into higher-level abstract concepts. For example, the first hidden layer might learn to identify pairs of words, while deeper layers might learn to recognize sentence structure or sentiment.
Finally, the highly processed information from the last hidden layer reaches the output layer. This layer condenses all the learned features into a final prediction. For a task like sentiment analysis, the output layer might have two neurons: one for "positive" and one for "negative". The neuron with the highest activation value determines the model's final answer.
Use the network builder above to solidify your understanding:
Neural networks process text by first converting words into meaningful numerical vectors (embeddings). These numbers are then passed through a series of hidden layers that extract increasingly complex features. Finally, an output layer makes a prediction based on these learned features. The entire architecture, from the input dimensions to the number of hidden layers and neurons, determines the model's capacity to learn and understand language.
Neural networks are powerful mathematical machines, but they only operate on numbers. They can't directly understand text like "hello" or "world". The first and most crucial step in Natural Language Processing (NLP) is to convert text into a numerical format that a network can process. This process is called text vectorization or word embedding.