šŸŽ“How I Study AIHISA
šŸ“–Read
šŸ“„PapersšŸ“°BlogsšŸŽ¬Courses
šŸ’”Learn
šŸ›¤ļøPathsšŸ“šTopicsšŸ’”ConceptsšŸŽ“Shorts
šŸŽÆPractice
ā±ļøCoach🧩Problems🧠ThinkingšŸŽÆPrompts🧠Review
SearchSettings
Think Longer to Explore Deeper: Learn to Explore In-Context via Length-Incentivized Reinforcement Learning | How I Study AI

Think Longer to Explore Deeper: Learn to Explore In-Context via Length-Incentivized Reinforcement Learning

Intermediate
Futing Wang, Jianhao Yan, Yun Luo et al.2/12/2026
arXiv

Key Summary

  • •The paper teaches language models to explore more ideas while thinking, so they can solve harder problems.
  • •It identifies a 'Shallow Exploration Trap': long, deep reasoning paths are needed but are sampled exponentially less often.
  • •The key idea is simple: reward the model for thinking longer, but also penalize it for repeating itself.
  • •This two-part recipe, called Length-Incentivized Exploration (LIE), expands the model’s 'state coverage'—the variety of reasoning steps it considers.
  • •Compared to strong baselines (GRPO, GSPO), LIE boosts in-domain accuracy by about 4.4% and out-of-domain accuracy by about 2.7%.
  • •On tough math contests like AIME 2025, LIE delivers gains of over 6%, showing it helps with complex reasoning.
  • •LIE generalizes across different models (Qwen3 and Llama-OctoThinker) and continues to scale with longer thinking budgets at test time.
  • •Experiments show LIE not only makes thoughts longer but also more diverse, increasing helpful behaviors like backtracking and verification.
  • •Directly maximizing 'distinct states' fails (reward hacking); the length-plus-anti-redundancy approach is stable and effective.

Why This Research Matters

When AI can explore more ideas inside a single answer, it becomes better at solving real problems like tricky homework, debugging code, or checking analysis. This work shows how to turn extra thinking time into better exploration rather than empty words. That means more reliable step-by-step solutions, fewer careless errors, and stronger generalization to new tasks. It also supports responsible deployment: the model learns to verify and backtrack instead of bluffing. As organizations shift from just making models bigger to using test-time compute smartly, this recipe is a practical way to get more quality per token. Over time, that can unlock better tutoring tools, science assistants, and planning agents.

Detailed Explanation

Tap terms for definitions

01Background & Problem Definition

šŸž Hook: Imagine you’re solving a big puzzle. If you stop after just a few tries, you’ll miss the tricky pieces that only show up when you explore longer. Models are like that, too.

🄬 The Concept: Test-time scaling is about letting a model think more steps before it answers, so it can check, correct, and refine its ideas. How it works:

  1. Give the model more compute (more tokens it can think with).
  2. Let it try multiple ideas, verify them, and fix mistakes along the way.
  3. Use its extra thinking to find better answers. Why it matters: Without extra thinking time, models get stuck with quick guesses and miss deeper solutions. šŸž Anchor: When a model solves a math word problem, test-time scaling lets it write a longer plan, test steps, and backtrack if it sees an error.

šŸž Hook: You know how a coach teaches you strategies during practice, but in the actual game, you must decide quickly in the moment? That’s training vs. in-context thinking.

🄬 The Concept: Reinforcement Learning (RL) is a way to train a model by giving feedback (rewards) for better behavior. How it works:

  1. The model tries to answer.
  2. If it’s good, it gets a higher reward; if not, lower.
  3. It updates its policy (its way of choosing next steps) to get more reward next time. Why it matters: Without RL, the model doesn’t learn from its outcomes and can’t steadily improve reasoning. šŸž Anchor: If the model gets the right answer with clear steps, it learns to repeat that approach next time.

šŸž Hook: Picture a maze. Each hallway you step into is a new situation you’ve visited. The more unique places you’ve been, the better your map.

🄬 The Concept: State coverage means how many different ā€˜situations’ (reasoning states) the model actually explores while thinking. How it works:

  1. Treat each partial thought as a ā€˜state’.
  2. Track how many distinct states the model visits in one reasoning run.
  3. More distinct states = broader exploration = better chance to find the right path. Why it matters: Without wide state coverage, a model keeps circling the same hallways and misses the exit. šŸž Anchor: In math problems, trying both algebra and a geometric view increases the odds you find a clean solution.

