{
  "id": 581015,
  "title": "135th Place Solution",
  "content": "<h1>135th Place Solution</h1>\n<p>First of all, I’d like to express my gratitude to my teammates ( <a href=\"https://www.kaggle.com/kazukishida\" target=\"_blank\">@kazukishida</a> , <a href=\"https://www.kaggle.com/nozomiyamamoto\" target=\"_blank\">@nozomiyamamoto</a> ), Kaggle, and everyone who participated in this competition. Special thanks to <a href=\"https://www.kaggle.com/richolson\" target=\"_blank\">@richolson</a> for releasing such an excellent starter notebook!</p>\n<p>The three of us on the team have been friends for a long time, and after <a href=\"https://www.kaggle.com/competitions/konwinski-prize/discussion/568799\" target=\"_blank\">placing 4th on the public leaderboard in the <strong>Konwinski Prize</strong> competition</a> (private results will be announced on June 12), we joined this competition right afterward.</p>\n<hr>\n<h1>1. Validation Strategy</h1>\n<h2>1.1. Dataset Creation</h2>\n<p>Since the provided training dataset included only 15 samples, we needed to create our own dataset.<br>\nWe followed the steps below:</p>\n<ol>\n<li>Generated approximately 2,400 new descriptions using AI, covering landscape, abstract, and fashion categories.</li>\n<li>Selected 268 instances as a validation set.</li>\n<li>The rest of the instances, including the unused ones, were used to train a category classification machine learning model (described later).</li>\n</ol>\n<h2>1.2. Additional Categories</h2>\n<p>Based on our judgment, we believe the following list covers most relevant categories:</p>\n<pre><code>categories: [] = [\n    ,\n    ,\n    ,\n    ,\n    ,\n    ,\n    ,\n    ,\n    ,\n    ,\n    ,\n    ,\n    ,\n    ,\n    ,\n    ,\n    ,\n    ,\n    ,\n    ,\n    ,\n    ,\n    ,\n    ,\n]\n</code></pre>\n<p>To ensure completeness and avoid category omissions, we used the <a href=\"https://www.kaggle.com/competitions/llm-20-questions/discussion/529525\" target=\"_blank\"><strong>LLM 20 Questions</strong> solution</a>.</p>\n<h2>1.3. Category Classification Model</h2>\n<p>While we brainstormed many possible categories, we concluded that it was not necessary to cover every possible category exhaustively.<br>\nThe key was to design an algorithm that performs well on the distribution of the dataset.</p>\n<p>So we built a <strong>3-class classification model</strong> for the categories <em>landscape</em>, <em>abstract</em>, and <em>fashion</em>, and split our dataset into landscape-like, abstract-like, and fashion-like subsets.<br>\nWe then fine-tuned generation parameters for each subset.<br>\nOne of our final submissions also included an <em>animals-like</em> category.</p>\n<hr>\n<h1>2. Modeling</h1>\n<p>We tried various models from the list shared by <a href=\"https://www.kaggle.com/kawchar85\" target=\"_blank\">@kawchar85</a> and selected <strong>SDXL Turbo</strong>, a high-performance model with fast inference time.</p>\n<p>For the scheduler, we adopted <strong>HeunDiscreteScheduler</strong>, which performed best both in CV and on the leaderboard.</p>\n<p>Each of the categories — <em>landscape-like</em>, <em>abstract-like</em>, <em>fashion-like</em>, and <em>animal-like</em> (or <em>landscape/abstract/fashion</em> in another final submission) — used the following parameter configurations:</p>\n<table>\n<thead>\n<tr>\n<th>Category</th>\n<th>Image Size</th>\n<th>num_colors</th>\n<th>ignore_area_threshold</th>\n<th>guidance_scale</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>landscape-like</td>\n<td>512</td>\n<td>12 or 9</td>\n<td>65 or 55</td>\n<td>5 or 20</td>\n</tr>\n<tr>\n<td>abstract-like</td>\n<td>384</td>\n<td>10 or 9</td>\n<td>55 or 55</td>\n<td>5 or 20</td>\n</tr>\n<tr>\n<td>fashion-like</td>\n<td>384</td>\n<td>8 or 9</td>\n<td>60 or 55</td>\n<td>5 or 20</td>\n</tr>\n<tr>\n<td>animal-like</td>\n<td>384</td>\n<td>9</td>\n<td>65</td>\n<td>5</td>\n</tr>\n</tbody>\n</table>\n<p>Common parameters across all categories:</p>\n<pre><code>num_attempts_per_description:  = \nnum_inference_steps:  = \nprompt_prefix:  = \nprompt_suffix:  = \nnegative_prompt:  = \n</code></pre>\n<hr>\n<h1>3. OCR Hallucination Mitigation</h1>\n<p>Initially, we experimented with adding various short text snippets to reduce hallucination, which showed some effect.<br>\nHowever, the OCR hallucination prevention function published by <a href=\"https://www.kaggle.com/richolson\" target=\"_blank\">@richolson</a> was excellent, so we adopted it.</p>\n<p>To reduce the number of online evaluations, we only ran OCR evaluations on top candidate SVGs ranked by metrics, instead of evaluating all of them.<br>\nThis allowed us to maintain quality while significantly reducing evaluation calls.</p>\n<p>Observation: In online evaluation, if an SVG was flagged for OCR hallucination, it typically was in the final evaluation as well.<br>\nHowever, there were rare cases where an SVG passed the online test but still failed in the final evaluation.</p>\n<hr>\n<h1>4. Pseudo-VQA</h1>\n<p>We tried to simulate VQA evaluation using AI, inspired by the provided dataset of questions, choices, and answers.<br>\nWe generated 417 questions and evaluated them to find the combinations with the highest correlation to the true VQA.</p>\n<p>The final selected 3 questions were:</p>\n<pre><code>questions.append()\nchoices_list.append()\nanswers.append()\n\nquestions.append()\nchoices_list.append()\nanswers.append()\n\nquestions.append()\nchoices_list.append()\nanswers.append()\n</code></pre>\n<p>We used the following weights for scoring: <strong>[0.50, 0.29, 0.21]</strong>.</p>\n<hr>\n<h1>5. What Didn’t Work</h1>\n<ul>\n<li>Applying various geometric transformations to the inferred SVGs and selecting based on improved scores</li>\n<li>Selecting pseudo-VQA questions tailored for each category</li>\n<li>Calibrating the mean and variance of pseudo-VQA scores to match the real VQA distribution</li>\n<li>:</li>\n</ul>",
  "comments": [
    {
      "id": 3210966,
      "author_name": "Zhuang Jia",
      "author_url": "",
      "post_date": "2025-05-28T01:10:45.977000",
      "content": "<p>Congratulations, this is a very systematic plan. I've learned a lot from it.</p>",
      "votes": 2,
      "replies": []
    }
  ],
  "comment_count": 1,
  "messages": [
    {
      "id": 3210951,
      "postDate": "2025-05-28T00:34:09.113Z",
      "content": "<h1>135th Place Solution</h1>\n<p>First of all, I’d like to express my gratitude to my teammates ( <a href=\"https://www.kaggle.com/kazukishida\" target=\"_blank\">@kazukishida</a> , <a href=\"https://www.kaggle.com/nozomiyamamoto\" target=\"_blank\">@nozomiyamamoto</a> ), Kaggle, and everyone who participated in this competition. Special thanks to <a href=\"https://www.kaggle.com/richolson\" target=\"_blank\">@richolson</a> for releasing such an excellent starter notebook!</p>\n<p>The three of us on the team have been friends for a long time, and after <a href=\"https://www.kaggle.com/competitions/konwinski-prize/discussion/568799\" target=\"_blank\">placing 4th on the public leaderboard in the <strong>Konwinski Prize</strong> competition</a> (private results will be announced on June 12), we joined this competition right afterward.</p>\n<hr>\n<h1>1. Validation Strategy</h1>\n<h2>1.1. Dataset Creation</h2>\n<p>Since the provided training dataset included only 15 samples, we needed to create our own dataset.<br>\nWe followed the steps below:</p>\n<ol>\n<li>Generated approximately 2,400 new descriptions using AI, covering landscape, abstract, and fashion categories.</li>\n<li>Selected 268 instances as a validation set.</li>\n<li>The rest of the instances, including the unused ones, were used to train a category classification machine learning model (described later).</li>\n</ol>\n<h2>1.2. Additional Categories</h2>\n<p>Based on our judgment, we believe the following list covers most relevant categories:</p>\n<pre><code>categories: [] = [\n    ,\n    ,\n    ,\n    ,\n    ,\n    ,\n    ,\n    ,\n    ,\n    ,\n    ,\n    ,\n    ,\n    ,\n    ,\n    ,\n    ,\n    ,\n    ,\n    ,\n    ,\n    ,\n    ,\n    ,\n]\n</code></pre>\n<p>To ensure completeness and avoid category omissions, we used the <a href=\"https://www.kaggle.com/competitions/llm-20-questions/discussion/529525\" target=\"_blank\"><strong>LLM 20 Questions</strong> solution</a>.</p>\n<h2>1.3. Category Classification Model</h2>\n<p>While we brainstormed many possible categories, we concluded that it was not necessary to cover every possible category exhaustively.<br>\nThe key was to design an algorithm that performs well on the distribution of the dataset.</p>\n<p>So we built a <strong>3-class classification model</strong> for the categories <em>landscape</em>, <em>abstract</em>, and <em>fashion</em>, and split our dataset into landscape-like, abstract-like, and fashion-like subsets.<br>\nWe then fine-tuned generation parameters for each subset.<br>\nOne of our final submissions also included an <em>animals-like</em> category.</p>\n<hr>\n<h1>2. Modeling</h1>\n<p>We tried various models from the list shared by <a href=\"https://www.kaggle.com/kawchar85\" target=\"_blank\">@kawchar85</a> and selected <strong>SDXL Turbo</strong>, a high-performance model with fast inference time.</p>\n<p>For the scheduler, we adopted <strong>HeunDiscreteScheduler</strong>, which performed best both in CV and on the leaderboard.</p>\n<p>Each of the categories — <em>landscape-like</em>, <em>abstract-like</em>, <em>fashion-like</em>, and <em>animal-like</em> (or <em>landscape/abstract/fashion</em> in another final submission) — used the following parameter configurations:</p>\n<table>\n<thead>\n<tr>\n<th>Category</th>\n<th>Image Size</th>\n<th>num_colors</th>\n<th>ignore_area_threshold</th>\n<th>guidance_scale</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>landscape-like</td>\n<td>512</td>\n<td>12 or 9</td>\n<td>65 or 55</td>\n<td>5 or 20</td>\n</tr>\n<tr>\n<td>abstract-like</td>\n<td>384</td>\n<td>10 or 9</td>\n<td>55 or 55</td>\n<td>5 or 20</td>\n</tr>\n<tr>\n<td>fashion-like</td>\n<td>384</td>\n<td>8 or 9</td>\n<td>60 or 55</td>\n<td>5 or 20</td>\n</tr>\n<tr>\n<td>animal-like</td>\n<td>384</td>\n<td>9</td>\n<td>65</td>\n<td>5</td>\n</tr>\n</tbody>\n</table>\n<p>Common parameters across all categories:</p>\n<pre><code>num_attempts_per_description:  = \nnum_inference_steps:  = \nprompt_prefix:  = \nprompt_suffix:  = \nnegative_prompt:  = \n</code></pre>\n<hr>\n<h1>3. OCR Hallucination Mitigation</h1>\n<p>Initially, we experimented with adding various short text snippets to reduce hallucination, which showed some effect.<br>\nHowever, the OCR hallucination prevention function published by <a href=\"https://www.kaggle.com/richolson\" target=\"_blank\">@richolson</a> was excellent, so we adopted it.</p>\n<p>To reduce the number of online evaluations, we only ran OCR evaluations on top candidate SVGs ranked by metrics, instead of evaluating all of them.<br>\nThis allowed us to maintain quality while significantly reducing evaluation calls.</p>\n<p>Observation: In online evaluation, if an SVG was flagged for OCR hallucination, it typically was in the final evaluation as well.<br>\nHowever, there were rare cases where an SVG passed the online test but still failed in the final evaluation.</p>\n<hr>\n<h1>4. Pseudo-VQA</h1>\n<p>We tried to simulate VQA evaluation using AI, inspired by the provided dataset of questions, choices, and answers.<br>\nWe generated 417 questions and evaluated them to find the combinations with the highest correlation to the true VQA.</p>\n<p>The final selected 3 questions were:</p>\n<pre><code>questions.append()\nchoices_list.append()\nanswers.append()\n\nquestions.append()\nchoices_list.append()\nanswers.append()\n\nquestions.append()\nchoices_list.append()\nanswers.append()\n</code></pre>\n<p>We used the following weights for scoring: <strong>[0.50, 0.29, 0.21]</strong>.</p>\n<hr>\n<h1>5. What Didn’t Work</h1>\n<ul>\n<li>Applying various geometric transformations to the inferred SVGs and selecting based on improved scores</li>\n<li>Selecting pseudo-VQA questions tailored for each category</li>\n<li>Calibrating the mean and variance of pseudo-VQA scores to match the real VQA distribution</li>\n<li>:</li>\n</ul>",
      "rawMarkdown": "# 135th Place Solution\n\nFirst of all, I’d like to express my gratitude to my teammates ( @kazukishida , @nozomiyamamoto ), Kaggle, and everyone who participated in this competition. Special thanks to @richolson for releasing such an excellent starter notebook!\n\nThe three of us on the team have been friends for a long time, and after [placing 4th on the public leaderboard in the **Konwinski Prize** competition](https://www.kaggle.com/competitions/konwinski-prize/discussion/568799) (private results will be announced on June 12), we joined this competition right afterward.\n\n---\n\n# 1. Validation Strategy\n\n## 1.1. Dataset Creation\n\nSince the provided training dataset included only 15 samples, we needed to create our own dataset.\nWe followed the steps below:\n\n1. Generated approximately 2,400 new descriptions using AI, covering landscape, abstract, and fashion categories.\n2. Selected 268 instances as a validation set.\n3. The rest of the instances, including the unused ones, were used to train a category classification machine learning model (described later).\n\n## 1.2. Additional Categories\n\nBased on our judgment, we believe the following list covers most relevant categories:\n\n```python\ncategories: list[str] = [\n    \"landscapes\",\n    \"abstract\",\n    \"fashion\",\n    \"architecture\",\n    \"leisure\",\n    \"plants\",\n    \"furniture and appliances\",\n    \"food and drinks\",\n    \"sports\",\n    \"vehicles\",\n    \"tools\",\n    \"animals\",\n    \"art\",\n    \"symbols\",\n    \"medical\",\n    \"music\",\n    \"weather\",\n    \"space\",\n    \"nature\",\n    \"graphs\",\n    \"science and technology\",\n    \"fantasy and fiction\",\n    \"products\",\n    \"items\",\n]\n```\n\nTo ensure completeness and avoid category omissions, we used the [**LLM 20 Questions** solution](https://www.kaggle.com/competitions/llm-20-questions/discussion/529525).\n\n## 1.3. Category Classification Model\n\nWhile we brainstormed many possible categories, we concluded that it was not necessary to cover every possible category exhaustively.\nThe key was to design an algorithm that performs well on the distribution of the dataset.\n\nSo we built a **3-class classification model** for the categories *landscape*, *abstract*, and *fashion*, and split our dataset into landscape-like, abstract-like, and fashion-like subsets.\nWe then fine-tuned generation parameters for each subset.\nOne of our final submissions also included an *animals-like* category.\n\n---\n\n# 2. Modeling\n\nWe tried various models from the list shared by @kawchar85 and selected **SDXL Turbo**, a high-performance model with fast inference time.\n\nFor the scheduler, we adopted **HeunDiscreteScheduler**, which performed best both in CV and on the leaderboard.\n\nEach of the categories — *landscape-like*, *abstract-like*, *fashion-like*, and *animal-like* (or *landscape/abstract/fashion* in another final submission) — used the following parameter configurations:\n\n| Category       | Image Size | num\\_colors | ignore\\_area\\_threshold | guidance\\_scale |\n| -------------- | ---------- | ----------- | ----------------------- | --------------- |\n| landscape-like | 512        | 12 or 9          | 65 or 55                       | 5 or 20               |\n| abstract-like  | 384        | 10 or 9          | 55 or 55                      | 5 or 20               |\n| fashion-like   | 384        | 8 or 9           | 60 or 55                      | 5 or 20              |\n| animal-like    | 384        | 9           | 65                      | 5         |\n\nCommon parameters across all categories:\n\n```python\nnum_attempts_per_description: int = 3\nnum_inference_steps: int = 24\nprompt_prefix: str = 'Clean vector art of '\nprompt_suffix: str = ', smooth curves, solid fills, scalable design, minimal anchor points'\nnegative_prompt: str = 'lines, framing, hatching, background, textures, patterns, details, outlines'\n```\n\n---\n\n# 3. OCR Hallucination Mitigation\n\nInitially, we experimented with adding various short text snippets to reduce hallucination, which showed some effect.\nHowever, the OCR hallucination prevention function published by @richolson was excellent, so we adopted it.\n\nTo reduce the number of online evaluations, we only ran OCR evaluations on top candidate SVGs ranked by metrics, instead of evaluating all of them.\nThis allowed us to maintain quality while significantly reducing evaluation calls.\n\nObservation: In online evaluation, if an SVG was flagged for OCR hallucination, it typically was in the final evaluation as well.\nHowever, there were rare cases where an SVG passed the online test but still failed in the final evaluation.\n\n---\n\n# 4. Pseudo-VQA\n\nWe tried to simulate VQA evaluation using AI, inspired by the provided dataset of questions, choices, and answers.\nWe generated 417 questions and evaluated them to find the combinations with the highest correlation to the true VQA.\n\nThe final selected 3 questions were:\n\n```python\nquestions.append(f\"How relevant is the image content to the description '{description}'?\")\nchoices_list.append(\"[not relevant, somewhat relevant, highly relevant, perfectly relevant]\")\nanswers.append(\"perfectly relevant\")\n\nquestions.append(f\"Is '{description}' presented without irrelevant details?\")\nchoices_list.append(\"[yes, somewhat, no]\")\nanswers.append(\"yes\")\n\nquestions.append(f\"Does '{description}' clearly communicate the intended theme visually?\")\nchoices_list.append(\"[yes, somewhat, no]\")\nanswers.append(\"yes\")\n```\n\nWe used the following weights for scoring: **\\[0.50, 0.29, 0.21]**.\n\n---\n\n# 5. What Didn’t Work\n\n* Applying various geometric transformations to the inferred SVGs and selecting based on improved scores\n* Selecting pseudo-VQA questions tailored for each category\n* Calibrating the mean and variance of pseudo-VQA scores to match the real VQA distribution\n* :\n",
      "votes": 16
    },
    {
      "id": 3210966,
      "postDate": "2025-05-28T01:10:45.977Z",
      "content": "<p>Congratulations, this is a very systematic plan. I've learned a lot from it.</p>",
      "rawMarkdown": "Congratulations, this is a very systematic plan. I've learned a lot from it.",
      "votes": 2
    }
  ],
  "complete": true,
  "source": "live",
  "fetched_at": "2026-10-20T09:07:41Z",
  "competition_id": 89659,
  "competition_slug": "drawing-with-llms",
  "team_id": 13419140,
  "solution_url": "/competitions/drawing-with-llms/writeups/graphninjas-135th-place-solution"
}