Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Ok-landscape
GitHub Repository: Ok-landscape/computational-pipeline
Path: blob/main/latex-templates/templates/cognitive-science/attention.tex
51 views
unlisted
1
% Computational Models of Visual Attention
2
% Topics: Spotlight and zoom-lens models, feature integration theory, biased competition, saliency maps, visual search
3
% Style: Cognitive neuroscience research report with computational models
4
5
\documentclass[a4paper, 11pt]{article}
6
\usepackage[utf8]{inputenc}
7
\usepackage[T1]{fontenc}
8
\usepackage{amsmath, amssymb}
9
\usepackage{graphicx}
10
\usepackage{siunitx}
11
\usepackage{booktabs}
12
\usepackage{subcaption}
13
\usepackage[makestderr]{pythontex}
14
15
% Theorem environments
16
\newtheorem{definition}{Definition}[section]
17
\newtheorem{theorem}{Theorem}[section]
18
\newtheorem{example}{Example}[section]
19
\newtheorem{remark}{Remark}[section]
20
21
\title{Computational Models of Visual Attention: From Saliency Maps to Biased Competition}
22
\author{Cognitive Neuroscience Laboratory}
23
\date{\today}
24
25
\begin{document}
26
\maketitle
27
28
\begin{abstract}
29
This report presents a computational investigation of visual attention mechanisms using models inspired by cognitive neuroscience research. We implement the feature integration theory (FIT) framework to simulate visual search tasks, construct bottom-up saliency maps based on multi-feature integration, model the attentional spotlight using Gaussian spatial weighting functions, and analyze the attentional blink phenomenon in rapid serial visual presentation (RSVP) paradigms. The computational models demonstrate how attention operates through both spatial selection (spotlight and zoom-lens mechanisms) and feature-based enhancement (biased competition), producing reaction time patterns and accuracy metrics consistent with behavioral data from human observers.
30
\end{abstract}
31
32
\section{Introduction}
33
34
Visual attention is the cognitive mechanism that selectively enhances processing of task-relevant information while suppressing irrelevant distractors. Understanding attention is fundamental to cognitive science because it reveals how the brain overcomes processing bottlenecks and allocates limited computational resources. Multiple theoretical frameworks have emerged to explain attention, ranging from early selection models that filter information based on spatial location to late selection models that operate on fully processed semantic representations.
35
36
\begin{definition}[Selective Attention]
37
Selective attention is the cognitive process that prioritizes relevant stimuli for enhanced processing through mechanisms including spatial selection (location-based filtering), feature-based selection (enhancement of specific features across the visual field), and object-based selection (selection of coherent perceptual objects).
38
\end{definition}
39
40
\section{Theoretical Framework}
41
42
\subsection{Feature Integration Theory}
43
44
Anne Treisman's feature integration theory (FIT) proposes that visual attention operates in two stages: a parallel preattentive stage that detects simple features across the entire visual field, followed by a serial attentive stage that binds features together to form coherent object representations.
45
46
\begin{theorem}[Feature vs Conjunction Search]
47
Under FIT, search for a target defined by a single feature (feature search) proceeds in parallel with constant reaction time independent of set size. Search for a target defined by a conjunction of features (conjunction search) requires serial attention with reaction time linearly proportional to set size: $RT = RT_0 + k \cdot n$, where $n$ is set size and $k$ is the search slope.
48
\end{theorem}
49
50
\begin{definition}[Illusory Conjunctions]
51
When attention is divided or overloaded, features from different objects may be incorrectly bound together, creating illusory conjunctions. This phenomenon supports the idea that feature binding requires focal attention.
52
\end{definition}
53
54
\subsection{Biased Competition Model}
55
56
The biased competition model, developed by Desimone and Duncan, proposes that visual processing involves competitive interactions among stimulus representations, with attention biasing the competition in favor of behaviorally relevant stimuli.
57
58
\begin{definition}[Biased Competition]
59
Multiple stimuli within a neuron's receptive field compete for neural representation. Attention biases this competition through top-down signals that enhance responses to attended stimuli and suppress responses to unattended stimuli, implementing a form of competitive selection at the neural level.
60
\end{definition}
61
62
\subsection{Saliency Map Theory}
63
64
Bottom-up attention can be modeled through saliency maps that integrate multiple feature dimensions (color, orientation, intensity) to compute a spatial map of visual conspicuity. The saliency at location $(x,y)$ is computed as:
65
66
\begin{equation}
67
S(x,y) = \sum_{i=1}^{N} w_i \cdot F_i(x,y)
68
\end{equation}
69
70
where $F_i(x,y)$ represents the feature contrast for feature channel $i$ and $w_i$ are channel weights. Regions with high saliency automatically capture attention.
71
72
\subsection{Spatial Models: Spotlight and Zoom-Lens}
73
74
\begin{definition}[Spotlight Model]
75
The spotlight model treats attention as a beam that illuminates a contiguous region of space, with enhanced processing within the spotlight and degraded processing outside it. The spotlight can be modeled as a Gaussian weighting function:
76
\begin{equation}
77
w_{spatial}(r) = \exp\left(-\frac{r^2}{2\sigma^2}\right)
78
\end{equation}
79
where $r$ is distance from the attended location and $\sigma$ controls spotlight size.
80
\end{definition}
81
82
\begin{remark}[Zoom-Lens Variant]
83
The zoom-lens model extends the spotlight model by allowing the attentional beam to vary in size (spatial extent). Smaller spotlights provide higher resolution processing over smaller regions, while larger spotlights provide coarser processing over broader areas.
84
\end{remark}
85
86
\section{Computational Analysis}
87
88
We now implement computational models of the attention mechanisms described above, simulating behavioral experiments and analyzing the resulting performance patterns.
89
90
\subsection{Visual Search Simulation: Feature Integration Theory}
91
92
Visual search tasks provide critical evidence for theories of attention. We simulate feature search (target differs in one feature) and conjunction search (target differs in multiple features) to demonstrate the qualitative differences predicted by feature integration theory.
93
94
\begin{pycode}
95
import numpy as np
96
import matplotlib.pyplot as plt
97
from scipy.optimize import curve_fit
98
from scipy.stats import linregress
99
from scipy.ndimage import gaussian_filter
100
101
np.random.seed(42)
102
103
# Visual search simulation: Feature Integration Theory
104
def simulate_visual_search(set_sizes, search_type='feature', num_trials=100):
105
"""
106
Simulate visual search experiments.
107
108
search_type: 'feature' or 'conjunction'
109
Returns: reaction times and accuracy for each set size
110
"""
111
rt_data = []
112
accuracy_data = []
113
114
for n in set_sizes:
115
if search_type == 'feature':
116
# Feature search: parallel processing
117
# RT is roughly constant regardless of set size
118
base_rt = 450 # ms
119
slope = 2 # very shallow slope
120
noise_sd = 50
121
else: # conjunction search
122
# Conjunction search: serial processing
123
# RT increases linearly with set size
124
base_rt = 500 # ms
125
slope = 35 # steep slope
126
noise_sd = 80
127
128
# Generate RTs for this set size
129
mean_rt = base_rt + slope * n
130
rts = np.random.normal(mean_rt, noise_sd, num_trials)
131
rts = np.maximum(rts, 200) # minimum RT
132
133
# Accuracy decreases slightly with set size for conjunction
134
if search_type == 'feature':
135
accuracy = 0.98 - 0.001 * n + np.random.normal(0, 0.02)
136
else:
137
accuracy = 0.95 - 0.005 * n + np.random.normal(0, 0.03)
138
139
accuracy = np.clip(accuracy, 0.5, 1.0)
140
141
rt_data.append(rts)
142
accuracy_data.append(accuracy)
143
144
return rt_data, accuracy_data
145
146
# Set sizes to test
147
set_sizes = np.array([4, 8, 12, 16, 20, 24])
148
149
# Simulate both search types
150
rt_feature, acc_feature = simulate_visual_search(set_sizes, 'feature', num_trials=100)
151
rt_conjunction, acc_conjunction = simulate_visual_search(set_sizes, 'conjunction', num_trials=100)
152
153
# Compute mean RTs
154
mean_rt_feature = np.array([np.mean(rts) for rts in rt_feature])
155
mean_rt_conjunction = np.array([np.mean(rts) for rts in rt_conjunction])
156
157
# Fit linear models: RT = intercept + slope * set_size
158
slope_feature, intercept_feature, r_feature, p_feature, se_feature = linregress(
159
set_sizes, mean_rt_feature)
160
slope_conjunction, intercept_conjunction, r_conjunction, p_conjunction, se_conjunction = linregress(
161
set_sizes, mean_rt_conjunction)
162
163
# Store slopes for later reference in conclusions
164
search_slope_feature = slope_feature
165
search_slope_conjunction = slope_conjunction
166
\end{pycode}
167
168
The simulation above models the classic dissociation between feature and conjunction search. In feature search, where the target is defined by a single distinctive feature (e.g., a red item among green items), detection can proceed in parallel across the visual field. This predicts flat search functions with minimal increases in reaction time as set size grows. By contrast, conjunction search requires serial examination of items to bind features together, producing steep linear search slopes.
169
170
The fitted regression models quantify these patterns, revealing search slopes of approximately \py{search_slope_feature:.1f} ms/item for feature search versus \py{search_slope_conjunction:.1f} ms/item for conjunction search. This 15-20 fold difference in slope is consistent with the distinction between parallel and serial processing mechanisms.
171
172
\subsection{Saliency Map Construction}
173
174
Bottom-up attention is driven by stimulus salience, computed by integrating local feature contrasts across multiple feature dimensions. We construct a saliency map by combining color, orientation, and intensity contrast maps.
175
176
\begin{pycode}
177
# Saliency map computation
178
def compute_feature_contrast(image, feature_type='intensity'):
179
"""
180
Compute local contrast for a given feature dimension.
181
Uses center-surround differences at multiple scales.
182
"""
183
h, w = image.shape
184
contrast_map = np.zeros((h, w))
185
186
# Center-surround at multiple scales
187
scales = [(3, 9), (5, 15), (7, 21)]
188
189
for center_size, surround_size in scales:
190
center = gaussian_filter(image, center_size)
191
surround = gaussian_filter(image, surround_size)
192
contrast = np.abs(center - surround)
193
contrast_map += contrast
194
195
# Normalize
196
if contrast_map.max() > 0:
197
contrast_map = contrast_map / contrast_map.max()
198
199
return contrast_map
200
201
# Create a synthetic visual scene (64x64 grid)
202
scene_size = 64
203
visual_scene = np.random.rand(scene_size, scene_size) * 0.3
204
205
# Add salient regions
206
# Region 1: bright spot (intensity salient)
207
visual_scene[15:20, 15:20] = 0.9
208
209
# Region 2: oriented edge (orientation salient)
210
visual_scene[45:55, 10:12] = 0.8
211
212
# Region 3: moderate contrast region
213
visual_scene[30:38, 45:53] = 0.6
214
215
# Compute feature contrast maps
216
intensity_contrast = compute_feature_contrast(visual_scene, 'intensity')
217
orientation_contrast = compute_feature_contrast(np.gradient(visual_scene)[0], 'orientation')
218
color_contrast = compute_feature_contrast(visual_scene + 0.1 * np.random.randn(scene_size, scene_size), 'color')
219
220
# Combine into saliency map
221
weight_intensity = 0.4
222
weight_orientation = 0.3
223
weight_color = 0.3
224
225
saliency_map = (weight_intensity * intensity_contrast +
226
weight_orientation * orientation_contrast +
227
weight_color * color_contrast)
228
229
# Find peak saliency location
230
max_saliency = np.max(saliency_map)
231
peak_location = np.unravel_index(np.argmax(saliency_map), saliency_map.shape)
232
\end{pycode}
233
234
The saliency map integrates information from multiple feature channels using weighted linear combination. Each feature channel computes center-surround differences at multiple spatial scales to identify regions with high local contrast. The resulting saliency map predicts that attention will be automatically drawn to the location at (\py{peak_location[0]}, \py{peak_location[1]}) with maximum saliency of \py{max_saliency:.3f}, demonstrating how bottom-up attention operates independently of task goals.
235
236
This saliency-based attention mechanism explains phenomena such as pop-out effects in visual search and the capture of attention by task-irrelevant but highly salient distractors. The model aligns with the influential computational framework proposed by Itti and Koch for predicting eye movements and attentional deployment.
237
238
\subsection{Attentional Spotlight: Gaussian Spatial Weighting}
239
240
The spatial spotlight model implements location-based selection by applying Gaussian weights to the visual field, with processing efficiency declining as a function of distance from the attended location.
241
242
\begin{pycode}
243
# Attentional spotlight model
244
def gaussian_spotlight(grid_size, center, sigma):
245
"""
246
Create a Gaussian attentional spotlight.
247
248
grid_size: size of spatial grid
249
center: (x, y) center of attention
250
sigma: spatial extent of spotlight
251
"""
252
x = np.arange(grid_size)
253
y = np.arange(grid_size)
254
X, Y = np.meshgrid(x, y)
255
256
cx, cy = center
257
distance = np.sqrt((X - cx)**2 + (Y - cy)**2)
258
spotlight = np.exp(-distance**2 / (2 * sigma**2))
259
260
return spotlight
261
262
# Create spotlights with different sizes (zoom-lens)
263
grid_size = 64
264
center = (32, 32)
265
266
spotlight_small = gaussian_spotlight(grid_size, center, sigma=5)
267
spotlight_medium = gaussian_spotlight(grid_size, center, sigma=10)
268
spotlight_large = gaussian_spotlight(grid_size, center, sigma=15)
269
270
# Simulate processing efficiency as function of distance
271
distances = np.arange(0, 30)
272
sigma_attention = 8
273
efficiency = np.exp(-distances**2 / (2 * sigma_attention**2))
274
275
# Reaction time increases with decreased efficiency
276
baseline_rt = 400 # ms
277
max_rt_cost = 300 # ms
278
reaction_times = baseline_rt + max_rt_cost * (1 - efficiency)
279
280
# Fit to estimate spatial gradient
281
def inverse_exp(d, rt0, cost, sigma_fit):
282
return rt0 + cost * (1 - np.exp(-d**2 / (2 * sigma_fit**2)))
283
284
popt_spotlight, _ = curve_fit(inverse_exp, distances, reaction_times,
285
p0=[400, 300, 8])
286
rt_baseline_fit, rt_cost_fit, sigma_fit = popt_spotlight
287
\end{pycode}
288
289
The Gaussian spotlight model captures the graded nature of spatial attention, where processing efficiency decreases smoothly with distance from the focus of attention rather than exhibiting a sharp boundary. The fitted parameters reveal a baseline reaction time of \py{rt_baseline_fit:.1f} ms at the attended location, increasing to approximately \py{rt_baseline_fit + rt_cost_fit:.1f} ms at unattended peripheral locations. The spatial extent parameter sigma = \py{sigma_fit:.1f} indicates the effective radius of the attentional spotlight.
290
291
This model accounts for cuing effects in spatial attention paradigms, where valid spatial cues that direct attention to the target location produce faster and more accurate responses compared to invalid cues. The zoom-lens extension allows the spotlight to expand or contract depending on task demands, trading spatial resolution for spatial coverage.
292
293
\subsection{Attentional Blink: Temporal Attention Dynamics}
294
295
When observers monitor a rapid serial visual presentation (RSVP) stream for two targets, detection of the first target (T1) impairs detection of the second target (T2) when it appears 200-500 ms later. This attentional blink reveals temporal limitations of attention.
296
297
\begin{pycode}
298
# Attentional blink simulation
299
def simulate_attentional_blink(lags, num_trials=200):
300
"""
301
Simulate attentional blink in RSVP.
302
303
lags: temporal separations between T1 and T2 (in units of items)
304
Returns: T2 accuracy given T1 detected
305
"""
306
# Convert lag to milliseconds (assume 100 ms per item)
307
ms_per_item = 100
308
309
accuracy_t2 = []
310
311
for lag in lags:
312
time_gap = lag * ms_per_item # ms
313
314
# Attentional blink function
315
# Lag 1: sparing (T2 still in attentional window)
316
# Lag 2-4: blink (attentional resources depleted)
317
# Lag 5+: recovery (attention recovered)
318
319
if lag == 1:
320
# Lag-1 sparing
321
mean_acc = 0.85
322
elif lag >= 2 and lag <= 4:
323
# Blink period
324
blink_depth = 0.40 # maximum deficit
325
recovery_rate = 0.15
326
mean_acc = 0.85 - blink_depth + recovery_rate * (lag - 2)
327
else:
328
# Full recovery
329
mean_acc = 0.85
330
331
# Add noise
332
acc = np.random.normal(mean_acc, 0.08, num_trials)
333
acc = np.clip(acc, 0, 1)
334
accuracy_t2.append(np.mean(acc))
335
336
return np.array(accuracy_t2)
337
338
# Simulate blink
339
lags = np.array([1, 2, 3, 4, 5, 6, 7, 8])
340
t2_accuracy = simulate_attentional_blink(lags, num_trials=200)
341
342
# Find minimum accuracy (blink depth)
343
blink_minimum = np.min(t2_accuracy)
344
blink_lag = lags[np.argmin(t2_accuracy)]
345
lag1_accuracy = t2_accuracy[0]
346
recovered_accuracy = t2_accuracy[-1]
347
\end{pycode}
348
349
The attentional blink simulation reveals the characteristic temporal dynamics of attention allocation. At lag 1 (100 ms separation), T2 benefits from lag-1 sparing with accuracy of \py{lag1_accuracy:.2f}, reflecting the continued availability of attentional resources deployed for T1 processing. However, at lag \py{blink_lag} (approximately \py{blink_lag * 100} ms), accuracy drops to a minimum of \py{blink_minimum:.2f} as attentional resources are consumed by T1 consolidation into working memory. By lag 8 (\py{8 * 100} ms), attention has recovered and T2 accuracy returns to \py{recovered_accuracy:.2f}.
350
351
This pattern demonstrates that attention operates under temporal constraints, with a refractory period during which attentional engagement with one target temporarily impairs processing of subsequent targets. The attentional blink has been influential in revealing the stages of perceptual processing and the bottleneck at the level of working memory consolidation.
352
353
\subsection{Integrated Visualization}
354
355
\begin{pycode}
356
# Create comprehensive figure
357
fig = plt.figure(figsize=(16, 12))
358
359
# Plot 1: Visual search results
360
ax1 = fig.add_subplot(3, 3, 1)
361
ax1.scatter(set_sizes, mean_rt_feature, s=80, c='blue', edgecolor='black',
362
label='Feature Search', marker='o')
363
ax1.scatter(set_sizes, mean_rt_conjunction, s=80, c='red', edgecolor='black',
364
label='Conjunction Search', marker='s')
365
set_sizes_fine = np.linspace(4, 24, 100)
366
ax1.plot(set_sizes_fine, intercept_feature + slope_feature * set_sizes_fine,
367
'b--', linewidth=2, alpha=0.7)
368
ax1.plot(set_sizes_fine, intercept_conjunction + slope_conjunction * set_sizes_fine,
369
'r--', linewidth=2, alpha=0.7)
370
ax1.set_xlabel('Set Size (number of items)', fontsize=11)
371
ax1.set_ylabel('Reaction Time (ms)', fontsize=11)
372
ax1.set_title('Visual Search: FIT Prediction', fontsize=12, fontweight='bold')
373
ax1.legend(fontsize=9)
374
ax1.grid(True, alpha=0.3)
375
ax1.set_xlim(2, 26)
376
ax1.set_ylim(400, 1200)
377
378
# Plot 2: Search slopes comparison
379
ax2 = fig.add_subplot(3, 3, 2)
380
search_types = ['Feature', 'Conjunction']
381
slopes = [slope_feature, slope_conjunction]
382
colors_bar = ['blue', 'red']
383
bars = ax2.bar(search_types, slopes, color=colors_bar, edgecolor='black', linewidth=2, alpha=0.7)
384
ax2.set_ylabel('Search Slope (ms/item)', fontsize=11)
385
ax2.set_title('Parallel vs Serial Processing', fontsize=12, fontweight='bold')
386
ax2.set_ylim(0, max(slopes) * 1.2)
387
for i, (bar, slope) in enumerate(zip(bars, slopes)):
388
height = bar.get_height()
389
ax2.text(bar.get_x() + bar.get_width()/2., height,
390
f'{slope:.1f}', ha='center', va='bottom', fontsize=10, fontweight='bold')
391
ax2.grid(True, alpha=0.3, axis='y')
392
393
# Plot 3: Visual scene and saliency map
394
ax3 = fig.add_subplot(3, 3, 3)
395
im3 = ax3.imshow(visual_scene, cmap='gray', origin='lower')
396
ax3.scatter(peak_location[1], peak_location[0], s=200, c='red', marker='x', linewidths=3)
397
ax3.set_xlabel('X position', fontsize=11)
398
ax3.set_ylabel('Y position', fontsize=11)
399
ax3.set_title('Visual Scene', fontsize=12, fontweight='bold')
400
plt.colorbar(im3, ax=ax3, fraction=0.046)
401
402
# Plot 4: Saliency map
403
ax4 = fig.add_subplot(3, 3, 4)
404
im4 = ax4.imshow(saliency_map, cmap='hot', origin='lower')
405
ax4.scatter(peak_location[1], peak_location[0], s=200, c='cyan', marker='x', linewidths=3)
406
ax4.set_xlabel('X position', fontsize=11)
407
ax4.set_ylabel('Y position', fontsize=11)
408
ax4.set_title('Bottom-Up Saliency Map', fontsize=12, fontweight='bold')
409
plt.colorbar(im4, ax=ax4, fraction=0.046)
410
411
# Plot 5: Feature contrast maps
412
ax5a = fig.add_subplot(3, 3, 5)
413
im5a = ax5a.imshow(intensity_contrast, cmap='viridis', origin='lower')
414
ax5a.set_title('Intensity Contrast', fontsize=11, fontweight='bold')
415
ax5a.set_xlabel('X position', fontsize=10)
416
ax5a.set_ylabel('Y position', fontsize=10)
417
plt.colorbar(im5a, ax=ax5a, fraction=0.046)
418
419
# Plot 6: Spotlight shapes (zoom-lens)
420
ax6 = fig.add_subplot(3, 3, 6)
421
center_profile = spotlight_small[32, :]
422
ax6.plot(np.arange(grid_size), spotlight_small[32, :], 'b-', linewidth=2.5,
423
label='$\\sigma=5$ (narrow)', alpha=0.8)
424
ax6.plot(np.arange(grid_size), spotlight_medium[32, :], 'g-', linewidth=2.5,
425
label='$\\sigma=10$ (medium)', alpha=0.8)
426
ax6.plot(np.arange(grid_size), spotlight_large[32, :], 'r-', linewidth=2.5,
427
label='$\\sigma=15$ (wide)', alpha=0.8)
428
ax6.axvline(x=32, color='black', linestyle='--', alpha=0.5)
429
ax6.set_xlabel('Spatial Position', fontsize=11)
430
ax6.set_ylabel('Attentional Weight', fontsize=11)
431
ax6.set_title('Zoom-Lens Model', fontsize=12, fontweight='bold')
432
ax6.legend(fontsize=9)
433
ax6.grid(True, alpha=0.3)
434
ax6.set_xlim(0, grid_size)
435
ax6.set_ylim(0, 1.1)
436
437
# Plot 7: Spotlight spatial map
438
ax7 = fig.add_subplot(3, 3, 7)
439
im7 = ax7.imshow(spotlight_medium, cmap='plasma', origin='lower')
440
ax7.set_xlabel('X position', fontsize=11)
441
ax7.set_ylabel('Y position', fontsize=11)
442
ax7.set_title('Spatial Spotlight ($\\sigma=10$)', fontsize=12, fontweight='bold')
443
plt.colorbar(im7, ax=ax7, fraction=0.046)
444
445
# Plot 8: RT vs distance from spotlight center
446
ax8 = fig.add_subplot(3, 3, 8)
447
ax8.scatter(distances, reaction_times, s=70, c='steelblue', edgecolor='black', alpha=0.7)
448
distances_fine = np.linspace(0, 30, 200)
449
rt_fit = inverse_exp(distances_fine, rt_baseline_fit, rt_cost_fit, sigma_fit)
450
ax8.plot(distances_fine, rt_fit, 'r-', linewidth=2.5, label='Gaussian Fit')
451
ax8.axhline(y=rt_baseline_fit, color='green', linestyle='--', alpha=0.6,
452
label=f'Baseline RT')
453
ax8.set_xlabel('Distance from Attended Location', fontsize=11)
454
ax8.set_ylabel('Reaction Time (ms)', fontsize=11)
455
ax8.set_title('Spatial Gradient of Attention', fontsize=12, fontweight='bold')
456
ax8.legend(fontsize=9)
457
ax8.grid(True, alpha=0.3)
458
ax8.set_xlim(-1, 31)
459
460
# Plot 9: Attentional blink
461
ax9 = fig.add_subplot(3, 3, 9)
462
ax9.plot(lags, t2_accuracy, 'o-', markersize=10, linewidth=2.5, color='darkviolet',
463
markeredgecolor='black', markeredgewidth=1.5)
464
ax9.axhline(y=0.85, color='gray', linestyle='--', alpha=0.6, label='Baseline')
465
ax9.axvspan(2, 4, alpha=0.2, color='red', label='Blink Period')
466
ax9.set_xlabel('Lag (T1-T2 Separation)', fontsize=11)
467
ax9.set_ylabel('T2|T1 Accuracy', fontsize=11)
468
ax9.set_title('Attentional Blink in RSVP', fontsize=12, fontweight='bold')
469
ax9.set_xticks(lags)
470
ax9.set_ylim(0.35, 0.95)
471
ax9.legend(fontsize=9)
472
ax9.grid(True, alpha=0.3)
473
474
plt.tight_layout()
475
plt.savefig('attention_comprehensive_analysis.pdf', dpi=150, bbox_inches='tight')
476
plt.close()
477
\end{pycode}
478
479
\begin{figure}[htbp]
480
\centering
481
\includegraphics[width=\textwidth]{attention_comprehensive_analysis.pdf}
482
\caption{Comprehensive computational analysis of visual attention mechanisms: (a) Visual search reaction times showing the dissociation between parallel feature search (flat slope) and serial conjunction search (steep slope) predicted by feature integration theory; (b) Quantitative comparison of search slopes revealing the 15-fold difference between processing modes; (c) Synthetic visual scene containing regions of varying contrast and salience; (d) Bottom-up saliency map computed by integrating intensity, orientation, and color contrast channels, with peak saliency marked; (e) Intensity contrast feature map showing center-surround differences; (f) Zoom-lens model demonstrating variable spotlight sizes with different spatial extents controlled by sigma parameter; (g) Two-dimensional representation of the Gaussian attentional spotlight with medium spatial extent; (h) Spatial gradient of attention showing reaction time costs as a function of distance from the attended location, fitted with Gaussian decay function; (i) Attentional blink in rapid serial visual presentation showing lag-1 sparing, blink period (lags 2-4), and recovery, revealing temporal constraints on attention allocation.}
483
\label{fig:attention_analysis}
484
\end{figure}
485
486
\section{Quantitative Results}
487
488
\subsection{Visual Search Performance}
489
490
\begin{pycode}
491
print(r"\begin{table}[htbp]")
492
print(r"\centering")
493
print(r"\caption{Visual Search Performance by Condition}")
494
print(r"\begin{tabular}{lcccc}")
495
print(r"\toprule")
496
print(r"Search Type & Slope (ms/item) & Intercept (ms) & $R^2$ & Interpretation \\")
497
print(r"\midrule")
498
print(f"Feature Search & {slope_feature:.2f} & {intercept_feature:.1f} & {r_feature**2:.3f} & Parallel \\\\")
499
print(f"Conjunction Search & {slope_conjunction:.2f} & {intercept_conjunction:.1f} & {r_conjunction**2:.3f} & Serial \\\\")
500
print(r"\midrule")
501
print(f"Slope Ratio & {slope_conjunction/slope_feature:.1f} & --- & --- & FIT Prediction \\\\")
502
print(r"\bottomrule")
503
print(r"\end{tabular}")
504
print(r"\label{tab:visual_search}")
505
print(r"\end{table}")
506
\end{pycode}
507
508
\subsection{Saliency and Attention Allocation}
509
510
\begin{pycode}
511
print(r"\begin{table}[htbp]")
512
print(r"\centering")
513
print(r"\caption{Saliency Map Parameters and Predictions}")
514
print(r"\begin{tabular}{lcc}")
515
print(r"\toprule")
516
print(r"Parameter & Value & Interpretation \\")
517
print(r"\midrule")
518
print(f"Intensity Weight ($w_{{intensity}}$) & {weight_intensity:.2f} & Channel contribution \\\\")
519
print(f"Orientation Weight ($w_{{orient}}$) & {weight_orientation:.2f} & Channel contribution \\\\")
520
print(f"Color Weight ($w_{{color}}$) & {weight_color:.2f} & Channel contribution \\\\")
521
print(r"\midrule")
522
print(f"Peak Saliency & {max_saliency:.3f} & Maximum attention capture \\\\")
523
print(f"Peak Location & ({peak_location[0]}, {peak_location[1]}) & Predicted fixation \\\\")
524
print(r"\bottomrule")
525
print(r"\end{tabular}")
526
print(r"\label{tab:saliency}")
527
print(r"\end{table}")
528
\end{pycode}
529
530
\subsection{Spatial Attention Parameters}
531
532
\begin{pycode}
533
print(r"\begin{table}[htbp]")
534
print(r"\centering")
535
print(r"\caption{Attentional Spotlight Model Parameters}")
536
print(r"\begin{tabular}{lcc}")
537
print(r"\toprule")
538
print(r"Parameter & Estimate & Interpretation \\")
539
print(r"\midrule")
540
print(f"Baseline RT ($RT_0$) & {rt_baseline_fit:.1f} ms & Attended location \\\\")
541
print(f"Maximum RT Cost & {rt_cost_fit:.1f} ms & Unattended periphery \\\\")
542
print(f"Spatial Extent ($\\sigma$) & {sigma_fit:.1f} units & Spotlight radius \\\\")
543
print(r"\midrule")
544
print(f"RT at Attended Location & {rt_baseline_fit:.1f} ms & Peak efficiency \\\\")
545
print(f"RT at Distance 20 & {inverse_exp(20, rt_baseline_fit, rt_cost_fit, sigma_fit):.1f} ms & Peripheral cost \\\\")
546
print(r"\bottomrule")
547
print(r"\end{tabular}")
548
print(r"\label{tab:spotlight}")
549
print(r"\end{table}")
550
\end{pycode}
551
552
\subsection{Attentional Blink Dynamics}
553
554
\begin{pycode}
555
print(r"\begin{table}[htbp]")
556
print(r"\centering")
557
print(r"\caption{Attentional Blink Time Course}")
558
print(r"\begin{tabular}{lcl}")
559
print(r"\toprule")
560
print(r"Temporal Window & T2|T1 Accuracy & Mechanism \\")
561
print(r"\midrule")
562
print(f"Lag 1 (100 ms) & {lag1_accuracy:.2f} & Lag-1 sparing \\\\")
563
print(f"Lag {blink_lag} ({blink_lag*100} ms) & {blink_minimum:.2f} & Blink minimum \\\\")
564
print(f"Lag 8 (800 ms) & {recovered_accuracy:.2f} & Full recovery \\\\")
565
print(r"\midrule")
566
print(f"Blink Depth & {lag1_accuracy - blink_minimum:.2f} & Accuracy deficit \\\\")
567
print(f"Blink Duration & {300} ms & Impairment window \\\\")
568
print(r"\bottomrule")
569
print(r"\end{tabular}")
570
print(r"\label{tab:attentional_blink}")
571
print(r"\end{table}")
572
\end{pycode}
573
574
\section{Discussion}
575
576
\begin{example}[Real-World Applications]
577
These computational models of attention have practical applications in multiple domains:
578
\begin{itemize}
579
\item \textbf{Interface Design}: Saliency maps predict where users will look first on web pages and software interfaces, informing layout decisions to place critical information in high-saliency regions.
580
\item \textbf{Aviation Safety}: Understanding attentional blink helps design cockpit warning systems that avoid presenting critical information during periods when pilot attention is engaged with a prior alert.
581
\item \textbf{Medical Imaging}: Feature integration theory explains why radiologists may miss tumors in conjunction search scenarios, leading to training protocols that improve diagnostic accuracy.
582
\item \textbf{Autonomous Vehicles}: Biased competition models inform computer vision systems about how to allocate computational resources to task-relevant objects while suppressing irrelevant scene elements.
583
\end{itemize}
584
\end{example}
585
586
\begin{remark}[Neural Implementation]
587
The computational models presented here have neural correlates in specific brain regions. The frontal eye fields (FEF) and lateral intraparietal area (LIP) show activity patterns consistent with saliency maps, the superior colliculus implements priority maps for saccadic eye movements, and visual cortex exhibits enhancement of responses to attended stimuli through top-down modulation from fronto-parietal attention networks.
588
\end{remark}
589
590
\begin{remark}[Model Limitations and Extensions]
591
While these models capture important phenomena, they simplify complex cognitive processes. Extensions include: (1) incorporating object-based attention where attention selects entire perceptual objects rather than spatial regions; (2) modeling feature-based attention that enhances processing of a particular feature (e.g., red) across the entire visual field; (3) integrating task-driven top-down control signals that bias attention based on behavioral goals; (4) accounting for individual differences in attentional capacity and control.
592
\end{remark}
593
594
\section{Conclusions}
595
596
This computational investigation demonstrates multiple mechanisms of visual attention operating at different levels of processing:
597
598
\begin{enumerate}
599
\item \textbf{Feature Integration Theory}: Visual search simulations reveal a clear dissociation between parallel feature search (slope = \py{f"{slope_feature:.1f}"} ms/item) and serial conjunction search (slope = \py{f"{slope_conjunction:.1f}"} ms/item), consistent with the two-stage processing architecture proposed by Treisman. The approximately \py{f"{slope_conjunction/slope_feature:.0f}"}-fold difference in slopes confirms that feature binding requires focal attention.
600
601
\item \textbf{Saliency-Based Selection}: Bottom-up saliency maps successfully predict attention capture by computing multi-feature conspicuity. The peak saliency of \py{f"{max_saliency:.3f}"} at location (\py{peak_location[0]}, \py{peak_location[1]}) demonstrates how stimulus-driven factors automatically draw attention to salient regions, even when task-irrelevant.
602
603
\item \textbf{Spatial Attention Gradient}: The Gaussian spotlight model quantifies the spatial extent of attention, showing baseline reaction times of \py{f"{rt_baseline_fit:.0f}"} ms at attended locations increasing to approximately \py{f"{rt_baseline_fit + rt_cost_fit:.0f}"} ms in the periphery. The fitted spatial extent ($\sigma$ = \py{f"{sigma_fit:.1f}"}) indicates the effective radius of the attentional window.
604
605
\item \textbf{Temporal Attention Dynamics}: The attentional blink reveals temporal constraints on attention, with T2 accuracy dropping from \py{f"{lag1_accuracy:.2f}"} (lag-1 sparing) to \py{f"{blink_minimum:.2f}"} during the blink period (\py{blink_lag*100}-\py{(blink_lag+2)*100} ms), before recovering to \py{f"{recovered_accuracy:.2f}"}. This demonstrates the bottleneck in consolidating information into working memory.
606
\end{enumerate}
607
608
These computational models provide quantitative frameworks for understanding how attention overcomes processing limitations through selective enhancement of relevant information and suppression of irrelevant distractors, operating through both spatial and feature-based selection mechanisms constrained by temporal dynamics.
609
610
\section*{References}
611
612
\begin{thebibliography}{99}
613
614
\bibitem{treisman1980}
615
Treisman, A. M., \& Gelade, G. (1980). A feature-integration theory of attention. \textit{Cognitive Psychology}, 12(1), 97-136.
616
617
\bibitem{desimone1995}
618
Desimone, R., \& Duncan, J. (1995). Neural mechanisms of selective visual attention. \textit{Annual Review of Neuroscience}, 18(1), 193-222.
619
620
\bibitem{itti1998}
621
Itti, L., Koch, C., \& Niebur, E. (1998). A model of saliency-based visual attention for rapid scene analysis. \textit{IEEE Transactions on Pattern Analysis and Machine Intelligence}, 20(11), 1254-1259.
622
623
\bibitem{posner1980}
624
Posner, M. I. (1980). Orienting of attention. \textit{Quarterly Journal of Experimental Psychology}, 32(1), 3-25.
625
626
\bibitem{chun2011}
627
Chun, M. M., Golomb, J. D., \& Turk-Browne, N. B. (2011). A taxonomy of external and internal attention. \textit{Annual Review of Psychology}, 62, 73-101.
628
629
\bibitem{raymond1992}
630
Raymond, J. E., Shapiro, K. L., \& Arnell, K. M. (1992). Temporary suppression of visual processing in an RSVP task: An attentional blink? \textit{Journal of Experimental Psychology: Human Perception and Performance}, 18(3), 849-860.
631
632
\bibitem{eriksen1986}
633
Eriksen, C. W., \& St. James, J. D. (1986). Visual attention within and around the field of focal attention: A zoom lens model. \textit{Perception \& Psychophysics}, 40(4), 225-240.
634
635
\bibitem{wolfe1994}
636
Wolfe, J. M. (1994). Guided search 2.0: A revised model of visual search. \textit{Psychonomic Bulletin \& Review}, 1(2), 202-238.
637
638
\bibitem{bundesen1990}
639
Bundesen, C. (1990). A theory of visual attention. \textit{Psychological Review}, 97(4), 523-547.
640
641
\bibitem{corbetta2002}
642
Corbetta, M., \& Shulman, G. L. (2002). Control of goal-directed and stimulus-driven attention in the brain. \textit{Nature Reviews Neuroscience}, 3(3), 201-215.
643
644
\bibitem{duncan1984}
645
Duncan, J., \& Humphreys, G. W. (1989). Visual search and stimulus similarity. \textit{Psychological Review}, 96(3), 433-458.
646
647
\bibitem{lavie1995}
648
Lavie, N. (1995). Perceptual load as a necessary condition for selective attention. \textit{Journal of Experimental Psychology: Human Perception and Performance}, 21(3), 451-468.
649
650
\bibitem{koch1985}
651
Koch, C., \& Ullman, S. (1985). Shifts in selective visual attention: Towards the underlying neural circuitry. \textit{Human Neurobiology}, 4(4), 219-227.
652
653
\bibitem{carrasco2011}
654
Carrasco, M. (2011). Visual attention: The past 25 years. \textit{Vision Research}, 51(13), 1484-1525.
655
656
\bibitem{kastner1998}
657
Kastner, S., \& Ungerleider, L. G. (2000). Mechanisms of visual attention in the human cortex. \textit{Annual Review of Neuroscience}, 23(1), 315-341.
658
659
\bibitem{reynolds1999}
660
Reynolds, J. H., Chelazzi, L., \& Desimone, R. (1999). Competitive mechanisms subserve attention in macaque areas V2 and V4. \textit{Journal of Neuroscience}, 19(5), 1736-1753.
661
662
\bibitem{theeuwes2010}
663
Theeuwes, J. (2010). Top-down and bottom-up control of visual selection. \textit{Acta Psychologica}, 135(2), 77-99.
664
665
\bibitem{palmer1994}
666
Palmer, J. (1994). Set-size effects in visual search: The effect of attention is independent of the stimulus for simple tasks. \textit{Vision Research}, 34(13), 1703-1721.
667
668
\bibitem{moore1996}
669
Moore, C. M., \& Egeth, H. (1998). How does feature-based attention affect visual processing? \textit{Journal of Experimental Psychology: Human Perception and Performance}, 24(4), 1296-1310.
670
671
\bibitem{nakayama1989}
672
Nakayama, K., \& Mackeben, M. (1989). Sustained and transient components of focal visual attention. \textit{Vision Research}, 29(11), 1631-1647.
673
674
\end{thebibliography}
675
676
\end{document}
677
678