2025년 1월 24일
The Thought Process Behind Kimi k1.5
(Flood Sung)
Kimi 1.5를 구축하는 과정 중에 있었던 사고의 흐름에 대한 소개. 아주 명쾌합니다.
모델이 스스로 탐색할 수 있게 하는 것이 필요하다.
모델의 사고 과정에 구조를 부여해서는 안 된다. MCTS도 하나의 구조이니 답이 아니다. 에전트 워크플로 같은 것도 물론.
부정확한 Reward Model이 아니라 정확한 보상이 필요하다. 따라서 정답이 있는 문제에 집중해야 한다.
모델이 스스로 반성하고 실수를 고칠 수 있다면 사고 과정에서 실수를 저지르는 것은 큰 문가 아니다. 오히려 도움이 될 수도 있다.
따라서 정답으로 이어진다면 무엇이든 (실수였더라도) 좋고 오답으로 이어진다면 무엇이든 (좋은 착안이었더라도) 좋지 않다.
사고 과정에 대해 일정한 단계와 같은 구조를 부여하는 것은 쉽지 않다. 실수 이후에 그 실수를 교정할 수 있는 상황에서 각 단계에 대해 정확한 Value를 추정하는 것은 어렵다. 따라서 Value 함수도 Process Reward도 적절하지 않다.
이제 Contextual Bandit 문제가 된다. 그런데 모델이 어떻게 더 긴 CoT를 생성하도록 할 것인가? 모델이 학습 과정에서 성능이 향상되면서 모델이 생성하는 CoT의 길이는 자연스럽게 길어진다.
측정 가능한 목표, 탐색, 그리고 RL을 통한 학습이 주어지면 이제 모델은 수많은 문제를 풀어낼 수 있다.
추론이라고 부를 수도 Inference time Scaling이라고 부를 수도 있겠지만 본질적으로는 결과를 기반으로 대규모 RL을 했을 때 나타나는 창발적인 현상이라는 것. 과정이 어떠해야 하는가를 기술하는 대신 모델이 그것을 스스로 찾게 해야 한다는 딥 러닝의 사고방식으로 다시 돌아가야 하는 순간이 아닐까 싶습니다.
An explanation of the thought process during Kimi 1.5 model development. It is very clear.
Model need to be able to search on their own.
We shoud avoid imposing structure on the model's thinking process. MCTS itself is a structure, so it is not a solution. The same applies to agentic workflows.
We need accurate rewards, not inaccurate one from reward models. Therefore, we should focus on problems with clear solutions.
If model can reflect and correct its own mistakes, making errors during the thinking process isn't problematic. It might even be beneficial.
Therefore, anything leading to correct answers (even if through mistakes) is good; anything leading to incorrect answers (even if through good insights) is not.
It's difficult to impose a structured steps to thinking processes. When mistakes can be corrected later, accurately estimating the value of each step becomes challenging. Thus, neither value functions nor process rewards are appropriate.
This ultimately becomes a contextual bandit problem. But how do we get models to generate longer CoT? Interestingly, as models improve during the training, the length of CoT naturally increases.
With Measurable objectives, exploration, and RL-based learning, models can solve a wide variety of problems.
Whether we call it reasoning or inference-time scaling, it's essentially an emergent phenomenon arising from large-scale RL training based on outcomes. Perhaps it's time to return to fundamental principle of deep learning that letting model discover their own processes rather than specifying them directly.
#reasoning #rl
Can We Generate Images with CoT? Let's Verify and Reinforce Image Generation Step by Step
(Ziyu Guo, Renrui Zhang, Chengzhuo Tong, Zhizheng Zhao, Peng Gao, Hongsheng Li, Pheng-Ann Heng)
Chain-of-Thought (CoT) reasoning has been extensively explored in large models to tackle complex understanding tasks. However, it still remains an open question whether such strategies can be applied to verifying and reinforcing image generation scenarios. In this paper, we provide the first comprehensive investigation of the potential of CoT reasoning to enhance autoregressive image generation. We focus on three techniques: scaling test-time computation for verification, aligning model preferences with Direct Preference Optimization (DPO), and integrating these techniques for complementary effects. Our results demonstrate that these approaches can be effectively adapted and combined to significantly improve image generation performance. Furthermore, given the pivotal role of reward models in our findings, we propose the Potential Assessment Reward Model (PARM) and PARM++, specialized for autoregressive image generation. PARM adaptively assesses each generation step through a potential assessment approach, merging the strengths of existing reward models, and PARM++ further introduces a reflection mechanism to self-correct the generated unsatisfactory image. Using our investigated reasoning strategies, we enhance a baseline model, Show-o, to achieve superior results, with a significant +24% improvement on the GenEval benchmark, surpassing Stable Diffusion 3 by +15%. We hope our study provides unique insights and paves a new path for integrating CoT reasoning with autoregressive image generation. Code and models are released at https://github.com/ZiyuGuo99/Image-Generation-CoT
Autoregressive Image Generation에서 생성 과정 중에 Reward Model을 통한 탐색이 가능한가에 대한 연구. Diffusion의 Inference Time Scaling (https://arxiv.org/abs/2501.09732) 연구와 비슷한 점이 있습니다. 여기서는 Masked Token Prediction을 사용하기에 생성 초반에도 Process Reward를 적용할 수 있는지 테스트했는데 아무래도 초기에는 이미지 상태가 좋지 않으니 이점이 없었다고 하네요. 이를 위한 방법을 설계했습니다.
This study investigates whether it's possible to use a reward model for search during the generation process in autoregressive image generation. It's similar to research on inference time scaling for diffusion models (https://arxiv.org/abs/2501.09732). Since this study uses masked token prediction, they tested whether process rewards could be applied in the early stages of generation. However, they found that it wasn't beneficial in the initial stages due to the low quality of early generated images. They designed a method to address this issue.
#inference-time-scaling #reward-model #autoregressive-model