Due to the effect of a spatial context or temporal context, the perceived orientation of a test line or grating pattern can appear tilted away from its physical orientation. The tilt illusion (TI) is the phenomenon that the perceived orientation of a test line or grating is altered by the presence of surrounding lines or grating with a different orientation (spatial context; see Fig.1). And the tilt aftereffect (TAE) is the phenomenon that the perceived orientation is changed after prolonged inspection of another oriented line or grating (temporal context; see Fig.2).
 It has been reported that the magnitude and the direction of the perceived orientation shift depends on the relative orientation between test and contextual stimuli (see Fig.3). Psychophysics experiments have shown that relative orientations between 0 deg and about 50 deg produce repulsion effects (the test line or grating tends to rotate away from the contextual stimulus), which is known as the direct form of the tilt effect; but larger relative orientations up to 90 deg produce attraction effects (the test line or grating tends to rotate towards the contextual stimulus), which is known as the indirect form of the tilt effect. It has been observed repeatedly that indirect effects are smaller than direct effects. The repulsion peak is about 3 degrees usually when the relative orientation between the test and contextual stimuli is around 20 degrees; and the attraction peak is usually maximally 0.5 degrees when the relative orientation is around 70 degrees (see Fig.3).
 These effects were first studied by Gibson in 1937. The subject's vision was restricted so that he could see a black line (the test line) bisecting a white circular field, and he could grasp the edges of a disk to rotate the line about its midpoint. An experimenter would sit behind the disk to set the stimuli and to record the subject's adjusted position of the line. During the tilt aftereffect experiment, the subject was required to look at an oriented line for four minutes, and then to adjust another line to a position which appeared to be vertical. In the simultaneous tilt illusion experiment, a tilted grating was introduced into the circular field of the subject, and the subject was supposed to set the adjustable line to vertical before and after the tilted grating had been superposed on it. Both experiments showed that the position which appeared to follow the subject's perceived vertical was slightly off the objective vertical, and the perceived orientation shifts depended on the relative orientation between the test line and the adapted line or the simultaneously induced line.
 The tilt effects have been tested with various stimulus parameters, such as spatial frequency, color, luminance and contrast differences between the test grating and the contextual grating, and disparity depth or temporal separation between them. Dichoptic presentation, "invisible" and natural image contextual stimuli have also been studied.
 It has been shown that both the TAE and the TI are spatial frequency specific, since both effects (TI and TAE) of the direct form (repulsion) are reduced considerably if the test and the contextual grating differ in spatial frequency. It has been further suggested by Wenderoth and Johnstone (1988) that separation between the contextual and test stimuli, with either the spatial gap or the spatial frequency difference, reduces the magnitude of the direct but not the indirect tilt illusion. They also showed that reducing the diameter of the contextual stimulus reduces the direct effect but the indirect effects are relatively constant.
 According to Durant's paper in 2006, in the direct form of tilt effects, the largest illusion occurs when the test stimulus and the context surround are presented simultaneously; the spatial gap, the relative contrast and depth cues result in a reduced TI. Experiments also show that both TI and TAE occur for contextual and test stimuli that differ in color and luminance.
 When the test line is presented in one eye and the context in the other (dichoptic presentation), the magnitude of the tilt illusion reduces), suggesting that at least part of the effect is due to monocular cells. And a reversed tilt effect was observed very recently: a direct form (repulsion) of TI under monocular presentation becomes indirect (attraction) for dichoptic stimulation, when the vertical test line inclined by a 20 deg line.
 Another interesting experiment was conducted by Clifford and Harris (2005), in which the contextual surround was followed immediately by a random noise mask covering the surround but not the center, so the contextual surround would not be consciously perceived. It turned out that an oriented contextual grating can affect the perceived orientation of the test grating even outside of awareness of this context.
 Furthermore, the illusion maintains when contextual textures have a broad range of orientations (e.g. natural images), even those without a clearly perceivable orientation; other oriented features, including illusory contours, an ellipse, a moving dot and a row of dots or lines, also can induce a robust tilt illusion.
 A hypothesis proposed by Blakemore et al. (1971) suggested that TAE and TI were both caused by lateral inhibition between cortical orientation detectors. Orientation detectors are evenly in favor of different orientations, but the presence of context could manipulate responses of orientation detectors resulting in detection biases. This hypothesis has been tested and developed.
 Gibson and Radner (1937) suggested that the TAE occurs because prolonged inspection of a tilted contextual stimulus results in the adaptation to the nearest vertical or horizontal axis of space; therefore, a subsequent vertical test stimulus would tilt away from the vertical or horizontal axis (similar to the idea of color or motion afterimage). However, this adaptation theory predicts a symmetrical TAE with relative orientations between 0 and 45 deg and 45 to 90 deg separation, which is inconsistent with the psychophysical data – the zero crossing occurs closer to 50 or 55 deg rather than 45 deg.
 Kohler and Wallach (1944) suggested a "cortical satiation" theory to explain aftereffects. Based on this theory, those cortical neurons tuned to orientations between the test and contextual stimuli would normally be excited by either stimulus alone. However, they would be inhibited when both stimuli are presented resulting in a shift apart of the peaks of excitation. By introducing large-angle disinhibition, this theory could also be used to explain indirect tilt effects.
 Around the 1970s, this theory has been developed into lateral inhibition theory by Blakemore et al. As in the visual cortex of the cat or the monkey, there are also orientation detectors in the human brain. Any orientation detector in the human visual cortex is excited by a relatively narrow range of orientations (preferred orientations) and is inhibited by a much broader band. The presentation of a single line would be expected to produce a distribution of activity among the population of orientation detectors which is in favor of the stimulated orientation (orientation tuning). The context would generate another distribution in favor of the contextual orientation. By simply adding these two distributions, the peaks of activity in this compound distribution are slightly shifted apart from the individual peaks produced by the single lines. Therefore, when two lines forming an acute angle should appear to be shifted away from each other in orientation (repulsion). Experimentally measured changes in the activity of such orientation detectors in the brain have been shown to correlate closely with the measured change in perceived orientation.
 Furthermore, mechanistic models of orientation tuning are used to assess the neural basis of experimental findings on tilt effects. Changes on tuning curves would shift population response resulting in tilt biases. Contextual stimuli can possibly change neural firing rates, tuning widths, and preferred orientations, which depends on the relationship between the orientation of the contextual stimuli and the preferred orientation of the neurons.
 Schwartz et al. (2009) proposed that natural scene statistics could also effect changes on orientation tuning curves with the presence of context. The coordination between the surround and the center across segmentation boundaries is greatly reduced, and our visual system takes advantage of this natural statistics feature: increased evidence for segmentation information leads the visual system to decouple the coordination between the center and surround. In their model, a segmentation probability between the test center and context is introduced to control the amount of contextual modulation. And they showed that this model predicts both the direct and indirect forms in the tilt illusion.
 The effect of context on tilt also can be detected by measuring how the electrophysiological responses of single or population neurons to the test stimuli are changed by context. Electrophysiological results indicate contextual stimuli could suppress or enhance neuron firing rates, cause broadening or sharpening of orientation tuning widths, and shifts in preferred orientation. It has also been shown that responses of population neurons (by adding individual responses together) are changed by the context.
 Fang et al. (2005) provided fMRI evidence on the tilt aftereffect: after long-term adaptation to an oriented grating, the fMRI response in the human V1, V2, V3/VP, V3A and V4 to a test grating was proportional to the relative orientation between the adapted and test grating.
 The simultaneous tilt illusion is generated due to spatial context, and the tilt aftereffect is due to temporal context; experimental data however show many similarities between them. Schwartz et al. (2007) reviewed the psychophysical and electrophysiological parallels between the TI and TAE, which are probably revealing functional commonality between spatial and temporal context. It has been shown that when an aftereffect and a simultaneous illusion of opposite biases were paired (first adapting to a clockwise oriented line and then presenting the vertical test line with a counterclockwise inducing line), the two effects summed linearly, which also suggests a common mechanism of TAE and TI.
 It has been suggested that this similarity between the spatial and temporal effect could be explained by the natural scene statistics in which spatial and temporal context always share features, since objects are typically smooth and change slowly. And our visual system adapts these statistics features in order to code information efficiently. However, there is not always a clear temporal analogue to spatial features. For example, spatial features have a key role in linking signals across space to get boundaries inference, while temporal signals may not play the same role.