The cortex takes part in perception, action, and object representation. Large areas of the mammalian cortex contain neurons that respond to physical objects. However, the precise mechanisms underlying pattern detection in the cortex remain elusive. We hypothesize that a neuron will learn to detect repeated patterns impinging on its dendrites using simple Hebbian rules. To test the hypothesis, we will use two-layer uni-directional neuronal culture, with which we will precisely control the activity patterns of the input layer using optogenetics and read the output layer activity using calcium imaging. We predict that specific neurons will “learn” to respond to a particular repeated pattern and be insensitive to other random activation patterns.