Path: blob/main/latex-templates/templates/cognitive-science/attention.tex
51 views
unlisted
% Computational Models of Visual Attention1% Topics: Spotlight and zoom-lens models, feature integration theory, biased competition, saliency maps, visual search2% Style: Cognitive neuroscience research report with computational models34\documentclass[a4paper, 11pt]{article}5\usepackage[utf8]{inputenc}6\usepackage[T1]{fontenc}7\usepackage{amsmath, amssymb}8\usepackage{graphicx}9\usepackage{siunitx}10\usepackage{booktabs}11\usepackage{subcaption}12\usepackage[makestderr]{pythontex}1314% Theorem environments15\newtheorem{definition}{Definition}[section]16\newtheorem{theorem}{Theorem}[section]17\newtheorem{example}{Example}[section]18\newtheorem{remark}{Remark}[section]1920\title{Computational Models of Visual Attention: From Saliency Maps to Biased Competition}21\author{Cognitive Neuroscience Laboratory}22\date{\today}2324\begin{document}25\maketitle2627\begin{abstract}28This 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.29\end{abstract}3031\section{Introduction}3233Visual 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.3435\begin{definition}[Selective Attention]36Selective 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).37\end{definition}3839\section{Theoretical Framework}4041\subsection{Feature Integration Theory}4243Anne 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.4445\begin{theorem}[Feature vs Conjunction Search]46Under 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.47\end{theorem}4849\begin{definition}[Illusory Conjunctions]50When 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.51\end{definition}5253\subsection{Biased Competition Model}5455The 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.5657\begin{definition}[Biased Competition]58Multiple 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.59\end{definition}6061\subsection{Saliency Map Theory}6263Bottom-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:6465\begin{equation}66S(x,y) = \sum_{i=1}^{N} w_i \cdot F_i(x,y)67\end{equation}6869where $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.7071\subsection{Spatial Models: Spotlight and Zoom-Lens}7273\begin{definition}[Spotlight Model]74The 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:75\begin{equation}76w_{spatial}(r) = \exp\left(-\frac{r^2}{2\sigma^2}\right)77\end{equation}78where $r$ is distance from the attended location and $\sigma$ controls spotlight size.79\end{definition}8081\begin{remark}[Zoom-Lens Variant]82The 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.83\end{remark}8485\section{Computational Analysis}8687We now implement computational models of the attention mechanisms described above, simulating behavioral experiments and analyzing the resulting performance patterns.8889\subsection{Visual Search Simulation: Feature Integration Theory}9091Visual 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.9293\begin{pycode}94import numpy as np95import matplotlib.pyplot as plt96from scipy.optimize import curve_fit97from scipy.stats import linregress98from scipy.ndimage import gaussian_filter99100np.random.seed(42)101102# Visual search simulation: Feature Integration Theory103def simulate_visual_search(set_sizes, search_type='feature', num_trials=100):104"""105Simulate visual search experiments.106107search_type: 'feature' or 'conjunction'108Returns: reaction times and accuracy for each set size109"""110rt_data = []111accuracy_data = []112113for n in set_sizes:114if search_type == 'feature':115# Feature search: parallel processing116# RT is roughly constant regardless of set size117base_rt = 450 # ms118slope = 2 # very shallow slope119noise_sd = 50120else: # conjunction search121# Conjunction search: serial processing122# RT increases linearly with set size123base_rt = 500 # ms124slope = 35 # steep slope125noise_sd = 80126127# Generate RTs for this set size128mean_rt = base_rt + slope * n129rts = np.random.normal(mean_rt, noise_sd, num_trials)130rts = np.maximum(rts, 200) # minimum RT131132# Accuracy decreases slightly with set size for conjunction133if search_type == 'feature':134accuracy = 0.98 - 0.001 * n + np.random.normal(0, 0.02)135else:136accuracy = 0.95 - 0.005 * n + np.random.normal(0, 0.03)137138accuracy = np.clip(accuracy, 0.5, 1.0)139140rt_data.append(rts)141accuracy_data.append(accuracy)142143return rt_data, accuracy_data144145# Set sizes to test146set_sizes = np.array([4, 8, 12, 16, 20, 24])147148# Simulate both search types149rt_feature, acc_feature = simulate_visual_search(set_sizes, 'feature', num_trials=100)150rt_conjunction, acc_conjunction = simulate_visual_search(set_sizes, 'conjunction', num_trials=100)151152# Compute mean RTs153mean_rt_feature = np.array([np.mean(rts) for rts in rt_feature])154mean_rt_conjunction = np.array([np.mean(rts) for rts in rt_conjunction])155156# Fit linear models: RT = intercept + slope * set_size157slope_feature, intercept_feature, r_feature, p_feature, se_feature = linregress(158set_sizes, mean_rt_feature)159slope_conjunction, intercept_conjunction, r_conjunction, p_conjunction, se_conjunction = linregress(160set_sizes, mean_rt_conjunction)161162# Store slopes for later reference in conclusions163search_slope_feature = slope_feature164search_slope_conjunction = slope_conjunction165\end{pycode}166167The 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.168169The 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.170171\subsection{Saliency Map Construction}172173Bottom-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.174175\begin{pycode}176# Saliency map computation177def compute_feature_contrast(image, feature_type='intensity'):178"""179Compute local contrast for a given feature dimension.180Uses center-surround differences at multiple scales.181"""182h, w = image.shape183contrast_map = np.zeros((h, w))184185# Center-surround at multiple scales186scales = [(3, 9), (5, 15), (7, 21)]187188for center_size, surround_size in scales:189center = gaussian_filter(image, center_size)190surround = gaussian_filter(image, surround_size)191contrast = np.abs(center - surround)192contrast_map += contrast193194# Normalize195if contrast_map.max() > 0:196contrast_map = contrast_map / contrast_map.max()197198return contrast_map199200# Create a synthetic visual scene (64x64 grid)201scene_size = 64202visual_scene = np.random.rand(scene_size, scene_size) * 0.3203204# Add salient regions205# Region 1: bright spot (intensity salient)206visual_scene[15:20, 15:20] = 0.9207208# Region 2: oriented edge (orientation salient)209visual_scene[45:55, 10:12] = 0.8210211# Region 3: moderate contrast region212visual_scene[30:38, 45:53] = 0.6213214# Compute feature contrast maps215intensity_contrast = compute_feature_contrast(visual_scene, 'intensity')216orientation_contrast = compute_feature_contrast(np.gradient(visual_scene)[0], 'orientation')217color_contrast = compute_feature_contrast(visual_scene + 0.1 * np.random.randn(scene_size, scene_size), 'color')218219# Combine into saliency map220weight_intensity = 0.4221weight_orientation = 0.3222weight_color = 0.3223224saliency_map = (weight_intensity * intensity_contrast +225weight_orientation * orientation_contrast +226weight_color * color_contrast)227228# Find peak saliency location229max_saliency = np.max(saliency_map)230peak_location = np.unravel_index(np.argmax(saliency_map), saliency_map.shape)231\end{pycode}232233The 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.234235This 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.236237\subsection{Attentional Spotlight: Gaussian Spatial Weighting}238239The 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.240241\begin{pycode}242# Attentional spotlight model243def gaussian_spotlight(grid_size, center, sigma):244"""245Create a Gaussian attentional spotlight.246247grid_size: size of spatial grid248center: (x, y) center of attention249sigma: spatial extent of spotlight250"""251x = np.arange(grid_size)252y = np.arange(grid_size)253X, Y = np.meshgrid(x, y)254255cx, cy = center256distance = np.sqrt((X - cx)**2 + (Y - cy)**2)257spotlight = np.exp(-distance**2 / (2 * sigma**2))258259return spotlight260261# Create spotlights with different sizes (zoom-lens)262grid_size = 64263center = (32, 32)264265spotlight_small = gaussian_spotlight(grid_size, center, sigma=5)266spotlight_medium = gaussian_spotlight(grid_size, center, sigma=10)267spotlight_large = gaussian_spotlight(grid_size, center, sigma=15)268269# Simulate processing efficiency as function of distance270distances = np.arange(0, 30)271sigma_attention = 8272efficiency = np.exp(-distances**2 / (2 * sigma_attention**2))273274# Reaction time increases with decreased efficiency275baseline_rt = 400 # ms276max_rt_cost = 300 # ms277reaction_times = baseline_rt + max_rt_cost * (1 - efficiency)278279# Fit to estimate spatial gradient280def inverse_exp(d, rt0, cost, sigma_fit):281return rt0 + cost * (1 - np.exp(-d**2 / (2 * sigma_fit**2)))282283popt_spotlight, _ = curve_fit(inverse_exp, distances, reaction_times,284p0=[400, 300, 8])285rt_baseline_fit, rt_cost_fit, sigma_fit = popt_spotlight286\end{pycode}287288The 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.289290This 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.291292\subsection{Attentional Blink: Temporal Attention Dynamics}293294When 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.295296\begin{pycode}297# Attentional blink simulation298def simulate_attentional_blink(lags, num_trials=200):299"""300Simulate attentional blink in RSVP.301302lags: temporal separations between T1 and T2 (in units of items)303Returns: T2 accuracy given T1 detected304"""305# Convert lag to milliseconds (assume 100 ms per item)306ms_per_item = 100307308accuracy_t2 = []309310for lag in lags:311time_gap = lag * ms_per_item # ms312313# Attentional blink function314# Lag 1: sparing (T2 still in attentional window)315# Lag 2-4: blink (attentional resources depleted)316# Lag 5+: recovery (attention recovered)317318if lag == 1:319# Lag-1 sparing320mean_acc = 0.85321elif lag >= 2 and lag <= 4:322# Blink period323blink_depth = 0.40 # maximum deficit324recovery_rate = 0.15325mean_acc = 0.85 - blink_depth + recovery_rate * (lag - 2)326else:327# Full recovery328mean_acc = 0.85329330# Add noise331acc = np.random.normal(mean_acc, 0.08, num_trials)332acc = np.clip(acc, 0, 1)333accuracy_t2.append(np.mean(acc))334335return np.array(accuracy_t2)336337# Simulate blink338lags = np.array([1, 2, 3, 4, 5, 6, 7, 8])339t2_accuracy = simulate_attentional_blink(lags, num_trials=200)340341# Find minimum accuracy (blink depth)342blink_minimum = np.min(t2_accuracy)343blink_lag = lags[np.argmin(t2_accuracy)]344lag1_accuracy = t2_accuracy[0]345recovered_accuracy = t2_accuracy[-1]346\end{pycode}347348The 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}.349350This 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.351352\subsection{Integrated Visualization}353354\begin{pycode}355# Create comprehensive figure356fig = plt.figure(figsize=(16, 12))357358# Plot 1: Visual search results359ax1 = fig.add_subplot(3, 3, 1)360ax1.scatter(set_sizes, mean_rt_feature, s=80, c='blue', edgecolor='black',361label='Feature Search', marker='o')362ax1.scatter(set_sizes, mean_rt_conjunction, s=80, c='red', edgecolor='black',363label='Conjunction Search', marker='s')364set_sizes_fine = np.linspace(4, 24, 100)365ax1.plot(set_sizes_fine, intercept_feature + slope_feature * set_sizes_fine,366'b--', linewidth=2, alpha=0.7)367ax1.plot(set_sizes_fine, intercept_conjunction + slope_conjunction * set_sizes_fine,368'r--', linewidth=2, alpha=0.7)369ax1.set_xlabel('Set Size (number of items)', fontsize=11)370ax1.set_ylabel('Reaction Time (ms)', fontsize=11)371ax1.set_title('Visual Search: FIT Prediction', fontsize=12, fontweight='bold')372ax1.legend(fontsize=9)373ax1.grid(True, alpha=0.3)374ax1.set_xlim(2, 26)375ax1.set_ylim(400, 1200)376377# Plot 2: Search slopes comparison378ax2 = fig.add_subplot(3, 3, 2)379search_types = ['Feature', 'Conjunction']380slopes = [slope_feature, slope_conjunction]381colors_bar = ['blue', 'red']382bars = ax2.bar(search_types, slopes, color=colors_bar, edgecolor='black', linewidth=2, alpha=0.7)383ax2.set_ylabel('Search Slope (ms/item)', fontsize=11)384ax2.set_title('Parallel vs Serial Processing', fontsize=12, fontweight='bold')385ax2.set_ylim(0, max(slopes) * 1.2)386for i, (bar, slope) in enumerate(zip(bars, slopes)):387height = bar.get_height()388ax2.text(bar.get_x() + bar.get_width()/2., height,389f'{slope:.1f}', ha='center', va='bottom', fontsize=10, fontweight='bold')390ax2.grid(True, alpha=0.3, axis='y')391392# Plot 3: Visual scene and saliency map393ax3 = fig.add_subplot(3, 3, 3)394im3 = ax3.imshow(visual_scene, cmap='gray', origin='lower')395ax3.scatter(peak_location[1], peak_location[0], s=200, c='red', marker='x', linewidths=3)396ax3.set_xlabel('X position', fontsize=11)397ax3.set_ylabel('Y position', fontsize=11)398ax3.set_title('Visual Scene', fontsize=12, fontweight='bold')399plt.colorbar(im3, ax=ax3, fraction=0.046)400401# Plot 4: Saliency map402ax4 = fig.add_subplot(3, 3, 4)403im4 = ax4.imshow(saliency_map, cmap='hot', origin='lower')404ax4.scatter(peak_location[1], peak_location[0], s=200, c='cyan', marker='x', linewidths=3)405ax4.set_xlabel('X position', fontsize=11)406ax4.set_ylabel('Y position', fontsize=11)407ax4.set_title('Bottom-Up Saliency Map', fontsize=12, fontweight='bold')408plt.colorbar(im4, ax=ax4, fraction=0.046)409410# Plot 5: Feature contrast maps411ax5a = fig.add_subplot(3, 3, 5)412im5a = ax5a.imshow(intensity_contrast, cmap='viridis', origin='lower')413ax5a.set_title('Intensity Contrast', fontsize=11, fontweight='bold')414ax5a.set_xlabel('X position', fontsize=10)415ax5a.set_ylabel('Y position', fontsize=10)416plt.colorbar(im5a, ax=ax5a, fraction=0.046)417418# Plot 6: Spotlight shapes (zoom-lens)419ax6 = fig.add_subplot(3, 3, 6)420center_profile = spotlight_small[32, :]421ax6.plot(np.arange(grid_size), spotlight_small[32, :], 'b-', linewidth=2.5,422label='$\\sigma=5$ (narrow)', alpha=0.8)423ax6.plot(np.arange(grid_size), spotlight_medium[32, :], 'g-', linewidth=2.5,424label='$\\sigma=10$ (medium)', alpha=0.8)425ax6.plot(np.arange(grid_size), spotlight_large[32, :], 'r-', linewidth=2.5,426label='$\\sigma=15$ (wide)', alpha=0.8)427ax6.axvline(x=32, color='black', linestyle='--', alpha=0.5)428ax6.set_xlabel('Spatial Position', fontsize=11)429ax6.set_ylabel('Attentional Weight', fontsize=11)430ax6.set_title('Zoom-Lens Model', fontsize=12, fontweight='bold')431ax6.legend(fontsize=9)432ax6.grid(True, alpha=0.3)433ax6.set_xlim(0, grid_size)434ax6.set_ylim(0, 1.1)435436# Plot 7: Spotlight spatial map437ax7 = fig.add_subplot(3, 3, 7)438im7 = ax7.imshow(spotlight_medium, cmap='plasma', origin='lower')439ax7.set_xlabel('X position', fontsize=11)440ax7.set_ylabel('Y position', fontsize=11)441ax7.set_title('Spatial Spotlight ($\\sigma=10$)', fontsize=12, fontweight='bold')442plt.colorbar(im7, ax=ax7, fraction=0.046)443444# Plot 8: RT vs distance from spotlight center445ax8 = fig.add_subplot(3, 3, 8)446ax8.scatter(distances, reaction_times, s=70, c='steelblue', edgecolor='black', alpha=0.7)447distances_fine = np.linspace(0, 30, 200)448rt_fit = inverse_exp(distances_fine, rt_baseline_fit, rt_cost_fit, sigma_fit)449ax8.plot(distances_fine, rt_fit, 'r-', linewidth=2.5, label='Gaussian Fit')450ax8.axhline(y=rt_baseline_fit, color='green', linestyle='--', alpha=0.6,451label=f'Baseline RT')452ax8.set_xlabel('Distance from Attended Location', fontsize=11)453ax8.set_ylabel('Reaction Time (ms)', fontsize=11)454ax8.set_title('Spatial Gradient of Attention', fontsize=12, fontweight='bold')455ax8.legend(fontsize=9)456ax8.grid(True, alpha=0.3)457ax8.set_xlim(-1, 31)458459# Plot 9: Attentional blink460ax9 = fig.add_subplot(3, 3, 9)461ax9.plot(lags, t2_accuracy, 'o-', markersize=10, linewidth=2.5, color='darkviolet',462markeredgecolor='black', markeredgewidth=1.5)463ax9.axhline(y=0.85, color='gray', linestyle='--', alpha=0.6, label='Baseline')464ax9.axvspan(2, 4, alpha=0.2, color='red', label='Blink Period')465ax9.set_xlabel('Lag (T1-T2 Separation)', fontsize=11)466ax9.set_ylabel('T2|T1 Accuracy', fontsize=11)467ax9.set_title('Attentional Blink in RSVP', fontsize=12, fontweight='bold')468ax9.set_xticks(lags)469ax9.set_ylim(0.35, 0.95)470ax9.legend(fontsize=9)471ax9.grid(True, alpha=0.3)472473plt.tight_layout()474plt.savefig('attention_comprehensive_analysis.pdf', dpi=150, bbox_inches='tight')475plt.close()476\end{pycode}477478\begin{figure}[htbp]479\centering480\includegraphics[width=\textwidth]{attention_comprehensive_analysis.pdf}481\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.}482\label{fig:attention_analysis}483\end{figure}484485\section{Quantitative Results}486487\subsection{Visual Search Performance}488489\begin{pycode}490print(r"\begin{table}[htbp]")491print(r"\centering")492print(r"\caption{Visual Search Performance by Condition}")493print(r"\begin{tabular}{lcccc}")494print(r"\toprule")495print(r"Search Type & Slope (ms/item) & Intercept (ms) & $R^2$ & Interpretation \\")496print(r"\midrule")497print(f"Feature Search & {slope_feature:.2f} & {intercept_feature:.1f} & {r_feature**2:.3f} & Parallel \\\\")498print(f"Conjunction Search & {slope_conjunction:.2f} & {intercept_conjunction:.1f} & {r_conjunction**2:.3f} & Serial \\\\")499print(r"\midrule")500print(f"Slope Ratio & {slope_conjunction/slope_feature:.1f} & --- & --- & FIT Prediction \\\\")501print(r"\bottomrule")502print(r"\end{tabular}")503print(r"\label{tab:visual_search}")504print(r"\end{table}")505\end{pycode}506507\subsection{Saliency and Attention Allocation}508509\begin{pycode}510print(r"\begin{table}[htbp]")511print(r"\centering")512print(r"\caption{Saliency Map Parameters and Predictions}")513print(r"\begin{tabular}{lcc}")514print(r"\toprule")515print(r"Parameter & Value & Interpretation \\")516print(r"\midrule")517print(f"Intensity Weight ($w_{{intensity}}$) & {weight_intensity:.2f} & Channel contribution \\\\")518print(f"Orientation Weight ($w_{{orient}}$) & {weight_orientation:.2f} & Channel contribution \\\\")519print(f"Color Weight ($w_{{color}}$) & {weight_color:.2f} & Channel contribution \\\\")520print(r"\midrule")521print(f"Peak Saliency & {max_saliency:.3f} & Maximum attention capture \\\\")522print(f"Peak Location & ({peak_location[0]}, {peak_location[1]}) & Predicted fixation \\\\")523print(r"\bottomrule")524print(r"\end{tabular}")525print(r"\label{tab:saliency}")526print(r"\end{table}")527\end{pycode}528529\subsection{Spatial Attention Parameters}530531\begin{pycode}532print(r"\begin{table}[htbp]")533print(r"\centering")534print(r"\caption{Attentional Spotlight Model Parameters}")535print(r"\begin{tabular}{lcc}")536print(r"\toprule")537print(r"Parameter & Estimate & Interpretation \\")538print(r"\midrule")539print(f"Baseline RT ($RT_0$) & {rt_baseline_fit:.1f} ms & Attended location \\\\")540print(f"Maximum RT Cost & {rt_cost_fit:.1f} ms & Unattended periphery \\\\")541print(f"Spatial Extent ($\\sigma$) & {sigma_fit:.1f} units & Spotlight radius \\\\")542print(r"\midrule")543print(f"RT at Attended Location & {rt_baseline_fit:.1f} ms & Peak efficiency \\\\")544print(f"RT at Distance 20 & {inverse_exp(20, rt_baseline_fit, rt_cost_fit, sigma_fit):.1f} ms & Peripheral cost \\\\")545print(r"\bottomrule")546print(r"\end{tabular}")547print(r"\label{tab:spotlight}")548print(r"\end{table}")549\end{pycode}550551\subsection{Attentional Blink Dynamics}552553\begin{pycode}554print(r"\begin{table}[htbp]")555print(r"\centering")556print(r"\caption{Attentional Blink Time Course}")557print(r"\begin{tabular}{lcl}")558print(r"\toprule")559print(r"Temporal Window & T2|T1 Accuracy & Mechanism \\")560print(r"\midrule")561print(f"Lag 1 (100 ms) & {lag1_accuracy:.2f} & Lag-1 sparing \\\\")562print(f"Lag {blink_lag} ({blink_lag*100} ms) & {blink_minimum:.2f} & Blink minimum \\\\")563print(f"Lag 8 (800 ms) & {recovered_accuracy:.2f} & Full recovery \\\\")564print(r"\midrule")565print(f"Blink Depth & {lag1_accuracy - blink_minimum:.2f} & Accuracy deficit \\\\")566print(f"Blink Duration & {300} ms & Impairment window \\\\")567print(r"\bottomrule")568print(r"\end{tabular}")569print(r"\label{tab:attentional_blink}")570print(r"\end{table}")571\end{pycode}572573\section{Discussion}574575\begin{example}[Real-World Applications]576These computational models of attention have practical applications in multiple domains:577\begin{itemize}578\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.579\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.580\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.581\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.582\end{itemize}583\end{example}584585\begin{remark}[Neural Implementation]586The 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.587\end{remark}588589\begin{remark}[Model Limitations and Extensions]590While 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.591\end{remark}592593\section{Conclusions}594595This computational investigation demonstrates multiple mechanisms of visual attention operating at different levels of processing:596597\begin{enumerate}598\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.599600\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.601602\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.603604\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.605\end{enumerate}606607These 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.608609\section*{References}610611\begin{thebibliography}{99}612613\bibitem{treisman1980}614Treisman, A. M., \& Gelade, G. (1980). A feature-integration theory of attention. \textit{Cognitive Psychology}, 12(1), 97-136.615616\bibitem{desimone1995}617Desimone, R., \& Duncan, J. (1995). Neural mechanisms of selective visual attention. \textit{Annual Review of Neuroscience}, 18(1), 193-222.618619\bibitem{itti1998}620Itti, 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.621622\bibitem{posner1980}623Posner, M. I. (1980). Orienting of attention. \textit{Quarterly Journal of Experimental Psychology}, 32(1), 3-25.624625\bibitem{chun2011}626Chun, 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.627628\bibitem{raymond1992}629Raymond, 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.630631\bibitem{eriksen1986}632Eriksen, 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.633634\bibitem{wolfe1994}635Wolfe, J. M. (1994). Guided search 2.0: A revised model of visual search. \textit{Psychonomic Bulletin \& Review}, 1(2), 202-238.636637\bibitem{bundesen1990}638Bundesen, C. (1990). A theory of visual attention. \textit{Psychological Review}, 97(4), 523-547.639640\bibitem{corbetta2002}641Corbetta, M., \& Shulman, G. L. (2002). Control of goal-directed and stimulus-driven attention in the brain. \textit{Nature Reviews Neuroscience}, 3(3), 201-215.642643\bibitem{duncan1984}644Duncan, J., \& Humphreys, G. W. (1989). Visual search and stimulus similarity. \textit{Psychological Review}, 96(3), 433-458.645646\bibitem{lavie1995}647Lavie, N. (1995). Perceptual load as a necessary condition for selective attention. \textit{Journal of Experimental Psychology: Human Perception and Performance}, 21(3), 451-468.648649\bibitem{koch1985}650Koch, C., \& Ullman, S. (1985). Shifts in selective visual attention: Towards the underlying neural circuitry. \textit{Human Neurobiology}, 4(4), 219-227.651652\bibitem{carrasco2011}653Carrasco, M. (2011). Visual attention: The past 25 years. \textit{Vision Research}, 51(13), 1484-1525.654655\bibitem{kastner1998}656Kastner, S., \& Ungerleider, L. G. (2000). Mechanisms of visual attention in the human cortex. \textit{Annual Review of Neuroscience}, 23(1), 315-341.657658\bibitem{reynolds1999}659Reynolds, 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.660661\bibitem{theeuwes2010}662Theeuwes, J. (2010). Top-down and bottom-up control of visual selection. \textit{Acta Psychologica}, 135(2), 77-99.663664\bibitem{palmer1994}665Palmer, 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.666667\bibitem{moore1996}668Moore, 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.669670\bibitem{nakayama1989}671Nakayama, K., \& Mackeben, M. (1989). Sustained and transient components of focal visual attention. \textit{Vision Research}, 29(11), 1631-1647.672673\end{thebibliography}674675\end{document}676677678