šŸž Hook: When you play a new board game, you sometimes try moves you haven’t tested before to learn faster.

🄬 The Concept: Count-based exploration encourages trying less-visited options by giving them a small bonus. How it works:

  1. Count how often you’ve tried a move/state.
  2. Give extra points to rare states.
  3. Balance between ā€˜good so far’ and ā€˜less explored’ to learn quickly. Why it matters: Without this, you overuse your favorite moves and never discover hidden winning strategies. šŸž Anchor: If you’ve rarely tried checking a sub-case, a bonus nudges you to check it now.

šŸž Hook: Think of writing an essay: longer essays can cover more points, but they’re harder to write and finish.

🄬 The Concept: The paper’s key problem is the Shallow Exploration Trap: long reasoning paths are needed to reach deep ideas, but models are exponentially less likely to generate them. How it works:

  1. Longer chains allow more unique states (capacity grows with length).
  2. But autoregressive generation ends sequences with a nonzero EOS chance at each step.
  3. So the chance of ever reaching long lengths shrinks exponentially. Why it matters: Without fixing this, models mostly produce short, shallow thoughts and miss complex solutions. šŸž Anchor: The model often stops early, never reaching the point where a key backtracking step would have fixed its mistake.

šŸž Hook: If you only reward ā€˜being long,’ kids might write the same sentence over and over. You need to reward length and quality.

🄬 The Concept: Length-Incentivized Exploration (LIE) is a simple RL recipe that rewards thinking longer and penalizes repetition, turning extra length into real exploration. How it works:

  1. Add a length reward if the model fails to solve a problem and writes shorter than a gentle target.
  2. Add a redundancy penalty when the model repeats similar local patterns too much.
  3. Keep the normal accuracy reward at the center. Why it matters: Without the penalty, the model would pad with fluff; without the length reward, it wouldn’t reach deeper states. šŸž Anchor: On AIME math, LIE pushes the model to write more steps, try alternate hypotheses, verify, and backtrack—boosting accuracy.

The world before: LLMs improved with more parameters and data, but complex reasoning still hit a ceiling when inference time (how long the model ā€˜thinks’) stayed short. People tried two families of test-time scaling. Parallel scaling samples many short answers and votes, which helps but can still miss rare deep paths. Sequential scaling (Long Chain-of-Thought) lets the model think longer in one go, which better matches how humans reason: draft, check, revise. Still, training didn’t reliably teach models to explore deeply in one continuous context.

The problem: In-context exploration—generating, checking, and refining multiple hypotheses inside one long reasoning chain—wasn’t emerging strongly. Theory said you need broad state coverage, and state coverage needs longer chains. But sampling long chains is exponentially unlikely. That’s the Shallow Exploration Trap: we need length to explore, yet length almost never happens by default.

Failed attempts: Standard RL variants (GRPO, GSPO) improved performance some, and even implicitly lengthened thoughts. But they either plateaued early (stuck short) or grew length too slowly. Worse, as length grew, the ā€˜distinct state ratio’ dropped—extra tokens became repetitive padding, not new ideas.

The gap: We needed a training signal that (1) safely extends length to raise exploration capacity and (2) ensures that added length actually diversifies states instead of looping.

Real stakes: This matters for students using AI tutors, scientists analyzing hypotheses, programmers debugging tricky code, and anyone needing reliable step-by-step reasoning. If models can explore and verify more in one go, they make fewer sloppy mistakes and better handle hard problems, even outside their training domain.

02Core Idea

šŸž Hook: Imagine a treasure hunt where the longest path has secret rooms with the best prizes—but most kids quit early because it’s hard to keep walking.

🄬 The Concept: The paper’s aha! is to explicitly reward longer thinking while penalizing repetition, so the model reaches deeper reasoning states and uses that extra time well. How it works:

  1. Give a gentle length reward only when the model failed and wrote less than a small target extension.
  2. Add a redundancy penalty when the model repeats local patterns too much.
  3. Keep the usual accuracy reward as the top priority. Why it matters: Without both parts, you either don’t reach deep states (no length) or you waste tokens repeating yourself (no quality). With both, extra tokens buy real exploration. šŸž Anchor: On a geometry problem, LIE makes the model try both coordinate and similar-triangle approaches, verify steps, and backtrack—raising the chance of a correct proof.

