Search arXiv⌕ Search

arXiv subjects

Azam Nouri

Publications and source records attributed to Azam Nouri.

7 recordsLinked to original sources

Confusion-Adaptive Margin Learning for Handwritten Letter Recognition: A Controlled Study on EMNIST Letters

Handwritten character recognition systems can achieve high accuracy while retaining concentrated errors among visually similar classes. Motivated by residual letter confusions in earlier geometry-based recognition work, we investigate whether these errors can be addressed through the training objective. We introduce Confusion-Adaptive Margin Learning (CAML), which constructs a sparse weighted confusion graph from a discovery partition held out from pilot training and applies pair-specific cosine-separation constraints during final training. CAML adds no classifier, routing rule, or inference-time parameters. We evaluate CAML on EMNIST Letters against a strictly matched cross-entropy CNN baseline, using the same architecture, final training data, deterministic augmentation, optimizer, and checkpoint selection. Eight confusion pairs are targeted: I/L, G/Q, U/V, R/V, D/O, C/E, I/J, and H/N. On the official clean test set, accuracy changes from 95.6346% to 95.6731%, and macro-F1 from 0.956326 to 0.956724. Mean accuracy across ten predefined corrupted conditions increases from approximately 95.3812% to 95.4303%; symmetric errors within targeted pairs decrease from 614 to 605 (1.47%). The global differences are small and not statistically reliable. CAML fixes 124 baseline errors but introduces 116 new errors on clean data (exact McNemar p=0.6515), and no corruption-specific difference remains significant after Holm correction. Thus, CAML does not establish global superiority, but shows that a leakage-controlled, pair-specific margin objective can alter targeted error structure with limited overall benefit for an already strong classifier.

cs.CV↗

A Sobel-Gradient MLP Baseline for Handwritten Character Recognition

This study examines how much handwritten-character information is retained by a deliberately simple first-order edge representation. Instead of learning spatial filters, each input image is transformed by the fixed Sobel-Feldman operator into signed horizontal and vertical derivative maps, which are independently normalized, flattened, and classified by a multilayer perceptron (MLP). The resulting model therefore separates fixed edge extraction from learned classification and provides a controlled baseline for evaluating the sufficiency of first-order image gradients. In the executed experiments, the Sobel-gradient MLP achieves 98.54 percent test accuracy on MNIST and 92.50 percent on the TensorFlow Datasets (TFDS) EMNIST Letters configuration. Macro F1 scores are 0.9853 and 0.9265, respectively. One-vs-rest ROC analysis further yields micro/macro AUC values of 0.9998/0.9998 on MNIST and 0.9987/0.9982 on EMNIST Letters. Confusion-matrix analysis shows that the remaining errors are concentrated among geometrically similar classes, especially 3/8 and 4/9 for MNIST and I/L and G/Q for EMNIST Letters. These results show that fixed first-order gradients preserve substantial class-discriminative structure, while also revealing the specific ambiguities that remain when recognition is driven by edge geometry alone.

cs.CV↗

MDL-Calibrated Significance-Gain Pair Encoding: Replication-Aware Automatic Stopping for Subword Tokenization

Byte-Pair Encoding (BPE) constructs subword vocabularies through greedy pair merging, but conventional BPE requires the number of merges or target vocabulary size to be specified externally. Significance-Gain Pair Encoding (SG-BPE) replaces frequency-only selection with a statistical criterion based on how strongly an observed pair exceeds its expected co-occurrence under an independence model. This paper introduces MDL-Calibrated Significance-Gain Pair Encoding (MDL-SG), a three-stage procedure separating discovery, replication, and utility. Candidate pairs are ranked by Significance-Gain on a discovery partition, tested for replication on a separate partition using an exact one-sided hypergeometric test with per-iteration Benjamini-Hochberg correction, and then evaluated on a utility partition using a Minimum Description Length (MDL) criterion. Merging stops automatically when no replicated candidate yields positive held-out MDL gain. On WikiText-103, MDL-SG stops at 209, 433, and 847 merges for 120K, 250K, and 500K-character tokenizer-training samples, respectively. At 500K characters, it selects a stored vocabulary of 1,017 tokens without prescribing the vocabulary size in advance. In a compute-matched TinyGPT experiment with identical 2,024,448-parameter models and 500 optimizer updates per language model, MDL-SG achieves validation/test BPC of 3.2612/3.2436, compared with test BPC of 3.2894 for SG-BPE and 3.3493 for frequency BPE. Frequency BPE achieves stronger raw compression, while MDL-SG achieves lower BPC, showing that compression-oriented merge selection and language-model utility need not coincide.