Three analogies for the same idea:

  1. Hiking analogy: A guide (length reward) encourages you to hike farther up the mountain where the view gets clearer, while a ranger (redundancy penalty) stops you from pacing in circles near the trailhead.
  2. Essay analogy: Your teacher asks for a slightly longer draft (length reward), but also marks you down if you repeat sentences (redundancy penalty), so you add new arguments instead of fluff.
  3. Lab analogy: The lab funds a few extra experiments (length reward) but requires each to test a different hypothesis (redundancy penalty). You explore wider, not just do the same trial over and over.

Before vs. after:

  • Before: RL training either didn’t push length enough or let length grow with lots of padding. Models saturated when forced to think longer at test time (they weren’t trained for it).
  • After: LIE trains models to expand length and fill it with diverse, useful states. At test time, when you allow more tokens, accuracy keeps rising instead of stalling or dropping.

Why it works (intuition, not equations):

  • Capacity: Long chains set a higher ceiling on how many distinct states you can visit in one trajectory.
  • Rarity: But long chains are sampled exponentially less often; so we need a nudge.
  • Balance: If you only nudge length, the easiest shortcut is to repeat yourself; so we counter with a redundancy penalty tied to local token patterns.
  • Together: Length lifts the ceiling; anti-redundancy fills that ceiling with fresh states; accuracy then benefits because the model actually searches the hard-to-reach parts of the space.

Building blocks (each with a mini sandwich):

  • šŸž Hook: You know how games have levels with many rooms? 🄬 The Concept: Markov Decision Process (MDP) is a way to describe step-by-step decisions where each partial thought is a ā€˜state’ and choosing the next token is an ā€˜action’. How it works: (1) State = prompt + tokens so far, (2) Action = next token, (3) Transition = append token, (4) Stop at EOS. Why it matters: It lets us reason about exploration: which states you visit, how often, and how to encourage new ones. šŸž Anchor: Writing ā€œLet x=3ā€ is a state; writing the next line is an action; finishing with the boxed answer is EOS.

  • šŸž Hook: Trying new moves in a board game helps you learn faster. 🄬 The Concept: Count-Based Exploration gives bonuses for trying less-visited states. How it works: (1) Track visit counts, (2) Add small bonus to rare states, (3) Balance learning from what works and exploring new options. Why it matters: It prevents tunnel vision on the same old ideas. šŸž Anchor: If you rarely checked a boundary case, the bonus nudges you to test it now.

  • šŸž Hook: Longer essays can cover more topics, but they’re harder to finish. 🄬 The Concept: Length defines capacity—longer chains can cover more distinct states, but are hard to sample. How it works: (1) Capacity grows with length, (2) Probability of reaching long length drops exponentially, (3) Net result: models stop short. Why it matters: Without help, you never get to the part of the problem where a key insight appears. šŸž Anchor: A model that stops early never discovers that switching frames (e.g., polar form) simplifies the algebra.

  • šŸž Hook: If you only ask for ā€˜more pages,’ students might copy-paste. 🄬 The Concept: Redundancy penalty encourages new content over repetition. How it works: (1) Watch recent token patterns (n-grams), (2) If a pattern repeats too much, apply a small penalty, (3) Keep content fresh. Why it matters: It converts length into exploration instead of loops. šŸž Anchor: The model avoids saying ā€œThereforeā€ five times in a row and instead tries a new line of reasoning.

Taken together, the idea is elegant: reward the model for going farther only when it needs to (failed attempts that were too short), and make sure the new distance explores new ground. That’s LIE’s core.

03Methodology

At a high level: Problem + Prompt → (RL rollout) Generate thought chain → Compute rewards: accuracy + length bonus (if needed) āˆ’ redundancy penalty → Update policy (GRPO/GSPO style) → Next batch.

Step-by-step with sandwiches for every new piece:

  1. šŸž Hook: Think of storytelling one sentence at a time; each sentence depends on the last. 🄬 The Concept: Autoregressive MDP for LLM reasoning treats each partial answer as a state and each next token as an action. How it works:
  • Build state = question + tokens so far.
  • Pick action = next token from vocabulary.
  • Transition by appending the token; stop at EOS. Why it matters: Framing generation as step-by-step decisions lets us apply RL tools to shape exploration. šŸž Anchor: After writing ā€œFirst, factor the polynomial,ā€ the next token might start a new method or continue the same one.
  1. šŸž Hook: When exploring a city, you remember the last few turns, not the entire day. 🄬 The Concept: State abstraction with last-n-grams summarizes the immediate local pattern to detect repetition. How it works:
  • Map each long state to its last n tokens.
  • Count repeats of these local patterns within one trajectory.
  • Use counts to estimate how ā€˜distinct’ the path is. Why it matters: Full histories are too unique to count meaningfully; local patterns are a workable proxy. šŸž Anchor: The model repeats ā€œThus,ā€ ā€œTherefore,ā€ and a formula fragment—detected by 10-gram windows as redundant.
  1. šŸž Hook: If a student writes a short, wrong draft, you might ask for just a bit more detail next time. 🄬 The Concept: Length-Incentivized reward (R_len) gently pushes longer thinking only when the answer was wrong and too short relative to a small target. How it works:
  • Compute a per-sample target = previous length + Ī”L (small increment).
  • If wrong and shorter than target, add a negative penalty proportional to how short it was (so growing to target helps).
  • If correct or already long enough, no length signal. Why it matters: It avoids bloating already-good solutions, and focuses help where deeper thinking is likely to pay off. šŸž Anchor: If the model wrote 250 tokens and missed the answer, set target 350; next time it’s nudged to explore further.
  1. šŸž Hook: If a child repeats the same sentence to reach the word count, you gently point that out. 🄬 The Concept: Redundancy penalty (R_red) discourages repeating the same local patterns too often in one reasoning run. How it works:
  • Track how many times a local pattern (n-gram) occurs.
  • If it exceeds a threshold Θ, subtract a small penalty.
  • This keeps thoughts diverse. Why it matters: It converts token budget into new ideas instead of filler. šŸž Anchor: If the 10-gram around a formula keeps reappearing, the model is pushed to try a different derivation.
  1. šŸž Hook: Good grades still matter most, even if we also care about effort and variety. 🄬 The Concept: Final reward = accuracy reward + length incentive + redundancy penalty. How it works:
  • Accuracy stays primary: correct solutions get the biggest reward.
  • Length signal only appears for failed, too-short attempts.
  • Redundancy penalty applies when local repeats go beyond Θ. Why it matters: The recipe balances reaching farther with using that distance wisely. šŸž Anchor: On a tough AMC problem, the model first fails briefly, then tries again longer and with fewer repeats, landing the correct boxed answer.
  1. šŸž Hook: Two coaches teach differently: one gives feedback token-by-token; the other looks at the whole essay. 🄬 The Concept: GRPO vs. GSPO are two RL update styles used as baselines and training backbones. How it works:
  • GRPO: token-level objective with group-normalized advantages.
  • GSPO: sequence-level objective with length-normalized importance weights.
  • LIE’s reward works with either. Why it matters: It shows the training recipe is algorithm-agnostic and practical. šŸž Anchor: Both GRPO+LIE and GSPO+LIE improved performance over their respective baselines.
  1. šŸž Hook: If you always stop a run early, you’ll never reach the big hill with the best view. 🄬 The Concept: Test-time scaling by longer Chain-of-Thought uses the model’s learned ability to think farther during inference. How it works:
  • Allow more tokens at inference than during training.
  • Well-trained models keep improving as the budget grows (no early saturation).
  • Poorly trained ones just pad or degrade. Why it matters: It proves extra compute can be turned into better answers when training prepared the model. šŸž Anchor: With LIE, accuracy keeps rising from 4k to 32k tokens, while baselines flatten or dip.

Concrete recipe details (simplified, kid-friendly):

  • Inputs: A batch of math or reasoning questions.
  • Generate: The model writes step-by-step thoughts up to a training max length.
  • Score:
    • Accuracy reward: Strong boost if the final boxed answer is correct (verified by a tool like Math-Verify).
    • Length incentive: Only if the answer was wrong and shorter than a gentle target (previous length + Ī”L), nudge it to go longer next time.
    • Redundancy penalty: If local 10-gram patterns repeat too much (beyond Θ), subtract a bit.
  • Update: Use GRPO or GSPO to adjust the policy to get higher future rewards.
  • Repeat: Over many batches, the model learns to write longer when needed and keep its thoughts fresh.