cs.CV↗

StepCache: Step-Level Reuse with Lightweight Verification and Selective Patching for LLM Serving

We address LLM serving workloads where repeated requests share a common solution structure but differ in localized constraints, such as output schema, variable names, or numeric constants. Prior caching approaches typically reuse either full responses (semantic caching) or model-internal KV/prefix states, which are respectively brittle under partial changes or tightly coupled to specific backends. We present StepCache, a backend-agnostic step-level reuse layer that segments outputs into ordered steps, retrieves the best-matching cached request, verifies steps using lightweight task-aware checks, and regenerates only failing regions via selective patching. StepCache additionally supports strict structured-output enforcement for JSON, including single-step extraction, required-key constraints, and one-shot repair, as well as conservative skip-reuse fallbacks for semantic changes. For linear equations, StepCache promotes verification into correction via a bounded repair loop with a deterministic fallback that guarantees correctness when the backend model fails. In a CPU-only perturbation-heavy micro-benchmark on math and JSON variants, averaged over three seeds, StepCache reduces mean latency from 2.13 s to 0.67 s, median latency from 2.42 s to 0.01 s, and p95 latency from 3.38 s to 3.30 s. It also reduces total token usage from 36.1k to 27.3k and improves end-to-end correctness from 72.5% to 100% under task-specific checks and a stitched-output integrity check. Across requests, 79.7% take the reuse-only fast path, 5.4% require patching, and 14.9% trigger skip-reuse.

cs.OS↗

Significance-Gain Pair Encoding for LLMs: A Statistical Alternative to Frequency-Based Subword Merging

Subword tokenization is a key design choice for modern language models, including large language models (LLMs), with byte- and character-level BPE serving as a widely used baseline. Standard BPE selects merges by raw pair frequency, which favors compression but can conflate true adjacency cohesion with pairs that are frequent due to high marginal counts. This paper introduces Significance-Gain BPE, a drop-in alternative merge criterion that measures cohesion via a z-statistic under an independence null model and combines it with an explicit compression-aware gain term. Significance-Gain BPE is evaluated on WikiText-103 (raw) character slices using a small causal Transformer language model, reporting both token-dependent perplexity and the tokenizer-invariant metric bits per character (BPC). At a representative operating point, Significance-Gain BPE reduces validation and test perplexity by 13% and 12%, respectively, and improves validation and test BPC by about 0.9 to 1.0%. A vocabulary-size sweep further shows lower BPC in most closest-compression comparisons, suggesting that statistically grounded merge selection can improve predictive efficiency per unit of raw text across a range of compression regimes.

cs.CL↗

Critical Exponent Elliptic Equations on the Half-Space: Uniqueness and Explicit Solutions

We prove that all positive solutions of $-Δu = u^{\frac{2n}{n-2}}$ on the upper half space $\mathbb{R}^n_{+}$ (for $n \geq 3$) satisfying the boundary condition $D_{x_n}u = -u^{\frac{n}{n-2}}$ are of the form $u(x) = a \left( \fracλ{λ^2 + |x-y|^2} \right)^{\frac{n-2}{2}}$, where $a = a(n)$, $λ> 0$, and $y = (y_1, \ldots, y_n)$ is a point in the lower half-space with $y_n < 0$.

math.AP↗

An MLP Baseline for Handwriting Recognition Using Planar Curvature and Gradient Orientation

This study investigates whether second-order geometric cues - planar curvature magnitude, curvature sign, and gradient orientation - are sufficient on their own to drive a multilayer perceptron (MLP) classifier for handwritten character recognition (HCR), offering an alternative to convolutional neural networks (CNNs). Using these three handcrafted feature maps as inputs, our curvature-orientation MLP achieves 97 percent accuracy on MNIST digits and 89 percent on EMNIST letters. These results underscore the discriminative power of curvature-based representations for handwritten character images and demonstrate that the advantages of deep learning can be realized even with interpretable, hand-engineered features.

cs.CV↗