Example with actual data flow:

  • Problem: ā€œSolve for x in 2x^2 āˆ’ 5x āˆ’ 3 = 0.ā€
  • Baseline try: Short derivation, arithmetic slip, wrong answer.
  • Rewards: Accuracy low; set target length +Ī”L; next try gets nudged to write longer.
  • Next try: Model writes quadratic formula, then checks discriminant and sign, tries alternative factorization; fewer repeated 10-grams.
  • Outcome: Correct boxed answer; no length nudge now; redundancy kept in check.

Secret sauce:

  • The two-part shaping transforms raw length into meaningful exploration. One part raises the ceiling (length), the other ensures fresh steps (anti-redundancy). This directly attacks the Shallow Exploration Trap and makes extra tokens translate into better search.

04Experiments & Results

šŸž Hook: Think of a science fair where every project is tested the same way to judge fairly.

🄬 The Concept: The authors tested LIE on multiple tough benchmarks and compared it with strong RL baselines. How it works:

  1. Use math contests (AIME 2024/2025, AMC, MATH-500, OlympiadBench) and general reasoning sets (ARC-c, GPQA-Diamond, MMLU-Pro).
  2. Train on Qwen3 and Llama-OctoThinker families; verify answers with Math-Verify; keep inference conditions fixed.
  3. Compare LIE against GRPO, GSPO, and a stronger GRPO variant. Why it matters: Strong, fair testing shows if gains are real, general, and stable. šŸž Anchor: On Qwen3-4B-Base, adding LIE to GSPO lifts in-domain average from 49.4% to 53.8% and OOD from 66.1% to 67.6%.

The test: They measured accuracy (Pass@1 or averaged over runs), response length, distinct in-context state counts, and the ratio of distinctness. They also looked at global diversity and entropy (to see if the model collapsed to a few modes) and analyzed reasoning behaviors like backtracking and verification.

The competition: Baselines were GRPO, GSPO, and GRPO with a higher clip. All are solid RLVR methods. LIE is a small change to the reward—so any big improvement suggests the recipe meaningfully changes exploration.

The scoreboard (with context):

  • Qwen3-4B-Base (core testbed): GSPO + LIE improves in-domain average from 49.4% to 53.8% (~+4.4%), and OOD from 66.1% to 67.6% (~+1.5%). On AIME25, gains reach about +6.2%, like jumping from a B to a strong A on a very hard exam.
  • Across algorithms: Adding LIE to GRPO variants also helps. For GRPO w/ higher clip, LIE raises in-domain to ~52.6% (about +2.7%).
  • Across models: Qwen3-4B (post-trained) and Llama-OctoThinker-3B both see +2–3% average gains, showing method generality. Scaling across sizes (1.7B/4B/8B) shows consistent improvements, with OOD accuracy hitting ~73.4% on 8B with LIE.
  • Test-time scaling: As inference token budgets increase (4k→32k), baselines flatten or degrade, but LIE keeps climbing—like athletes who get better the longer they can play.

Surprising findings:

  • Only length reward helps but also increases repetition: C_context grows fast, accuracy bumps up, but distinct ratio drops—proof that length alone invites padding.
  • Adding the redundancy penalty restores exploration quality: Now longer chains actually try new approaches, and accuracy rises more robustly.
  • Global diversity and entropy stay higher with LIE: This avoids premature convergence (mode collapse) and helps discover rare, high-reward reasoning paths during training.
  • Reasoning behaviors improve: Backtracking, verification, subgoal setting, and enumeration all increase—especially backtracking—matching the goal of in-context exploration.

Why this is meaningful: Numbers alone don’t tell the story; trends do. The model not only writes more, it thinks better as it writes more. The improved scaling curve at test time confirms training truly prepared the model to turn extra tokens into better answers, not just more words.

05Discussion & Limitations

šŸž Hook: Even great hiking boots have limits—they’re amazing on trails but not for swimming.

🄬 The Concept: LIE works well but has boundaries, resource needs, and open questions. How it works (limitations and cautions):

  1. Hyperparameter sensitivity: Ī”L (how much to lengthen), Θ (redundancy threshold), and n-gram size matter. Too aggressive Ī”L can cause repetition; too strict Θ can punish natural phrasing.
  2. Budget dependence: LIE shines when you can afford longer training rollouts and test-time tokens; with very tight budgets, benefits shrink.
  3. Domain mismatch: While OOD improved, extreme domain shifts without verifiers may need tailored signals; otherwise, length might grow before useful checking emerges.
  4. Reward hacking risks: Directly maximizing distinct states fails; LIE avoids this, but poorly chosen thresholds can still invite gaming. Why it matters: Knowing limits helps deploy LIE where it helps most. šŸž Anchor: For on-device assistants with tiny token budgets, LIE’s gains will be smaller than in cloud settings with long budgets.

Required resources:

  • Compute: Multi-GPU training (e.g., 4ƗH100) and long-context inference (8k–32k+) to realize full benefits.
  • Verifiers: Outcome-based checking (e.g., Math-Verify) improves accuracy signals; weaker verifiers may dampen gains.
  • Data: Reasoning-rich prompts help the model use extra length productively.

When not to use:

  • Ultra-low-latency chat where short answers are mandatory.
  • Tasks where verbosity harms user experience (e.g., SMS reply bots).
  • Simple fact lookup with no benefit from multi-step chains.

Open questions:

  • Can we learn the redundancy threshold and n-gram window adaptively from signals like perplexity or semantic similarity, not just token patterns?
  • How to combine LIE with structure-aware signals (graph of thoughts, tool-use events) for even smarter exploration?
  • Can we dynamically decide when to stop (learned early stopping) so we only pay for extra length when needed?
  • How does LIE interact with other RL ingredients (KL control, entropy regularization) across more domains without verifiers?
  • Can we generalize beyond local n-grams to semantic redundancy detection that’s robust to paraphrases?

Overall, LIE is a sturdy, simple method that works broadly, but its best results appear when we have enough compute, decent verifiers, and careful hyperparameters.

06Conclusion & Future Work

Three-sentence summary: This paper identifies a core blockage in deep reasoning—the Shallow Exploration Trap—where long, necessary thought chains are exponentially unlikely to appear. It introduces a tiny but powerful RL recipe, Length-Incentivized Exploration (LIE), that rewards longer thinking only when needed and penalizes repetition so extra tokens create real exploration. Experiments across models and benchmarks show consistent gains, and, crucially, accuracy keeps improving as test-time budgets grow.

Main achievement: Turning additional tokens into meaningful, diverse reasoning steps—rather than fluff—by combining a gentle length incentive with a redundancy penalty.

Future directions: Learn adaptive redundancy detection beyond n-grams; integrate semantic and structural signals (graphs of thought, tool usage); develop smart early stopping and difficulty-aware budgeting; extend to domains lacking clean verifiers; combine with SFT as injection-plus-activation pipelines.

Why remember this: LIE is a compact, practical idea with big impact: it breaks a fundamental sampling barrier and converts longer chains into deeper exploration. As models increasingly rely on test-time compute rather than just parameter count, methods like LIE will be the bridge that turns ā€˜more thinking’ into ā€˜better answers’ consistently.

Practical Applications

  • •Math tutoring systems that show clearer, longer, and self-checked solutions.
  • •Code assistants that try alternative fixes, verify results, and backtrack from bad patches.
  • •Scientific reasoning helpers that explore multiple hypotheses and cross-check calculations.
  • •Business analytics agents that consider alternative scenarios before recommending decisions.
  • •Legal or policy drafting tools that generate longer arguments with fewer repetitive sections.
  • •Healthcare triage assistants that outline multiple differential diagnoses and verification steps.
  • •Education platforms that teach students how to explore, verify, and backtrack while solving.
  • •Research copilots that maintain high diversity and avoid getting stuck in one approach.
  • •Autonomous planning agents that use extra steps to simulate options without looping.
  • •Interview prep bots that present varied reasoning paths instead of repeating stock answers.
#In-Context Exploration#Test-Time Scaling#Chain-of-Thought#Reinforcement Learning#Count-Based Exploration#State Coverage#Shallow Exploration Trap#GRPO#GSPO#Length-Incentivized Exploration#Redundancy Penalty#State Abstraction#Policy Entropy#Long Sequence Generation#Verifiable Reasoning
Version: 1

Notes

0/2000
Press Cmd+Enter to submit